summaryrefslogtreecommitdiff
path: root/doc/src/sgml/pgxcddl.sgml
blob: 2afe06fb9dab894980feefe049dec08842d7629c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<sect1 id="pgxcddl" xreflabel="pgxcddl">

<title>pgxc_ddl</title>

 <indexterm zone="pgxcddl">
  <primary>pgxc_ddl</primary>
 </indexterm>

 <sect2>
  <title>
   Overview
  </title>

  <para>
   pgxc_ddl is a module for Coordinator catalog table synchronization.
   It has the following syntax.

<programlisting>
pgxc_ddl <optional> <replaceable>option</> </optional>
</programlisting>
  </para>

  <para>
   pgxc_ddl is used to synchronize all Coordinator catalog tables from one
   chosen by a user. It is also possible to launch a DDL on one Coordinator,
   and then to synchronize all Coordinator catalog tables from the catalog
   table of the Coordinator having received the DDL. The copy method is "cold".
   All Coordinators are stopped, catalog files are copied, then all
   Coordinators are restarted.
  </para>

  <para>
   This utility is not really needed in  <productname>Postgres-XL</productname>; DDL is
   synchronized automatically on all the nodes of the
   cluster. 
  </para>

 </sect2>

 <sect2>
  <title>Options</title>

  <para>
   Options are specified with preceding '<literal>-</literal>', each
   option may be associated with a value.
  </para>

  <para>
   Options are as follows:
  </para>

  <para>
   <variablelist>
    <varlistentry>
     <term><option>-D</option></term>
     <listitem>
      <para>
       Specify <filename>pgxc.conf</filename> folder, for
       characteristics of all the Coordinators.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-l</option></term>
     <listitem>
      <para>
       Specify application folder, in case <varname>PATH</varname> is not defined.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-f</option></term>
     <listitem>
      <para>
       Specify DDL file location.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-d</option></term>
     <listitem>
      <para>
       Database name.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-n</option></term>
     <listitem>
      <para>
       Coordinator number. Coordinator chosen corresponds to the one
       defined in <filename>pgxc.conf</filename> at the nth place.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-t</option></term>
     <listitem>
      <para>
       Specify temporary folder where to copy the configuration files
       <filename>postgresql.conf</filename> and <filename>pg_hba.conf</filename>
       for each Coordinator.
      </para>
     </listitem>
    </varlistentry>

   </variablelist>
  </para>

  <para>
   Because <command>pgxc_ddl</command> requires access to the Coordinator
   configuration file and data folders, the following parameters have to be set
   in <filename>pgxc.conf</filename>:
  </para>

  <table>
   <title><filename>pgxc.conf</filename> entries</title>

   <tgroup cols="3">
    <thead>
     <row>
      <entry>Name</entry>
      <entry>Type</entry>
      <entry>Description</entry>
     </row>
    </thead>

    <tbody>
     <row>
      <entry><varname>coordinator_ports</varname></entry>
      <entry>string</entry>
      <entry>
       Specify the port number of all Coordinators. Maintain the order of the
       value as the same as those in coordinator_hosts. It is necessary to
       specify a number of ports equal to the number of hosts. A comma
       separator is also necessary.
      </entry>
     </row>

     <row>
      <entry><varname>coordinator_folders</varname></entry>
      <entry>string</entry>
      <entry>
       Specify the data folders of all Coordinators. Maintain the order of the
       value as the same as those in coordinator_hosts. It is necessary to
       specify a number of data folders equal to the number of hosts. A comma
       separator is also necessary.
      </entry>
     </row>

     <row>
      <entry><varname>coordinator_hosts</varname></entry>
      <entry>string</entry>
      <entry>
       Specify the host name or IP address of the Coordinators. Separate each
       value with comma.
      </entry>
     </row>
    </tbody>
   </tgroup>
  </table>

  <note>
   <para>
    About the temporary folder, this one has the name chosen by the
    user. As an extension name, the PID of the shell script is
    added. This folder is by default in <filename>/tmp</filename>. The user can choose
    the name freely.
   </para>
  </note>

  <note>
   <para>
    Configuration files of Coordinators that have their catalog files changed
    are defined with an extension name postgresql.conf.number, "number" being
    the number of the Coordinator in the order defined in
    <filename>pgxc.conf</filename>.
   </para>
  </note>
 </sect2>
</sect1>