Changeset 986

Show
Ignore:
Timestamp:
04/13/08 16:20:55 (9 months ago)
Author:
daamien
Message:

1ere tard, à relire

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • traduc/trunk/slony/partitioning.xml

    r901 r986  
    66 
    77<sect1 id="partitioning"> 
    8 <title>Partitioning Support </title> 
    9 <indexterm><primary>partitioning</primary></indexterm> 
     8<title>Support du partitionnement </title> 
     9<indexterm><primary>partitionnement</primary></indexterm> 
    1010 
    11 <para> &slony1; does not directly provide support for the &postgres; 
    12 methodology of partitioning via inheritance, but it does not, by the 
    13 same token, prevent the Gentle User from using that sort of 
    14 replication scheme, and then replicating the underlying 
    15 tables. </para> 
     11<para> &slony1; ne supporte pas directement la méthode de partitionnement 
     12  par héritage de &postgres;, cependant il n'empêche pas non plus les 
     13  utilisateur de répliquer de tels héritages et ainsi que les tables  
     14  qui y sont associées.</para> 
    1615 
    17 <para> One of the tests in the <xref linkend="testbed"/>, called 
    18 <filename>testinherit</filename>, tests that &slony1; behaves as 
    19 expected to replicate data across partitions.  This test creates a 
    20 master <envar>sales_data</envar> table, from which various children 
    21 inherit: </para> 
     16<para> Un des tests du <xref linkend="testbed"/>, appelé  
     17<filename>testinherit</filename>, vérifie que &slony1; se comporte 
     18comme prévu lors de la réplication de données partitionnées. Ce test 
     19crée une table maître <envar>sales_data</envar> dont plusieurs tables filles héritent : </para> 
    2220 
    2321<itemizedlist> 
     
    2725</itemizedlist> 
    2826 
    29 <para> The example is somewhat simplistic as it only provides rules to 
    30 handle initial insertion into the respective partitions; it does not 
    31 then support allowing tuples to migrate from partition to partition if 
    32 they are altered via an <COMMAND>UPDATE</COMMAND> statement.  On the 
    33 other hand, unlike with many partitioning cases, this one permits the 
    34 <quote>parent</quote> table to contain tuples. </para> 
     27<para> Cet exemple est un peu simpliste car il fournit uniquement des rÚgles 
     28  d'insertion dans les différentes partitions; il ne permet pas de migrer des  
     29  tuples d'une partition à une autre si ils sont modifiés via une commande  
     30  <COMMAND>UPDATE</COMMAND> statement.  D'un autre coté, à la différence de  
     31  de beaucoup de partitionnement, celui-ci permet à la table <quote>parente</quote> 
     32  de contenir des tuples. </para> 
    3533 
    36 <para> Things worth observing include:</para> 
     34<para> On peut remarquer quelques points intéressants :</para> 
    3735 
    3836<itemizedlist> 
    39 <listitem><para> Each partition table must be added to replication individually. </para> </listitem> 
    40 <listitem><para> &slony1; is not aware of the relationship between partitions; it simply regards them as a series of individual tables. </para> </listitem> 
     37<listitem><para> Chaque table de partition doit être ajoutée à la réplication individuellement. </para> </listitem> 
     38<listitem><para> &slony1; n'est pas conscient des relations entre les tables de partition; il les considÚre comme 
     39    une série de tables indépendantes. </para> </listitem> 
    4140</itemizedlist> 
    4241 
    4342 
    44 <sect2><title> Support for Dynamic Partition Addition</title> 
     43<sect2><title> Support de l'ajout dynamique de partition</title> 
    4544 
    46 <para> One common <quote>use case</quote> of replication is to 
    47 partition large data sets based on time period, whether weekly
    48 monthly, quarterly, or annually, where there is therefore a need to 
    49 periodically add a new partition. </para> 
     45<para> Un <quote>cas d'utilisation</quote> fréquent de la réplication consiste  
     46  à partitionner de large ensemble de données selon un critÚre temporel : la semaine
     47  le moins, le trimestre ou l'année, ce qui implique par conséquent l'ajout périodique 
     48  d'une nouvelle partition. </para> 
    5049 
    51 <para> The traditional approach taken to this in &slony1; would be the 
    52 following: </para> 
     50<para> L'approche traditionnelle pour effectuer cela avec &slony1; est la suivante : </para> 
    5351 
    5452<itemizedlist> 
    55 <listitem><para> <xref linkend="stmtddlscript"/> to add the new partition(s) on each node </para> </listitem> 
    56 <listitem><para> <xref linkend="stmtcreateset"/> to create a temporary replication set </para> </listitem> 
    57 <listitem><para> <xref linkend="stmtsetaddtable"/> to add the table(s) to that set </para> </listitem> 
    58 <listitem><para> <xref linkend="stmtsubscribeset"/>, once for each subscriber node, to set up replication of the table on each node </para> </listitem> 
    59 <listitem><para> <xref linkend="stmtmergeset"/>, once subscriptions are running, to eliminate the temporary set </para> </listitem> 
     53<listitem><para> <xref linkend="stmtddlscript"/> pour ajouter la nouvelle table de partition sur chaque noeud</para> </listitem> 
     54<listitem><para> <xref linkend="stmtcreateset"/> pour créer un ensemble de réplication temporaire </para> </listitem> 
     55<listitem><para> <xref linkend="stmtsetaddtable"/> pour ajouter la table dans cet ensemble </para> </listitem> 
     56<listitem><para> <xref linkend="stmtsubscribeset"/>, une fois pour chaque noeud abonné, afin de mettre en place 
     57    la réplication sur chaque noeud </para> </listitem> 
     58<listitem><para> <xref linkend="stmtmergeset"/>, une fois que la réplication fonctionne, afin de supprimer  
     59    l'ensemble de réplication temporaire </para> </listitem> 
    6060</itemizedlist> 
    6161 
    62 <para> In view of the fact that we can be certain that a 
    63 thus-far-unused partition will be empty, we offer an alternative 
    64 mechanism which evades the need to create extra replication sets and 
    65 the need to submit multiple <xref linkend="stmtsubscribeset"/> 
    66 requests.  The alternative is as follows; we use <xref 
    67 linkend="stmtddlscript"/>, extending the DDL script thus: </para> 
     62<para> Sachant qu'il y a de fortes chances pour que la nouvelle partition soit vide, 
     63  il existe un mécanisme alternatif qui évite de créer un ensemble de réplication 
     64  supplémentaire et l'utilisation de multiples requêtes <xref linkend="stmtsubscribeset"/> 
     65  Cette alternative est la suivante : on utilise le script  <xref 
     66linkend="stmtddlscript"/>, pour effectuer le script DDL suivant : </para> 
    6867 
    6968<itemizedlist> 
    70 <listitem><para> Add the new partition(s) on each node </para> </listitem> 
    71 <listitem><para> Run a &slony1; stored function to mark the new partition as being a replicated table </para>  
     69<listitem><para> Ajouter la nouvelle partition sur chaque noeud </para> </listitem> 
     70<listitem><para> Exécuter les fonction stockées pour inscrire la nouvelle partition dans l'ensemble de réplication.</para>  
    7271 
    73 <para> On the origin node, if the table is found to have tuples in it
    74 the DDL script will be aborted, as the precondition that it be empty 
    75 has been violated. </para>  
     72<para> Sur le noeud d'origine, si la table de partitionnement contient des tuples
     73 le script DDL s'arrêtera car le fait que la table soit vide est une condition qui ne  
     74 peut pas être violée. </para>  
    7675 
    77 <para> On subscriber nodes, we may safely <command>TRUNCATE</command> the new table. </para> 
     76<para> Sur les noeuds abonnés, on peut effectuer sans danger un <command>TRUNCATE</command> sur la nouvelle table. </para> 
    7877</listitem> 
    7978</itemizedlist> 
    8079 
    81 <para> There are several stored functions provided to support this; 
    82 the Gentle User may use whichever seems preferable.  The <quote>base 
    83 function</quote> is <function>add_empty_table_to_replication()</function>; the others 
    84 provide additional structure and validation of the arguments </para> 
     80<para> Il existe plusieurs fonctions qui prennent en charge cela : 
     81  L'utilisateur peut utiliser celle qu'il préfÚre. La <quote> fonction de  
     82base </quote> est <function>add_empty_table_to_replication()</function>; les  
     83autres disposent d'arguments supplémentaires ou différents</para> 
    8584 
    8685<itemizedlist> 
    8786<listitem><para> <function> add_empty_table_to_replication (set_id, tab_id, nspname, tabname, idxname, comment);</function> </para>  
    8887 
    89 <para> This is the <quote>base</quote> function; you must specify the 
    90 set ID, table ID, namespace name, table name, index name, and a 
    91 comment, and this table will be added to replication. </para> 
     88<para> Ceci est la fonction de <quote>base</quote>; vous devez spécifier 
     89  l'identifiant de l'ensemble (set_id), l'identifiant de la table (tab_id), 
     90  l'espace de nom (nspname), le nom de la table(tabname), le nom de l'index (idxname)  
     91  et un commentaire (comment) . La table sera alors ajouté dans la réplication. </para> 
    9292 
    93 <para> Note that the index name is optional; if NULL, the function 
    94 will look up the primary key for the table, assuming one exists, and 
    95 fail if it does not exist. </para> 
     93<para> Notez que le nom d'index est optionnel; si la valeur est NULL, alors 
     94  la fonction utilisera la clé primaire de la table, en supposant qu'il en existe une. 
     95  La fonction échouera s'il n'existe pas de clé primaire. </para> 
    9696 
    9797</listitem> 
     
    9999<listitem><para> <function> replicate_partition(tab_id, nspname, tabname, idxname, comment); </function> </para>  
    100100 
    101 <para> If it is known that the table to be replicated inherits from a 
    102 replicated parent table, then this function can draw set and origin 
    103 information from that parent table.  </para> 
    104  
     101<para> Si l'on sait que la table qui doit être répliquée hérite d'une table mÚre  
     102  répliquée elle-aussi, alors cette fonction peut récupérer les informations sur  
     103  l'ensemble de réplication et l'origine à partir de la table mÚre. 
    105104</listitem> 
    106105</itemizedlist> 
    107106 
    108107 
    109 <note><para> As has been observed previously, &slony1; is unaware that 
    110 tables are partitioned.  Therefore, this approach may also be used 
    111 with confidence to add any table to replication that is known to be 
    112 empty. </para> </note> 
     108<note><para> Comme il a été remarqué précédemment, &slony1; n'est pas conscient 
     109    que les tables sont partitionnées. Ainsi, cette approche peut être utilisée 
     110    pour ajouter une table vide dans la réplication. </para> </note> 
    113111</sect2> 
    114112