You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
(6) |
Sep
|
Oct
(19) |
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(12) |
Feb
(1) |
Mar
(4) |
Apr
(4) |
May
(32) |
Jun
(12) |
Jul
(11) |
Aug
(1) |
Sep
(6) |
Oct
(3) |
Nov
|
Dec
(10) |
2012 |
Jan
(11) |
Feb
(1) |
Mar
(3) |
Apr
(25) |
May
(53) |
Jun
(38) |
Jul
(103) |
Aug
(54) |
Sep
(31) |
Oct
(66) |
Nov
(77) |
Dec
(20) |
2013 |
Jan
(91) |
Feb
(86) |
Mar
(103) |
Apr
(107) |
May
(25) |
Jun
(37) |
Jul
(17) |
Aug
(59) |
Sep
(38) |
Oct
(78) |
Nov
(29) |
Dec
(15) |
2014 |
Jan
(23) |
Feb
(82) |
Mar
(118) |
Apr
(101) |
May
(103) |
Jun
(45) |
Jul
(6) |
Aug
(10) |
Sep
|
Oct
(32) |
Nov
|
Dec
(9) |
2015 |
Jan
(3) |
Feb
(5) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(9) |
Aug
(4) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
1
|
2
(3) |
3
|
4
|
5
(5) |
6
(22) |
7
(1) |
8
(4) |
9
|
10
|
11
|
12
|
13
(4) |
14
(6) |
15
(5) |
16
(18) |
17
|
18
|
19
(8) |
20
(1) |
21
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
|
From: Michael P. <mic...@gm...> - 2012-11-16 04:02:47
|
On Fri, Nov 16, 2012 at 10:36 AM, Roumalyn Tiru <rt...@nt...>wrote: > Hi All, > > I am performing a functionality test of Postgres-XC. > For XML data type, I am able to create a table with xml type but when I > try to insert values, the following error message is displayed. > > > ERROR: unsupported XML feature > DETAIL: This functionality requires the server to be built with libxml > support. > HINT: You need to rebuild PostgreSQL using --with-libxml. > > > I have configured and installed Postgres-XC with --with-libxml option. > Have you launched ./configure with option --with-libxml on ALL the nodes where binaries are installed if you use multiple servers? I use xml libs myself and I got: postgres=# CREATE TABLE xmltest ( postgres(# id int, postgres(# data xml postgres(# ); CREATE TABLE postgres=# postgres=# INSERT INTO xmltest VALUES (1, '<value>one</value>'); INSERT 0 1 postgres=# INSERT INTO xmltest VALUES (2, '<value>two</value>'); INSERT 0 1 -- Michael Paquier http://michael.otacoo.com |
From: Roumalyn T. <rt...@nt...> - 2012-11-16 03:00:18
|
Hi All, I am performing a functionality test of Postgres-XC. For XML data type, I am able to create a table with xml type but when I try to insert values, the following error message is displayed. ERROR: unsupported XML feature DETAIL: This functionality requires the server to be built with libxml support. HINT: You need to rebuild PostgreSQL using --with-libxml. I have configured and installed Postgres-XC with --with-libxml option. Any help will be greatly appreciated. Thank you! |
From: Tatsuo I. <is...@po...> - 2012-11-15 08:49:18
|
> On Thu, Nov 15, 2012 at 1:47 PM, Tatsuo Ishii <is...@po...> wrote: > >> >> PostgreSQL Enterprise Consortium is planning to do a benchmark against >> >> Postges-XC. If we would use standard pgbench workload(pgbench default, >> >> -N, -S), what is a recommended portioning plan for pgbench_accounts? >> >> >> > If you want to show up the scalability, I recommend that you use pgbench >> > with option -k for initialization and launching, which is an option that >> > has been added in the pgbench version of XC available in its source code. >> > This allows to to a benchmark test by using bid as a distribution key so >> > this minimizes the amount of 2PC done when write operations involve >> several >> > nodes in a transaction. >> > $ pgbench --help >> > Initialization options: >> > -k distribute by primary key branch id - bid >> > Benchmarking options: >> > -k query with default key and additional key branch id (bid) >> > >> > Depending on your cluster structure, I would also recommend you also to >> use >> > PREFERRED node with ALTER NODE (ALTER NODE nodename WITH (PREFERRED)) for >> > example with the Datanode that is on the same server as a Coordinator if >> > you use a structure of 1 Coordinator and 1 Datanode per server. This also >> > reduces the network load by having replicated table read being done on >> the >> > preferred node in priority. This is especially better if the node is >> local >> > of course. >> >> Thanks for suggestion. We did pgbench -k benchmark and got good >> result. Details will be published at PGECONS seminar on December 7th >> in Tokyo. >> > Thanks for letting me know. I'll show up at this presentation I am pretty > interested, but no dinner for me :) > > https://www.pgecons.org/2012/12/07/1527/ >> >> Also I would like to do some read-only workload benchmark as well. Any >> suggestion to get good result? I'm not sure if plain pgbench -S gives >> good result. >> > When using -S you only perform a select on aid of pgbench_accounts, so if > you initialize pgbench without -k pgbench_accounts will be hashed with aid > as key as the default if no distribution is specified is to take a hash > distribution and the first hashable column of relation. So this would be > good for scans as you will always scan only a single node based on the > value of aid. > So yeah do not use -k for read evaluation. I'm confused. If I don't give -k to pgbench -i, then all the data for pgbench_accounts go to the first data node. If CREATE TABLE is not supplied WITH DISTRIBUTE, what is an expected behavior? -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese: http://www.sraoss.co.jp |
From: Michael P. <mic...@gm...> - 2012-11-15 05:29:49
|
On Thu, Nov 15, 2012 at 1:47 PM, Tatsuo Ishii <is...@po...> wrote: > >> PostgreSQL Enterprise Consortium is planning to do a benchmark against > >> Postges-XC. If we would use standard pgbench workload(pgbench default, > >> -N, -S), what is a recommended portioning plan for pgbench_accounts? > >> > > If you want to show up the scalability, I recommend that you use pgbench > > with option -k for initialization and launching, which is an option that > > has been added in the pgbench version of XC available in its source code. > > This allows to to a benchmark test by using bid as a distribution key so > > this minimizes the amount of 2PC done when write operations involve > several > > nodes in a transaction. > > $ pgbench --help > > Initialization options: > > -k distribute by primary key branch id - bid > > Benchmarking options: > > -k query with default key and additional key branch id (bid) > > > > Depending on your cluster structure, I would also recommend you also to > use > > PREFERRED node with ALTER NODE (ALTER NODE nodename WITH (PREFERRED)) for > > example with the Datanode that is on the same server as a Coordinator if > > you use a structure of 1 Coordinator and 1 Datanode per server. This also > > reduces the network load by having replicated table read being done on > the > > preferred node in priority. This is especially better if the node is > local > > of course. > > Thanks for suggestion. We did pgbench -k benchmark and got good > result. Details will be published at PGECONS seminar on December 7th > in Tokyo. > Thanks for letting me know. I'll show up at this presentation I am pretty interested, but no dinner for me :) https://www.pgecons.org/2012/12/07/1527/ > > Also I would like to do some read-only workload benchmark as well. Any > suggestion to get good result? I'm not sure if plain pgbench -S gives > good result. > When using -S you only perform a select on aid of pgbench_accounts, so if you initialize pgbench without -k pgbench_accounts will be hashed with aid as key as the default if no distribution is specified is to take a hash distribution and the first hashable column of relation. So this would be good for scans as you will always scan only a single node based on the value of aid. So yeah do not use -k for read evaluation. -- Michael Paquier http://michael.otacoo.com |
From: Koichi S. <koi...@gm...> - 2012-11-15 05:27:33
|
Thanks a lot for the info. I registered for the seminar. Looking forward to hearing about XC. Regards; ---------- Koichi Suzuki 2012/11/15 Tatsuo Ishii <is...@po...>: >>> PostgreSQL Enterprise Consortium is planning to do a benchmark against >>> Postges-XC. If we would use standard pgbench workload(pgbench default, >>> -N, -S), what is a recommended portioning plan for pgbench_accounts? >>> >> If you want to show up the scalability, I recommend that you use pgbench >> with option -k for initialization and launching, which is an option that >> has been added in the pgbench version of XC available in its source code. >> This allows to to a benchmark test by using bid as a distribution key so >> this minimizes the amount of 2PC done when write operations involve several >> nodes in a transaction. >> $ pgbench --help >> Initialization options: >> -k distribute by primary key branch id - bid >> Benchmarking options: >> -k query with default key and additional key branch id (bid) >> >> Depending on your cluster structure, I would also recommend you also to use >> PREFERRED node with ALTER NODE (ALTER NODE nodename WITH (PREFERRED)) for >> example with the Datanode that is on the same server as a Coordinator if >> you use a structure of 1 Coordinator and 1 Datanode per server. This also >> reduces the network load by having replicated table read being done on the >> preferred node in priority. This is especially better if the node is local >> of course. > > Thanks for suggestion. We did pgbench -k benchmark and got good > result. Details will be published at PGECONS seminar on December 7th > in Tokyo. > > https://www.pgecons.org/2012/12/07/1527/ > > Also I would like to do some read-only workload benchmark as well. Any > suggestion to get good result? I'm not sure if plain pgbench -S gives > good result. > -- > Tatsuo Ishii > SRA OSS, Inc. Japan > English: http://www.sraoss.co.jp/index_en.php > Japanese: http://www.sraoss.co.jp > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > _______________________________________________ > Postgres-xc-general mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general |
From: Tatsuo I. <is...@po...> - 2012-11-15 04:47:58
|
>> PostgreSQL Enterprise Consortium is planning to do a benchmark against >> Postges-XC. If we would use standard pgbench workload(pgbench default, >> -N, -S), what is a recommended portioning plan for pgbench_accounts? >> > If you want to show up the scalability, I recommend that you use pgbench > with option -k for initialization and launching, which is an option that > has been added in the pgbench version of XC available in its source code. > This allows to to a benchmark test by using bid as a distribution key so > this minimizes the amount of 2PC done when write operations involve several > nodes in a transaction. > $ pgbench --help > Initialization options: > -k distribute by primary key branch id - bid > Benchmarking options: > -k query with default key and additional key branch id (bid) > > Depending on your cluster structure, I would also recommend you also to use > PREFERRED node with ALTER NODE (ALTER NODE nodename WITH (PREFERRED)) for > example with the Datanode that is on the same server as a Coordinator if > you use a structure of 1 Coordinator and 1 Datanode per server. This also > reduces the network load by having replicated table read being done on the > preferred node in priority. This is especially better if the node is local > of course. Thanks for suggestion. We did pgbench -k benchmark and got good result. Details will be published at PGECONS seminar on December 7th in Tokyo. https://www.pgecons.org/2012/12/07/1527/ Also I would like to do some read-only workload benchmark as well. Any suggestion to get good result? I'm not sure if plain pgbench -S gives good result. -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese: http://www.sraoss.co.jp |
From: Michael P. <mic...@gm...> - 2012-11-15 00:19:58
|
I just committed the fix for the comment. Will take care of correcting pg_ctl.sgmlin later. On Wed, Nov 14, 2012 at 10:28 PM, Michael Paquier <mic...@gm... > wrote: > > > On Wed, Nov 14, 2012 at 10:22 PM, Matteo Dessalvi <M.D...@gs...>wrote: > >> Ok, thank you Michael. Using the '--cordinator' and '--datanode' options >> I was able to start my test cluster and now it's up and running :-). >> >> May I also suggest a slightly modification on >> src/backend/postmaster/postmaster.c? >> At line 780, inside the #ifdef PGXC ... #endif the line >> >> write_stderr("%s: Postgres-XC: must start as either a Coordinator >> (--datanode) or Data Node (--datanode)\n" (...) >> >> should be something like this: >> >> write_stderr("%s: Postgres-XC: must start as either a Coordinator >> (--coordinator) or Data Node (--datanode)\n" (...) >> >> Is it right? >> > Completely right :) > Thanks for noticing! > -- > Michael Paquier > http://michael.otacoo.com > -- Michael Paquier http://michael.otacoo.com |
From: Michael P. <mic...@gm...> - 2012-11-14 13:28:41
|
On Wed, Nov 14, 2012 at 10:22 PM, Matteo Dessalvi <M.D...@gs...> wrote: > Ok, thank you Michael. Using the '--cordinator' and '--datanode' options > I was able to start my test cluster and now it's up and running :-). > > May I also suggest a slightly modification on > src/backend/postmaster/postmaster.c? > At line 780, inside the #ifdef PGXC ... #endif the line > > write_stderr("%s: Postgres-XC: must start as either a Coordinator > (--datanode) or Data Node (--datanode)\n" (...) > > should be something like this: > > write_stderr("%s: Postgres-XC: must start as either a Coordinator > (--coordinator) or Data Node (--datanode)\n" (...) > > Is it right? > Completely right :) Thanks for noticing! -- Michael Paquier http://michael.otacoo.com |
From: Matteo D. <M.D...@gs...> - 2012-11-14 13:22:15
|
Ok, thank you Michael. Using the '--cordinator' and '--datanode' options I was able to start my test cluster and now it's up and running :-). May I also suggest a slightly modification on src/backend/postmaster/postmaster.c? At line 780, inside the #ifdef PGXC ... #endif the line write_stderr("%s: Postgres-XC: must start as either a Coordinator (--datanode) or Data Node (--datanode)\n" (...) should be something like this: write_stderr("%s: Postgres-XC: must start as either a Coordinator (--coordinator) or Data Node (--datanode)\n" (...) Is it right? Best regards, Matteo On 14.11.2012 13:37, Michael Paquier wrote: > > > On Wed, Nov 14, 2012 at 9:10 PM, Matteo Dessalvi <M.D...@gs... > <mailto:M.D...@gs...>> wrote: > > Hi all. > > I am testing Postgres XC for a project I am starting at my work > place . > I apologize > if the following is already a known issue. > > I was following the installation tutorial on the Postgres XC web site > (on Sourceforge) > and I have managed to install Postgresql XC 1.0.1 on a Debian > Wheezy VM > (creating a > deb package from the sources), but when I am trying to start the > postgres instances > (using the postgres user) for the datanodes I'll get this error: > > postgres: invalid option -- 'X' > > X option is valid for versions 1.0.X as specified on the docs: > http://postgres-xc.sourceforge.net/docs/1_0/app-postgres.html > X is used to start a node as a Datanode and C as a Coordinator > > On current master branch, those have been changed into more generic > options --coordinator and --datanode to avoid any future conflicts > with postgres options. > > On the other hand, pg_ctl uses -Z coordinator/datanode to start a node > as a Coordinator or a Datanode. > It is specified on the docs here: > http://postgres-xc.sourceforge.net/docs/1_0/app-pg-ctl.html > However this page looks to be outdated. I am going to fix that tomorrow. > > > > I was looking under > postgresql-xc-1.0.1/src/backend/tcop/postgres.c and > in fact this option > is not listed on the function process_postgres_switches(...), nor > it is > mentioned in main.c, > located under postgresql-xc-1.0.1/src/backend/main. > I also tried to find this option on the main Postgresql versions > (9.1/9.0/8.4) but it seems that > there isn't any reference to a '-X' option. > > According to the short tutorial on > http://postgres-xc.sourceforge.net/docs/1_0/install-short.html > this is the required procedure to start the cluster. If I try to start > the datanodes without the '-X' > option I'll get another error: > > Postgres-XC: must start as either a Coordinator (--datanode) or Data > Node (--datanode) > > which means, I guess, that this option has something to do with the > roles of the instances. > > > Thanks in advance. > > > Best regards, > Matteo > > -- > Matteo Dessalvi > Abteilung: HPC > Ort: SB3.1.250 > > Fax.: +49 6159 71 2986 <tel:%2B49%206159%2071%202986> > E-Mail:m.d...@gs... <mailto:E-Mail%3Am...@gs...> > > GSI Helmholtzzentrum für Schwerionenforschung GmbH Planckstraße 1 > 64291 Darmstadt > www.gsi.de <http://www.gsi.de> > > Gesellschaft mit beschränkter Haftung > Sitz der Gesellschaft: Darmstadt > Handelsregister: Amtsgericht Darmstadt, HRB 1528 > > Geschäftsführung: Professor Dr. Dr. h.c. mult. Horst Stöcker, > Peter Hassenbach > > Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph > Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt > > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, > vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > _______________________________________________ > Postgres-xc-general mailing list > Pos...@li... > <mailto:Pos...@li...> > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general > > > > > -- > Michael Paquier > http://michael.otacoo.com -- Matteo Dessalvi Abteilung: HPC Ort: SB3.1.250 Fax.: +49 6159 71 2986 E-Mail:m.d...@gs... GSI Helmholtzzentrum für Schwerionenforschung GmbH Planckstraße 1 64291 Darmstadt www.gsi.de Gesellschaft mit beschränkter Haftung Sitz der Gesellschaft: Darmstadt Handelsregister: Amtsgericht Darmstadt, HRB 1528 Geschäftsführung: Professor Dr. Dr. h.c. mult. Horst Stöcker, Peter Hassenbach Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt |
From: Michael P. <mic...@gm...> - 2012-11-14 12:38:08
|
On Wed, Nov 14, 2012 at 9:10 PM, Matteo Dessalvi <M.D...@gs...> wrote: > Hi all. > > I am testing Postgres XC for a project I am starting at my work place . > I apologize > if the following is already a known issue. > > I was following the installation tutorial on the Postgres XC web site > (on Sourceforge) > and I have managed to install Postgresql XC 1.0.1 on a Debian Wheezy VM > (creating a > deb package from the sources), but when I am trying to start the > postgres instances > (using the postgres user) for the datanodes I'll get this error: > > postgres: invalid option -- 'X' > X option is valid for versions 1.0.X as specified on the docs: http://postgres-xc.sourceforge.net/docs/1_0/app-postgres.html X is used to start a node as a Datanode and C as a Coordinator On current master branch, those have been changed into more generic options --coordinator and --datanode to avoid any future conflicts with postgres options. On the other hand, pg_ctl uses -Z coordinator/datanode to start a node as a Coordinator or a Datanode. It is specified on the docs here: http://postgres-xc.sourceforge.net/docs/1_0/app-pg-ctl.html However this page looks to be outdated. I am going to fix that tomorrow. > I was looking under postgresql-xc-1.0.1/src/backend/tcop/postgres.c and > in fact this option > is not listed on the function process_postgres_switches(...), nor it is > mentioned in main.c, > located under postgresql-xc-1.0.1/src/backend/main. > I also tried to find this option on the main Postgresql versions > (9.1/9.0/8.4) but it seems that > there isn't any reference to a '-X' option. > > According to the short tutorial on > http://postgres-xc.sourceforge.net/docs/1_0/install-short.html > this is the required procedure to start the cluster. If I try to start > the datanodes without the '-X' > option I'll get another error: > > Postgres-XC: must start as either a Coordinator (--datanode) or Data > Node (--datanode) > > which means, I guess, that this option has something to do with the > roles of the instances. > > > Thanks in advance. > > > Best regards, > Matteo > > -- > Matteo Dessalvi > Abteilung: HPC > Ort: SB3.1.250 > > Fax.: +49 6159 71 2986 > E-Mail:m.d...@gs... > > GSI Helmholtzzentrum für Schwerionenforschung GmbH Planckstraße 1 > 64291 Darmstadt > www.gsi.de > > Gesellschaft mit beschränkter Haftung > Sitz der Gesellschaft: Darmstadt > Handelsregister: Amtsgericht Darmstadt, HRB 1528 > > Geschäftsführung: Professor Dr. Dr. h.c. mult. Horst Stöcker, > Peter Hassenbach > > Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph > Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt > > > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > _______________________________________________ > Postgres-xc-general mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general > -- Michael Paquier http://michael.otacoo.com |
From: Matteo D. <M.D...@gs...> - 2012-11-14 12:36:45
|
Hi. The tutorial I am following is here: http://postgres-xc.sourceforge.net/docs/1_0/index.html Since it is located on the main Postgres XC web site and the title is "Postgres-XC 1.0.1 Documentation" I thought it should be the most up to date documentation. Thanks for your answer but unfortunately I get the same error with the '-Z' option too: postgres: invalid option -- 'Z' and looking in the source code I can't find the '-Z' option as a command line parameter. I have pulled my sources directly from the git repository on GitHub: https://github.com/postgres-xc/postgres-xc.git so I believe I am not using some outdated version. Best regards, Matteo On 14.11.2012 13:23, Nikhil Sontakke wrote: > Hi Matteo, > > Where did you get the instruction to use -X exactly? Maybe that > specific documentation is out of date. > > Please use "-Z" instead of "-X". > > Regards, > Nikhils > > On Wed, Nov 14, 2012 at 5:40 PM, Matteo Dessalvi <M.D...@gs... > <mailto:M.D...@gs...>> wrote: > > Hi all. > > I am testing Postgres XC for a project I am starting at my work > place . > I apologize > if the following is already a known issue. > > I was following the installation tutorial on the Postgres XC web site > (on Sourceforge) > and I have managed to install Postgresql XC 1.0.1 on a Debian > Wheezy VM > (creating a > deb package from the sources), but when I am trying to start the > postgres instances > (using the postgres user) for the datanodes I'll get this error: > > postgres: invalid option -- 'X' > > I was looking under > postgresql-xc-1.0.1/src/backend/tcop/postgres.c and > in fact this option > is not listed on the function process_postgres_switches(...), nor > it is > mentioned in main.c, > located under postgresql-xc-1.0.1/src/backend/main. > I also tried to find this option on the main Postgresql versions > (9.1/9.0/8.4) but it seems that > there isn't any reference to a '-X' option. > > According to the short tutorial on > http://postgres-xc.sourceforge.net/docs/1_0/install-short.html > this is the required procedure to start the cluster. If I try to start > the datanodes without the '-X' > option I'll get another error: > > Postgres-XC: must start as either a Coordinator (--datanode) or Data > Node (--datanode) > > which means, I guess, that this option has something to do with the > roles of the instances. > > > Thanks in advance. > > > Best regards, > Matteo > > -- > Matteo Dessalvi > Abteilung: HPC > Ort: SB3.1.250 > > Fax.: +49 6159 71 2986 > E-Mail:m.d...@gs... <mailto:E-Mail%3Am...@gs...> > > GSI Helmholtzzentrum für Schwerionenforschung GmbH Planckstraße 1 > 64291 Darmstadt > www.gsi.de <http://www.gsi.de> > > Gesellschaft mit beschränkter Haftung > Sitz der Gesellschaft: Darmstadt > Handelsregister: Amtsgericht Darmstadt, HRB 1528 > > Geschäftsführung: Professor Dr. Dr. h.c. mult. Horst Stöcker, > Peter Hassenbach > > Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph > Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt > > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, > vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > _______________________________________________ > Postgres-xc-general mailing list > Pos...@li... > <mailto:Pos...@li...> > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general > > > > > -- > StormDB - http://www.stormdb.com > The Database Cloud > Postgres-XC Support and Service -- Matteo Dessalvi Abteilung: HPC Ort: SB3.1.250 Fax.: +49 6159 71 2986 E-Mail:m.d...@gs... GSI Helmholtzzentrum für Schwerionenforschung GmbH Planckstraße 1 64291 Darmstadt www.gsi.de Gesellschaft mit beschränkter Haftung Sitz der Gesellschaft: Darmstadt Handelsregister: Amtsgericht Darmstadt, HRB 1528 Geschäftsführung: Professor Dr. Dr. h.c. mult. Horst Stöcker, Peter Hassenbach Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt |
From: Nikhil S. <ni...@st...> - 2012-11-14 12:23:31
|
Hi Matteo, Where did you get the instruction to use -X exactly? Maybe that specific documentation is out of date. Please use "-Z" instead of "-X". Regards, Nikhils On Wed, Nov 14, 2012 at 5:40 PM, Matteo Dessalvi <M.D...@gs...> wrote: > Hi all. > > I am testing Postgres XC for a project I am starting at my work place . > I apologize > if the following is already a known issue. > > I was following the installation tutorial on the Postgres XC web site > (on Sourceforge) > and I have managed to install Postgresql XC 1.0.1 on a Debian Wheezy VM > (creating a > deb package from the sources), but when I am trying to start the > postgres instances > (using the postgres user) for the datanodes I'll get this error: > > postgres: invalid option -- 'X' > > I was looking under postgresql-xc-1.0.1/src/backend/tcop/postgres.c and > in fact this option > is not listed on the function process_postgres_switches(...), nor it is > mentioned in main.c, > located under postgresql-xc-1.0.1/src/backend/main. > I also tried to find this option on the main Postgresql versions > (9.1/9.0/8.4) but it seems that > there isn't any reference to a '-X' option. > > According to the short tutorial on > http://postgres-xc.sourceforge.net/docs/1_0/install-short.html > this is the required procedure to start the cluster. If I try to start > the datanodes without the '-X' > option I'll get another error: > > Postgres-XC: must start as either a Coordinator (--datanode) or Data > Node (--datanode) > > which means, I guess, that this option has something to do with the > roles of the instances. > > > Thanks in advance. > > > Best regards, > Matteo > > -- > Matteo Dessalvi > Abteilung: HPC > Ort: SB3.1.250 > > Fax.: +49 6159 71 2986 > E-Mail:m.d...@gs... > > GSI Helmholtzzentrum für Schwerionenforschung GmbH Planckstraße 1 > 64291 Darmstadt > www.gsi.de > > Gesellschaft mit beschränkter Haftung > Sitz der Gesellschaft: Darmstadt > Handelsregister: Amtsgericht Darmstadt, HRB 1528 > > Geschäftsführung: Professor Dr. Dr. h.c. mult. Horst Stöcker, > Peter Hassenbach > > Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph > Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt > > > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > _______________________________________________ > Postgres-xc-general mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general > -- StormDB - http://www.stormdb.com The Database Cloud Postgres-XC Support and Service |
From: Matteo D. <M.D...@gs...> - 2012-11-14 12:10:46
|
Hi all. I am testing Postgres XC for a project I am starting at my work place . I apologize if the following is already a known issue. I was following the installation tutorial on the Postgres XC web site (on Sourceforge) and I have managed to install Postgresql XC 1.0.1 on a Debian Wheezy VM (creating a deb package from the sources), but when I am trying to start the postgres instances (using the postgres user) for the datanodes I'll get this error: postgres: invalid option -- 'X' I was looking under postgresql-xc-1.0.1/src/backend/tcop/postgres.c and in fact this option is not listed on the function process_postgres_switches(...), nor it is mentioned in main.c, located under postgresql-xc-1.0.1/src/backend/main. I also tried to find this option on the main Postgresql versions (9.1/9.0/8.4) but it seems that there isn't any reference to a '-X' option. According to the short tutorial on http://postgres-xc.sourceforge.net/docs/1_0/install-short.html this is the required procedure to start the cluster. If I try to start the datanodes without the '-X' option I'll get another error: Postgres-XC: must start as either a Coordinator (--datanode) or Data Node (--datanode) which means, I guess, that this option has something to do with the roles of the instances. Thanks in advance. Best regards, Matteo -- Matteo Dessalvi Abteilung: HPC Ort: SB3.1.250 Fax.: +49 6159 71 2986 E-Mail:m.d...@gs... GSI Helmholtzzentrum für Schwerionenforschung GmbH Planckstraße 1 64291 Darmstadt www.gsi.de Gesellschaft mit beschränkter Haftung Sitz der Gesellschaft: Darmstadt Handelsregister: Amtsgericht Darmstadt, HRB 1528 Geschäftsführung: Professor Dr. Dr. h.c. mult. Horst Stöcker, Peter Hassenbach Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt |
From: Paulo P. <pj...@ub...> - 2012-11-13 12:59:24
|
Hi all, After much reading, I have a couple doubts about recovery. 1) Do we just need to backup Coordinators and Datanodes or GTM as well? 2) Does recovery mean that the cluster should be down? I mean, when recovering, for instance, a datanode or a coordinator, what happens to all the data that has been CRUD'ed into other working nodes? Cheers, -- Paulo Pires |
From: Vladimir S. <vst...@gm...> - 2012-11-13 09:05:30
|
On Tue, Nov 13, 2012 at 06:53:38PM +1100, Joseph Glanville wrote: > Not everything is about performance. Application level replication > will always be superior for other reasons. If You mean replication of standalone database it is other thing. But here we are discussing external HA solution for XC. In this context if chosen, replication should be done for every node separately and its only role is failover. -- ********************************** ## Vladimir Stavrinov ## vst...@gm... ********************************** |
From: Joseph G. <jos...@or...> - 2012-11-13 07:59:30
|
On 13 November 2012 18:13, Vladimir Stavrinov <vst...@gm...> wrote: > On Fri, Nov 9, 2012 at 12:15 AM, Joseph Glanville > <jos...@or...> wrote: > >> With SSDs and Infiniband (DRBD supports Sockets Direct Protocol over >> RDMA) you can achieve close to native performance due to very low > > If "native performance" means performance of standalone (without DRBD) > server, then ... > >> However, application level replication is superior in everyway. > > what means "superior" against "close to native performance" above? Not everything is about performance. Application level replication will always be superior for other reasons. > > And what about ceph? I am thinking about it, but never tested yet and > have no information about using it with database. Ceph RBD or CephFS? CephFS is currently too unstable to be used in production. RBD is stable but it's not optimized for performance, especially not for random IO workloads. > > -- > ********************************** > ## Vladimir Stavrinov > ## vst...@gm... > ********************************** -- CTO | Orion Virtualisation Solutions | www.orionvm.com.au Phone: 1300 56 99 52 | Mobile: 0428 754 846 |
From: Vladimir S. <vst...@gm...> - 2012-11-13 07:13:11
|
On Fri, Nov 9, 2012 at 12:15 AM, Joseph Glanville <jos...@or...> wrote: > With SSDs and Infiniband (DRBD supports Sockets Direct Protocol over > RDMA) you can achieve close to native performance due to very low If "native performance" means performance of standalone (without DRBD) server, then ... > However, application level replication is superior in everyway. what means "superior" against "close to native performance" above? And what about ceph? I am thinking about it, but never tested yet and have no information about using it with database. -- ********************************** ## Vladimir Stavrinov ## vst...@gm... ********************************** |
From: Joseph G. <jos...@or...> - 2012-11-08 20:23:55
|
On 9 November 2012 02:34, Koichi Suzuki <koi...@gm...> wrote: > The result looks very similar to the one I've seen. Maybe this is > what we should expect with DRBD. DRBD is very latency sensitive if not using the async modes (which provide less data guarantees). With SSDs and Infiniband (DRBD supports Sockets Direct Protocol over RDMA) you can achieve close to native performance due to very low latency of interconnect. However, application level replication is superior in everyway. > ---------- > Koichi Suzuki > > > 2012/11/9 Vladimir Stavrinov <vst...@gm...>: >> On Tue, Nov 6, 2012 at 4:55 AM, Koichi Suzuki <koi...@gm...> wrote: >> >>> Does anybody has performance data for DRBD with PostgreSQL? The >>> following reports that the throughput will become almost half. >>> >>> http://archives.postgresql.org/pgsql-performance/2007-09/msg00118.php >> >> I've reproduced this test against postgresql-9.1 with similar or even >> worse results. Though experiment was not clean because of outsider >> load on system, but kernel and drbd are not most recent. This is >> confirmed by my other experiment with dd writes where 45% in speed was >> lost on drbd. But this is one more argument in favor of internal HA >> where we can expect better results. > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_nov > _______________________________________________ > Postgres-xc-general mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general -- CTO | Orion Virtualisation Solutions | www.orionvm.com.au Phone: 1300 56 99 52 | Mobile: 0428 754 846 |
From: Koichi S. <koi...@gm...> - 2012-11-08 15:34:23
|
The result looks very similar to the one I've seen. Maybe this is what we should expect with DRBD. ---------- Koichi Suzuki 2012/11/9 Vladimir Stavrinov <vst...@gm...>: > On Tue, Nov 6, 2012 at 4:55 AM, Koichi Suzuki <koi...@gm...> wrote: > >> Does anybody has performance data for DRBD with PostgreSQL? The >> following reports that the throughput will become almost half. >> >> http://archives.postgresql.org/pgsql-performance/2007-09/msg00118.php > > I've reproduced this test against postgresql-9.1 with similar or even > worse results. Though experiment was not clean because of outsider > load on system, but kernel and drbd are not most recent. This is > confirmed by my other experiment with dd writes where 45% in speed was > lost on drbd. But this is one more argument in favor of internal HA > where we can expect better results. |
From: Vladimir S. <vst...@gm...> - 2012-11-08 15:11:58
|
On Tue, Nov 6, 2012 at 4:55 AM, Koichi Suzuki <koi...@gm...> wrote: > Does anybody has performance data for DRBD with PostgreSQL? The > following reports that the throughput will become almost half. > > http://archives.postgresql.org/pgsql-performance/2007-09/msg00118.php I've reproduced this test against postgresql-9.1 with similar or even worse results. Though experiment was not clean because of outsider load on system, but kernel and drbd are not most recent. This is confirmed by my other experiment with dd writes where 45% in speed was lost on drbd. But this is one more argument in favor of internal HA where we can expect better results. |
From: Vladimir S. <vst...@gm...> - 2012-11-08 10:28:29
|
On Tue, Nov 6, 2012 at 4:55 AM, Koichi Suzuki <koi...@gm...> wrote: > Does anybody has performance data for DRBD with PostgreSQL? The > following reports that the throughput will become almost half. It is interesting to compare with standby replication solution. |
From: David H. <da...@c0...> - 2012-11-07 07:08:43
|
Hi Koichi, Not specifically PostgreSQL, using mysql, and we haven't benchmarked... We run an email marketing company (we basically DDOS ourselves by sending mails fast and receiving clicks back) and have about 20 pizzabox servers in one rack. Each pizzabox has about 5 VMs, most have an active db instance. Using asynchronous DRBD, via a 1Gbps VPLS, we sync to the second location so we have a hot-standby for a server. The average traffic in our usecase is 100Mbps and we peak around 400Mbps during backups (the backupserver is also mirrored of course). I have _never_ seen issues with DRBD is this setting (and we failover regularly for maintenance of the hosts; only the VMs are synced). We used to have synchronous replication when the hosts were coupled together; no issues either. I have to say that our data is not required to be of 'bank quality' (using mysql/myisam will guarantee that). I have seen many more issues from upgrading from Debian Lenny to Debian Squeeze on our Dell R310. I/O performance seems to have lowered significantly, say 20% or 30% (more I/O related incidents since update). These are gut numbers because I have a hard time reproducing this (it only occurs when many users do many different things). We have not located that issue (to any driver, hw and/or kernel changes). However. We basically are not using 50% of our hardware and it hurts my need for optimization. David On 11/06/2012 01:55 AM, Koichi Suzuki wrote: > Does anybody has performance data for DRBD with PostgreSQL? The > following reports that the throughput will become almost half. > > http://archives.postgresql.org/pgsql-performance/2007-09/msg00118.php > > The article is posted about five years ago, though. > > Regards; > ---------- > Koichi Suzuki > > > 2012/11/6 Vladimir Stavrinov <vst...@gm...>: >> On Mon, Nov 05, 2012 at 07:22:54PM +0300, Vladimir Stavrinov wrote: >> >>> solution is alliance of drbd + pacemaker + corosync. It is very >> Forgot to add in this team ipvs. >> >> >> ***************************** >> ### Vladimir Stavrinov >> ### vst...@gm... >> ***************************** >> >> >> ------------------------------------------------------------------------------ >> LogMeIn Central: Instant, anywhere, Remote PC access and management. >> Stay in control, update software, and manage PCs from one command center >> Diagnose problems and improve visibility into emerging IT issues >> Automate, monitor and manage. Do more in less time with Central >> http://p.sf.net/sfu/logmein12331_d2d >> _______________________________________________ >> Postgres-xc-general mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-general > ------------------------------------------------------------------------------ > LogMeIn Central: Instant, anywhere, Remote PC access and management. > Stay in control, update software, and manage PCs from one command center > Diagnose problems and improve visibility into emerging IT issues > Automate, monitor and manage. Do more in less time with Central > http://p.sf.net/sfu/logmein12331_d2d > _______________________________________________ > Postgres-xc-general mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general -- let op: mijn email is gewijzigd naar da...@c0... |
From: Koichi S. <koi...@gm...> - 2012-11-06 11:34:31
|
No, So far, views are only propagated to coordinators. pgxc_* catalogs will be found only at coordinators. Depending upon objects, CREATE/ALTER/DROP are propagated to datanodes as well. View is a kind of exception. Regards; ---------- Koichi Suzuki 2012/11/6 Tatsuo Ishii <is...@po...>: > Thanks. Your answer cleared my question. > > BTW, the view created on the coordinator node should be copied to data > nodes? I couldn't find the view on the data nodes. If the answer is > no, DDL executed on coordinator node is not copied to data node in > Postgres-XC? CREATE TABLE seems to be copied to data node. Maybe > CREATE VIEW is treated specially? > -- > Tatsuo Ishii > SRA OSS, Inc. Japan > English: http://www.sraoss.co.jp/index_en.php > Japanese: http://www.sraoss.co.jp > >> Yes, the view works at coordinator locally. >> >> CREATE VIEW is propagated to all the coordinators so you should run it >> only once at one of them. >> >> The reason I suggested EXECUTE DIRECT is user table looked involved in >> the query. >> >> Regards; >> ---------- >> Koichi Suzuki >> >> >> 2012/11/6 Tatsuo Ishii <is...@po...>: >>> Thanks. Your view works great! BTW, Should the view be executed on >>> coordinator node? If so, I'm a little bit confused. Because you said: >>> >>>> Because pgxc_class and pg_class are both local to each node, oid is >>>> also local. To query correctly, they should be issued using EXECUTE >>>> DIRECT statement. Each EXECUTE DIRECT will return the result local >>>> to each node. >>>> 2012/11/6 Tatsuo Ishii <is...@po...>: >>>>> I sent a query to coordinator node and got following result. Doesn't >>>>> this means table "pgbench_accounts" distributed? >>>>> >>>>> test=# select * from pgxc_class as x join pg_class as c on x.pcrelid = c.oid where c.relname = 'pgbench_accounts'; >>> >>>> pgxc_class has distribution definition of each table. I'm using the >>>> following views as a handy tool: >>>> >>>> ---- >>>> [koichi@linker:scripts]$ cat distr_view.sql >>>> DROP VIEW IF EXISTS xc_table_distribution; >>>> >>>> >>>> CREATE VIEW xc_table_distribution AS >>>> >>>> SELECT pg_class.relname relation, >>>> CASE >>>> WHEN pclocatortype = 'H' THEN 'Hash' >>>> WHEN pclocatortype = 'M' THEN 'Modulo' >>>> WHEN pclocatortype = 'N' THEN 'Round Robin' >>>> WHEN pclocatortype = 'R' THEN 'Replicate' >>>> ELSE 'Unknown' >>>> END AS distribution, >>>> pg_attribute.attname attname >>>> FROM pg_class, pgxc_class, pg_attribute >>>> WHERE pg_class.oid = pgxc_class.pcrelid >>>> and pg_class.oid = pg_attribute.attrelid >>>> and pgxc_class.pcattnum = pg_attribute.attnum >>>> UNION >>>> >>>> SELECT pg_class.relname relation, >>>> CASE >>>> WHEN pclocatortype = 'H' THEN 'Hash' >>>> WHEN pclocatortype = 'M' THEN 'Modulo' >>>> WHEN pclocatortype = 'N' THEN 'Round Robin' >>>> WHEN pclocatortype = 'R' THEN 'Replicate' >>>> ELSE 'Unknown' >>>> END AS distribution, >>>> '- none -' attname >>>> FROM pg_class, pgxc_class, pg_attribute >>>> WHERE pg_class.oid = pgxc_class.pcrelid >>>> and pg_class.oid = pg_attribute.attrelid >>>> and pgxc_class.pcattnum = 0 >>>> ; >>>> >>>> COMMENT ON VIEW xc_table_distribution IS >>>> 'View to show distribution/replication attribute of the given table.'; >>>> >>>> [koichi@linker:scripts]$ >>>> ------ >>>> >>>> Info for pgbench tables are as follows: >>>> ----------- >>>> koichi=# select * from xc_table_distribution >>>> koichi-# ; >>>> relation | distribution | attname >>>> ------------------+--------------+---------- >>>> t | Hash | a >>>> pgbench_branches | Hash | bid >>>> y | Modulo | a >>>> pgbench_tellers | Hash | bid >>>> pgbench_accounts | Hash | bid >>>> x | Round Robin | - none - >>>> pgbench_history | Hash | bid >>>> s | Replicate | - none - >>>> (8 rows) >>>> >>>> koichi=# >>>> ------ >>>> >>>> Hope it helps. >>>> >>>> Regards; >>>> ---------- >>>> Koichi Suzuki >>>> >>>> >>>> 2012/11/6 Tatsuo Ishii <is...@po...>: >>>>>> One suggestion. Because set bid value is relatively small, it may be >>>>>> better to distribute tables using MODULO, not HASH. >>>>> >>>>> What is the distribution method when pgbench -k is used? >>>>> -- >>>>> Tatsuo Ishii >>>>> SRA OSS, Inc. Japan >>>>> English: http://www.sraoss.co.jp/index_en.php >>>>> Japanese: http://www.sraoss.co.jp |
From: Tatsuo I. <is...@po...> - 2012-11-06 11:14:34
|
Thanks. Your answer cleared my question. BTW, the view created on the coordinator node should be copied to data nodes? I couldn't find the view on the data nodes. If the answer is no, DDL executed on coordinator node is not copied to data node in Postgres-XC? CREATE TABLE seems to be copied to data node. Maybe CREATE VIEW is treated specially? -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese: http://www.sraoss.co.jp > Yes, the view works at coordinator locally. > > CREATE VIEW is propagated to all the coordinators so you should run it > only once at one of them. > > The reason I suggested EXECUTE DIRECT is user table looked involved in > the query. > > Regards; > ---------- > Koichi Suzuki > > > 2012/11/6 Tatsuo Ishii <is...@po...>: >> Thanks. Your view works great! BTW, Should the view be executed on >> coordinator node? If so, I'm a little bit confused. Because you said: >> >>> Because pgxc_class and pg_class are both local to each node, oid is >>> also local. To query correctly, they should be issued using EXECUTE >>> DIRECT statement. Each EXECUTE DIRECT will return the result local >>> to each node. >>> 2012/11/6 Tatsuo Ishii <is...@po...>: >>>> I sent a query to coordinator node and got following result. Doesn't >>>> this means table "pgbench_accounts" distributed? >>>> >>>> test=# select * from pgxc_class as x join pg_class as c on x.pcrelid = c.oid where c.relname = 'pgbench_accounts'; >> >>> pgxc_class has distribution definition of each table. I'm using the >>> following views as a handy tool: >>> >>> ---- >>> [koichi@linker:scripts]$ cat distr_view.sql >>> DROP VIEW IF EXISTS xc_table_distribution; >>> >>> >>> CREATE VIEW xc_table_distribution AS >>> >>> SELECT pg_class.relname relation, >>> CASE >>> WHEN pclocatortype = 'H' THEN 'Hash' >>> WHEN pclocatortype = 'M' THEN 'Modulo' >>> WHEN pclocatortype = 'N' THEN 'Round Robin' >>> WHEN pclocatortype = 'R' THEN 'Replicate' >>> ELSE 'Unknown' >>> END AS distribution, >>> pg_attribute.attname attname >>> FROM pg_class, pgxc_class, pg_attribute >>> WHERE pg_class.oid = pgxc_class.pcrelid >>> and pg_class.oid = pg_attribute.attrelid >>> and pgxc_class.pcattnum = pg_attribute.attnum >>> UNION >>> >>> SELECT pg_class.relname relation, >>> CASE >>> WHEN pclocatortype = 'H' THEN 'Hash' >>> WHEN pclocatortype = 'M' THEN 'Modulo' >>> WHEN pclocatortype = 'N' THEN 'Round Robin' >>> WHEN pclocatortype = 'R' THEN 'Replicate' >>> ELSE 'Unknown' >>> END AS distribution, >>> '- none -' attname >>> FROM pg_class, pgxc_class, pg_attribute >>> WHERE pg_class.oid = pgxc_class.pcrelid >>> and pg_class.oid = pg_attribute.attrelid >>> and pgxc_class.pcattnum = 0 >>> ; >>> >>> COMMENT ON VIEW xc_table_distribution IS >>> 'View to show distribution/replication attribute of the given table.'; >>> >>> [koichi@linker:scripts]$ >>> ------ >>> >>> Info for pgbench tables are as follows: >>> ----------- >>> koichi=# select * from xc_table_distribution >>> koichi-# ; >>> relation | distribution | attname >>> ------------------+--------------+---------- >>> t | Hash | a >>> pgbench_branches | Hash | bid >>> y | Modulo | a >>> pgbench_tellers | Hash | bid >>> pgbench_accounts | Hash | bid >>> x | Round Robin | - none - >>> pgbench_history | Hash | bid >>> s | Replicate | - none - >>> (8 rows) >>> >>> koichi=# >>> ------ >>> >>> Hope it helps. >>> >>> Regards; >>> ---------- >>> Koichi Suzuki >>> >>> >>> 2012/11/6 Tatsuo Ishii <is...@po...>: >>>>> One suggestion. Because set bid value is relatively small, it may be >>>>> better to distribute tables using MODULO, not HASH. >>>> >>>> What is the distribution method when pgbench -k is used? >>>> -- >>>> Tatsuo Ishii >>>> SRA OSS, Inc. Japan >>>> English: http://www.sraoss.co.jp/index_en.php >>>> Japanese: http://www.sraoss.co.jp |
From: Koichi S. <koi...@gm...> - 2012-11-06 11:07:10
|
Yes, the view works at coordinator locally. CREATE VIEW is propagated to all the coordinators so you should run it only once at one of them. The reason I suggested EXECUTE DIRECT is user table looked involved in the query. Regards; ---------- Koichi Suzuki 2012/11/6 Tatsuo Ishii <is...@po...>: > Thanks. Your view works great! BTW, Should the view be executed on > coordinator node? If so, I'm a little bit confused. Because you said: > >> Because pgxc_class and pg_class are both local to each node, oid is >> also local. To query correctly, they should be issued using EXECUTE >> DIRECT statement. Each EXECUTE DIRECT will return the result local >> to each node. >> 2012/11/6 Tatsuo Ishii <is...@po...>: >>> I sent a query to coordinator node and got following result. Doesn't >>> this means table "pgbench_accounts" distributed? >>> >>> test=# select * from pgxc_class as x join pg_class as c on x.pcrelid = c.oid where c.relname = 'pgbench_accounts'; > >> pgxc_class has distribution definition of each table. I'm using the >> following views as a handy tool: >> >> ---- >> [koichi@linker:scripts]$ cat distr_view.sql >> DROP VIEW IF EXISTS xc_table_distribution; >> >> >> CREATE VIEW xc_table_distribution AS >> >> SELECT pg_class.relname relation, >> CASE >> WHEN pclocatortype = 'H' THEN 'Hash' >> WHEN pclocatortype = 'M' THEN 'Modulo' >> WHEN pclocatortype = 'N' THEN 'Round Robin' >> WHEN pclocatortype = 'R' THEN 'Replicate' >> ELSE 'Unknown' >> END AS distribution, >> pg_attribute.attname attname >> FROM pg_class, pgxc_class, pg_attribute >> WHERE pg_class.oid = pgxc_class.pcrelid >> and pg_class.oid = pg_attribute.attrelid >> and pgxc_class.pcattnum = pg_attribute.attnum >> UNION >> >> SELECT pg_class.relname relation, >> CASE >> WHEN pclocatortype = 'H' THEN 'Hash' >> WHEN pclocatortype = 'M' THEN 'Modulo' >> WHEN pclocatortype = 'N' THEN 'Round Robin' >> WHEN pclocatortype = 'R' THEN 'Replicate' >> ELSE 'Unknown' >> END AS distribution, >> '- none -' attname >> FROM pg_class, pgxc_class, pg_attribute >> WHERE pg_class.oid = pgxc_class.pcrelid >> and pg_class.oid = pg_attribute.attrelid >> and pgxc_class.pcattnum = 0 >> ; >> >> COMMENT ON VIEW xc_table_distribution IS >> 'View to show distribution/replication attribute of the given table.'; >> >> [koichi@linker:scripts]$ >> ------ >> >> Info for pgbench tables are as follows: >> ----------- >> koichi=# select * from xc_table_distribution >> koichi-# ; >> relation | distribution | attname >> ------------------+--------------+---------- >> t | Hash | a >> pgbench_branches | Hash | bid >> y | Modulo | a >> pgbench_tellers | Hash | bid >> pgbench_accounts | Hash | bid >> x | Round Robin | - none - >> pgbench_history | Hash | bid >> s | Replicate | - none - >> (8 rows) >> >> koichi=# >> ------ >> >> Hope it helps. >> >> Regards; >> ---------- >> Koichi Suzuki >> >> >> 2012/11/6 Tatsuo Ishii <is...@po...>: >>>> One suggestion. Because set bid value is relatively small, it may be >>>> better to distribute tables using MODULO, not HASH. >>> >>> What is the distribution method when pgbench -k is used? >>> -- >>> Tatsuo Ishii >>> SRA OSS, Inc. Japan >>> English: http://www.sraoss.co.jp/index_en.php >>> Japanese: http://www.sraoss.co.jp |