diff options
author | Michael Paquier | 2012-05-31 04:30:20 +0000 |
---|---|---|
committer | Michael Paquier | 2012-05-31 04:33:08 +0000 |
commit | af488de7241de630c68c2f8a7a5ec6efb68ad083 (patch) | |
tree | 1b9d6e14f34864e1fb1e49f3faebf8281fe13208 | |
parent | 68032614b0a99f4b0ba666b52cbbf4dd30566e70 (diff) |
Move pgxc_clean and pgxc_ddl to contrib modules
Both features are not directly related to the core features,
so it is better to move them there.
The installation of pgxc_clean can be done with the same way as
a normal contrib module. pgxc_ddl is not installed by default,
but is kept for future developments.
Documentation is moved the same way.
-rw-r--r-- | contrib/Makefile | 1 | ||||
-rw-r--r-- | contrib/pgxc_clean/Makefile | 34 | ||||
-rw-r--r-- | contrib/pgxc_clean/pgxc_clean.c (renamed from src/pgxc/bin/pgxc_clean/pgxc_clean.c) | 0 | ||||
-rw-r--r-- | contrib/pgxc_clean/pgxc_clean.h (renamed from src/pgxc/bin/pgxc_clean/pgxc_clean.h) | 0 | ||||
-rw-r--r-- | contrib/pgxc_clean/pgxc_clean_test.sh (renamed from src/pgxc/bin/pgxc_clean/pgxc_clean_test.sh) | 0 | ||||
-rw-r--r-- | contrib/pgxc_clean/txninfo.c (renamed from src/pgxc/bin/pgxc_clean/txninfo.c) | 0 | ||||
-rw-r--r-- | contrib/pgxc_clean/txninfo.h (renamed from src/pgxc/bin/pgxc_clean/txninfo.h) | 0 | ||||
-rw-r--r-- | contrib/pgxc_ddl/README (renamed from src/pgxc/bin/pgxc_ddl/README) | 0 | ||||
-rw-r--r-- | contrib/pgxc_ddl/pgxc.conf.sample (renamed from src/pgxc/bin/pgxc_ddl/pgxc.conf.sample) | 0 | ||||
-rw-r--r-- | contrib/pgxc_ddl/pgxc_ddl (renamed from src/pgxc/bin/pgxc_ddl/pgxc_ddl) | 0 | ||||
-rw-r--r-- | doc-xc/src/sgml/contrib.sgmlin | 4 | ||||
-rw-r--r-- | doc-xc/src/sgml/filelist.sgmlin | 2 | ||||
-rw-r--r-- | doc-xc/src/sgml/installation.sgmlin | 2 | ||||
-rw-r--r-- | doc-xc/src/sgml/pgxcclean.sgmlin (renamed from doc-xc/src/sgml/ref/pgxc_clean-ref.sgmlin) | 57 | ||||
-rw-r--r-- | doc-xc/src/sgml/pgxcddl.sgmlin | 196 | ||||
-rw-r--r-- | doc-xc/src/sgml/ref/allfiles.sgmlin | 4 | ||||
-rw-r--r-- | doc-xc/src/sgml/ref/pgxc_ddl.sgmlin | 313 | ||||
-rw-r--r-- | doc-xc/src/sgml/reference.sgmlin | 4 | ||||
-rw-r--r-- | src/backend/access/transam/twophase.c | 9 | ||||
-rw-r--r-- | src/backend/pgxc/pool/execRemote.c | 4 | ||||
-rw-r--r-- | src/pgxc/Makefile | 2 | ||||
-rw-r--r-- | src/pgxc/bin/Makefile | 18 | ||||
-rw-r--r-- | src/pgxc/bin/pgxc_clean/Makefile | 43 |
23 files changed, 262 insertions, 431 deletions
diff --git a/contrib/Makefile b/contrib/Makefile index 696776795e..809551a8ca 100644 --- a/contrib/Makefile +++ b/contrib/Makefile @@ -42,6 +42,7 @@ SUBDIRS = \ pgcrypto \ pgrowlocks \ pgstattuple \ + pgxc_clean \ seg \ spi \ tablefunc \ diff --git a/contrib/pgxc_clean/Makefile b/contrib/pgxc_clean/Makefile new file mode 100644 index 0000000000..4938573d35 --- /dev/null +++ b/contrib/pgxc_clean/Makefile @@ -0,0 +1,34 @@ +#------------------------------------------------------------------------- +# +# Makefile for contrib/pgxc_clean +# +# Portions Copyright (c) 2011-2012 Postgres-XC Development Group +# +# $PostgreSQL$ +# +#------------------------------------------------------------------------- + +PGFILEDESC = "pgxc_clean - Abort prepared transaction for a Postgres-XC Coordinator" +PGAPPICON = win32 + +PROGRAM= pgxc_clean +OBJS= pgxc_clean.o txninfo.o + +#Include GTM objects +gtm_builddir = $(top_builddir)/src/gtm +EX_OBJS = $(gtm_builddir)/common/assert.o \ + $(gtm_builddir)/client/libgtmclient.a + +PG_CPPFLAGS = -DFRONTEND -DDLSUFFIX=\"$(DLSUFFIX)\" -I$(srcdir) -I$(libpq_srcdir) +PG_LIBS = $(libpq_pgport) $(PTHREAD_LIBS) + +ifdef USE_PGXS +PG_CONFIG = pg_config +PGXS := $(shell $(PG_CONFIG) --pgxs) +include $(PGXS) +else +subdir = contrib/pgxc_clean +top_builddir = ../.. +include $(top_builddir)/src/Makefile.global +include $(top_srcdir)/contrib/contrib-global.mk +endif diff --git a/src/pgxc/bin/pgxc_clean/pgxc_clean.c b/contrib/pgxc_clean/pgxc_clean.c index c72600d1c5..c72600d1c5 100644 --- a/src/pgxc/bin/pgxc_clean/pgxc_clean.c +++ b/contrib/pgxc_clean/pgxc_clean.c diff --git a/src/pgxc/bin/pgxc_clean/pgxc_clean.h b/contrib/pgxc_clean/pgxc_clean.h index cc3def7c7f..cc3def7c7f 100644 --- a/src/pgxc/bin/pgxc_clean/pgxc_clean.h +++ b/contrib/pgxc_clean/pgxc_clean.h diff --git a/src/pgxc/bin/pgxc_clean/pgxc_clean_test.sh b/contrib/pgxc_clean/pgxc_clean_test.sh index 39c9b98def..39c9b98def 100644 --- a/src/pgxc/bin/pgxc_clean/pgxc_clean_test.sh +++ b/contrib/pgxc_clean/pgxc_clean_test.sh diff --git a/src/pgxc/bin/pgxc_clean/txninfo.c b/contrib/pgxc_clean/txninfo.c index 29a96ea92d..29a96ea92d 100644 --- a/src/pgxc/bin/pgxc_clean/txninfo.c +++ b/contrib/pgxc_clean/txninfo.c diff --git a/src/pgxc/bin/pgxc_clean/txninfo.h b/contrib/pgxc_clean/txninfo.h index 10798712ee..10798712ee 100644 --- a/src/pgxc/bin/pgxc_clean/txninfo.h +++ b/contrib/pgxc_clean/txninfo.h diff --git a/src/pgxc/bin/pgxc_ddl/README b/contrib/pgxc_ddl/README index 0a2c440b44..0a2c440b44 100644 --- a/src/pgxc/bin/pgxc_ddl/README +++ b/contrib/pgxc_ddl/README diff --git a/src/pgxc/bin/pgxc_ddl/pgxc.conf.sample b/contrib/pgxc_ddl/pgxc.conf.sample index 9dcc0c7a2d..9dcc0c7a2d 100644 --- a/src/pgxc/bin/pgxc_ddl/pgxc.conf.sample +++ b/contrib/pgxc_ddl/pgxc.conf.sample diff --git a/src/pgxc/bin/pgxc_ddl/pgxc_ddl b/contrib/pgxc_ddl/pgxc_ddl index b56a8ff86a..b56a8ff86a 100644 --- a/src/pgxc/bin/pgxc_ddl/pgxc_ddl +++ b/contrib/pgxc_ddl/pgxc_ddl diff --git a/doc-xc/src/sgml/contrib.sgmlin b/doc-xc/src/sgml/contrib.sgmlin index bfd6418d84..8cf98b8bf4 100644 --- a/doc-xc/src/sgml/contrib.sgmlin +++ b/doc-xc/src/sgml/contrib.sgmlin @@ -125,6 +125,10 @@ CREATE EXTENSION <replaceable>module_name</> FROM unpackaged; &pgtestfsync; &pgtrgm; &pgupgrade; +<!## XC> + &pgxcclean; + &pgxcddl; +<!## end> &seg; &sepgsql; &contrib-spi; diff --git a/doc-xc/src/sgml/filelist.sgmlin b/doc-xc/src/sgml/filelist.sgmlin index 9ac9817a1e..2b3baa4f75 100644 --- a/doc-xc/src/sgml/filelist.sgmlin +++ b/doc-xc/src/sgml/filelist.sgmlin @@ -137,6 +137,8 @@ <!ENTITY pgtestfsync SYSTEM "pgtestfsync.sgml"> <!ENTITY pgtrgm SYSTEM "pgtrgm.sgml"> <!ENTITY pgupgrade SYSTEM "pgupgrade.sgml"> +<!ENTITY pgxcclean SYSTEM "pgxcclean.sgml"> +<!ENTITY pgxcddl SYSTEM "pgxcddl.sgml"> <!ENTITY seg SYSTEM "seg.sgml"> <!ENTITY contrib-spi SYSTEM "contrib-spi.sgml"> <!ENTITY sepgsql SYSTEM "sepgsql.sgml"> diff --git a/doc-xc/src/sgml/installation.sgmlin b/doc-xc/src/sgml/installation.sgmlin index 40ccd548a2..8e7ec8c70c 100644 --- a/doc-xc/src/sgml/installation.sgmlin +++ b/doc-xc/src/sgml/installation.sgmlin @@ -2217,7 +2217,7 @@ bin/ include/ lib/ share/ <para> For server to run Coordinator or Datanode, or both, you should copy the following files to your - path: <filename>bin/initdb</>, <filename>bin/pgxc_ddl</>, <filename>pgxc_clean</>. + path: <filename>bin/initdb</>. You should also copy everything in <filename>path</> directory to your library search path. </para> diff --git a/doc-xc/src/sgml/ref/pgxc_clean-ref.sgmlin b/doc-xc/src/sgml/pgxcclean.sgmlin index 18638614e3..c4c24ee87d 100644 --- a/doc-xc/src/sgml/ref/pgxc_clean-ref.sgmlin +++ b/doc-xc/src/sgml/pgxcclean.sgmlin @@ -1,52 +1,37 @@ -<!-- -doc/src/sgml/ref/psql-ref.sgml -PostgreSQL documentation ---> - -<refentry id="APP-PGXC-CLEAN"> - <refmeta> - <refentrytitle><application>pgxc_clean</application></refentrytitle> - <manvolnum>1</manvolnum> - <refmiscinfo>Application</refmiscinfo> - </refmeta> - - <refnamediv> - <refname><application>pgxc_clean</application></refname> - <refpurpose> - <productname>Postgres-XC</productname> interactive terminal - </refpurpose> - </refnamediv> - - <indexterm zone="app-pgxc-clean"> +<!-- doc/src/sgml/pgxcclean.sgml --> + +<sect1 id="pgxcclean" xreflabel="pgxcclean"> + +<title>pgxc_clean</title> + + <indexterm zone="pgxcclean"> <primary>pgxc_clean</primary> </indexterm> - <refsynopsisdiv> - <cmdsynopsis> - <command>pgxc_clean</command> - <arg rep="repeat"><replaceable class="parameter">option</replaceable></arg> - <arg><replaceable class="parameter">dbname</replaceable> - <arg><replaceable class="parameter">username</replaceable></arg></arg> - </cmdsynopsis> - </refsynopsisdiv> - - <refsect1> - <title>Description</title> + <sect2> + <title>Overview</title> &xconly; + <para> + pgxc_clean has the following synopsis. +<programlisting> +pgxc_clean <optional> <replaceable>option</> </optional> <optional><replaceable>dbname</><optional><replaceable>username</></optional></optional> +</programlisting> + </para> <para> <application>pgxc_clean</application> is Postgres-XC utility to maintain transaction status after a crash. When some Postgres-XC node crashes and recovers or fails over, commit status of such node may be inconsistent with other nodes. <application>pgxc_clean</application> checks transaction commit status and corrects them. </para> + <para> - You should run this utility against one of the available Coordinators. THe tool cleans up transaction status + You should run this utility against one of the available Coordinators. The tool cleans up transaction status of all the nodes automatically. </para> - </refsect1> + </sect2> - <refsect1 id="R1-APP-PGXC-CLEAN-3"> + <sect2> <title>Options</title> <variablelist> @@ -221,6 +206,6 @@ PostgreSQL documentation </varlistentry> </variablelist> - </refsect1> + </sect2> -</refentry> +</sect1>
\ No newline at end of file diff --git a/doc-xc/src/sgml/pgxcddl.sgmlin b/doc-xc/src/sgml/pgxcddl.sgmlin new file mode 100644 index 0000000000..beb45570b9 --- /dev/null +++ b/doc-xc/src/sgml/pgxcddl.sgmlin @@ -0,0 +1,196 @@ +<!-- doc/src/sgml/pgxcddl.sgml --> + +<sect1 id="pgxcddl" xreflabel="pgxcddl"> + +<title>pgxc_ddl</title> + + <indexterm zone="pgxcddl"> + <primary>pgxc_ddl</primary> + </indexterm> + + <sect2> + <title> + Overview + </title> +&xconly + + <para> + pgxc_ddl is a module for Coordinator catalog table synchronization and DDL treatment module. + It has the following synopsis. + +<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 the Coordinator catalog + tables from the catalog table of the Coordinator having received the + DDL. Copy method is cold. All the Coordinators are stopped, + catalog files are copied, then all the Coordinators are restarted. + </para> + + <para> + Since <productname>Postgres-XC</productname> 0.9.3, DDL are + synchronized automatically on all the nodes of the + cluster, <command>pgxc_ddl</command> is let on purpose of future + feature development. + </para> + + <para> + Since <productname>Postgres-XC</productname> 0.9.4, pgxc_ddl and + pgxc.conf are not anymore installed by default. Scripts are saved + in the folder <filename>contrib/pgxc_ddl</filename>. + </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 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 the Coordinators. Maintain the + order of the value 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 the Coordinators. Maintain the + order of the value 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 Coordinator. 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 t Coordinator in the order defined + in <filename>pgxc.conf</filename>. + </para> + </note> + </sect2> +</sect1> diff --git a/doc-xc/src/sgml/ref/allfiles.sgmlin b/doc-xc/src/sgml/ref/allfiles.sgmlin index 5daf11390a..67479233ad 100644 --- a/doc-xc/src/sgml/ref/allfiles.sgmlin +++ b/doc-xc/src/sgml/ref/allfiles.sgmlin @@ -149,9 +149,6 @@ Complete list of usable sgml source files in this directory. <!ENTITY lock SYSTEM "lock.sgml"> <!ENTITY move SYSTEM "move.sgml"> <!ENTITY notify SYSTEM "notify.sgml"> -<!## XC> -<!ENTITY pgxcClean SYSTEM "pgxc_clean-ref.sgml"> -<!## end> <!ENTITY prepare SYSTEM "prepare.sgml"> <!ENTITY prepareTransaction SYSTEM "prepare_transaction.sgml"> <!ENTITY reassignOwned SYSTEM "reassign_owned.sgml"> @@ -184,7 +181,6 @@ Complete list of usable sgml source files in this directory. <!entity gtm system "gtm.sgml"> <!entity gtmPxy system "gtm_proxy.sgml"> <!entity gtmCtl system "gtm_ctl.sgml"> -<!entity pgxcDdl system "pgxc_ddl.sgml"> <!## end> <!ENTITY clusterdb SYSTEM "clusterdb.sgml"> <!ENTITY createdb SYSTEM "createdb.sgml"> diff --git a/doc-xc/src/sgml/ref/pgxc_ddl.sgmlin b/doc-xc/src/sgml/ref/pgxc_ddl.sgmlin deleted file mode 100644 index 4a8ea91131..0000000000 --- a/doc-xc/src/sgml/ref/pgxc_ddl.sgmlin +++ /dev/null @@ -1,313 +0,0 @@ -<!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/initdb.sgml,v 1.47 2010/04/03 07:23:01 petere Exp $ -PostgreSQL documentation ---> - -<refentry id="APP-PGXC-DDL"> - <refmeta> - <refentrytitle>pgxc_ddl</refentrytitle> - <manvolnum>1</manvolnum> - <refmiscinfo>Application</refmiscinfo> - </refmeta> - - <refnamediv> - <refname>pgxc_ddl</refname> - <refpurpose> - Coordinator catalog table synchronization and DDL treatment module - </refpurpose> - </refnamediv> - - <indexterm zone="app-pgxc-ddl"> - <primary>pgxc_ddl</primary> - </indexterm> - - <refsynopsisdiv> - <cmdsynopsis> - <command>pgxc_ddl</command> - <arg rep="repeat"><replaceable>option</></arg> - </cmdsynopsis> - </refsynopsisdiv> - - <refsect1 id="R1-APP-PGXC-DDL-1"> - <title> - Description - </title> -&xconly - <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 the Coordinator catalog -tables from the catalog table of the Coordinator having received the -DDL. Copy method is cold-based. All the Coordinators are stopped, -catalog files are copied, then all the Coordinators are restarted. - </para> - - <para> - Since <productname>Postgres-XC</productname> 0.9.3, DDL are - synchronized automatically on all the nodes of the - cluster, <command>pgxc_ddl</command> is let on purpose of future - feature development. - </para> - - <para> - Since <productname>Postgres-XC</productname> 0.9.4, pgxc_ddl and - pgxc.conf are not anymore installed by default. Scripts are saved - in the folder <filename>src/pgxc/bin/pgxc_ddl</filename>. - </para> - - </refsect1> - - <refsect1> - <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 - postgresql.conf and pg_hba.conf for each Coordinator. - </para> - </listitem> - </varlistentry> - - </variablelist> - </para> - - <para> - <command>gtm_ctl</command> issues the following keywords to select - operations on <command>gtm</command> - and <command>gtm_proxy</command>. - </para> - - <para> - <variablelist> - - <varlistentry> - <term><option>start</option></term> - <listitem> - <para> - Start a GTM/GTM proxy instance. - </para> - </listitem> - </varlistentry> - - <varlistentry> - <term><option>restart</option></term> - <listitem> - <para> - Restart a GTM/GTM proxy instance. - </para> - </listitem> - </varlistentry> - - <varlistentry> - <term><option>stop</option></term> - <listitem> - <para> - Stop a GTM/GTM proxy instance. - </para> - </listitem> - </varlistentry> - - <varlistentry> - <term><option>status</option></term> - <listitem> - <para> - Look at the status of GTM instance. If active, 1 is printed. If - standby, 0 is printed. - </para> - </listitem> - </varlistentry> - - <varlistentry> - <term><option>promote</option></term> - <listitem> - <para> - Promote a GTM instance as active. - </para> - </listitem> - </varlistentry> - - <varlistentry> - <term><option>reconnect</option></term> - <listitem> - <para> - Reconnect a GTM Proxy to another GTM instance. - </para> - </listitem> - </varlistentry> - - </variablelist> - </para> - - <para> - Typically, you can issue the following command to start <command>gtm</command>/ -<programlisting> -gtm_ctl start -S gtm -D datafolder -</programlisting> - </para> - - <para> - Or <command>gtm_proxy</command>: -<programlisting> -gtm_ctl start -S gtm_proxy -D datafolder_proxy -</programlisting> - </para> - - <para> - Promote a GTM as active: -<programlisting> -gtm_ctl promote -S gtm -D datafolder -</programlisting> - </para> - - <para> - Reconnect a GTM proxy to another GTM instance: -<programlisting> -gtm_ctl reconnect -S gtm_proxy -D datafolder_proxy -o '-s hostname -t port_number' -</programlisting> - </para> - - <para> - Look at the status of a GTM server: -<programlisting> -gtm_ctl status -S gtm -D datafolder -</programlisting> - </para> - </refsect1> - - <refsect1 id="R1-APP-PGXC-DDL-2"> - <title> - Configuration - </title> -&xconly - <para> - Because <command>pgxc_ddl</command> requires access to 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 the Coordinators. Maintain the - order of the value 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 the Coordinators. Maintain the - order of the value 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 Coordinator. 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 definition in /tmp. 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 t Coordinator in the order defined - in <filename>pgxc.conf</filename>. - </para> - </note> - </refsect1> -</refentry> diff --git a/doc-xc/src/sgml/reference.sgmlin b/doc-xc/src/sgml/reference.sgmlin index c0699b72d6..957a20538a 100644 --- a/doc-xc/src/sgml/reference.sgmlin +++ b/doc-xc/src/sgml/reference.sgmlin @@ -256,9 +256,6 @@ &pgDump; &pgDumpall; &pgRestore; -<!## XC> - &pgxcClean; -<!## end> &psqlRef; &reindexdb; &vacuumdb; @@ -292,7 +289,6 @@ >m; >mPxy; >mCtl; - &pgxcDdl; <!## end> &initdb; <!## XC> diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index 411e4b2267..78755c2386 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -1257,15 +1257,6 @@ StandbyTransactionIdIsPrepared(TransactionId xid) /* * FinishPreparedTransaction: execute COMMIT PREPARED or ROLLBACK PREPARED - * - *(The following comment is only for Postgres-XC) - * - * With regard to xc_maintenance_mode related to pgxc_clean, COMMIT/ROLLBACK PREPARED - * might be called in the node where the transaction with given gid does not exist. - * This may happen at the originating Coordinator. In this case, we should - * skip to handle two-phase file. - * - * Please note that we don't have to write commit/abort log to WAL in this case. */ void FinishPreparedTransaction(const char *gid, bool isCommit) diff --git a/src/backend/pgxc/pool/execRemote.c b/src/backend/pgxc/pool/execRemote.c index 3bae9570d0..c8aef7cbaf 100644 --- a/src/backend/pgxc/pool/execRemote.c +++ b/src/backend/pgxc/pool/execRemote.c @@ -4516,8 +4516,7 @@ FinishRemotePreparedTransaction(char *prepareGID, bool commit) /* * Please note that with xc_maintenance_mode = on, COMMIT/ROLLBACK PREPARED will not - * propagate to remote nodes. Only GTM status is cleaned up. Prepared transaction - * on remote nodes will be cleaned up by pgxc_clean using EXECUTE DIRECT. + * propagate to remote nodes. Only GTM status is cleaned up. */ if (xc_maintenance_mode) { @@ -4534,6 +4533,7 @@ FinishRemotePreparedTransaction(char *prepareGID, bool commit) } return false; } + /* * Get the list of nodes involved in this transaction. * diff --git a/src/pgxc/Makefile b/src/pgxc/Makefile index eeed4ebb66..553e5deb73 100644 --- a/src/pgxc/Makefile +++ b/src/pgxc/Makefile @@ -12,6 +12,6 @@ subdir = src/pgxc top_builddir = ../.. include $(top_builddir)/src/Makefile.global -SUBDIRS = bin tools +SUBDIRS = tools $(recurse) diff --git a/src/pgxc/bin/Makefile b/src/pgxc/bin/Makefile deleted file mode 100644 index 4f04bc8984..0000000000 --- a/src/pgxc/bin/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -#---------------------------------------------------------------------------- -# -# Postgres-XC documentation tool makefile -# -# Copyright (c) 2010-2012 Postgres-XC Development Group -# -# doc-xc/Makefile -# -#---------------------------------------------------------------------------- - -subdir = src/pgxc/bin -top_builddir = ../../.. -include $(top_builddir)/src/Makefile.global - -SUBDIRS = pgxc_clean - -all distprep html man install installdirs uninstall clean distclean maintainer-clean maintainer-check: - $(MAKE) -C $(SUBDIRS) $@ diff --git a/src/pgxc/bin/pgxc_clean/Makefile b/src/pgxc/bin/pgxc_clean/Makefile deleted file mode 100644 index 12556fced7..0000000000 --- a/src/pgxc/bin/pgxc_clean/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -#------------------------------------------------------------------------- -# -# Makefile for src/pgxc/bin/pgxc_clean -# -# Portions Copyright (c) 2011 Postgres-XC Development Group -# -# $PostgreSQL$ -# -#------------------------------------------------------------------------- - -PGFILEDESC = "pgxc_clean - Abort prepared transaction for a Postgres-XC Coordinator" -subdir = src/pgxc/bin/pgxc_clean -top_builddir = ../../../.. -include $(top_builddir)/src/Makefile.global - -override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) - -gtm_builddir = $(top_builddir)/src/gtm - -OBJS= pgxc_clean.o txninfo.o -EX_OBJS = $(gtm_builddir)/common/assert.o \ - $(gtm_builddir)/client/libgtmclient.a - -override LDFLAGS := -L$(top_builddir)/src/gtm/client $(LDFLAGS) - -LIBS= -lpthread - -pgxc_clean: $(OBJS) - $(CC) $(CFLAGS) $(EX_OBJS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@$(X) - -all: pgxc_clean - -install: $(all) - $(INSTALL_PROGRAM) pgxc_clean$(X) '$(DESTDIR)$(bindir)/pgxc_clean$(X)' - -installdirs: - $(mkinstalldirs) '$(DESTDIR)$(bindir)' - -uninstall: - rm -f $(addprefix '$(DESTDIR)$(bindir)'/, pgxc_clean$(X)) - -clean distclean maintainer-clean: - rm -f pgxc_clean$(X) $(OBJS) |