You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
(10) |
May
(17) |
Jun
(3) |
Jul
|
Aug
|
Sep
(8) |
Oct
(18) |
Nov
(51) |
Dec
(74) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(47) |
Feb
(44) |
Mar
(44) |
Apr
(102) |
May
(35) |
Jun
(25) |
Jul
(56) |
Aug
(69) |
Sep
(32) |
Oct
(37) |
Nov
(31) |
Dec
(16) |
2012 |
Jan
(34) |
Feb
(127) |
Mar
(218) |
Apr
(252) |
May
(80) |
Jun
(137) |
Jul
(205) |
Aug
(159) |
Sep
(35) |
Oct
(50) |
Nov
(82) |
Dec
(52) |
2013 |
Jan
(107) |
Feb
(159) |
Mar
(118) |
Apr
(163) |
May
(151) |
Jun
(89) |
Jul
(106) |
Aug
(177) |
Sep
(49) |
Oct
(63) |
Nov
(46) |
Dec
(7) |
2014 |
Jan
(65) |
Feb
(128) |
Mar
(40) |
Apr
(11) |
May
(4) |
Jun
(8) |
Jul
(16) |
Aug
(11) |
Sep
(4) |
Oct
(1) |
Nov
(5) |
Dec
(16) |
2015 |
Jan
(5) |
Feb
|
Mar
(2) |
Apr
(5) |
May
(4) |
Jun
(12) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
1
(14) |
2
|
3
(4) |
4
(12) |
5
(14) |
6
|
7
(1) |
8
(7) |
9
(10) |
10
(7) |
11
(8) |
12
(6) |
13
|
14
(1) |
15
(3) |
16
(1) |
17
(8) |
18
(11) |
19
(3) |
20
|
21
(2) |
22
(9) |
23
(2) |
24
(14) |
25
(13) |
26
(1) |
27
|
28
|
29
(1) |
30
(11) |
|
|
|
|
From: Venky K. <ve...@ad...> - 2013-04-11 15:09:52
|
Thanks Amit & Andrei. There is only one update and 4 inserts - at total of 5 threads which are waiting on each other. Not sure if this is a typical deadlock situation. These are all replicated tables and none of the datanodes are marked as primary. I will mark one as primary and see if the problem happens again. Thanks for your insight. ________________________________________ Venky Kandaswamy Principal Engineer, Adchemy Inc. 925-200-7124 ________________________________ From: Andrei Martsinchyk [and...@gm...] Sent: Thursday, April 11, 2013 2:01 AM To: Amit Khandekar Cc: Venky Kandaswamy; pos...@li... Subject: Re: [Postgres-xc-developers] PGXC hangs when run with concurrent inserts 2013/4/11 Amit Khandekar <ami...@en...<mailto:ami...@en...>> On 11 April 2013 13:35, Andrei Martsinchyk <and...@gm...<mailto:and...@gm...>> wrote: I see the not granted tuple level locks on datanodes, they are requested by the "INSERT waiting" processes. Guess they are updating indexes. It seems like these locks are not granted because of exclusive lock held by "UPDATE waiting". But it is not clear, what the update is faiting for? I thnk there are multiple updates. That's why I think they might be waiting for each other, causing a deadlock possibly because there is no primary node. I see only one update in the ps outputs. 2013/4/11 Amit Khandekar <ami...@en...<mailto:ami...@en...>> Hi Venky, Thanks for the details. Have you defined one of the data nodes as a primary node ? If no, we need to define one, because replicated table updates need that in order to avoid deadlocks. If you have already marked a node as a primary node, is the primary node one of the nodes on which the feature table is replicated on ? If no, you may have hit this bug : http://sourceforge.net/tracker/index.php?func=detail&aid=3547808&group_id=311227&atid=1310232 Currently we hit this bug because the primary node is not table-specific, it should be implemented table-specific. For now you need to make sure one of the nodes on which the table is replicated is defined as a primary node. On 11 April 2013 06:51, Venky Kandaswamy <ve...@ad...<mailto:ve...@ad...>> wrote: We are processing inserts/updates using multiple threads. Here is the trace log of the actual statements that are hung. The scenario shows the statements on the coordinator and 2 datanodes. The scenario is similar across all the datanodes. The same data updates did not cause Postgres 9.1.2 to hang. This could be related to an application problem, although we could not reproduce it on Postgres 9.1.2. At a high level, there is an update on the 'feature' table that is holding an exclusive lock on the row. The inserts are inserting to another table that has a foreign key that references the row being locked by the update. Pid 7174 and 7179 are waiting to complete and they are also similar inserts. The only thing in common seems to be that the update is locking the feature row that is referenced in a foreign key in the other inserts. This should not cause a deadlock, I believe. The question in my mind is whether pids 7181 and 7186 should have been granted exclusive access to a tuple while others were granted share access. This might cause a race condition. This causes PGXC to hang. Obviously, the update is in turn waiting for something (which we cannot figure out from the logs) and therefore not committing the update. [postgres@sv4-pgxc-db01 pgxc]$ ps -ef | grep adchemy1234 <COORDINATOR> postgres 7169 7113 0 16:41 ? 00:00:02 postgres: adchemy adchemy1234 192.168.51.73(49186) INSERT postgres 7170 7113 0 16:41 ? 00:00:02 postgres: adchemy adchemy1234 192.168.51.73(49187) INSERT postgres 7171 7113 0 16:41 ? 00:00:02 postgres: adchemy adchemy1234 192.168.51.73(49188) UPDATE postgres 7172 7113 0 16:41 ? 00:00:02 postgres: adchemy adchemy1234 192.168.51.73(49189) INSERT postgres 7173 7113 0 16:41 ? 00:00:02 postgres: adchemy adchemy1234 192.168.51.73(49190) INSERT <COORDINATOR> <DATANODE1> postgres 7174 7127 0 16:41 ? 00:00:01 postgres: adchemy adchemy1234 172.17.28.61(51909) idle in transaction postgres 7175 7127 0 16:41 ? 00:00:01 postgres: adchemy adchemy1234 172.17.28.61(51910) INSERT waiting postgres 7181 7127 0 16:41 ? 00:00:01 postgres: adchemy adchemy1234 172.17.28.61(51924) UPDATE waiting postgres 7182 7127 0 16:41 ? 00:00:01 postgres: adchemy adchemy1234 172.17.28.61(51925) INSERT waiting postgres 7183 7127 0 16:41 ? 00:00:01 postgres: adchemy adchemy1234 172.17.28.61(51926) INSERT waiting <DATANODE1> <DATANODE2> postgres 7179 7140 0 16:41 ? 00:00:00 postgres: adchemy adchemy1234 172.17.28.61(48957) idle in transaction postgres 7180 7140 0 16:41 ? 00:00:00 postgres: adchemy adchemy1234 172.17.28.61(48962) INSERT waiting postgres 7184 7140 0 16:41 ? 00:00:00 postgres: adchemy adchemy1234 172.17.28.61(48970) INSERT waiting postgres 7185 7140 0 16:41 ? 00:00:00 postgres: adchemy adchemy1234 172.17.28.61(48975) INSERT waiting postgres 7186 7140 0 16:41 ? 00:00:00 postgres: adchemy adchemy1234 172.17.28.61(48980) UPDATE waiting <DATANODE2> -----LOGS----- formatted %t %u %p 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute S_1: BEGIN 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute <unnamed>: select nextval ('hibernate_sequence') 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute <unnamed>: insert into biods.product_feature (category_id, category_semid, created_ts, feature_id, feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) 2013-04-10 16:42:16 PDT adchemy 7169 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = 'description', $6 = '46105', $7 = 'description,Give your riches the designer treatment with Mcms leather heritage wallet. The logo-stamped little number stores your essentials in luxe vintage style.', $8 = NULL, $9 = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = '46455' 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute S_1: BEGIN 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute <unnamed>: select nextval ('hibernate_sequence') 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute <unnamed>: insert into biods.product_feature (category_id, category_semid, created_ts, feature_id, feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) 2013-04-10 16:42:16 PDT adchemy 7170 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up with a bold logo-stamped plaque in this utility chic wallet from Marc By Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = '2013-04-10 15:02:43.413-07', $12 = '46445' 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute S_1: BEGIN 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute <unnamed>: select feature0_.feature_id as feature1_8_1_, feature0_.created_ts as created2_8_1_, feature0_.feature_name as feature3_8_1_, feature0_.feature_semid as feature4_8_1_, feature0_.modified_by as modified5_8_1_, feature0_.source_msg_ts as source6_8_1_, feature0_.updated_ts as updated7_8_1_, featureval1_.feature_id as feature9_8_3_, featureval1_.feature_value_id as feature1_14_3_, featureval1_.feature_value_id as feature1_14_0_, featureval1_.created_ts as created2_14_0_, featureval1_.feature_id as feature9_14_0_, featureval1_.feature_semid as feature3_14_0_, featureval1_.feature_value as feature4_14_0_, featureval1_.feature_value_semid as feature5_14_0_, featureval1_.modified_by as modified6_14_0_, featureval1_.source_msg_ts as source7_14_0_, featureval1_.updated_ts as updated8_14_0_ from biods.feature feature0_ left outer join biods.feature_value featureval1_ on feature0_.feature_id=featureval1_.feature_id where feature0_.feature_id=$1 2013-04-10 16:42:15 PDT adchemy 7171 DETAIL: parameters: $1 = '42318' 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute <unnamed>: update biods.feature set created_ts=$1, feature_name=$2, feature_semid=$3, modified_by=$4, source_msg_ts=$5, updated_ts=$6 where feature_id=$7 2013-04-10 16:42:15 PDT adchemy 7171 DETAIL: parameters: $1 = '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', $7 = '42318' 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute S_1: BEGIN 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute <unnamed>: select nextval ('hibernate_sequence') 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute <unnamed>: insert into biods.product_feature (category_id, category_semid, created_ts, feature_id, feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) 2013-04-10 16:42:17 PDT adchemy 7172 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = 'description', $6 = '44831', $7 = 'description,A chic logo-detailed cosmetic case for the contemporary girl from Tory Burch. Exclusive to Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = '2013-04-10 15:02:42.003-07', $12 = '46460' 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute S_1: BEGIN 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute <unnamed>: select nextval ('hibernate_sequence') 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute <unnamed>: insert into biods.product_feature (category_id, category_semid, created_ts, feature_id, feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) 2013-04-10 16:42:15 PDT adchemy 7173 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = 'description', $6 = '46154', $7 = 'description,Keep the essentials close with LeSportsacs crossbody bag in matte black nylon practical interior zip compartments make those daily errands a little bit easier.', $8 = NULL, $9 = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = '46435' 2013-04-10 16:42:15 PDT adchemy 7174 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:15 PDT adchemy 7174 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:15 PDT adchemy 7174 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = 'description', $6 = '46154', $7 = 'description,Keep the essentials close with LeSportsacs crossbody bag in matte black nylon practical interior zip compartments make those daily errands a little bit easier.', $8 = NULL, $9 = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = '46435' 2013-04-10 16:42:16 PDT adchemy 7175 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:16 PDT adchemy 7175 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:16 PDT adchemy 7175 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = 'description', $6 = '46105', $7 = 'description,Give your riches the designer treatment with Mcms leather heritage wallet. The logo-stamped little number stores your essentials in luxe vintage style.', $8 = NULL, $9 = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = '46455' 2013-04-10 16:42:15 PDT adchemy 7179 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:15 PDT adchemy 7179 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:15 PDT adchemy 7179 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = 'description', $6 = '46154', $7 = 'description,Keep the essentials close with LeSportsacs crossbody bag in matte black nylon practical interior zip compartments make those daily errands a little bit easier.', $8 = NULL, $9 = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = '46435' 2013-04-10 16:42:16 PDT adchemy 7180 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:16 PDT adchemy 7180 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:16 PDT adchemy 7180 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = 'description', $6 = '46105', $7 = 'description,Give your riches the designer treatment with Mcms leather heritage wallet. The logo-stamped little number stores your essentials in luxe vintage style.', $8 = NULL, $9 = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = '46455' 2013-04-10 16:42:15 PDT adchemy 7181 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:15 PDT adchemy 7181 LOG: execute <unnamed>: UPDATE biods.feature SET feature_semid = $3, feature_name = $2, created_ts = $1, updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = $7) 2013-04-10 16:42:15 PDT adchemy 7181 DETAIL: parameters: $1 = '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', $7 = '42318' 2013-04-10 16:42:17 PDT adchemy 7182 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:17 PDT adchemy 7182 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:17 PDT adchemy 7182 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = 'description', $6 = '44831', $7 = 'description,A chic logo-detailed cosmetic case for the contemporary girl from Tory Burch. Exclusive to Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = '2013-04-10 15:02:42.003-07', $12 = '46460' 2013-04-10 16:42:16 PDT adchemy 7183 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:16 PDT adchemy 7183 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:16 PDT adchemy 7183 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up with a bold logo-stamped plaque in this utility chic wallet from Marc By Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = '2013-04-10 15:02:43.413-07', $12 = '46445' 2013-04-10 16:42:17 PDT adchemy 7184 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:17 PDT adchemy 7184 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:17 PDT adchemy 7184 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = 'description', $6 = '44831', $7 = 'description,A chic logo-detailed cosmetic case for the contemporary girl from Tory Burch. Exclusive to Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = '2013-04-10 15:02:42.003-07', $12 = '46460' 2013-04-10 16:42:16 PDT adchemy 7185 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:16 PDT adchemy 7185 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:16 PDT adchemy 7185 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up with a bold logo-stamped plaque in this utility chic wallet from Marc By Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = '2013-04-10 15:02:43.413-07', $12 = '46445' 2013-04-10 16:42:15 PDT adchemy 7186 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:15 PDT adchemy 7186 LOG: execute <unnamed>: UPDATE biods.feature SET feature_semid = $3, feature_name = $2, created_ts = $1, updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = $7) 2013-04-10 16:42:15 PDT adchemy 7186 DETAIL: parameters: $1 = '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', $7 = '42318' LOCKS ON COORDINATOR: [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5432 -U postgres -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by mode;" pid | relname | locktype | mode | granted ------+--------------------+----------+------------------+--------- 7169 | hibernate_sequence | relation | AccessShareLock | t 7173 | hibernate_sequence | relation | AccessShareLock | t 7172 | hibernate_sequence | relation | AccessShareLock | t 7171 | feature_value | relation | AccessShareLock | t 7171 | feature | relation | AccessShareLock | t 7170 | hibernate_sequence | relation | AccessShareLock | t 7171 | feature | relation | RowExclusiveLock | t 7172 | product_feature | relation | RowExclusiveLock | t 7170 | product_feature | relation | RowExclusiveLock | t 7173 | product_feature | relation | RowExclusiveLock | t 7169 | product_feature | relation | RowExclusiveLock | t (11 rows) LOCKS ON DATANODE1: [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5433 -U postgres -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by mode;" pid | relname | locktype | mode | granted ------+-----------------------+----------+--------------------------+--------- 7174 | prd_id | relation | AccessShareLock | t 7182 | feature_id | relation | AccessShareLock | t 7174 | feature_value_id | relation | AccessShareLock | t 7183 | feature_id | relation | AccessShareLock | t 7174 | feature_id | relation | AccessShareLock | t 7175 | feature_id | relation | AccessShareLock | t 7181 | feature | tuple | ExclusiveLock | t 7181 | feature_semid | relation | RowExclusiveLock | t 7181 | feature_id | relation | RowExclusiveLock | t 7181 | feature | relation | RowExclusiveLock | t 7175 | cat_prd_feature_semid | relation | RowExclusiveLock | t 7183 | cat_prd_feature_semid | relation | RowExclusiveLock | t 7183 | prd_feature_id | relation | RowExclusiveLock | t 7183 | product_feature | relation | RowExclusiveLock | t 7182 | cat_prd_feature_semid | relation | RowExclusiveLock | t 7182 | prd_feature_id | relation | RowExclusiveLock | t 7182 | product_feature | relation | RowExclusiveLock | t 7175 | prd_feature_id | relation | RowExclusiveLock | t 7175 | product_feature | relation | RowExclusiveLock | t 7174 | product_feature | relation | RowExclusiveLock | t 7206 | feature_semid | relation | RowExclusiveLock | t 7206 | feature_id | relation | RowExclusiveLock | t 7174 | product | relation | RowShareLock | t 7182 | feature | relation | RowShareLock | t 7174 | feature_value | relation | RowShareLock | t 7183 | category | relation | RowShareLock | t 7174 | feature | relation | RowShareLock | t 7174 | category | relation | RowShareLock | t 7175 | category | relation | RowShareLock | t 7175 | feature | relation | RowShareLock | t 7183 | feature | relation | RowShareLock | t 7182 | category | relation | RowShareLock | t 7182 | feature | tuple | ShareLock | f 7175 | feature | tuple | ShareLock | f 7183 | feature | tuple | ShareLock | f 7206 | feature | relation | ShareUpdateExclusiveLock | t LOCKS ON DATANODE2: [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5434 -U postgres -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by mode;" pid | relname | locktype | mode | granted ------+-----------------------+----------+--------------------------+--------- 7185 | feature_id | relation | AccessShareLock | t 7179 | feature_value_id | relation | AccessShareLock | t 7179 | prd_id | relation | AccessShareLock | t 7184 | feature_id | relation | AccessShareLock | t 7180 | feature_id | relation | AccessShareLock | t 7179 | feature_id | relation | AccessShareLock | t 7186 | feature | tuple | ExclusiveLock | t 7184 | prd_feature_id | relation | RowExclusiveLock | t 7184 | product_feature | relation | RowExclusiveLock | t 7186 | feature_semid | relation | RowExclusiveLock | t 7186 | feature_id | relation | RowExclusiveLock | t 7186 | feature | relation | RowExclusiveLock | t 7185 | cat_prd_feature_semid | relation | RowExclusiveLock | t 7185 | prd_feature_id | relation | RowExclusiveLock | t 7185 | product_feature | relation | RowExclusiveLock | t 7184 | cat_prd_feature_semid | relation | RowExclusiveLock | t 7180 | cat_prd_feature_semid | relation | RowExclusiveLock | t 7180 | prd_feature_id | relation | RowExclusiveLock | t 7180 | product_feature | relation | RowExclusiveLock | t 7179 | product_feature | relation | RowExclusiveLock | t 7202 | feature_semid | relation | RowExclusiveLock | t 7202 | feature_id | relation | RowExclusiveLock | t 7179 | product | relation | RowShareLock | t 7184 | feature | relation | RowShareLock | t 7179 | feature_value | relation | RowShareLock | t 7185 | category | relation | RowShareLock | t 7179 | feature | relation | RowShareLock | t 7179 | category | relation | RowShareLock | t 7180 | feature | relation | RowShareLock | t 7180 | category | relation | RowShareLock | t 7185 | feature | relation | RowShareLock | t 7184 | category | relation | RowShareLock | t 7185 | feature | tuple | ShareLock | f 7180 | feature | tuple | ShareLock | f 7184 | feature | tuple | ShareLock | f 7202 | feature | relation | ShareUpdateExclusiveLock | t (36 rows) ________________________________________ Venky Kandaswamy Principal Engineer, Adchemy Inc. 925-200-7124 ________________________________ From: Koichi Suzuki [koi...@gm...<mailto:koi...@gm...>] Sent: Monday, April 08, 2013 10:41 PM To: Amit Khandekar Cc: Venky Kandaswamy; pos...@li...<mailto:pos...@li...> Subject: Re: [Postgres-xc-developers] PGXC hangs when run with concurrent inserts Because insert is being done in parallel, I'm afraid there could be a possibility that we have internal lock conflicts, which should not happen. Regards; ---------- Koichi Suzuki 2013/4/9 Amit Khandekar <ami...@en...<mailto:ami...@en...>> On 9 April 2013 06:46, Venky Kandaswamy <ve...@ad...<mailto:ve...@ad...>> wrote: All, We have been running into a hang issue on our app that appears to be related to PGXC. Our app processes messages from RabbitMQ and inserts/updates tables. We run 5 concurrent threads. The incoming queues are replicated, one feeding Postgres 9.1 and the other feeding PGXC (current git master). PGXC is hanging on inserts after processing a few transactions. It does not appear to be related to the actual data itself. IT looks like all the sessions are waiting for something. There is no information on locks available from pg_locks. Since most of the operations are inserts, it does not look like it is due to locks, unless something has acquired table locks. But just to rule out that possibility, it would be better if you check pg_locks on the datanodes, if you have checked it only on coordinator so far. An strace simply says recfrom(10. The are no errors in the logs from gtm, coordinator or datanodes. The tables have referential integrity and use a shared sequence to get the next id. Is it possible that something is going on with the logic to retrieve sequence numbers? The tables are all replicated. Unfortunately, we have not been able to reproduce a reliable test case. [postgres@gnode0 pgxc]$ /usr/local/pgsql/bin/psql -p 5433 -U postgres -d postgres -c 'select * from pg_catalog.pg_stat_activity;' datid | datname | pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | xact_start | query_start | state_change | waiting | state | query -------+--------------+-------+----------+----------+------------------+----------------+-----------------+-------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+---------+---------------------+-------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 12893 | postgres | 22330 | 10 | postgres | pgxc | 192.168.53.109 | | 47025 | 2013-03-31 21:42:16.724845-07 | | 2013-04-08 15:43:52.313325-07 | 2013-04-08 15:26:11.444754-07 | f | idle | COMMIT PREPARED 'T1 32273' 16393 | master | 4267 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 54961 | 2013-04-08 15:24:28.668023-07 | | 2013-04-08 15:33:17.586836-07 | 2013-04-08 15:33:17.587942-07 | f | idle | SELECT count(*) FRO M ONLY bicommon.account_datasource WHERE true 16395 | adchemy10013 | 4363 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55084 | 2013-04-08 15:28:48.822939-07 | | 2013-04-08 15:50:21.650727-07 | 2013-04-08 15:50:07.916753-07 | f | idle | SELECT prd_id, prd_ semid, prd_name, prd_line, prd_model, prd_brand, prd_image_url, prd_dest_url, created_ts, updated_ts, source_msg_ts, modified_by FROM biods.product 16393 | master | 4486 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55246 | 2013-04-08 15:33:21.019388-07 | | 2013-04-08 15:43:51.321376-07 | 2013-04-08 15:43:51.322675-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4781 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55515 | 2013-04-08 15:42:42.122785-07 | | 2013-04-08 17:02:21.023713-07 | 2013-04-08 17:02:20.804751-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4787 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55521 | 2013-04-08 15:42:42.142662-07 | | 2013-04-08 16:17:19.26364-07 | 2013-04-08 16:17:19.126163-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4792 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55526 | 2013-04-08 15:42:42.159009-07 | | 2013-04-08 15:45:11.915026-07 | 2013-04-08 15:45:11.886392-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4799 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55533 | 2013-04-08 15:42:42.678387-07 | | 2013-04-08 17:02:21.195332-07 | 2013-04-08 17:02:20.805074-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4804 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55538 | 2013-04-08 15:42:42.694802-07 | | 2013-04-08 15:45:11.904619-07 | 2013-04-08 15:45:11.888493-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16395 | adchemy10013 | 4977 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55732 | 2013-04-08 15:47:34.901175-07 | 2013-04-08 15:48:08.345331-07 | 2013-04-08 15:48:08.528818-07 | 2013-04-08 15:48:08.410815-07 | f | idle in transaction | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 4979 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55734 | 2013-04-08 15:47:35.042778-07 | 2013-04-08 15:48:16.384763-07 | 2013-04-08 15:48:16.506899-07 | 2013-04-08 15:48:16.388503-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 4985 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55740 | 2013-04-08 15:47:35.235945-07<tel:35.235945-07> | 2013-04-08 15:48:14.38895-07 | 2013-04-08 15:48:14.445351-07 | 2013-04-08 15:48:14.446752-07 | t | active | UPDATE biods.featur e SET feature_semid = $3, feature_name = $2, created_ts = $1, updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = $7) 16395 | adchemy10013 | 4986 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55741 | 2013-04-08 15:47:35.238843-07<tel:35.238843-07> | 2013-04-08 15:48:18.201043-07 | 2013-04-08 15:48:18.273204-07 | 2013-04-08 15:48:18.205647-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 4998 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55753 | 2013-04-08 15:47:35.910309-07 | 2013-04-08 15:48:08.412038-07 | 2013-04-08 15:48:08.566945-07 | 2013-04-08 15:48:08.415026-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6340 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57002 | 2013-04-08 16:31:44.414804-07 | 2013-04-08 16:31:50.293828-07 | 2013-04-08 16:31:50.433988-07 | 2013-04-08 16:31:50.297752-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6341 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57003 | 2013-04-08 16:31:44.418356-07 | 2013-04-08 16:31:49.450704-07 | 2013-04-08 16:31:49.599946-07 | 2013-04-08 16:31:49.45562-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6348 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57010 | 2013-04-08 16:31:45.065767-07<tel:45.065767-07> | 2013-04-08 16:31:50.699979-07 | 2013-04-08 16:31:50.817425-07 | 2013-04-08 16:31:50.704669-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6349 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57011 | 2013-04-08 16:31:45.06926-07 | 2013-04-08 16:31:51.528207-07 | 2013-04-08 16:31:51.582036-07 | 2013-04-08 16:31:51.532618-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6350 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57012 | 2013-04-08 16:31:45.072711-07<tel:45.072711-07> | 2013-04-08 16:31:50.085336-07 | 2013-04-08 16:31:50.223221-07 | 2013-04-08 16:31:50.088908-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7269 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57774 | 2013-04-08 16:57:15.563006-07 | 2013-04-08 16:57:21.849156-07 | 2013-04-08 16:57:21.978984-07 | 2013-04-08 16:57:21.853289-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7271 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57776 | 2013-04-08 16:57:15.63199-07 | 2013-04-08 16:57:16.575535-07 | 2013-04-08 16:57:17.00605-07 | 2013-04-08 16:57:17.007747-07 | t | active | INSERT INTO biods.f eature_value (feature_value_id, feature_value_semid, feature_value, feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) 16395 | adchemy10013 | 7283 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57788 | 2013-04-08 16:57:16.292702-07 | 2013-04-08 16:57:21.849125-07 | 2013-04-08 16:57:21.978824-07 | 2013-04-08 16:57:21.853251-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7284 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57789 | 2013-04-08 16:57:16.295879-07 | 2013-04-08 16:57:24.233166-07 | 2013-04-08 16:57:24.321938-07 | 2013-04-08 16:57:24.237514-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7285 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57790 | 2013-04-08 16:57:16.299271-07 | 2013-04-08 16:57:22.119868-07 | 2013-04-08 16:57:22.197213-07 | 2013-04-08 16:57:22.128357-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7465 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57954 | 2013-04-08 17:01:54.750113-07 | 2013-04-08 17:02:00.17336-07 | 2013-04-08 17:02:00.320469-07 | 2013-04-08 17:02:00.177758-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7466 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57955 | 2013-04-08 17:01:54.753559-07 | 2013-04-08 17:01:59.49003-07 | 2013-04-08 17:01:59.602925-07 | 2013-04-08 17:01:59.493732-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7467 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57956 | 2013-04-08 17:01:54.75699-07 | 2013-04-08 17:01:58.262083-07 | 2013-04-08 17:01:58.349452-07 | 2013-04-08 17:01:58.350822-07 | t | active | INSERT INTO biods.f eature_value (feature_value_id, feature_value_semid, feature_value, feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) 16395 | adchemy10013 | 7473 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57963 | 2013-04-08 17:01:55.49134-07 | 2013-04-08 17:02:00.313138-07 | 2013-04-08 17:02:00.420405-07 | 2013-04-08 17:02:00.318887-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7474 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57964 | 2013-04-08 17:01:55.494777-07 | 2013-04-08 17:02:00.514142-07 | 2013-04-08 17:02:00.577239-07 | 2013-04-08 17:02:00.519572-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 12893 | postgres | 8517 | 10 | postgres | psql | | | -1 | 2013-04-08 17:35:28.217934-07 | | 2013-04-08 17:35:28.220366-07 | 2013-04-08 17:35:28.220369-07 | f | active | select * from pg_ca talog.pg_stat_activity; (30 rows) ________________________________________ Venky Kandaswamy Principal Engineer, Adchemy Inc. 925-200-7124<tel:925-200-7124> ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Postgres-xc-developers mailing list Pos...@li...<mailto:Pos...@li...> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Postgres-xc-developers mailing list Pos...@li...<mailto:Pos...@li...> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Postgres-xc-developers mailing list Pos...@li...<mailto:Pos...@li...> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Postgres-xc-developers mailing list Pos...@li...<mailto:Pos...@li...> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers -- Andrei Martsinchyk StormDB - http://www.stormdb.com<http://www.stormdb.com/> The Database Cloud -- Andrei Martsinchyk StormDB - http://www.stormdb.com<http://www.stormdb.com/> The Database Cloud |
From: Andrei M. <and...@gm...> - 2013-04-11 09:01:15
|
2013/4/11 Amit Khandekar <ami...@en...> > > > > On 11 April 2013 13:35, Andrei Martsinchyk <and...@gm...>wrote: > >> I see the not granted tuple level locks on datanodes, they are requested >> by the "INSERT waiting" processes. Guess they are updating indexes. >> It seems like these locks are not granted because of exclusive lock held >> by "UPDATE waiting". >> > > > >> But it is not clear, what the update is faiting for? >> > I thnk there are multiple updates. That's why I think they might be > waiting for each other, causing a deadlock possibly because there is no > primary node. > > I see only one update in the ps outputs. > >> >> 2013/4/11 Amit Khandekar <ami...@en...> >> >>> Hi Venky, >>> >>> Thanks for the details. Have you defined one of the data nodes as a >>> primary node ? If no, we need to define one, because replicated table >>> updates need that in order to avoid deadlocks. If you have already marked a >>> node as a primary node, is the primary node one of the nodes on which the >>> feature table is replicated on ? If no, you may have hit this bug : >>> >>> http://sourceforge.net/tracker/index.php?func=detail&aid=3547808&group_id=311227&atid=1310232 >>> >>> >>> Currently we hit this bug because the primary node is not >>> table-specific, it should be implemented table-specific. For now you need >>> to make sure one of the nodes on which the table is replicated is defined >>> as a primary node. >>> >>> >>> On 11 April 2013 06:51, Venky Kandaswamy <ve...@ad...> wrote: >>> >>>> We are processing inserts/updates using multiple threads. Here is the >>>> trace log of the actual statements that are hung. The scenario shows the >>>> statements on the coordinator and 2 datanodes. The scenario is similar >>>> across all the datanodes. >>>> The same data updates did not cause Postgres 9.1.2 to hang. This could >>>> be related to an application problem, although we could not reproduce it on >>>> Postgres 9.1.2. >>>> >>>> At a high level, there is an update on the 'feature' table that is >>>> holding an exclusive lock on the row. The inserts are inserting to another >>>> table that has a foreign key that references the row being locked by the >>>> update. Pid 7174 and 7179 are waiting to complete and they are also similar >>>> inserts. The only thing in common seems to be that the update is locking >>>> the feature row that is referenced in a foreign key in the other inserts. >>>> This should not cause a deadlock, I believe. >>>> >>>> The question in my mind is whether pids 7181 and 7186 should have been >>>> granted exclusive access to a tuple while others were granted share access. >>>> This might cause a race condition. >>>> >>>> This causes PGXC to hang. Obviously, the update is in turn waiting for >>>> something (which we cannot figure out from the logs) and therefore not >>>> committing the update. >>>> >>>> [postgres@sv4-pgxc-db01 pgxc]$ ps -ef | grep adchemy1234 >>>> <COORDINATOR> >>>> postgres 7169 7113 0 16:41 ? 00:00:02 postgres: adchemy >>>> adchemy1234 192.168.51.73(49186) INSERT >>>> postgres 7170 7113 0 16:41 ? 00:00:02 postgres: adchemy >>>> adchemy1234 192.168.51.73(49187) INSERT >>>> postgres 7171 7113 0 16:41 ? 00:00:02 postgres: adchemy >>>> adchemy1234 192.168.51.73(49188) UPDATE >>>> postgres 7172 7113 0 16:41 ? 00:00:02 postgres: adchemy >>>> adchemy1234 192.168.51.73(49189) INSERT >>>> postgres 7173 7113 0 16:41 ? 00:00:02 postgres: adchemy >>>> adchemy1234 192.168.51.73(49190) INSERT >>>> <COORDINATOR> >>>> >>>> <DATANODE1> >>>> postgres 7174 7127 0 16:41 ? 00:00:01 postgres: adchemy >>>> adchemy1234 172.17.28.61(51909) idle in transaction >>>> postgres 7175 7127 0 16:41 ? 00:00:01 postgres: adchemy >>>> adchemy1234 172.17.28.61(51910) INSERT waiting >>>> postgres 7181 7127 0 16:41 ? 00:00:01 postgres: adchemy >>>> adchemy1234 172.17.28.61(51924) UPDATE waiting >>>> postgres 7182 7127 0 16:41 ? 00:00:01 postgres: adchemy >>>> adchemy1234 172.17.28.61(51925) INSERT waiting >>>> postgres 7183 7127 0 16:41 ? 00:00:01 postgres: adchemy >>>> adchemy1234 172.17.28.61(51926) INSERT waiting >>>> <DATANODE1> >>>> >>>> <DATANODE2> >>>> postgres 7179 7140 0 16:41 ? 00:00:00 postgres: adchemy >>>> adchemy1234 172.17.28.61(48957) idle in transaction >>>> postgres 7180 7140 0 16:41 ? 00:00:00 postgres: adchemy >>>> adchemy1234 172.17.28.61(48962) INSERT waiting >>>> postgres 7184 7140 0 16:41 ? 00:00:00 postgres: adchemy >>>> adchemy1234 172.17.28.61(48970) INSERT waiting >>>> postgres 7185 7140 0 16:41 ? 00:00:00 postgres: adchemy >>>> adchemy1234 172.17.28.61(48975) INSERT waiting >>>> postgres 7186 7140 0 16:41 ? 00:00:00 postgres: adchemy >>>> adchemy1234 172.17.28.61(48980) UPDATE waiting >>>> <DATANODE2> >>>> >>>> -----LOGS----- formatted %t %u %p >>>> >>>> 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute S_1: BEGIN >>>> 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute <unnamed>: select >>>> nextval ('hibernate_sequence') >>>> 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute <unnamed>: insert >>>> into biods.product_feature (category_id, category_semid, created_ts, >>>> feature_id, feature_semid, feature_value_id, feature_value_semid, >>>> modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, >>>> $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) >>>> 2013-04-10 16:42:16 PDT adchemy 7169 DETAIL: parameters: $1 = '42302', >>>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = >>>> 'description', $6 = '46105', $7 = 'description,Give your riches the >>>> designer treatment with Mcms leather heritage wallet. The logo-stamped >>>> little number stores your essentials in luxe vintage style.', $8 = NULL, $9 >>>> = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = >>>> '46455' >>>> >>>> 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute S_1: BEGIN >>>> 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute <unnamed>: select >>>> nextval ('hibernate_sequence') >>>> 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute <unnamed>: insert >>>> into biods.product_feature (category_id, category_semid, created_ts, >>>> feature_id, feature_semid, feature_value_id, feature_value_semid, >>>> modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, >>>> $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) >>>> 2013-04-10 16:42:16 PDT adchemy 7170 DETAIL: parameters: $1 = '42302', >>>> $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = >>>> 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up >>>> with a bold logo-stamped plaque in this utility chic wallet from Marc By >>>> Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = >>>> '2013-04-10 15:02:43.413-07', $12 = '46445' >>>> >>>> 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute S_1: BEGIN >>>> 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute <unnamed>: select >>>> feature0_.feature_id as feature1_8_1_, feature0_.created_ts as >>>> created2_8_1_, feature0_.feature_name as feature3_8_1_, >>>> feature0_.feature_semid as feature4_8_1_, feature0_.modified_by as >>>> modified5_8_1_, feature0_.source_msg_ts as source6_8_1_, >>>> feature0_.updated_ts as updated7_8_1_, featureval1_.feature_id as >>>> feature9_8_3_, featureval1_.feature_value_id as feature1_14_3_, >>>> featureval1_.feature_value_id as feature1_14_0_, featureval1_.created_ts as >>>> created2_14_0_, featureval1_.feature_id as feature9_14_0_, >>>> featureval1_.feature_semid as feature3_14_0_, featureval1_.feature_value as >>>> feature4_14_0_, featureval1_.feature_value_semid as feature5_14_0_, >>>> featureval1_.modified_by as modified6_14_0_, featureval1_.source_msg_ts as >>>> source7_14_0_, featureval1_.updated_ts as updated8_14_0_ from biods.feature >>>> feature0_ left outer join biods.feature_value featureval1_ on >>>> feature0_.feature_id=featureval1_.feature_id where feature0_.feature_id=$1 >>>> 2013-04-10 16:42:15 PDT adchemy 7171 DETAIL: parameters: $1 = '42318' >>>> 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute <unnamed>: update >>>> biods.feature set created_ts=$1, feature_name=$2, feature_semid=$3, >>>> modified_by=$4, source_msg_ts=$5, updated_ts=$6 where feature_id=$7 >>>> 2013-04-10 16:42:15 PDT adchemy 7171 DETAIL: parameters: $1 = >>>> '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = >>>> NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', >>>> $7 = '42318' >>>> >>>> 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute S_1: BEGIN >>>> 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute <unnamed>: select >>>> nextval ('hibernate_sequence') >>>> 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute <unnamed>: insert >>>> into biods.product_feature (category_id, category_semid, created_ts, >>>> feature_id, feature_semid, feature_value_id, feature_value_semid, >>>> modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, >>>> $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) >>>> 2013-04-10 16:42:17 PDT adchemy 7172 DETAIL: parameters: $1 = '42302', >>>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = >>>> 'description', $6 = '44831', $7 = 'description,A chic logo-detailed >>>> cosmetic case for the contemporary girl from Tory Burch. Exclusive to >>>> Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = >>>> '2013-04-10 15:02:42.003-07', $12 = '46460' >>>> >>>> 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute S_1: BEGIN >>>> 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute <unnamed>: select >>>> nextval ('hibernate_sequence') >>>> 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute <unnamed>: insert >>>> into biods.product_feature (category_id, category_semid, created_ts, >>>> feature_id, feature_semid, feature_value_id, feature_value_semid, >>>> modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, >>>> $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) >>>> 2013-04-10 16:42:15 PDT adchemy 7173 DETAIL: parameters: $1 = '42302', >>>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = >>>> 'description', $6 = '46154', $7 = 'description,Keep the essentials close >>>> with LeSportsacs crossbody bag in matte black nylon practical interior zip >>>> compartments make those daily errands a little bit easier.', $8 = NULL, $9 >>>> = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = >>>> '46435' >>>> >>>> 2013-04-10 16:42:15 PDT adchemy 7174 LOG: statement: START TRANSACTION >>>> ISOLATION LEVEL read committed READ WRITE >>>> 2013-04-10 16:42:15 PDT adchemy 7174 LOG: execute <unnamed>: INSERT >>>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 2013-04-10 16:42:15 PDT adchemy 7174 DETAIL: parameters: $1 = '42302', >>>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = >>>> 'description', $6 = '46154', $7 = 'description,Keep the essentials close >>>> with LeSportsacs crossbody bag in matte black nylon practical interior zip >>>> compartments make those daily errands a little bit easier.', $8 = NULL, $9 >>>> = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = >>>> '46435' >>>> >>>> 2013-04-10 16:42:16 PDT adchemy 7175 LOG: statement: START TRANSACTION >>>> ISOLATION LEVEL read committed READ WRITE >>>> 2013-04-10 16:42:16 PDT adchemy 7175 LOG: execute <unnamed>: INSERT >>>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 2013-04-10 16:42:16 PDT adchemy 7175 DETAIL: parameters: $1 = '42302', >>>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = >>>> 'description', $6 = '46105', $7 = 'description,Give your riches the >>>> designer treatment with Mcms leather heritage wallet. The logo-stamped >>>> little number stores your essentials in luxe vintage style.', $8 = NULL, $9 >>>> = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = >>>> '46455' >>>> >>>> 2013-04-10 16:42:15 PDT adchemy 7179 LOG: statement: START TRANSACTION >>>> ISOLATION LEVEL read committed READ WRITE >>>> 2013-04-10 16:42:15 PDT adchemy 7179 LOG: execute <unnamed>: INSERT >>>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 2013-04-10 16:42:15 PDT adchemy 7179 DETAIL: parameters: $1 = '42302', >>>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = >>>> 'description', $6 = '46154', $7 = 'description,Keep the essentials close >>>> with LeSportsacs crossbody bag in matte black nylon practical interior zip >>>> compartments make those daily errands a little bit easier.', $8 = NULL, $9 >>>> = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = >>>> '46435' >>>> >>>> 2013-04-10 16:42:16 PDT adchemy 7180 LOG: statement: START TRANSACTION >>>> ISOLATION LEVEL read committed READ WRITE >>>> 2013-04-10 16:42:16 PDT adchemy 7180 LOG: execute <unnamed>: INSERT >>>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 2013-04-10 16:42:16 PDT adchemy 7180 DETAIL: parameters: $1 = '42302', >>>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = >>>> 'description', $6 = '46105', $7 = 'description,Give your riches the >>>> designer treatment with Mcms leather heritage wallet. The logo-stamped >>>> little number stores your essentials in luxe vintage style.', $8 = NULL, $9 >>>> = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = >>>> '46455' >>>> >>>> 2013-04-10 16:42:15 PDT adchemy 7181 LOG: statement: START TRANSACTION >>>> ISOLATION LEVEL read committed READ WRITE >>>> 2013-04-10 16:42:15 PDT adchemy 7181 LOG: execute <unnamed>: UPDATE >>>> biods.feature SET feature_semid = $3, feature_name = $2, created_ts = $1, >>>> updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = >>>> $7) >>>> 2013-04-10 16:42:15 PDT adchemy 7181 DETAIL: parameters: $1 = >>>> '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = >>>> NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', >>>> $7 = '42318' >>>> >>>> 2013-04-10 16:42:17 PDT adchemy 7182 LOG: statement: START TRANSACTION >>>> ISOLATION LEVEL read committed READ WRITE >>>> 2013-04-10 16:42:17 PDT adchemy 7182 LOG: execute <unnamed>: INSERT >>>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 2013-04-10 16:42:17 PDT adchemy 7182 DETAIL: parameters: $1 = '42302', >>>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = >>>> 'description', $6 = '44831', $7 = 'description,A chic logo-detailed >>>> cosmetic case for the contemporary girl from Tory Burch. Exclusive to >>>> Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = >>>> '2013-04-10 15:02:42.003-07', $12 = '46460' >>>> >>>> 2013-04-10 16:42:16 PDT adchemy 7183 LOG: statement: START TRANSACTION >>>> ISOLATION LEVEL read committed READ WRITE >>>> 2013-04-10 16:42:16 PDT adchemy 7183 LOG: execute <unnamed>: INSERT >>>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 2013-04-10 16:42:16 PDT adchemy 7183 DETAIL: parameters: $1 = '42302', >>>> $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = >>>> 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up >>>> with a bold logo-stamped plaque in this utility chic wallet from Marc By >>>> Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = >>>> '2013-04-10 15:02:43.413-07', $12 = '46445' >>>> >>>> 2013-04-10 16:42:17 PDT adchemy 7184 LOG: statement: START TRANSACTION >>>> ISOLATION LEVEL read committed READ WRITE >>>> 2013-04-10 16:42:17 PDT adchemy 7184 LOG: execute <unnamed>: INSERT >>>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 2013-04-10 16:42:17 PDT adchemy 7184 DETAIL: parameters: $1 = '42302', >>>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = >>>> 'description', $6 = '44831', $7 = 'description,A chic logo-detailed >>>> cosmetic case for the contemporary girl from Tory Burch. Exclusive to >>>> Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = >>>> '2013-04-10 15:02:42.003-07', $12 = '46460' >>>> >>>> 2013-04-10 16:42:16 PDT adchemy 7185 LOG: statement: START TRANSACTION >>>> ISOLATION LEVEL read committed READ WRITE >>>> 2013-04-10 16:42:16 PDT adchemy 7185 LOG: execute <unnamed>: INSERT >>>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 2013-04-10 16:42:16 PDT adchemy 7185 DETAIL: parameters: $1 = '42302', >>>> $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = >>>> 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up >>>> with a bold logo-stamped plaque in this utility chic wallet from Marc By >>>> Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = >>>> '2013-04-10 15:02:43.413-07', $12 = '46445' >>>> >>>> 2013-04-10 16:42:15 PDT adchemy 7186 LOG: statement: START TRANSACTION >>>> ISOLATION LEVEL read committed READ WRITE >>>> 2013-04-10 16:42:15 PDT adchemy 7186 LOG: execute <unnamed>: UPDATE >>>> biods.feature SET feature_semid = $3, feature_name = $2, created_ts = $1, >>>> updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = >>>> $7) >>>> 2013-04-10 16:42:15 PDT adchemy 7186 DETAIL: parameters: $1 = >>>> '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = >>>> NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', >>>> $7 = '42318' >>>> >>>> LOCKS ON COORDINATOR: >>>> >>>> [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5432 -U postgres >>>> -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from >>>> pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by >>>> mode;" >>>> pid | relname | locktype | mode | granted >>>> ------+--------------------+----------+------------------+--------- >>>> 7169 | hibernate_sequence | relation | AccessShareLock | t >>>> 7173 | hibernate_sequence | relation | AccessShareLock | t >>>> 7172 | hibernate_sequence | relation | AccessShareLock | t >>>> 7171 | feature_value | relation | AccessShareLock | t >>>> 7171 | feature | relation | AccessShareLock | t >>>> 7170 | hibernate_sequence | relation | AccessShareLock | t >>>> 7171 | feature | relation | RowExclusiveLock | t >>>> 7172 | product_feature | relation | RowExclusiveLock | t >>>> 7170 | product_feature | relation | RowExclusiveLock | t >>>> 7173 | product_feature | relation | RowExclusiveLock | t >>>> 7169 | product_feature | relation | RowExclusiveLock | t >>>> (11 rows) >>>> >>>> LOCKS ON DATANODE1: >>>> >>>> [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5433 -U postgres >>>> -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from >>>> pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by >>>> mode;" >>>> pid | relname | locktype | mode | >>>> granted >>>> >>>> ------+-----------------------+----------+--------------------------+--------- >>>> 7174 | prd_id | relation | AccessShareLock | t >>>> 7182 | feature_id | relation | AccessShareLock | t >>>> 7174 | feature_value_id | relation | AccessShareLock | t >>>> 7183 | feature_id | relation | AccessShareLock | t >>>> 7174 | feature_id | relation | AccessShareLock | t >>>> 7175 | feature_id | relation | AccessShareLock | t >>>> 7181 | feature | tuple | ExclusiveLock | t >>>> 7181 | feature_semid | relation | RowExclusiveLock | t >>>> 7181 | feature_id | relation | RowExclusiveLock | t >>>> 7181 | feature | relation | RowExclusiveLock | t >>>> 7175 | cat_prd_feature_semid | relation | RowExclusiveLock | t >>>> 7183 | cat_prd_feature_semid | relation | RowExclusiveLock | t >>>> 7183 | prd_feature_id | relation | RowExclusiveLock | t >>>> 7183 | product_feature | relation | RowExclusiveLock | t >>>> 7182 | cat_prd_feature_semid | relation | RowExclusiveLock | t >>>> 7182 | prd_feature_id | relation | RowExclusiveLock | t >>>> 7182 | product_feature | relation | RowExclusiveLock | t >>>> 7175 | prd_feature_id | relation | RowExclusiveLock | t >>>> 7175 | product_feature | relation | RowExclusiveLock | t >>>> 7174 | product_feature | relation | RowExclusiveLock | t >>>> 7206 | feature_semid | relation | RowExclusiveLock | t >>>> 7206 | feature_id | relation | RowExclusiveLock | t >>>> 7174 | product | relation | RowShareLock | t >>>> 7182 | feature | relation | RowShareLock | t >>>> 7174 | feature_value | relation | RowShareLock | t >>>> 7183 | category | relation | RowShareLock | t >>>> 7174 | feature | relation | RowShareLock | t >>>> 7174 | category | relation | RowShareLock | t >>>> 7175 | category | relation | RowShareLock | t >>>> 7175 | feature | relation | RowShareLock | t >>>> 7183 | feature | relation | RowShareLock | t >>>> 7182 | category | relation | RowShareLock | t >>>> 7182 | feature | tuple | ShareLock | f >>>> 7175 | feature | tuple | ShareLock | f >>>> 7183 | feature | tuple | ShareLock | f >>>> 7206 | feature | relation | ShareUpdateExclusiveLock | t >>>> >>>> LOCKS ON DATANODE2: >>>> >>>> [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5434 -U postgres >>>> -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from >>>> pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by >>>> mode;" >>>> pid | relname | locktype | mode | >>>> granted >>>> >>>> ------+-----------------------+----------+--------------------------+--------- >>>> 7185 | feature_id | relation | AccessShareLock | t >>>> 7179 | feature_value_id | relation | AccessShareLock | t >>>> 7179 | prd_id | relation | AccessShareLock | t >>>> 7184 | feature_id | relation | AccessShareLock | t >>>> 7180 | feature_id | relation | AccessShareLock | t >>>> 7179 | feature_id | relation | AccessShareLock | t >>>> 7186 | feature | tuple | ExclusiveLock | t >>>> 7184 | prd_feature_id | relation | RowExclusiveLock | t >>>> 7184 | product_feature | relation | RowExclusiveLock | t >>>> 7186 | feature_semid | relation | RowExclusiveLock | t >>>> 7186 | feature_id | relation | RowExclusiveLock | t >>>> 7186 | feature | relation | RowExclusiveLock | t >>>> 7185 | cat_prd_feature_semid | relation | RowExclusiveLock | t >>>> 7185 | prd_feature_id | relation | RowExclusiveLock | t >>>> 7185 | product_feature | relation | RowExclusiveLock | t >>>> 7184 | cat_prd_feature_semid | relation | RowExclusiveLock | t >>>> 7180 | cat_prd_feature_semid | relation | RowExclusiveLock | t >>>> 7180 | prd_feature_id | relation | RowExclusiveLock | t >>>> 7180 | product_feature | relation | RowExclusiveLock | t >>>> 7179 | product_feature | relation | RowExclusiveLock | t >>>> 7202 | feature_semid | relation | RowExclusiveLock | t >>>> 7202 | feature_id | relation | RowExclusiveLock | t >>>> 7179 | product | relation | RowShareLock | t >>>> 7184 | feature | relation | RowShareLock | t >>>> 7179 | feature_value | relation | RowShareLock | t >>>> 7185 | category | relation | RowShareLock | t >>>> 7179 | feature | relation | RowShareLock | t >>>> 7179 | category | relation | RowShareLock | t >>>> 7180 | feature | relation | RowShareLock | t >>>> 7180 | category | relation | RowShareLock | t >>>> 7185 | feature | relation | RowShareLock | t >>>> 7184 | category | relation | RowShareLock | t >>>> 7185 | feature | tuple | ShareLock | f >>>> 7180 | feature | tuple | ShareLock | f >>>> 7184 | feature | tuple | ShareLock | f >>>> 7202 | feature | relation | ShareUpdateExclusiveLock | t >>>> (36 rows) >>>> >>>> >>>> >>>> ________________________________________ >>>> >>>> Venky Kandaswamy >>>> >>>> Principal Engineer, Adchemy Inc. >>>> >>>> 925-200-7124 >>>> ------------------------------ >>>> *From:* Koichi Suzuki [koi...@gm...] >>>> *Sent:* Monday, April 08, 2013 10:41 PM >>>> *To:* Amit Khandekar >>>> *Cc:* Venky Kandaswamy; pos...@li... >>>> *Subject:* Re: [Postgres-xc-developers] PGXC hangs when run with >>>> concurrent inserts >>>> >>>> Because insert is being done in parallel, I'm afraid there could be >>>> a possibility that we have internal lock conflicts, which should not >>>> happen. >>>> >>>> Regards; >>>> ---------- >>>> Koichi Suzuki >>>> >>>> >>>> 2013/4/9 Amit Khandekar <ami...@en...> >>>> >>>>> >>>>> >>>>> >>>>> On 9 April 2013 06:46, Venky Kandaswamy <ve...@ad...> wrote: >>>>> >>>>>> All, >>>>>> We have been running into a hang issue on our app that appears to >>>>>> be related to PGXC. Our app processes messages from RabbitMQ and >>>>>> inserts/updates tables. We run 5 concurrent threads. The incoming queues >>>>>> are replicated, one feeding Postgres 9.1 and the other feeding PGXC >>>>>> (current git master). PGXC is hanging on inserts after processing a few >>>>>> transactions. It does not appear to be related to the actual data itself. >>>>>> IT looks like all the sessions are waiting for something. There is no >>>>>> information on locks available from pg_locks. >>>>>> >>>>> >>>>> Since most of the operations are inserts, it does not look like it >>>>> is due to locks, unless something has acquired table locks. But just to >>>>> rule out that possibility, it would be better if you check pg_locks on the >>>>> datanodes, if you have checked it only on coordinator so far. >>>>> >>>>> >>>>>> >>>>>> An strace simply says recfrom(10. >>>>>> >>>>>> The are no errors in the logs from gtm, coordinator or datanodes. >>>>>> >>>>>> The tables have referential integrity and use a shared sequence to >>>>>> get the next id. Is it possible that something is going on with the logic >>>>>> to retrieve sequence numbers? The tables are all replicated. >>>>>> >>>>>> Unfortunately, we have not been able to reproduce a reliable test >>>>>> case. >>>>>> >>>>>> [postgres@gnode0 pgxc]$ /usr/local/pgsql/bin/psql -p 5433 -U >>>>>> postgres -d postgres -c 'select * from pg_catalog.pg_stat_activity;' >>>>>> datid | datname | pid | usesysid | usename | >>>>>> application_name | client_addr | client_hostname | client_port | >>>>>> backend_start | xact_start | >>>>>> query_start | state_change | waiting | >>>>>> state | >>>>>> >>>>>> query >>>>>> >>>>>> >>>>>> -------+--------------+-------+----------+----------+------------------+----------------+-----------------+-------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+---------+---------------------+-------------------- >>>>>> >>>>>> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- >>>>>> 12893 | postgres | 22330 | 10 | postgres | >>>>>> pgxc | 192.168.53.109 | | 47025 | >>>>>> 2013-03-31 21:42:16.724845-07 | | 2013-04-08 >>>>>> 15:43:52.313325-07 | 2013-04-08 15:26:11.444754-07 | f | >>>>>> idle | COMMIT PREPARED 'T1 >>>>>> 32273' >>>>>> 16393 | master | 4267 | 16392 | xcadmin | >>>>>> pgxc | 192.168.53.109 | | 54961 | >>>>>> 2013-04-08 15:24:28.668023-07 | | 2013-04-08 >>>>>> 15:33:17.586836-07 | 2013-04-08 15:33:17.587942-07 | f | >>>>>> idle | SELECT count(*) FRO >>>>>> M ONLY bicommon.account_datasource WHERE true >>>>>> 16395 | adchemy10013 | 4363 | 16392 | xcadmin | >>>>>> pgxc | 192.168.53.109 | | 55084 | >>>>>> 2013-04-08 15:28:48.822939-07 | | 2013-04-08 >>>>>> 15:50:21.650727-07 | 2013-04-08 15:50:07.916753-07 | f | >>>>>> idle | SELECT prd_id, prd_ >>>>>> semid, prd_name, prd_line, prd_model, prd_brand, prd_image_url, >>>>>> prd_dest_url, created_ts, updated_ts, source_msg_ts, modified_by FROM >>>>>> biods.product >>>>>> 16393 | master | 4486 | 16392 | xcadmin | >>>>>> pgxc | 192.168.53.109 | | 55246 | >>>>>> 2013-04-08 15:33:21.019388-07 | | 2013-04-08 >>>>>> 15:43:51.321376-07 | 2013-04-08 15:43:51.322675-07 | f | >>>>>> idle | SET SESSION AUTHORI >>>>>> ZATION DEFAULT;RESET ALL; >>>>>> 16393 | master | 4781 | 16392 | xcadmin | >>>>>> pgxc | 192.168.53.109 | | 55515 | >>>>>> 2013-04-08 15:42:42.122785-07 | | 2013-04-08 >>>>>> 17:02:21.023713-07 | 2013-04-08 17:02:20.804751-07 | f | >>>>>> idle | SET SESSION AUTHORI >>>>>> ZATION DEFAULT;RESET ALL; >>>>>> 16393 | master | 4787 | 16392 | xcadmin | >>>>>> pgxc | 192.168.53.109 | | 55521 | >>>>>> 2013-04-08 15:42:42.142662-07 | | 2013-04-08 >>>>>> 16:17:19.26364-07 | 2013-04-08 16:17:19.126163-07 | f | >>>>>> idle | SET SESSION AUTHORI >>>>>> ZATION DEFAULT;RESET ALL; >>>>>> 16393 | master | 4792 | 16392 | xcadmin | >>>>>> pgxc | 192.168.53.109 | | 55526 | >>>>>> 2013-04-08 15:42:42.159009-07 | | 2013-04-08 >>>>>> 15:45:11.915026-07 | 2013-04-08 15:45:11.886392-07 | f | >>>>>> idle | SET SESSION AUTHORI >>>>>> ZATION DEFAULT;RESET ALL; >>>>>> 16393 | master | 4799 | 16392 | xcadmin | >>>>>> pgxc | 192.168.53.109 | | 55533 | >>>>>> 2013-04-08 15:42:42.678387-07 | | 2013-04-08 >>>>>> 17:02:21.195332-07 | 2013-04-08 17:02:20.805074-07 | f | >>>>>> idle | SET SESSION AUTHORI >>>>>> ZATION DEFAULT;RESET ALL; >>>>>> 16393 | master | 4804 | 16392 | xcadmin | >>>>>> pgxc | 192.168.53.109 | | 55538 | >>>>>> 2013-04-08 15:42:42.694802-07 | | 2013-04-08 >>>>>> 15:45:11.904619-07 | 2013-04-08 15:45:11.888493-07 | f | >>>>>> idle | SET SESSION AUTHORI >>>>>> ZATION DEFAULT;RESET ALL; >>>>>> 16395 | adchemy10013 | 4977 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 55732 | >>>>>> 2013-04-08 15:47:34.901175-07 | 2013-04-08 15:48:08.345331-07 | 2013-04-08 >>>>>> 15:48:08.528818-07 | 2013-04-08 15:48:08.410815-07 | f | idle in >>>>>> transaction | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 4979 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 55734 | >>>>>> 2013-04-08 15:47:35.042778-07 | 2013-04-08 15:48:16.384763-07 | 2013-04-08 >>>>>> 15:48:16.506899-07 | 2013-04-08 15:48:16.388503-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 4985 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 55740 | >>>>>> 2013-04-08 15:47:35.235945-07 | 2013-04-08 15:48:14.38895-07 | >>>>>> 2013-04-08 15:48:14.445351-07 | 2013-04-08 15:48:14.446752-07 | t | >>>>>> active | UPDATE biods.featur >>>>>> e SET feature_semid = $3, feature_name = $2, created_ts = $1, >>>>>> updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = >>>>>> $7) >>>>>> 16395 | adchemy10013 | 4986 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 55741 | >>>>>> 2013-04-08 15:47:35.238843-07 | 2013-04-08 15:48:18.201043-07 | >>>>>> 2013-04-08 15:48:18.273204-07 | 2013-04-08 15:48:18.205647-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 4998 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 55753 | >>>>>> 2013-04-08 15:47:35.910309-07 | 2013-04-08 15:48:08.412038-07 | 2013-04-08 >>>>>> 15:48:08.566945-07 | 2013-04-08 15:48:08.415026-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 6340 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57002 | >>>>>> 2013-04-08 16:31:44.414804-07 | 2013-04-08 16:31:50.293828-07 | 2013-04-08 >>>>>> 16:31:50.433988-07 | 2013-04-08 16:31:50.297752-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 6341 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57003 | >>>>>> 2013-04-08 16:31:44.418356-07 | 2013-04-08 16:31:49.450704-07 | 2013-04-08 >>>>>> 16:31:49.599946-07 | 2013-04-08 16:31:49.45562-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 6348 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57010 | >>>>>> 2013-04-08 16:31:45.065767-07 | 2013-04-08 16:31:50.699979-07 | >>>>>> 2013-04-08 16:31:50.817425-07 | 2013-04-08 16:31:50.704669-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 6349 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57011 | >>>>>> 2013-04-08 16:31:45.06926-07 | 2013-04-08 16:31:51.528207-07 | 2013-04-08 >>>>>> 16:31:51.582036-07 | 2013-04-08 16:31:51.532618-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 6350 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57012 | >>>>>> 2013-04-08 16:31:45.072711-07 | 2013-04-08 16:31:50.085336-07 | >>>>>> 2013-04-08 16:31:50.223221-07 | 2013-04-08 16:31:50.088908-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 7269 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57774 | >>>>>> 2013-04-08 16:57:15.563006-07 | 2013-04-08 16:57:21.849156-07 | 2013-04-08 >>>>>> 16:57:21.978984-07 | 2013-04-08 16:57:21.853289-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 7271 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57776 | >>>>>> 2013-04-08 16:57:15.63199-07 | 2013-04-08 16:57:16.575535-07 | 2013-04-08 >>>>>> 16:57:17.00605-07 | 2013-04-08 16:57:17.007747-07 | t | >>>>>> active | INSERT INTO biods.f >>>>>> eature_value (feature_value_id, feature_value_semid, feature_value, >>>>>> feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, >>>>>> modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) >>>>>> 16395 | adchemy10013 | 7283 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57788 | >>>>>> 2013-04-08 16:57:16.292702-07 | 2013-04-08 16:57:21.849125-07 | 2013-04-08 >>>>>> 16:57:21.978824-07 | 2013-04-08 16:57:21.853251-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 7284 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57789 | >>>>>> 2013-04-08 16:57:16.295879-07 | 2013-04-08 16:57:24.233166-07 | 2013-04-08 >>>>>> 16:57:24.321938-07 | 2013-04-08 16:57:24.237514-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 7285 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57790 | >>>>>> 2013-04-08 16:57:16.299271-07 | 2013-04-08 16:57:22.119868-07 | 2013-04-08 >>>>>> 16:57:22.197213-07 | 2013-04-08 16:57:22.128357-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 7465 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57954 | >>>>>> 2013-04-08 17:01:54.750113-07 | 2013-04-08 17:02:00.17336-07 | 2013-04-08 >>>>>> 17:02:00.320469-07 | 2013-04-08 17:02:00.177758-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 7466 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57955 | >>>>>> 2013-04-08 17:01:54.753559-07 | 2013-04-08 17:01:59.49003-07 | 2013-04-08 >>>>>> 17:01:59.602925-07 | 2013-04-08 17:01:59.493732-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 7467 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57956 | >>>>>> 2013-04-08 17:01:54.75699-07 | 2013-04-08 17:01:58.262083-07 | 2013-04-08 >>>>>> 17:01:58.349452-07 | 2013-04-08 17:01:58.350822-07 | t | >>>>>> active | INSERT INTO biods.f >>>>>> eature_value (feature_value_id, feature_value_semid, feature_value, >>>>>> feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, >>>>>> modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) >>>>>> 16395 | adchemy10013 | 7473 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57963 | >>>>>> 2013-04-08 17:01:55.49134-07 | 2013-04-08 17:02:00.313138-07 | 2013-04-08 >>>>>> 17:02:00.420405-07 | 2013-04-08 17:02:00.318887-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 16395 | adchemy10013 | 7474 | 17361 | adchemy | >>>>>> pgxc | 192.168.53.109 | | 57964 | >>>>>> 2013-04-08 17:01:55.494777-07 | 2013-04-08 17:02:00.514142-07 | 2013-04-08 >>>>>> 17:02:00.577239-07 | 2013-04-08 17:02:00.519572-07 | t | >>>>>> active | INSERT INTO biods.p >>>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>>> 12893 | postgres | 8517 | 10 | postgres | >>>>>> psql | | | -1 | >>>>>> 2013-04-08 17:35:28.217934-07 | | 2013-04-08 >>>>>> 17:35:28.220366-07 | 2013-04-08 17:35:28.220369-07 | f | >>>>>> active | select * from pg_ca >>>>>> talog.pg_stat_activity; >>>>>> (30 rows) >>>>>> >>>>>> >>>>>> ________________________________________ >>>>>> >>>>>> Venky Kandaswamy >>>>>> >>>>>> Principal Engineer, Adchemy Inc. >>>>>> >>>>>> 925-200-7124 >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Precog is a next-generation analytics platform capable of advanced >>>>>> analytics on semi-structured data. The platform includes APIs for >>>>>> building >>>>>> apps and a phenomenal toolset for data science. Developers can use >>>>>> our toolset for easy data analysis & visualization. Get a free >>>>>> account! >>>>>> http://www2.precog.com/precogplatform/slashdotnewsletter >>>>>> _______________________________________________ >>>>>> Postgres-xc-developers mailing list >>>>>> Pos...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>>>> >>>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Precog is a next-generation analytics platform capable of advanced >>>>> analytics on semi-structured data. The platform includes APIs for >>>>> building >>>>> apps and a phenomenal toolset for data science. Developers can use >>>>> our toolset for easy data analysis & visualization. Get a free account! >>>>> http://www2.precog.com/precogplatform/slashdotnewsletter >>>>> _______________________________________________ >>>>> Postgres-xc-developers mailing list >>>>> Pos...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>>> >>>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Precog is a next-generation analytics platform capable of advanced >>>> analytics on semi-structured data. The platform includes APIs for >>>> building >>>> apps and a phenomenal toolset for data science. Developers can use >>>> our toolset for easy data analysis & visualization. Get a free account! >>>> http://www2.precog.com/precogplatform/slashdotnewsletter >>>> _______________________________________________ >>>> Postgres-xc-developers mailing list >>>> Pos...@li... >>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Precog is a next-generation analytics platform capable of advanced >>> analytics on semi-structured data. The platform includes APIs for >>> building >>> apps and a phenomenal toolset for data science. Developers can use >>> our toolset for easy data analysis & visualization. Get a free account! >>> http://www2.precog.com/precogplatform/slashdotnewsletter >>> _______________________________________________ >>> Postgres-xc-developers mailing list >>> Pos...@li... >>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>> >>> >> >> >> -- >> Andrei Martsinchyk >> >> StormDB - http://www.stormdb.com >> The Database Cloud >> >> > -- Andrei Martsinchyk StormDB - http://www.stormdb.com The Database Cloud |
From: Amit K. <ami...@en...> - 2013-04-11 08:46:28
|
On 11 April 2013 13:35, Andrei Martsinchyk <and...@gm...>wrote: > I see the not granted tuple level locks on datanodes, they are requested > by the "INSERT waiting" processes. Guess they are updating indexes. > It seems like these locks are not granted because of exclusive lock held > by "UPDATE waiting". > > But it is not clear, what the update is faiting for? > I thnk there are multiple updates. That's why I think they might be waiting for each other, causing a deadlock possibly because there is no primary node. > > > 2013/4/11 Amit Khandekar <ami...@en...> > >> Hi Venky, >> >> Thanks for the details. Have you defined one of the data nodes as a >> primary node ? If no, we need to define one, because replicated table >> updates need that in order to avoid deadlocks. If you have already marked a >> node as a primary node, is the primary node one of the nodes on which the >> feature table is replicated on ? If no, you may have hit this bug : >> >> http://sourceforge.net/tracker/index.php?func=detail&aid=3547808&group_id=311227&atid=1310232 >> >> >> Currently we hit this bug because the primary node is not table-specific, >> it should be implemented table-specific. For now you need to make sure one >> of the nodes on which the table is replicated is defined as a primary node. >> >> >> On 11 April 2013 06:51, Venky Kandaswamy <ve...@ad...> wrote: >> >>> We are processing inserts/updates using multiple threads. Here is the >>> trace log of the actual statements that are hung. The scenario shows the >>> statements on the coordinator and 2 datanodes. The scenario is similar >>> across all the datanodes. >>> The same data updates did not cause Postgres 9.1.2 to hang. This could >>> be related to an application problem, although we could not reproduce it on >>> Postgres 9.1.2. >>> >>> At a high level, there is an update on the 'feature' table that is >>> holding an exclusive lock on the row. The inserts are inserting to another >>> table that has a foreign key that references the row being locked by the >>> update. Pid 7174 and 7179 are waiting to complete and they are also similar >>> inserts. The only thing in common seems to be that the update is locking >>> the feature row that is referenced in a foreign key in the other inserts. >>> This should not cause a deadlock, I believe. >>> >>> The question in my mind is whether pids 7181 and 7186 should have been >>> granted exclusive access to a tuple while others were granted share access. >>> This might cause a race condition. >>> >>> This causes PGXC to hang. Obviously, the update is in turn waiting for >>> something (which we cannot figure out from the logs) and therefore not >>> committing the update. >>> >>> [postgres@sv4-pgxc-db01 pgxc]$ ps -ef | grep adchemy1234 >>> <COORDINATOR> >>> postgres 7169 7113 0 16:41 ? 00:00:02 postgres: adchemy >>> adchemy1234 192.168.51.73(49186) INSERT >>> postgres 7170 7113 0 16:41 ? 00:00:02 postgres: adchemy >>> adchemy1234 192.168.51.73(49187) INSERT >>> postgres 7171 7113 0 16:41 ? 00:00:02 postgres: adchemy >>> adchemy1234 192.168.51.73(49188) UPDATE >>> postgres 7172 7113 0 16:41 ? 00:00:02 postgres: adchemy >>> adchemy1234 192.168.51.73(49189) INSERT >>> postgres 7173 7113 0 16:41 ? 00:00:02 postgres: adchemy >>> adchemy1234 192.168.51.73(49190) INSERT >>> <COORDINATOR> >>> >>> <DATANODE1> >>> postgres 7174 7127 0 16:41 ? 00:00:01 postgres: adchemy >>> adchemy1234 172.17.28.61(51909) idle in transaction >>> postgres 7175 7127 0 16:41 ? 00:00:01 postgres: adchemy >>> adchemy1234 172.17.28.61(51910) INSERT waiting >>> postgres 7181 7127 0 16:41 ? 00:00:01 postgres: adchemy >>> adchemy1234 172.17.28.61(51924) UPDATE waiting >>> postgres 7182 7127 0 16:41 ? 00:00:01 postgres: adchemy >>> adchemy1234 172.17.28.61(51925) INSERT waiting >>> postgres 7183 7127 0 16:41 ? 00:00:01 postgres: adchemy >>> adchemy1234 172.17.28.61(51926) INSERT waiting >>> <DATANODE1> >>> >>> <DATANODE2> >>> postgres 7179 7140 0 16:41 ? 00:00:00 postgres: adchemy >>> adchemy1234 172.17.28.61(48957) idle in transaction >>> postgres 7180 7140 0 16:41 ? 00:00:00 postgres: adchemy >>> adchemy1234 172.17.28.61(48962) INSERT waiting >>> postgres 7184 7140 0 16:41 ? 00:00:00 postgres: adchemy >>> adchemy1234 172.17.28.61(48970) INSERT waiting >>> postgres 7185 7140 0 16:41 ? 00:00:00 postgres: adchemy >>> adchemy1234 172.17.28.61(48975) INSERT waiting >>> postgres 7186 7140 0 16:41 ? 00:00:00 postgres: adchemy >>> adchemy1234 172.17.28.61(48980) UPDATE waiting >>> <DATANODE2> >>> >>> -----LOGS----- formatted %t %u %p >>> >>> 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute S_1: BEGIN >>> 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute <unnamed>: select >>> nextval ('hibernate_sequence') >>> 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute <unnamed>: insert >>> into biods.product_feature (category_id, category_semid, created_ts, >>> feature_id, feature_semid, feature_value_id, feature_value_semid, >>> modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, >>> $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) >>> 2013-04-10 16:42:16 PDT adchemy 7169 DETAIL: parameters: $1 = '42302', >>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = >>> 'description', $6 = '46105', $7 = 'description,Give your riches the >>> designer treatment with Mcms leather heritage wallet. The logo-stamped >>> little number stores your essentials in luxe vintage style.', $8 = NULL, $9 >>> = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = >>> '46455' >>> >>> 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute S_1: BEGIN >>> 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute <unnamed>: select >>> nextval ('hibernate_sequence') >>> 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute <unnamed>: insert >>> into biods.product_feature (category_id, category_semid, created_ts, >>> feature_id, feature_semid, feature_value_id, feature_value_semid, >>> modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, >>> $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) >>> 2013-04-10 16:42:16 PDT adchemy 7170 DETAIL: parameters: $1 = '42302', >>> $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = >>> 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up >>> with a bold logo-stamped plaque in this utility chic wallet from Marc By >>> Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = >>> '2013-04-10 15:02:43.413-07', $12 = '46445' >>> >>> 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute S_1: BEGIN >>> 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute <unnamed>: select >>> feature0_.feature_id as feature1_8_1_, feature0_.created_ts as >>> created2_8_1_, feature0_.feature_name as feature3_8_1_, >>> feature0_.feature_semid as feature4_8_1_, feature0_.modified_by as >>> modified5_8_1_, feature0_.source_msg_ts as source6_8_1_, >>> feature0_.updated_ts as updated7_8_1_, featureval1_.feature_id as >>> feature9_8_3_, featureval1_.feature_value_id as feature1_14_3_, >>> featureval1_.feature_value_id as feature1_14_0_, featureval1_.created_ts as >>> created2_14_0_, featureval1_.feature_id as feature9_14_0_, >>> featureval1_.feature_semid as feature3_14_0_, featureval1_.feature_value as >>> feature4_14_0_, featureval1_.feature_value_semid as feature5_14_0_, >>> featureval1_.modified_by as modified6_14_0_, featureval1_.source_msg_ts as >>> source7_14_0_, featureval1_.updated_ts as updated8_14_0_ from biods.feature >>> feature0_ left outer join biods.feature_value featureval1_ on >>> feature0_.feature_id=featureval1_.feature_id where feature0_.feature_id=$1 >>> 2013-04-10 16:42:15 PDT adchemy 7171 DETAIL: parameters: $1 = '42318' >>> 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute <unnamed>: update >>> biods.feature set created_ts=$1, feature_name=$2, feature_semid=$3, >>> modified_by=$4, source_msg_ts=$5, updated_ts=$6 where feature_id=$7 >>> 2013-04-10 16:42:15 PDT adchemy 7171 DETAIL: parameters: $1 = >>> '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = >>> NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', >>> $7 = '42318' >>> >>> 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute S_1: BEGIN >>> 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute <unnamed>: select >>> nextval ('hibernate_sequence') >>> 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute <unnamed>: insert >>> into biods.product_feature (category_id, category_semid, created_ts, >>> feature_id, feature_semid, feature_value_id, feature_value_semid, >>> modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, >>> $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) >>> 2013-04-10 16:42:17 PDT adchemy 7172 DETAIL: parameters: $1 = '42302', >>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = >>> 'description', $6 = '44831', $7 = 'description,A chic logo-detailed >>> cosmetic case for the contemporary girl from Tory Burch. Exclusive to >>> Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = >>> '2013-04-10 15:02:42.003-07', $12 = '46460' >>> >>> 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute S_1: BEGIN >>> 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute <unnamed>: select >>> nextval ('hibernate_sequence') >>> 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute <unnamed>: insert >>> into biods.product_feature (category_id, category_semid, created_ts, >>> feature_id, feature_semid, feature_value_id, feature_value_semid, >>> modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, >>> $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) >>> 2013-04-10 16:42:15 PDT adchemy 7173 DETAIL: parameters: $1 = '42302', >>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = >>> 'description', $6 = '46154', $7 = 'description,Keep the essentials close >>> with LeSportsacs crossbody bag in matte black nylon practical interior zip >>> compartments make those daily errands a little bit easier.', $8 = NULL, $9 >>> = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = >>> '46435' >>> >>> 2013-04-10 16:42:15 PDT adchemy 7174 LOG: statement: START TRANSACTION >>> ISOLATION LEVEL read committed READ WRITE >>> 2013-04-10 16:42:15 PDT adchemy 7174 LOG: execute <unnamed>: INSERT >>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 2013-04-10 16:42:15 PDT adchemy 7174 DETAIL: parameters: $1 = '42302', >>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = >>> 'description', $6 = '46154', $7 = 'description,Keep the essentials close >>> with LeSportsacs crossbody bag in matte black nylon practical interior zip >>> compartments make those daily errands a little bit easier.', $8 = NULL, $9 >>> = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = >>> '46435' >>> >>> 2013-04-10 16:42:16 PDT adchemy 7175 LOG: statement: START TRANSACTION >>> ISOLATION LEVEL read committed READ WRITE >>> 2013-04-10 16:42:16 PDT adchemy 7175 LOG: execute <unnamed>: INSERT >>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 2013-04-10 16:42:16 PDT adchemy 7175 DETAIL: parameters: $1 = '42302', >>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = >>> 'description', $6 = '46105', $7 = 'description,Give your riches the >>> designer treatment with Mcms leather heritage wallet. The logo-stamped >>> little number stores your essentials in luxe vintage style.', $8 = NULL, $9 >>> = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = >>> '46455' >>> >>> 2013-04-10 16:42:15 PDT adchemy 7179 LOG: statement: START TRANSACTION >>> ISOLATION LEVEL read committed READ WRITE >>> 2013-04-10 16:42:15 PDT adchemy 7179 LOG: execute <unnamed>: INSERT >>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 2013-04-10 16:42:15 PDT adchemy 7179 DETAIL: parameters: $1 = '42302', >>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = >>> 'description', $6 = '46154', $7 = 'description,Keep the essentials close >>> with LeSportsacs crossbody bag in matte black nylon practical interior zip >>> compartments make those daily errands a little bit easier.', $8 = NULL, $9 >>> = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = >>> '46435' >>> >>> 2013-04-10 16:42:16 PDT adchemy 7180 LOG: statement: START TRANSACTION >>> ISOLATION LEVEL read committed READ WRITE >>> 2013-04-10 16:42:16 PDT adchemy 7180 LOG: execute <unnamed>: INSERT >>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 2013-04-10 16:42:16 PDT adchemy 7180 DETAIL: parameters: $1 = '42302', >>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = >>> 'description', $6 = '46105', $7 = 'description,Give your riches the >>> designer treatment with Mcms leather heritage wallet. The logo-stamped >>> little number stores your essentials in luxe vintage style.', $8 = NULL, $9 >>> = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = >>> '46455' >>> >>> 2013-04-10 16:42:15 PDT adchemy 7181 LOG: statement: START TRANSACTION >>> ISOLATION LEVEL read committed READ WRITE >>> 2013-04-10 16:42:15 PDT adchemy 7181 LOG: execute <unnamed>: UPDATE >>> biods.feature SET feature_semid = $3, feature_name = $2, created_ts = $1, >>> updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = >>> $7) >>> 2013-04-10 16:42:15 PDT adchemy 7181 DETAIL: parameters: $1 = >>> '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = >>> NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', >>> $7 = '42318' >>> >>> 2013-04-10 16:42:17 PDT adchemy 7182 LOG: statement: START TRANSACTION >>> ISOLATION LEVEL read committed READ WRITE >>> 2013-04-10 16:42:17 PDT adchemy 7182 LOG: execute <unnamed>: INSERT >>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 2013-04-10 16:42:17 PDT adchemy 7182 DETAIL: parameters: $1 = '42302', >>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = >>> 'description', $6 = '44831', $7 = 'description,A chic logo-detailed >>> cosmetic case for the contemporary girl from Tory Burch. Exclusive to >>> Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = >>> '2013-04-10 15:02:42.003-07', $12 = '46460' >>> >>> 2013-04-10 16:42:16 PDT adchemy 7183 LOG: statement: START TRANSACTION >>> ISOLATION LEVEL read committed READ WRITE >>> 2013-04-10 16:42:16 PDT adchemy 7183 LOG: execute <unnamed>: INSERT >>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 2013-04-10 16:42:16 PDT adchemy 7183 DETAIL: parameters: $1 = '42302', >>> $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = >>> 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up >>> with a bold logo-stamped plaque in this utility chic wallet from Marc By >>> Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = >>> '2013-04-10 15:02:43.413-07', $12 = '46445' >>> >>> 2013-04-10 16:42:17 PDT adchemy 7184 LOG: statement: START TRANSACTION >>> ISOLATION LEVEL read committed READ WRITE >>> 2013-04-10 16:42:17 PDT adchemy 7184 LOG: execute <unnamed>: INSERT >>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 2013-04-10 16:42:17 PDT adchemy 7184 DETAIL: parameters: $1 = '42302', >>> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = >>> 'description', $6 = '44831', $7 = 'description,A chic logo-detailed >>> cosmetic case for the contemporary girl from Tory Burch. Exclusive to >>> Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = >>> '2013-04-10 15:02:42.003-07', $12 = '46460' >>> >>> 2013-04-10 16:42:16 PDT adchemy 7185 LOG: statement: START TRANSACTION >>> ISOLATION LEVEL read committed READ WRITE >>> 2013-04-10 16:42:16 PDT adchemy 7185 LOG: execute <unnamed>: INSERT >>> INTO biods.product_feature (prd_feature_id, category_id, prd_id, >>> feature_id, feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 2013-04-10 16:42:16 PDT adchemy 7185 DETAIL: parameters: $1 = '42302', >>> $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = >>> 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up >>> with a bold logo-stamped plaque in this utility chic wallet from Marc By >>> Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = >>> '2013-04-10 15:02:43.413-07', $12 = '46445' >>> >>> 2013-04-10 16:42:15 PDT adchemy 7186 LOG: statement: START TRANSACTION >>> ISOLATION LEVEL read committed READ WRITE >>> 2013-04-10 16:42:15 PDT adchemy 7186 LOG: execute <unnamed>: UPDATE >>> biods.feature SET feature_semid = $3, feature_name = $2, created_ts = $1, >>> updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = >>> $7) >>> 2013-04-10 16:42:15 PDT adchemy 7186 DETAIL: parameters: $1 = >>> '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = >>> NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', >>> $7 = '42318' >>> >>> LOCKS ON COORDINATOR: >>> >>> [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5432 -U postgres >>> -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from >>> pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by >>> mode;" >>> pid | relname | locktype | mode | granted >>> ------+--------------------+----------+------------------+--------- >>> 7169 | hibernate_sequence | relation | AccessShareLock | t >>> 7173 | hibernate_sequence | relation | AccessShareLock | t >>> 7172 | hibernate_sequence | relation | AccessShareLock | t >>> 7171 | feature_value | relation | AccessShareLock | t >>> 7171 | feature | relation | AccessShareLock | t >>> 7170 | hibernate_sequence | relation | AccessShareLock | t >>> 7171 | feature | relation | RowExclusiveLock | t >>> 7172 | product_feature | relation | RowExclusiveLock | t >>> 7170 | product_feature | relation | RowExclusiveLock | t >>> 7173 | product_feature | relation | RowExclusiveLock | t >>> 7169 | product_feature | relation | RowExclusiveLock | t >>> (11 rows) >>> >>> LOCKS ON DATANODE1: >>> >>> [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5433 -U postgres >>> -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from >>> pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by >>> mode;" >>> pid | relname | locktype | mode | >>> granted >>> >>> ------+-----------------------+----------+--------------------------+--------- >>> 7174 | prd_id | relation | AccessShareLock | t >>> 7182 | feature_id | relation | AccessShareLock | t >>> 7174 | feature_value_id | relation | AccessShareLock | t >>> 7183 | feature_id | relation | AccessShareLock | t >>> 7174 | feature_id | relation | AccessShareLock | t >>> 7175 | feature_id | relation | AccessShareLock | t >>> 7181 | feature | tuple | ExclusiveLock | t >>> 7181 | feature_semid | relation | RowExclusiveLock | t >>> 7181 | feature_id | relation | RowExclusiveLock | t >>> 7181 | feature | relation | RowExclusiveLock | t >>> 7175 | cat_prd_feature_semid | relation | RowExclusiveLock | t >>> 7183 | cat_prd_feature_semid | relation | RowExclusiveLock | t >>> 7183 | prd_feature_id | relation | RowExclusiveLock | t >>> 7183 | product_feature | relation | RowExclusiveLock | t >>> 7182 | cat_prd_feature_semid | relation | RowExclusiveLock | t >>> 7182 | prd_feature_id | relation | RowExclusiveLock | t >>> 7182 | product_feature | relation | RowExclusiveLock | t >>> 7175 | prd_feature_id | relation | RowExclusiveLock | t >>> 7175 | product_feature | relation | RowExclusiveLock | t >>> 7174 | product_feature | relation | RowExclusiveLock | t >>> 7206 | feature_semid | relation | RowExclusiveLock | t >>> 7206 | feature_id | relation | RowExclusiveLock | t >>> 7174 | product | relation | RowShareLock | t >>> 7182 | feature | relation | RowShareLock | t >>> 7174 | feature_value | relation | RowShareLock | t >>> 7183 | category | relation | RowShareLock | t >>> 7174 | feature | relation | RowShareLock | t >>> 7174 | category | relation | RowShareLock | t >>> 7175 | category | relation | RowShareLock | t >>> 7175 | feature | relation | RowShareLock | t >>> 7183 | feature | relation | RowShareLock | t >>> 7182 | category | relation | RowShareLock | t >>> 7182 | feature | tuple | ShareLock | f >>> 7175 | feature | tuple | ShareLock | f >>> 7183 | feature | tuple | ShareLock | f >>> 7206 | feature | relation | ShareUpdateExclusiveLock | t >>> >>> LOCKS ON DATANODE2: >>> >>> [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5434 -U postgres >>> -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from >>> pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by >>> mode;" >>> pid | relname | locktype | mode | >>> granted >>> >>> ------+-----------------------+----------+--------------------------+--------- >>> 7185 | feature_id | relation | AccessShareLock | t >>> 7179 | feature_value_id | relation | AccessShareLock | t >>> 7179 | prd_id | relation | AccessShareLock | t >>> 7184 | feature_id | relation | AccessShareLock | t >>> 7180 | feature_id | relation | AccessShareLock | t >>> 7179 | feature_id | relation | AccessShareLock | t >>> 7186 | feature | tuple | ExclusiveLock | t >>> 7184 | prd_feature_id | relation | RowExclusiveLock | t >>> 7184 | product_feature | relation | RowExclusiveLock | t >>> 7186 | feature_semid | relation | RowExclusiveLock | t >>> 7186 | feature_id | relation | RowExclusiveLock | t >>> 7186 | feature | relation | RowExclusiveLock | t >>> 7185 | cat_prd_feature_semid | relation | RowExclusiveLock | t >>> 7185 | prd_feature_id | relation | RowExclusiveLock | t >>> 7185 | product_feature | relation | RowExclusiveLock | t >>> 7184 | cat_prd_feature_semid | relation | RowExclusiveLock | t >>> 7180 | cat_prd_feature_semid | relation | RowExclusiveLock | t >>> 7180 | prd_feature_id | relation | RowExclusiveLock | t >>> 7180 | product_feature | relation | RowExclusiveLock | t >>> 7179 | product_feature | relation | RowExclusiveLock | t >>> 7202 | feature_semid | relation | RowExclusiveLock | t >>> 7202 | feature_id | relation | RowExclusiveLock | t >>> 7179 | product | relation | RowShareLock | t >>> 7184 | feature | relation | RowShareLock | t >>> 7179 | feature_value | relation | RowShareLock | t >>> 7185 | category | relation | RowShareLock | t >>> 7179 | feature | relation | RowShareLock | t >>> 7179 | category | relation | RowShareLock | t >>> 7180 | feature | relation | RowShareLock | t >>> 7180 | category | relation | RowShareLock | t >>> 7185 | feature | relation | RowShareLock | t >>> 7184 | category | relation | RowShareLock | t >>> 7185 | feature | tuple | ShareLock | f >>> 7180 | feature | tuple | ShareLock | f >>> 7184 | feature | tuple | ShareLock | f >>> 7202 | feature | relation | ShareUpdateExclusiveLock | t >>> (36 rows) >>> >>> >>> >>> ________________________________________ >>> >>> Venky Kandaswamy >>> >>> Principal Engineer, Adchemy Inc. >>> >>> 925-200-7124 >>> ------------------------------ >>> *From:* Koichi Suzuki [koi...@gm...] >>> *Sent:* Monday, April 08, 2013 10:41 PM >>> *To:* Amit Khandekar >>> *Cc:* Venky Kandaswamy; pos...@li... >>> *Subject:* Re: [Postgres-xc-developers] PGXC hangs when run with >>> concurrent inserts >>> >>> Because insert is being done in parallel, I'm afraid there could be a >>> possibility that we have internal lock conflicts, which should not happen. >>> >>> Regards; >>> ---------- >>> Koichi Suzuki >>> >>> >>> 2013/4/9 Amit Khandekar <ami...@en...> >>> >>>> >>>> >>>> >>>> On 9 April 2013 06:46, Venky Kandaswamy <ve...@ad...> wrote: >>>> >>>>> All, >>>>> We have been running into a hang issue on our app that appears to >>>>> be related to PGXC. Our app processes messages from RabbitMQ and >>>>> inserts/updates tables. We run 5 concurrent threads. The incoming queues >>>>> are replicated, one feeding Postgres 9.1 and the other feeding PGXC >>>>> (current git master). PGXC is hanging on inserts after processing a few >>>>> transactions. It does not appear to be related to the actual data itself. >>>>> IT looks like all the sessions are waiting for something. There is no >>>>> information on locks available from pg_locks. >>>>> >>>> >>>> Since most of the operations are inserts, it does not look like it is >>>> due to locks, unless something has acquired table locks. But just to rule >>>> out that possibility, it would be better if you check pg_locks on the >>>> datanodes, if you have checked it only on coordinator so far. >>>> >>>> >>>>> >>>>> An strace simply says recfrom(10. >>>>> >>>>> The are no errors in the logs from gtm, coordinator or datanodes. >>>>> >>>>> The tables have referential integrity and use a shared sequence to >>>>> get the next id. Is it possible that something is going on with the logic >>>>> to retrieve sequence numbers? The tables are all replicated. >>>>> >>>>> Unfortunately, we have not been able to reproduce a reliable test >>>>> case. >>>>> >>>>> [postgres@gnode0 pgxc]$ /usr/local/pgsql/bin/psql -p 5433 -U >>>>> postgres -d postgres -c 'select * from pg_catalog.pg_stat_activity;' >>>>> datid | datname | pid | usesysid | usename | application_name >>>>> | client_addr | client_hostname | client_port | >>>>> backend_start | xact_start | >>>>> query_start | state_change | waiting | >>>>> state | >>>>> >>>>> query >>>>> >>>>> >>>>> -------+--------------+-------+----------+----------+------------------+----------------+-----------------+-------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+---------+---------------------+-------------------- >>>>> >>>>> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- >>>>> 12893 | postgres | 22330 | 10 | postgres | pgxc >>>>> | 192.168.53.109 | | 47025 | 2013-03-31 >>>>> 21:42:16.724845-07 | | 2013-04-08 >>>>> 15:43:52.313325-07 | 2013-04-08 15:26:11.444754-07 | f | >>>>> idle | COMMIT PREPARED 'T1 >>>>> 32273' >>>>> 16393 | master | 4267 | 16392 | xcadmin | pgxc >>>>> | 192.168.53.109 | | 54961 | 2013-04-08 >>>>> 15:24:28.668023-07 | | 2013-04-08 >>>>> 15:33:17.586836-07 | 2013-04-08 15:33:17.587942-07 | f | >>>>> idle | SELECT count(*) FRO >>>>> M ONLY bicommon.account_datasource WHERE true >>>>> 16395 | adchemy10013 | 4363 | 16392 | xcadmin | pgxc >>>>> | 192.168.53.109 | | 55084 | 2013-04-08 >>>>> 15:28:48.822939-07 | | 2013-04-08 >>>>> 15:50:21.650727-07 | 2013-04-08 15:50:07.916753-07 | f | >>>>> idle | SELECT prd_id, prd_ >>>>> semid, prd_name, prd_line, prd_model, prd_brand, prd_image_url, >>>>> prd_dest_url, created_ts, updated_ts, source_msg_ts, modified_by FROM >>>>> biods.product >>>>> 16393 | master | 4486 | 16392 | xcadmin | pgxc >>>>> | 192.168.53.109 | | 55246 | 2013-04-08 >>>>> 15:33:21.019388-07 | | 2013-04-08 >>>>> 15:43:51.321376-07 | 2013-04-08 15:43:51.322675-07 | f | >>>>> idle | SET SESSION AUTHORI >>>>> ZATION DEFAULT;RESET ALL; >>>>> 16393 | master | 4781 | 16392 | xcadmin | pgxc >>>>> | 192.168.53.109 | | 55515 | 2013-04-08 >>>>> 15:42:42.122785-07 | | 2013-04-08 >>>>> 17:02:21.023713-07 | 2013-04-08 17:02:20.804751-07 | f | >>>>> idle | SET SESSION AUTHORI >>>>> ZATION DEFAULT;RESET ALL; >>>>> 16393 | master | 4787 | 16392 | xcadmin | pgxc >>>>> | 192.168.53.109 | | 55521 | 2013-04-08 >>>>> 15:42:42.142662-07 | | 2013-04-08 >>>>> 16:17:19.26364-07 | 2013-04-08 16:17:19.126163-07 | f | >>>>> idle | SET SESSION AUTHORI >>>>> ZATION DEFAULT;RESET ALL; >>>>> 16393 | master | 4792 | 16392 | xcadmin | pgxc >>>>> | 192.168.53.109 | | 55526 | 2013-04-08 >>>>> 15:42:42.159009-07 | | 2013-04-08 >>>>> 15:45:11.915026-07 | 2013-04-08 15:45:11.886392-07 | f | >>>>> idle | SET SESSION AUTHORI >>>>> ZATION DEFAULT;RESET ALL; >>>>> 16393 | master | 4799 | 16392 | xcadmin | pgxc >>>>> | 192.168.53.109 | | 55533 | 2013-04-08 >>>>> 15:42:42.678387-07 | | 2013-04-08 >>>>> 17:02:21.195332-07 | 2013-04-08 17:02:20.805074-07 | f | >>>>> idle | SET SESSION AUTHORI >>>>> ZATION DEFAULT;RESET ALL; >>>>> 16393 | master | 4804 | 16392 | xcadmin | pgxc >>>>> | 192.168.53.109 | | 55538 | 2013-04-08 >>>>> 15:42:42.694802-07 | | 2013-04-08 >>>>> 15:45:11.904619-07 | 2013-04-08 15:45:11.888493-07 | f | >>>>> idle | SET SESSION AUTHORI >>>>> ZATION DEFAULT;RESET ALL; >>>>> 16395 | adchemy10013 | 4977 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 55732 | 2013-04-08 >>>>> 15:47:34.901175-07 | 2013-04-08 15:48:08.345331-07 | 2013-04-08 >>>>> 15:48:08.528818-07 | 2013-04-08 15:48:08.410815-07 | f | idle in >>>>> transaction | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 4979 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 55734 | 2013-04-08 >>>>> 15:47:35.042778-07 | 2013-04-08 15:48:16.384763-07 | 2013-04-08 >>>>> 15:48:16.506899-07 | 2013-04-08 15:48:16.388503-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 4985 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 55740 | 2013-04-08 15:47: >>>>> 35.235945-07 | 2013-04-08 15:48:14.38895-07 | 2013-04-08 >>>>> 15:48:14.445351-07 | 2013-04-08 15:48:14.446752-07 | t | >>>>> active | UPDATE biods.featur >>>>> e SET feature_semid = $3, feature_name = $2, created_ts = $1, >>>>> updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = >>>>> $7) >>>>> 16395 | adchemy10013 | 4986 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 55741 | 2013-04-08 15:47: >>>>> 35.238843-07 | 2013-04-08 15:48:18.201043-07 | 2013-04-08 >>>>> 15:48:18.273204-07 | 2013-04-08 15:48:18.205647-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 4998 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 55753 | 2013-04-08 >>>>> 15:47:35.910309-07 | 2013-04-08 15:48:08.412038-07 | 2013-04-08 >>>>> 15:48:08.566945-07 | 2013-04-08 15:48:08.415026-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 6340 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57002 | 2013-04-08 >>>>> 16:31:44.414804-07 | 2013-04-08 16:31:50.293828-07 | 2013-04-08 >>>>> 16:31:50.433988-07 | 2013-04-08 16:31:50.297752-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 6341 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57003 | 2013-04-08 >>>>> 16:31:44.418356-07 | 2013-04-08 16:31:49.450704-07 | 2013-04-08 >>>>> 16:31:49.599946-07 | 2013-04-08 16:31:49.45562-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 6348 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57010 | 2013-04-08 16:31: >>>>> 45.065767-07 | 2013-04-08 16:31:50.699979-07 | 2013-04-08 >>>>> 16:31:50.817425-07 | 2013-04-08 16:31:50.704669-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 6349 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57011 | 2013-04-08 >>>>> 16:31:45.06926-07 | 2013-04-08 16:31:51.528207-07 | 2013-04-08 >>>>> 16:31:51.582036-07 | 2013-04-08 16:31:51.532618-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 6350 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57012 | 2013-04-08 16:31: >>>>> 45.072711-07 | 2013-04-08 16:31:50.085336-07 | 2013-04-08 >>>>> 16:31:50.223221-07 | 2013-04-08 16:31:50.088908-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 7269 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57774 | 2013-04-08 >>>>> 16:57:15.563006-07 | 2013-04-08 16:57:21.849156-07 | 2013-04-08 >>>>> 16:57:21.978984-07 | 2013-04-08 16:57:21.853289-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 7271 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57776 | 2013-04-08 >>>>> 16:57:15.63199-07 | 2013-04-08 16:57:16.575535-07 | 2013-04-08 >>>>> 16:57:17.00605-07 | 2013-04-08 16:57:17.007747-07 | t | >>>>> active | INSERT INTO biods.f >>>>> eature_value (feature_value_id, feature_value_semid, feature_value, >>>>> feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, >>>>> modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) >>>>> 16395 | adchemy10013 | 7283 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57788 | 2013-04-08 >>>>> 16:57:16.292702-07 | 2013-04-08 16:57:21.849125-07 | 2013-04-08 >>>>> 16:57:21.978824-07 | 2013-04-08 16:57:21.853251-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 7284 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57789 | 2013-04-08 >>>>> 16:57:16.295879-07 | 2013-04-08 16:57:24.233166-07 | 2013-04-08 >>>>> 16:57:24.321938-07 | 2013-04-08 16:57:24.237514-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 7285 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57790 | 2013-04-08 >>>>> 16:57:16.299271-07 | 2013-04-08 16:57:22.119868-07 | 2013-04-08 >>>>> 16:57:22.197213-07 | 2013-04-08 16:57:22.128357-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 7465 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57954 | 2013-04-08 >>>>> 17:01:54.750113-07 | 2013-04-08 17:02:00.17336-07 | 2013-04-08 >>>>> 17:02:00.320469-07 | 2013-04-08 17:02:00.177758-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 7466 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57955 | 2013-04-08 >>>>> 17:01:54.753559-07 | 2013-04-08 17:01:59.49003-07 | 2013-04-08 >>>>> 17:01:59.602925-07 | 2013-04-08 17:01:59.493732-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 7467 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57956 | 2013-04-08 >>>>> 17:01:54.75699-07 | 2013-04-08 17:01:58.262083-07 | 2013-04-08 >>>>> 17:01:58.349452-07 | 2013-04-08 17:01:58.350822-07 | t | >>>>> active | INSERT INTO biods.f >>>>> eature_value (feature_value_id, feature_value_semid, feature_value, >>>>> feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, >>>>> modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) >>>>> 16395 | adchemy10013 | 7473 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57963 | 2013-04-08 >>>>> 17:01:55.49134-07 | 2013-04-08 17:02:00.313138-07 | 2013-04-08 >>>>> 17:02:00.420405-07 | 2013-04-08 17:02:00.318887-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 16395 | adchemy10013 | 7474 | 17361 | adchemy | pgxc >>>>> | 192.168.53.109 | | 57964 | 2013-04-08 >>>>> 17:01:55.494777-07 | 2013-04-08 17:02:00.514142-07 | 2013-04-08 >>>>> 17:02:00.577239-07 | 2013-04-08 17:02:00.519572-07 | t | >>>>> active | INSERT INTO biods.p >>>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>>> 12893 | postgres | 8517 | 10 | postgres | psql >>>>> | | | -1 | 2013-04-08 >>>>> 17:35:28.217934-07 | | 2013-04-08 >>>>> 17:35:28.220366-07 | 2013-04-08 17:35:28.220369-07 | f | >>>>> active | select * from pg_ca >>>>> talog.pg_stat_activity; >>>>> (30 rows) >>>>> >>>>> >>>>> ________________________________________ >>>>> >>>>> Venky Kandaswamy >>>>> >>>>> Principal Engineer, Adchemy Inc. >>>>> >>>>> 925-200-7124 >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Precog is a next-generation analytics platform capable of advanced >>>>> analytics on semi-structured data. The platform includes APIs for >>>>> building >>>>> apps and a phenomenal toolset for data science. Developers can use >>>>> our toolset for easy data analysis & visualization. Get a free account! >>>>> http://www2.precog.com/precogplatform/slashdotnewsletter >>>>> _______________________________________________ >>>>> Postgres-xc-developers mailing list >>>>> Pos...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>>> >>>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Precog is a next-generation analytics platform capable of advanced >>>> analytics on semi-structured data. The platform includes APIs for >>>> building >>>> apps and a phenomenal toolset for data science. Developers can use >>>> our toolset for easy data analysis & visualization. Get a free account! >>>> http://www2.precog.com/precogplatform/slashdotnewsletter >>>> _______________________________________________ >>>> Postgres-xc-developers mailing list >>>> Pos...@li... >>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Precog is a next-generation analytics platform capable of advanced >>> analytics on semi-structured data. The platform includes APIs for >>> building >>> apps and a phenomenal toolset for data science. Developers can use >>> our toolset for easy data analysis & visualization. Get a free account! >>> http://www2.precog.com/precogplatform/slashdotnewsletter >>> _______________________________________________ >>> Postgres-xc-developers mailing list >>> Pos...@li... >>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Precog is a next-generation analytics platform capable of advanced >> analytics on semi-structured data. The platform includes APIs for building >> apps and a phenomenal toolset for data science. Developers can use >> our toolset for easy data analysis & visualization. Get a free account! >> http://www2.precog.com/precogplatform/slashdotnewsletter >> _______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> >> > > > -- > Andrei Martsinchyk > > StormDB - http://www.stormdb.com > The Database Cloud > > |
From: Andrei M. <and...@gm...> - 2013-04-11 08:05:39
|
I see the not granted tuple level locks on datanodes, they are requested by the "INSERT waiting" processes. Guess they are updating indexes. It seems like these locks are not granted because of exclusive lock held by "UPDATE waiting". But it is not clear, what the update is faiting for? 2013/4/11 Amit Khandekar <ami...@en...> > Hi Venky, > > Thanks for the details. Have you defined one of the data nodes as a > primary node ? If no, we need to define one, because replicated table > updates need that in order to avoid deadlocks. If you have already marked a > node as a primary node, is the primary node one of the nodes on which the > feature table is replicated on ? If no, you may have hit this bug : > > http://sourceforge.net/tracker/index.php?func=detail&aid=3547808&group_id=311227&atid=1310232 > > > Currently we hit this bug because the primary node is not table-specific, > it should be implemented table-specific. For now you need to make sure one > of the nodes on which the table is replicated is defined as a primary node. > > > On 11 April 2013 06:51, Venky Kandaswamy <ve...@ad...> wrote: > >> We are processing inserts/updates using multiple threads. Here is the >> trace log of the actual statements that are hung. The scenario shows the >> statements on the coordinator and 2 datanodes. The scenario is similar >> across all the datanodes. >> The same data updates did not cause Postgres 9.1.2 to hang. This could be >> related to an application problem, although we could not reproduce it on >> Postgres 9.1.2. >> >> At a high level, there is an update on the 'feature' table that is >> holding an exclusive lock on the row. The inserts are inserting to another >> table that has a foreign key that references the row being locked by the >> update. Pid 7174 and 7179 are waiting to complete and they are also similar >> inserts. The only thing in common seems to be that the update is locking >> the feature row that is referenced in a foreign key in the other inserts. >> This should not cause a deadlock, I believe. >> >> The question in my mind is whether pids 7181 and 7186 should have been >> granted exclusive access to a tuple while others were granted share access. >> This might cause a race condition. >> >> This causes PGXC to hang. Obviously, the update is in turn waiting for >> something (which we cannot figure out from the logs) and therefore not >> committing the update. >> >> [postgres@sv4-pgxc-db01 pgxc]$ ps -ef | grep adchemy1234 >> <COORDINATOR> >> postgres 7169 7113 0 16:41 ? 00:00:02 postgres: adchemy >> adchemy1234 192.168.51.73(49186) INSERT >> postgres 7170 7113 0 16:41 ? 00:00:02 postgres: adchemy >> adchemy1234 192.168.51.73(49187) INSERT >> postgres 7171 7113 0 16:41 ? 00:00:02 postgres: adchemy >> adchemy1234 192.168.51.73(49188) UPDATE >> postgres 7172 7113 0 16:41 ? 00:00:02 postgres: adchemy >> adchemy1234 192.168.51.73(49189) INSERT >> postgres 7173 7113 0 16:41 ? 00:00:02 postgres: adchemy >> adchemy1234 192.168.51.73(49190) INSERT >> <COORDINATOR> >> >> <DATANODE1> >> postgres 7174 7127 0 16:41 ? 00:00:01 postgres: adchemy >> adchemy1234 172.17.28.61(51909) idle in transaction >> postgres 7175 7127 0 16:41 ? 00:00:01 postgres: adchemy >> adchemy1234 172.17.28.61(51910) INSERT waiting >> postgres 7181 7127 0 16:41 ? 00:00:01 postgres: adchemy >> adchemy1234 172.17.28.61(51924) UPDATE waiting >> postgres 7182 7127 0 16:41 ? 00:00:01 postgres: adchemy >> adchemy1234 172.17.28.61(51925) INSERT waiting >> postgres 7183 7127 0 16:41 ? 00:00:01 postgres: adchemy >> adchemy1234 172.17.28.61(51926) INSERT waiting >> <DATANODE1> >> >> <DATANODE2> >> postgres 7179 7140 0 16:41 ? 00:00:00 postgres: adchemy >> adchemy1234 172.17.28.61(48957) idle in transaction >> postgres 7180 7140 0 16:41 ? 00:00:00 postgres: adchemy >> adchemy1234 172.17.28.61(48962) INSERT waiting >> postgres 7184 7140 0 16:41 ? 00:00:00 postgres: adchemy >> adchemy1234 172.17.28.61(48970) INSERT waiting >> postgres 7185 7140 0 16:41 ? 00:00:00 postgres: adchemy >> adchemy1234 172.17.28.61(48975) INSERT waiting >> postgres 7186 7140 0 16:41 ? 00:00:00 postgres: adchemy >> adchemy1234 172.17.28.61(48980) UPDATE waiting >> <DATANODE2> >> >> -----LOGS----- formatted %t %u %p >> >> 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute S_1: BEGIN >> 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute <unnamed>: select >> nextval ('hibernate_sequence') >> 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute <unnamed>: insert into >> biods.product_feature (category_id, category_semid, created_ts, feature_id, >> feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, >> prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, >> $8, $9, $10, $11, $12) >> 2013-04-10 16:42:16 PDT adchemy 7169 DETAIL: parameters: $1 = '42302', >> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = >> 'description', $6 = '46105', $7 = 'description,Give your riches the >> designer treatment with Mcms leather heritage wallet. The logo-stamped >> little number stores your essentials in luxe vintage style.', $8 = NULL, $9 >> = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = >> '46455' >> >> 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute S_1: BEGIN >> 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute <unnamed>: select >> nextval ('hibernate_sequence') >> 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute <unnamed>: insert into >> biods.product_feature (category_id, category_semid, created_ts, feature_id, >> feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, >> prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, >> $8, $9, $10, $11, $12) >> 2013-04-10 16:42:16 PDT adchemy 7170 DETAIL: parameters: $1 = '42302', >> $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = >> 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up >> with a bold logo-stamped plaque in this utility chic wallet from Marc By >> Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = >> '2013-04-10 15:02:43.413-07', $12 = '46445' >> >> 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute S_1: BEGIN >> 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute <unnamed>: select >> feature0_.feature_id as feature1_8_1_, feature0_.created_ts as >> created2_8_1_, feature0_.feature_name as feature3_8_1_, >> feature0_.feature_semid as feature4_8_1_, feature0_.modified_by as >> modified5_8_1_, feature0_.source_msg_ts as source6_8_1_, >> feature0_.updated_ts as updated7_8_1_, featureval1_.feature_id as >> feature9_8_3_, featureval1_.feature_value_id as feature1_14_3_, >> featureval1_.feature_value_id as feature1_14_0_, featureval1_.created_ts as >> created2_14_0_, featureval1_.feature_id as feature9_14_0_, >> featureval1_.feature_semid as feature3_14_0_, featureval1_.feature_value as >> feature4_14_0_, featureval1_.feature_value_semid as feature5_14_0_, >> featureval1_.modified_by as modified6_14_0_, featureval1_.source_msg_ts as >> source7_14_0_, featureval1_.updated_ts as updated8_14_0_ from biods.feature >> feature0_ left outer join biods.feature_value featureval1_ on >> feature0_.feature_id=featureval1_.feature_id where feature0_.feature_id=$1 >> 2013-04-10 16:42:15 PDT adchemy 7171 DETAIL: parameters: $1 = '42318' >> 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute <unnamed>: update >> biods.feature set created_ts=$1, feature_name=$2, feature_semid=$3, >> modified_by=$4, source_msg_ts=$5, updated_ts=$6 where feature_id=$7 >> 2013-04-10 16:42:15 PDT adchemy 7171 DETAIL: parameters: $1 = >> '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = >> NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', >> $7 = '42318' >> >> 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute S_1: BEGIN >> 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute <unnamed>: select >> nextval ('hibernate_sequence') >> 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute <unnamed>: insert into >> biods.product_feature (category_id, category_semid, created_ts, feature_id, >> feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, >> prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, >> $8, $9, $10, $11, $12) >> 2013-04-10 16:42:17 PDT adchemy 7172 DETAIL: parameters: $1 = '42302', >> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = >> 'description', $6 = '44831', $7 = 'description,A chic logo-detailed >> cosmetic case for the contemporary girl from Tory Burch. Exclusive to >> Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = >> '2013-04-10 15:02:42.003-07', $12 = '46460' >> >> 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute S_1: BEGIN >> 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute <unnamed>: select >> nextval ('hibernate_sequence') >> 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute <unnamed>: insert into >> biods.product_feature (category_id, category_semid, created_ts, feature_id, >> feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, >> prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, >> $8, $9, $10, $11, $12) >> 2013-04-10 16:42:15 PDT adchemy 7173 DETAIL: parameters: $1 = '42302', >> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = >> 'description', $6 = '46154', $7 = 'description,Keep the essentials close >> with LeSportsacs crossbody bag in matte black nylon practical interior zip >> compartments make those daily errands a little bit easier.', $8 = NULL, $9 >> = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = >> '46435' >> >> 2013-04-10 16:42:15 PDT adchemy 7174 LOG: statement: START TRANSACTION >> ISOLATION LEVEL read committed READ WRITE >> 2013-04-10 16:42:15 PDT adchemy 7174 LOG: execute <unnamed>: INSERT INTO >> biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 2013-04-10 16:42:15 PDT adchemy 7174 DETAIL: parameters: $1 = '42302', >> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = >> 'description', $6 = '46154', $7 = 'description,Keep the essentials close >> with LeSportsacs crossbody bag in matte black nylon practical interior zip >> compartments make those daily errands a little bit easier.', $8 = NULL, $9 >> = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = >> '46435' >> >> 2013-04-10 16:42:16 PDT adchemy 7175 LOG: statement: START TRANSACTION >> ISOLATION LEVEL read committed READ WRITE >> 2013-04-10 16:42:16 PDT adchemy 7175 LOG: execute <unnamed>: INSERT INTO >> biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 2013-04-10 16:42:16 PDT adchemy 7175 DETAIL: parameters: $1 = '42302', >> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = >> 'description', $6 = '46105', $7 = 'description,Give your riches the >> designer treatment with Mcms leather heritage wallet. The logo-stamped >> little number stores your essentials in luxe vintage style.', $8 = NULL, $9 >> = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = >> '46455' >> >> 2013-04-10 16:42:15 PDT adchemy 7179 LOG: statement: START TRANSACTION >> ISOLATION LEVEL read committed READ WRITE >> 2013-04-10 16:42:15 PDT adchemy 7179 LOG: execute <unnamed>: INSERT INTO >> biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 2013-04-10 16:42:15 PDT adchemy 7179 DETAIL: parameters: $1 = '42302', >> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = >> 'description', $6 = '46154', $7 = 'description,Keep the essentials close >> with LeSportsacs crossbody bag in matte black nylon practical interior zip >> compartments make those daily errands a little bit easier.', $8 = NULL, $9 >> = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = >> '46435' >> >> 2013-04-10 16:42:16 PDT adchemy 7180 LOG: statement: START TRANSACTION >> ISOLATION LEVEL read committed READ WRITE >> 2013-04-10 16:42:16 PDT adchemy 7180 LOG: execute <unnamed>: INSERT INTO >> biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 2013-04-10 16:42:16 PDT adchemy 7180 DETAIL: parameters: $1 = '42302', >> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = >> 'description', $6 = '46105', $7 = 'description,Give your riches the >> designer treatment with Mcms leather heritage wallet. The logo-stamped >> little number stores your essentials in luxe vintage style.', $8 = NULL, $9 >> = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = >> '46455' >> >> 2013-04-10 16:42:15 PDT adchemy 7181 LOG: statement: START TRANSACTION >> ISOLATION LEVEL read committed READ WRITE >> 2013-04-10 16:42:15 PDT adchemy 7181 LOG: execute <unnamed>: UPDATE >> biods.feature SET feature_semid = $3, feature_name = $2, created_ts = $1, >> updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = >> $7) >> 2013-04-10 16:42:15 PDT adchemy 7181 DETAIL: parameters: $1 = >> '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = >> NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', >> $7 = '42318' >> >> 2013-04-10 16:42:17 PDT adchemy 7182 LOG: statement: START TRANSACTION >> ISOLATION LEVEL read committed READ WRITE >> 2013-04-10 16:42:17 PDT adchemy 7182 LOG: execute <unnamed>: INSERT INTO >> biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 2013-04-10 16:42:17 PDT adchemy 7182 DETAIL: parameters: $1 = '42302', >> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = >> 'description', $6 = '44831', $7 = 'description,A chic logo-detailed >> cosmetic case for the contemporary girl from Tory Burch. Exclusive to >> Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = >> '2013-04-10 15:02:42.003-07', $12 = '46460' >> >> 2013-04-10 16:42:16 PDT adchemy 7183 LOG: statement: START TRANSACTION >> ISOLATION LEVEL read committed READ WRITE >> 2013-04-10 16:42:16 PDT adchemy 7183 LOG: execute <unnamed>: INSERT INTO >> biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 2013-04-10 16:42:16 PDT adchemy 7183 DETAIL: parameters: $1 = '42302', >> $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = >> 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up >> with a bold logo-stamped plaque in this utility chic wallet from Marc By >> Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = >> '2013-04-10 15:02:43.413-07', $12 = '46445' >> >> 2013-04-10 16:42:17 PDT adchemy 7184 LOG: statement: START TRANSACTION >> ISOLATION LEVEL read committed READ WRITE >> 2013-04-10 16:42:17 PDT adchemy 7184 LOG: execute <unnamed>: INSERT INTO >> biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 2013-04-10 16:42:17 PDT adchemy 7184 DETAIL: parameters: $1 = '42302', >> $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = >> 'description', $6 = '44831', $7 = 'description,A chic logo-detailed >> cosmetic case for the contemporary girl from Tory Burch. Exclusive to >> Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = >> '2013-04-10 15:02:42.003-07', $12 = '46460' >> >> 2013-04-10 16:42:16 PDT adchemy 7185 LOG: statement: START TRANSACTION >> ISOLATION LEVEL read committed READ WRITE >> 2013-04-10 16:42:16 PDT adchemy 7185 LOG: execute <unnamed>: INSERT INTO >> biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 2013-04-10 16:42:16 PDT adchemy 7185 DETAIL: parameters: $1 = '42302', >> $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = >> 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up >> with a bold logo-stamped plaque in this utility chic wallet from Marc By >> Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = >> '2013-04-10 15:02:43.413-07', $12 = '46445' >> >> 2013-04-10 16:42:15 PDT adchemy 7186 LOG: statement: START TRANSACTION >> ISOLATION LEVEL read committed READ WRITE >> 2013-04-10 16:42:15 PDT adchemy 7186 LOG: execute <unnamed>: UPDATE >> biods.feature SET feature_semid = $3, feature_name = $2, created_ts = $1, >> updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = >> $7) >> 2013-04-10 16:42:15 PDT adchemy 7186 DETAIL: parameters: $1 = >> '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = >> NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', >> $7 = '42318' >> >> LOCKS ON COORDINATOR: >> >> [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5432 -U postgres >> -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from >> pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by >> mode;" >> pid | relname | locktype | mode | granted >> ------+--------------------+----------+------------------+--------- >> 7169 | hibernate_sequence | relation | AccessShareLock | t >> 7173 | hibernate_sequence | relation | AccessShareLock | t >> 7172 | hibernate_sequence | relation | AccessShareLock | t >> 7171 | feature_value | relation | AccessShareLock | t >> 7171 | feature | relation | AccessShareLock | t >> 7170 | hibernate_sequence | relation | AccessShareLock | t >> 7171 | feature | relation | RowExclusiveLock | t >> 7172 | product_feature | relation | RowExclusiveLock | t >> 7170 | product_feature | relation | RowExclusiveLock | t >> 7173 | product_feature | relation | RowExclusiveLock | t >> 7169 | product_feature | relation | RowExclusiveLock | t >> (11 rows) >> >> LOCKS ON DATANODE1: >> >> [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5433 -U postgres >> -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from >> pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by >> mode;" >> pid | relname | locktype | mode | >> granted >> >> ------+-----------------------+----------+--------------------------+--------- >> 7174 | prd_id | relation | AccessShareLock | t >> 7182 | feature_id | relation | AccessShareLock | t >> 7174 | feature_value_id | relation | AccessShareLock | t >> 7183 | feature_id | relation | AccessShareLock | t >> 7174 | feature_id | relation | AccessShareLock | t >> 7175 | feature_id | relation | AccessShareLock | t >> 7181 | feature | tuple | ExclusiveLock | t >> 7181 | feature_semid | relation | RowExclusiveLock | t >> 7181 | feature_id | relation | RowExclusiveLock | t >> 7181 | feature | relation | RowExclusiveLock | t >> 7175 | cat_prd_feature_semid | relation | RowExclusiveLock | t >> 7183 | cat_prd_feature_semid | relation | RowExclusiveLock | t >> 7183 | prd_feature_id | relation | RowExclusiveLock | t >> 7183 | product_feature | relation | RowExclusiveLock | t >> 7182 | cat_prd_feature_semid | relation | RowExclusiveLock | t >> 7182 | prd_feature_id | relation | RowExclusiveLock | t >> 7182 | product_feature | relation | RowExclusiveLock | t >> 7175 | prd_feature_id | relation | RowExclusiveLock | t >> 7175 | product_feature | relation | RowExclusiveLock | t >> 7174 | product_feature | relation | RowExclusiveLock | t >> 7206 | feature_semid | relation | RowExclusiveLock | t >> 7206 | feature_id | relation | RowExclusiveLock | t >> 7174 | product | relation | RowShareLock | t >> 7182 | feature | relation | RowShareLock | t >> 7174 | feature_value | relation | RowShareLock | t >> 7183 | category | relation | RowShareLock | t >> 7174 | feature | relation | RowShareLock | t >> 7174 | category | relation | RowShareLock | t >> 7175 | category | relation | RowShareLock | t >> 7175 | feature | relation | RowShareLock | t >> 7183 | feature | relation | RowShareLock | t >> 7182 | category | relation | RowShareLock | t >> 7182 | feature | tuple | ShareLock | f >> 7175 | feature | tuple | ShareLock | f >> 7183 | feature | tuple | ShareLock | f >> 7206 | feature | relation | ShareUpdateExclusiveLock | t >> >> LOCKS ON DATANODE2: >> >> [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5434 -U postgres >> -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from >> pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by >> mode;" >> pid | relname | locktype | mode | >> granted >> >> ------+-----------------------+----------+--------------------------+--------- >> 7185 | feature_id | relation | AccessShareLock | t >> 7179 | feature_value_id | relation | AccessShareLock | t >> 7179 | prd_id | relation | AccessShareLock | t >> 7184 | feature_id | relation | AccessShareLock | t >> 7180 | feature_id | relation | AccessShareLock | t >> 7179 | feature_id | relation | AccessShareLock | t >> 7186 | feature | tuple | ExclusiveLock | t >> 7184 | prd_feature_id | relation | RowExclusiveLock | t >> 7184 | product_feature | relation | RowExclusiveLock | t >> 7186 | feature_semid | relation | RowExclusiveLock | t >> 7186 | feature_id | relation | RowExclusiveLock | t >> 7186 | feature | relation | RowExclusiveLock | t >> 7185 | cat_prd_feature_semid | relation | RowExclusiveLock | t >> 7185 | prd_feature_id | relation | RowExclusiveLock | t >> 7185 | product_feature | relation | RowExclusiveLock | t >> 7184 | cat_prd_feature_semid | relation | RowExclusiveLock | t >> 7180 | cat_prd_feature_semid | relation | RowExclusiveLock | t >> 7180 | prd_feature_id | relation | RowExclusiveLock | t >> 7180 | product_feature | relation | RowExclusiveLock | t >> 7179 | product_feature | relation | RowExclusiveLock | t >> 7202 | feature_semid | relation | RowExclusiveLock | t >> 7202 | feature_id | relation | RowExclusiveLock | t >> 7179 | product | relation | RowShareLock | t >> 7184 | feature | relation | RowShareLock | t >> 7179 | feature_value | relation | RowShareLock | t >> 7185 | category | relation | RowShareLock | t >> 7179 | feature | relation | RowShareLock | t >> 7179 | category | relation | RowShareLock | t >> 7180 | feature | relation | RowShareLock | t >> 7180 | category | relation | RowShareLock | t >> 7185 | feature | relation | RowShareLock | t >> 7184 | category | relation | RowShareLock | t >> 7185 | feature | tuple | ShareLock | f >> 7180 | feature | tuple | ShareLock | f >> 7184 | feature | tuple | ShareLock | f >> 7202 | feature | relation | ShareUpdateExclusiveLock | t >> (36 rows) >> >> >> >> ________________________________________ >> >> Venky Kandaswamy >> >> Principal Engineer, Adchemy Inc. >> >> 925-200-7124 >> ------------------------------ >> *From:* Koichi Suzuki [koi...@gm...] >> *Sent:* Monday, April 08, 2013 10:41 PM >> *To:* Amit Khandekar >> *Cc:* Venky Kandaswamy; pos...@li... >> *Subject:* Re: [Postgres-xc-developers] PGXC hangs when run with >> concurrent inserts >> >> Because insert is being done in parallel, I'm afraid there could be a >> possibility that we have internal lock conflicts, which should not happen. >> >> Regards; >> ---------- >> Koichi Suzuki >> >> >> 2013/4/9 Amit Khandekar <ami...@en...> >> >>> >>> >>> >>> On 9 April 2013 06:46, Venky Kandaswamy <ve...@ad...> wrote: >>> >>>> All, >>>> We have been running into a hang issue on our app that appears to be >>>> related to PGXC. Our app processes messages from RabbitMQ and >>>> inserts/updates tables. We run 5 concurrent threads. The incoming queues >>>> are replicated, one feeding Postgres 9.1 and the other feeding PGXC >>>> (current git master). PGXC is hanging on inserts after processing a few >>>> transactions. It does not appear to be related to the actual data itself. >>>> IT looks like all the sessions are waiting for something. There is no >>>> information on locks available from pg_locks. >>>> >>> >>> Since most of the operations are inserts, it does not look like it is >>> due to locks, unless something has acquired table locks. But just to rule >>> out that possibility, it would be better if you check pg_locks on the >>> datanodes, if you have checked it only on coordinator so far. >>> >>> >>>> >>>> An strace simply says recfrom(10. >>>> >>>> The are no errors in the logs from gtm, coordinator or datanodes. >>>> >>>> The tables have referential integrity and use a shared sequence to >>>> get the next id. Is it possible that something is going on with the logic >>>> to retrieve sequence numbers? The tables are all replicated. >>>> >>>> Unfortunately, we have not been able to reproduce a reliable test >>>> case. >>>> >>>> [postgres@gnode0 pgxc]$ /usr/local/pgsql/bin/psql -p 5433 -U >>>> postgres -d postgres -c 'select * from pg_catalog.pg_stat_activity;' >>>> datid | datname | pid | usesysid | usename | application_name >>>> | client_addr | client_hostname | client_port | >>>> backend_start | xact_start | >>>> query_start | state_change | waiting | >>>> state | >>>> >>>> query >>>> >>>> >>>> -------+--------------+-------+----------+----------+------------------+----------------+-----------------+-------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+---------+---------------------+-------------------- >>>> >>>> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- >>>> 12893 | postgres | 22330 | 10 | postgres | pgxc >>>> | 192.168.53.109 | | 47025 | 2013-03-31 >>>> 21:42:16.724845-07 | | 2013-04-08 >>>> 15:43:52.313325-07 | 2013-04-08 15:26:11.444754-07 | f | >>>> idle | COMMIT PREPARED 'T1 >>>> 32273' >>>> 16393 | master | 4267 | 16392 | xcadmin | pgxc >>>> | 192.168.53.109 | | 54961 | 2013-04-08 >>>> 15:24:28.668023-07 | | 2013-04-08 >>>> 15:33:17.586836-07 | 2013-04-08 15:33:17.587942-07 | f | >>>> idle | SELECT count(*) FRO >>>> M ONLY bicommon.account_datasource WHERE true >>>> 16395 | adchemy10013 | 4363 | 16392 | xcadmin | pgxc >>>> | 192.168.53.109 | | 55084 | 2013-04-08 >>>> 15:28:48.822939-07 | | 2013-04-08 >>>> 15:50:21.650727-07 | 2013-04-08 15:50:07.916753-07 | f | >>>> idle | SELECT prd_id, prd_ >>>> semid, prd_name, prd_line, prd_model, prd_brand, prd_image_url, >>>> prd_dest_url, created_ts, updated_ts, source_msg_ts, modified_by FROM >>>> biods.product >>>> 16393 | master | 4486 | 16392 | xcadmin | pgxc >>>> | 192.168.53.109 | | 55246 | 2013-04-08 >>>> 15:33:21.019388-07 | | 2013-04-08 >>>> 15:43:51.321376-07 | 2013-04-08 15:43:51.322675-07 | f | >>>> idle | SET SESSION AUTHORI >>>> ZATION DEFAULT;RESET ALL; >>>> 16393 | master | 4781 | 16392 | xcadmin | pgxc >>>> | 192.168.53.109 | | 55515 | 2013-04-08 >>>> 15:42:42.122785-07 | | 2013-04-08 >>>> 17:02:21.023713-07 | 2013-04-08 17:02:20.804751-07 | f | >>>> idle | SET SESSION AUTHORI >>>> ZATION DEFAULT;RESET ALL; >>>> 16393 | master | 4787 | 16392 | xcadmin | pgxc >>>> | 192.168.53.109 | | 55521 | 2013-04-08 >>>> 15:42:42.142662-07 | | 2013-04-08 >>>> 16:17:19.26364-07 | 2013-04-08 16:17:19.126163-07 | f | >>>> idle | SET SESSION AUTHORI >>>> ZATION DEFAULT;RESET ALL; >>>> 16393 | master | 4792 | 16392 | xcadmin | pgxc >>>> | 192.168.53.109 | | 55526 | 2013-04-08 >>>> 15:42:42.159009-07 | | 2013-04-08 >>>> 15:45:11.915026-07 | 2013-04-08 15:45:11.886392-07 | f | >>>> idle | SET SESSION AUTHORI >>>> ZATION DEFAULT;RESET ALL; >>>> 16393 | master | 4799 | 16392 | xcadmin | pgxc >>>> | 192.168.53.109 | | 55533 | 2013-04-08 >>>> 15:42:42.678387-07 | | 2013-04-08 >>>> 17:02:21.195332-07 | 2013-04-08 17:02:20.805074-07 | f | >>>> idle | SET SESSION AUTHORI >>>> ZATION DEFAULT;RESET ALL; >>>> 16393 | master | 4804 | 16392 | xcadmin | pgxc >>>> | 192.168.53.109 | | 55538 | 2013-04-08 >>>> 15:42:42.694802-07 | | 2013-04-08 >>>> 15:45:11.904619-07 | 2013-04-08 15:45:11.888493-07 | f | >>>> idle | SET SESSION AUTHORI >>>> ZATION DEFAULT;RESET ALL; >>>> 16395 | adchemy10013 | 4977 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 55732 | 2013-04-08 >>>> 15:47:34.901175-07 | 2013-04-08 15:48:08.345331-07 | 2013-04-08 >>>> 15:48:08.528818-07 | 2013-04-08 15:48:08.410815-07 | f | idle in >>>> transaction | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 4979 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 55734 | 2013-04-08 >>>> 15:47:35.042778-07 | 2013-04-08 15:48:16.384763-07 | 2013-04-08 >>>> 15:48:16.506899-07 | 2013-04-08 15:48:16.388503-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 4985 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 55740 | 2013-04-08 15:47: >>>> 35.235945-07 | 2013-04-08 15:48:14.38895-07 | 2013-04-08 >>>> 15:48:14.445351-07 | 2013-04-08 15:48:14.446752-07 | t | >>>> active | UPDATE biods.featur >>>> e SET feature_semid = $3, feature_name = $2, created_ts = $1, >>>> updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = >>>> $7) >>>> 16395 | adchemy10013 | 4986 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 55741 | 2013-04-08 15:47: >>>> 35.238843-07 | 2013-04-08 15:48:18.201043-07 | 2013-04-08 >>>> 15:48:18.273204-07 | 2013-04-08 15:48:18.205647-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 4998 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 55753 | 2013-04-08 >>>> 15:47:35.910309-07 | 2013-04-08 15:48:08.412038-07 | 2013-04-08 >>>> 15:48:08.566945-07 | 2013-04-08 15:48:08.415026-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 6340 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57002 | 2013-04-08 >>>> 16:31:44.414804-07 | 2013-04-08 16:31:50.293828-07 | 2013-04-08 >>>> 16:31:50.433988-07 | 2013-04-08 16:31:50.297752-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 6341 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57003 | 2013-04-08 >>>> 16:31:44.418356-07 | 2013-04-08 16:31:49.450704-07 | 2013-04-08 >>>> 16:31:49.599946-07 | 2013-04-08 16:31:49.45562-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 6348 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57010 | 2013-04-08 16:31: >>>> 45.065767-07 | 2013-04-08 16:31:50.699979-07 | 2013-04-08 >>>> 16:31:50.817425-07 | 2013-04-08 16:31:50.704669-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 6349 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57011 | 2013-04-08 >>>> 16:31:45.06926-07 | 2013-04-08 16:31:51.528207-07 | 2013-04-08 >>>> 16:31:51.582036-07 | 2013-04-08 16:31:51.532618-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 6350 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57012 | 2013-04-08 16:31: >>>> 45.072711-07 | 2013-04-08 16:31:50.085336-07 | 2013-04-08 >>>> 16:31:50.223221-07 | 2013-04-08 16:31:50.088908-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 7269 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57774 | 2013-04-08 >>>> 16:57:15.563006-07 | 2013-04-08 16:57:21.849156-07 | 2013-04-08 >>>> 16:57:21.978984-07 | 2013-04-08 16:57:21.853289-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 7271 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57776 | 2013-04-08 >>>> 16:57:15.63199-07 | 2013-04-08 16:57:16.575535-07 | 2013-04-08 >>>> 16:57:17.00605-07 | 2013-04-08 16:57:17.007747-07 | t | >>>> active | INSERT INTO biods.f >>>> eature_value (feature_value_id, feature_value_semid, feature_value, >>>> feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, >>>> modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) >>>> 16395 | adchemy10013 | 7283 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57788 | 2013-04-08 >>>> 16:57:16.292702-07 | 2013-04-08 16:57:21.849125-07 | 2013-04-08 >>>> 16:57:21.978824-07 | 2013-04-08 16:57:21.853251-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 7284 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57789 | 2013-04-08 >>>> 16:57:16.295879-07 | 2013-04-08 16:57:24.233166-07 | 2013-04-08 >>>> 16:57:24.321938-07 | 2013-04-08 16:57:24.237514-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 7285 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57790 | 2013-04-08 >>>> 16:57:16.299271-07 | 2013-04-08 16:57:22.119868-07 | 2013-04-08 >>>> 16:57:22.197213-07 | 2013-04-08 16:57:22.128357-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 7465 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57954 | 2013-04-08 >>>> 17:01:54.750113-07 | 2013-04-08 17:02:00.17336-07 | 2013-04-08 >>>> 17:02:00.320469-07 | 2013-04-08 17:02:00.177758-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 7466 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57955 | 2013-04-08 >>>> 17:01:54.753559-07 | 2013-04-08 17:01:59.49003-07 | 2013-04-08 >>>> 17:01:59.602925-07 | 2013-04-08 17:01:59.493732-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 7467 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57956 | 2013-04-08 >>>> 17:01:54.75699-07 | 2013-04-08 17:01:58.262083-07 | 2013-04-08 >>>> 17:01:58.349452-07 | 2013-04-08 17:01:58.350822-07 | t | >>>> active | INSERT INTO biods.f >>>> eature_value (feature_value_id, feature_value_semid, feature_value, >>>> feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, >>>> modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) >>>> 16395 | adchemy10013 | 7473 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57963 | 2013-04-08 >>>> 17:01:55.49134-07 | 2013-04-08 17:02:00.313138-07 | 2013-04-08 >>>> 17:02:00.420405-07 | 2013-04-08 17:02:00.318887-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 16395 | adchemy10013 | 7474 | 17361 | adchemy | pgxc >>>> | 192.168.53.109 | | 57964 | 2013-04-08 >>>> 17:01:55.494777-07 | 2013-04-08 17:02:00.514142-07 | 2013-04-08 >>>> 17:02:00.577239-07 | 2013-04-08 17:02:00.519572-07 | t | >>>> active | INSERT INTO biods.p >>>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>>> feature_value_id, category_semid, prd_semid, feature_semid, >>>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>>> 12893 | postgres | 8517 | 10 | postgres | psql >>>> | | | -1 | 2013-04-08 >>>> 17:35:28.217934-07 | | 2013-04-08 >>>> 17:35:28.220366-07 | 2013-04-08 17:35:28.220369-07 | f | >>>> active | select * from pg_ca >>>> talog.pg_stat_activity; >>>> (30 rows) >>>> >>>> >>>> ________________________________________ >>>> >>>> Venky Kandaswamy >>>> >>>> Principal Engineer, Adchemy Inc. >>>> >>>> 925-200-7124 >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Precog is a next-generation analytics platform capable of advanced >>>> analytics on semi-structured data. The platform includes APIs for >>>> building >>>> apps and a phenomenal toolset for data science. Developers can use >>>> our toolset for easy data analysis & visualization. Get a free account! >>>> http://www2.precog.com/precogplatform/slashdotnewsletter >>>> _______________________________________________ >>>> Postgres-xc-developers mailing list >>>> Pos...@li... >>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Precog is a next-generation analytics platform capable of advanced >>> analytics on semi-structured data. The platform includes APIs for >>> building >>> apps and a phenomenal toolset for data science. Developers can use >>> our toolset for easy data analysis & visualization. Get a free account! >>> http://www2.precog.com/precogplatform/slashdotnewsletter >>> _______________________________________________ >>> Postgres-xc-developers mailing list >>> Pos...@li... >>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Precog is a next-generation analytics platform capable of advanced >> analytics on semi-structured data. The platform includes APIs for building >> apps and a phenomenal toolset for data science. Developers can use >> our toolset for easy data analysis & visualization. Get a free account! >> http://www2.precog.com/precogplatform/slashdotnewsletter >> _______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> >> > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > -- Andrei Martsinchyk StormDB - http://www.stormdb.com The Database Cloud |
From: Amit K. <ami...@en...> - 2013-04-11 07:58:21
|
Hi Venky, Thanks for the details. Have you defined one of the data nodes as a primary node ? If no, we need to define one, because replicated table updates need that in order to avoid deadlocks. If you have already marked a node as a primary node, is the primary node one of the nodes on which the feature table is replicated on ? If no, you may have hit this bug : http://sourceforge.net/tracker/index.php?func=detail&aid=3547808&group_id=311227&atid=1310232 Currently we hit this bug because the primary node is not table-specific, it should be implemented table-specific. For now you need to make sure one of the nodes on which the table is replicated is defined as a primary node. On 11 April 2013 06:51, Venky Kandaswamy <ve...@ad...> wrote: > We are processing inserts/updates using multiple threads. Here is the > trace log of the actual statements that are hung. The scenario shows the > statements on the coordinator and 2 datanodes. The scenario is similar > across all the datanodes. > The same data updates did not cause Postgres 9.1.2 to hang. This could be > related to an application problem, although we could not reproduce it on > Postgres 9.1.2. > > At a high level, there is an update on the 'feature' table that is holding > an exclusive lock on the row. The inserts are inserting to another table > that has a foreign key that references the row being locked by the update. > Pid 7174 and 7179 are waiting to complete and they are also similar > inserts. The only thing in common seems to be that the update is locking > the feature row that is referenced in a foreign key in the other inserts. > This should not cause a deadlock, I believe. > > The question in my mind is whether pids 7181 and 7186 should have been > granted exclusive access to a tuple while others were granted share access. > This might cause a race condition. > > This causes PGXC to hang. Obviously, the update is in turn waiting for > something (which we cannot figure out from the logs) and therefore not > committing the update. > > [postgres@sv4-pgxc-db01 pgxc]$ ps -ef | grep adchemy1234 > <COORDINATOR> > postgres 7169 7113 0 16:41 ? 00:00:02 postgres: adchemy > adchemy1234 192.168.51.73(49186) INSERT > postgres 7170 7113 0 16:41 ? 00:00:02 postgres: adchemy > adchemy1234 192.168.51.73(49187) INSERT > postgres 7171 7113 0 16:41 ? 00:00:02 postgres: adchemy > adchemy1234 192.168.51.73(49188) UPDATE > postgres 7172 7113 0 16:41 ? 00:00:02 postgres: adchemy > adchemy1234 192.168.51.73(49189) INSERT > postgres 7173 7113 0 16:41 ? 00:00:02 postgres: adchemy > adchemy1234 192.168.51.73(49190) INSERT > <COORDINATOR> > > <DATANODE1> > postgres 7174 7127 0 16:41 ? 00:00:01 postgres: adchemy > adchemy1234 172.17.28.61(51909) idle in transaction > postgres 7175 7127 0 16:41 ? 00:00:01 postgres: adchemy > adchemy1234 172.17.28.61(51910) INSERT waiting > postgres 7181 7127 0 16:41 ? 00:00:01 postgres: adchemy > adchemy1234 172.17.28.61(51924) UPDATE waiting > postgres 7182 7127 0 16:41 ? 00:00:01 postgres: adchemy > adchemy1234 172.17.28.61(51925) INSERT waiting > postgres 7183 7127 0 16:41 ? 00:00:01 postgres: adchemy > adchemy1234 172.17.28.61(51926) INSERT waiting > <DATANODE1> > > <DATANODE2> > postgres 7179 7140 0 16:41 ? 00:00:00 postgres: adchemy > adchemy1234 172.17.28.61(48957) idle in transaction > postgres 7180 7140 0 16:41 ? 00:00:00 postgres: adchemy > adchemy1234 172.17.28.61(48962) INSERT waiting > postgres 7184 7140 0 16:41 ? 00:00:00 postgres: adchemy > adchemy1234 172.17.28.61(48970) INSERT waiting > postgres 7185 7140 0 16:41 ? 00:00:00 postgres: adchemy > adchemy1234 172.17.28.61(48975) INSERT waiting > postgres 7186 7140 0 16:41 ? 00:00:00 postgres: adchemy > adchemy1234 172.17.28.61(48980) UPDATE waiting > <DATANODE2> > > -----LOGS----- formatted %t %u %p > > 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute S_1: BEGIN > 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute <unnamed>: select > nextval ('hibernate_sequence') > 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute <unnamed>: insert into > biods.product_feature (category_id, category_semid, created_ts, feature_id, > feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, > prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, > $8, $9, $10, $11, $12) > 2013-04-10 16:42:16 PDT adchemy 7169 DETAIL: parameters: $1 = '42302', $2 > = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = > 'description', $6 = '46105', $7 = 'description,Give your riches the > designer treatment with Mcms leather heritage wallet. The logo-stamped > little number stores your essentials in luxe vintage style.', $8 = NULL, $9 > = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = > '46455' > > 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute S_1: BEGIN > 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute <unnamed>: select > nextval ('hibernate_sequence') > 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute <unnamed>: insert into > biods.product_feature (category_id, category_semid, created_ts, feature_id, > feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, > prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, > $8, $9, $10, $11, $12) > 2013-04-10 16:42:16 PDT adchemy 7170 DETAIL: parameters: $1 = '42302', $2 > = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = > 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up > with a bold logo-stamped plaque in this utility chic wallet from Marc By > Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = > '2013-04-10 15:02:43.413-07', $12 = '46445' > > 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute S_1: BEGIN > 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute <unnamed>: select > feature0_.feature_id as feature1_8_1_, feature0_.created_ts as > created2_8_1_, feature0_.feature_name as feature3_8_1_, > feature0_.feature_semid as feature4_8_1_, feature0_.modified_by as > modified5_8_1_, feature0_.source_msg_ts as source6_8_1_, > feature0_.updated_ts as updated7_8_1_, featureval1_.feature_id as > feature9_8_3_, featureval1_.feature_value_id as feature1_14_3_, > featureval1_.feature_value_id as feature1_14_0_, featureval1_.created_ts as > created2_14_0_, featureval1_.feature_id as feature9_14_0_, > featureval1_.feature_semid as feature3_14_0_, featureval1_.feature_value as > feature4_14_0_, featureval1_.feature_value_semid as feature5_14_0_, > featureval1_.modified_by as modified6_14_0_, featureval1_.source_msg_ts as > source7_14_0_, featureval1_.updated_ts as updated8_14_0_ from biods.feature > feature0_ left outer join biods.feature_value featureval1_ on > feature0_.feature_id=featureval1_.feature_id where feature0_.feature_id=$1 > 2013-04-10 16:42:15 PDT adchemy 7171 DETAIL: parameters: $1 = '42318' > 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute <unnamed>: update > biods.feature set created_ts=$1, feature_name=$2, feature_semid=$3, > modified_by=$4, source_msg_ts=$5, updated_ts=$6 where feature_id=$7 > 2013-04-10 16:42:15 PDT adchemy 7171 DETAIL: parameters: $1 = '2013-04-10 > 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = NULL, $5 = > '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', $7 = > '42318' > > 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute S_1: BEGIN > 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute <unnamed>: select > nextval ('hibernate_sequence') > 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute <unnamed>: insert into > biods.product_feature (category_id, category_semid, created_ts, feature_id, > feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, > prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, > $8, $9, $10, $11, $12) > 2013-04-10 16:42:17 PDT adchemy 7172 DETAIL: parameters: $1 = '42302', $2 > = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = > 'description', $6 = '44831', $7 = 'description,A chic logo-detailed > cosmetic case for the contemporary girl from Tory Burch. Exclusive to > Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = > '2013-04-10 15:02:42.003-07', $12 = '46460' > > 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute S_1: BEGIN > 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute <unnamed>: select > nextval ('hibernate_sequence') > 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute <unnamed>: insert into > biods.product_feature (category_id, category_semid, created_ts, feature_id, > feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, > prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, > $8, $9, $10, $11, $12) > 2013-04-10 16:42:15 PDT adchemy 7173 DETAIL: parameters: $1 = '42302', $2 > = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = > 'description', $6 = '46154', $7 = 'description,Keep the essentials close > with LeSportsacs crossbody bag in matte black nylon practical interior zip > compartments make those daily errands a little bit easier.', $8 = NULL, $9 > = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = > '46435' > > 2013-04-10 16:42:15 PDT adchemy 7174 LOG: statement: START TRANSACTION > ISOLATION LEVEL read committed READ WRITE > 2013-04-10 16:42:15 PDT adchemy 7174 LOG: execute <unnamed>: INSERT INTO > biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 2013-04-10 16:42:15 PDT adchemy 7174 DETAIL: parameters: $1 = '42302', $2 > = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = > 'description', $6 = '46154', $7 = 'description,Keep the essentials close > with LeSportsacs crossbody bag in matte black nylon practical interior zip > compartments make those daily errands a little bit easier.', $8 = NULL, $9 > = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = > '46435' > > 2013-04-10 16:42:16 PDT adchemy 7175 LOG: statement: START TRANSACTION > ISOLATION LEVEL read committed READ WRITE > 2013-04-10 16:42:16 PDT adchemy 7175 LOG: execute <unnamed>: INSERT INTO > biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 2013-04-10 16:42:16 PDT adchemy 7175 DETAIL: parameters: $1 = '42302', $2 > = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = > 'description', $6 = '46105', $7 = 'description,Give your riches the > designer treatment with Mcms leather heritage wallet. The logo-stamped > little number stores your essentials in luxe vintage style.', $8 = NULL, $9 > = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = > '46455' > > 2013-04-10 16:42:15 PDT adchemy 7179 LOG: statement: START TRANSACTION > ISOLATION LEVEL read committed READ WRITE > 2013-04-10 16:42:15 PDT adchemy 7179 LOG: execute <unnamed>: INSERT INTO > biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 2013-04-10 16:42:15 PDT adchemy 7179 DETAIL: parameters: $1 = '42302', $2 > = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = > 'description', $6 = '46154', $7 = 'description,Keep the essentials close > with LeSportsacs crossbody bag in matte black nylon practical interior zip > compartments make those daily errands a little bit easier.', $8 = NULL, $9 > = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = > '46435' > > 2013-04-10 16:42:16 PDT adchemy 7180 LOG: statement: START TRANSACTION > ISOLATION LEVEL read committed READ WRITE > 2013-04-10 16:42:16 PDT adchemy 7180 LOG: execute <unnamed>: INSERT INTO > biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 2013-04-10 16:42:16 PDT adchemy 7180 DETAIL: parameters: $1 = '42302', $2 > = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = > 'description', $6 = '46105', $7 = 'description,Give your riches the > designer treatment with Mcms leather heritage wallet. The logo-stamped > little number stores your essentials in luxe vintage style.', $8 = NULL, $9 > = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = > '46455' > > 2013-04-10 16:42:15 PDT adchemy 7181 LOG: statement: START TRANSACTION > ISOLATION LEVEL read committed READ WRITE > 2013-04-10 16:42:15 PDT adchemy 7181 LOG: execute <unnamed>: UPDATE > biods.feature SET feature_semid = $3, feature_name = $2, created_ts = $1, > updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = > $7) > 2013-04-10 16:42:15 PDT adchemy 7181 DETAIL: parameters: $1 = '2013-04-10 > 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = NULL, $5 = > '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', $7 = > '42318' > > 2013-04-10 16:42:17 PDT adchemy 7182 LOG: statement: START TRANSACTION > ISOLATION LEVEL read committed READ WRITE > 2013-04-10 16:42:17 PDT adchemy 7182 LOG: execute <unnamed>: INSERT INTO > biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 2013-04-10 16:42:17 PDT adchemy 7182 DETAIL: parameters: $1 = '42302', $2 > = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = > 'description', $6 = '44831', $7 = 'description,A chic logo-detailed > cosmetic case for the contemporary girl from Tory Burch. Exclusive to > Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = > '2013-04-10 15:02:42.003-07', $12 = '46460' > > 2013-04-10 16:42:16 PDT adchemy 7183 LOG: statement: START TRANSACTION > ISOLATION LEVEL read committed READ WRITE > 2013-04-10 16:42:16 PDT adchemy 7183 LOG: execute <unnamed>: INSERT INTO > biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 2013-04-10 16:42:16 PDT adchemy 7183 DETAIL: parameters: $1 = '42302', $2 > = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = > 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up > with a bold logo-stamped plaque in this utility chic wallet from Marc By > Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = > '2013-04-10 15:02:43.413-07', $12 = '46445' > > 2013-04-10 16:42:17 PDT adchemy 7184 LOG: statement: START TRANSACTION > ISOLATION LEVEL read committed READ WRITE > 2013-04-10 16:42:17 PDT adchemy 7184 LOG: execute <unnamed>: INSERT INTO > biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 2013-04-10 16:42:17 PDT adchemy 7184 DETAIL: parameters: $1 = '42302', $2 > = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = > 'description', $6 = '44831', $7 = 'description,A chic logo-detailed > cosmetic case for the contemporary girl from Tory Burch. Exclusive to > Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = > '2013-04-10 15:02:42.003-07', $12 = '46460' > > 2013-04-10 16:42:16 PDT adchemy 7185 LOG: statement: START TRANSACTION > ISOLATION LEVEL read committed READ WRITE > 2013-04-10 16:42:16 PDT adchemy 7185 LOG: execute <unnamed>: INSERT INTO > biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 2013-04-10 16:42:16 PDT adchemy 7185 DETAIL: parameters: $1 = '42302', $2 > = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = > 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up > with a bold logo-stamped plaque in this utility chic wallet from Marc By > Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = > '2013-04-10 15:02:43.413-07', $12 = '46445' > > 2013-04-10 16:42:15 PDT adchemy 7186 LOG: statement: START TRANSACTION > ISOLATION LEVEL read committed READ WRITE > 2013-04-10 16:42:15 PDT adchemy 7186 LOG: execute <unnamed>: UPDATE > biods.feature SET feature_semid = $3, feature_name = $2, created_ts = $1, > updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = > $7) > 2013-04-10 16:42:15 PDT adchemy 7186 DETAIL: parameters: $1 = '2013-04-10 > 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = NULL, $5 = > '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', $7 = > '42318' > > LOCKS ON COORDINATOR: > > [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5432 -U postgres -d > adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from pg_locks, > pg_class where relation=oid and relname not like 'pg_%' order by mode;" > pid | relname | locktype | mode | granted > ------+--------------------+----------+------------------+--------- > 7169 | hibernate_sequence | relation | AccessShareLock | t > 7173 | hibernate_sequence | relation | AccessShareLock | t > 7172 | hibernate_sequence | relation | AccessShareLock | t > 7171 | feature_value | relation | AccessShareLock | t > 7171 | feature | relation | AccessShareLock | t > 7170 | hibernate_sequence | relation | AccessShareLock | t > 7171 | feature | relation | RowExclusiveLock | t > 7172 | product_feature | relation | RowExclusiveLock | t > 7170 | product_feature | relation | RowExclusiveLock | t > 7173 | product_feature | relation | RowExclusiveLock | t > 7169 | product_feature | relation | RowExclusiveLock | t > (11 rows) > > LOCKS ON DATANODE1: > > [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5433 -U postgres -d > adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from pg_locks, > pg_class where relation=oid and relname not like 'pg_%' order by mode;" > pid | relname | locktype | mode | > granted > > ------+-----------------------+----------+--------------------------+--------- > 7174 | prd_id | relation | AccessShareLock | t > 7182 | feature_id | relation | AccessShareLock | t > 7174 | feature_value_id | relation | AccessShareLock | t > 7183 | feature_id | relation | AccessShareLock | t > 7174 | feature_id | relation | AccessShareLock | t > 7175 | feature_id | relation | AccessShareLock | t > 7181 | feature | tuple | ExclusiveLock | t > 7181 | feature_semid | relation | RowExclusiveLock | t > 7181 | feature_id | relation | RowExclusiveLock | t > 7181 | feature | relation | RowExclusiveLock | t > 7175 | cat_prd_feature_semid | relation | RowExclusiveLock | t > 7183 | cat_prd_feature_semid | relation | RowExclusiveLock | t > 7183 | prd_feature_id | relation | RowExclusiveLock | t > 7183 | product_feature | relation | RowExclusiveLock | t > 7182 | cat_prd_feature_semid | relation | RowExclusiveLock | t > 7182 | prd_feature_id | relation | RowExclusiveLock | t > 7182 | product_feature | relation | RowExclusiveLock | t > 7175 | prd_feature_id | relation | RowExclusiveLock | t > 7175 | product_feature | relation | RowExclusiveLock | t > 7174 | product_feature | relation | RowExclusiveLock | t > 7206 | feature_semid | relation | RowExclusiveLock | t > 7206 | feature_id | relation | RowExclusiveLock | t > 7174 | product | relation | RowShareLock | t > 7182 | feature | relation | RowShareLock | t > 7174 | feature_value | relation | RowShareLock | t > 7183 | category | relation | RowShareLock | t > 7174 | feature | relation | RowShareLock | t > 7174 | category | relation | RowShareLock | t > 7175 | category | relation | RowShareLock | t > 7175 | feature | relation | RowShareLock | t > 7183 | feature | relation | RowShareLock | t > 7182 | category | relation | RowShareLock | t > 7182 | feature | tuple | ShareLock | f > 7175 | feature | tuple | ShareLock | f > 7183 | feature | tuple | ShareLock | f > 7206 | feature | relation | ShareUpdateExclusiveLock | t > > LOCKS ON DATANODE2: > > [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5434 -U postgres -d > adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from pg_locks, > pg_class where relation=oid and relname not like 'pg_%' order by mode;" > pid | relname | locktype | mode | > granted > > ------+-----------------------+----------+--------------------------+--------- > 7185 | feature_id | relation | AccessShareLock | t > 7179 | feature_value_id | relation | AccessShareLock | t > 7179 | prd_id | relation | AccessShareLock | t > 7184 | feature_id | relation | AccessShareLock | t > 7180 | feature_id | relation | AccessShareLock | t > 7179 | feature_id | relation | AccessShareLock | t > 7186 | feature | tuple | ExclusiveLock | t > 7184 | prd_feature_id | relation | RowExclusiveLock | t > 7184 | product_feature | relation | RowExclusiveLock | t > 7186 | feature_semid | relation | RowExclusiveLock | t > 7186 | feature_id | relation | RowExclusiveLock | t > 7186 | feature | relation | RowExclusiveLock | t > 7185 | cat_prd_feature_semid | relation | RowExclusiveLock | t > 7185 | prd_feature_id | relation | RowExclusiveLock | t > 7185 | product_feature | relation | RowExclusiveLock | t > 7184 | cat_prd_feature_semid | relation | RowExclusiveLock | t > 7180 | cat_prd_feature_semid | relation | RowExclusiveLock | t > 7180 | prd_feature_id | relation | RowExclusiveLock | t > 7180 | product_feature | relation | RowExclusiveLock | t > 7179 | product_feature | relation | RowExclusiveLock | t > 7202 | feature_semid | relation | RowExclusiveLock | t > 7202 | feature_id | relation | RowExclusiveLock | t > 7179 | product | relation | RowShareLock | t > 7184 | feature | relation | RowShareLock | t > 7179 | feature_value | relation | RowShareLock | t > 7185 | category | relation | RowShareLock | t > 7179 | feature | relation | RowShareLock | t > 7179 | category | relation | RowShareLock | t > 7180 | feature | relation | RowShareLock | t > 7180 | category | relation | RowShareLock | t > 7185 | feature | relation | RowShareLock | t > 7184 | category | relation | RowShareLock | t > 7185 | feature | tuple | ShareLock | f > 7180 | feature | tuple | ShareLock | f > 7184 | feature | tuple | ShareLock | f > 7202 | feature | relation | ShareUpdateExclusiveLock | t > (36 rows) > > > > ________________________________________ > > Venky Kandaswamy > > Principal Engineer, Adchemy Inc. > > 925-200-7124 > ------------------------------ > *From:* Koichi Suzuki [koi...@gm...] > *Sent:* Monday, April 08, 2013 10:41 PM > *To:* Amit Khandekar > *Cc:* Venky Kandaswamy; pos...@li... > *Subject:* Re: [Postgres-xc-developers] PGXC hangs when run with > concurrent inserts > > Because insert is being done in parallel, I'm afraid there could be a > possibility that we have internal lock conflicts, which should not happen. > > Regards; > ---------- > Koichi Suzuki > > > 2013/4/9 Amit Khandekar <ami...@en...> > >> >> >> >> On 9 April 2013 06:46, Venky Kandaswamy <ve...@ad...> wrote: >> >>> All, >>> We have been running into a hang issue on our app that appears to be >>> related to PGXC. Our app processes messages from RabbitMQ and >>> inserts/updates tables. We run 5 concurrent threads. The incoming queues >>> are replicated, one feeding Postgres 9.1 and the other feeding PGXC >>> (current git master). PGXC is hanging on inserts after processing a few >>> transactions. It does not appear to be related to the actual data itself. >>> IT looks like all the sessions are waiting for something. There is no >>> information on locks available from pg_locks. >>> >> >> Since most of the operations are inserts, it does not look like it is >> due to locks, unless something has acquired table locks. But just to rule >> out that possibility, it would be better if you check pg_locks on the >> datanodes, if you have checked it only on coordinator so far. >> >> >>> >>> An strace simply says recfrom(10. >>> >>> The are no errors in the logs from gtm, coordinator or datanodes. >>> >>> The tables have referential integrity and use a shared sequence to >>> get the next id. Is it possible that something is going on with the logic >>> to retrieve sequence numbers? The tables are all replicated. >>> >>> Unfortunately, we have not been able to reproduce a reliable test >>> case. >>> >>> [postgres@gnode0 pgxc]$ /usr/local/pgsql/bin/psql -p 5433 -U >>> postgres -d postgres -c 'select * from pg_catalog.pg_stat_activity;' >>> datid | datname | pid | usesysid | usename | application_name >>> | client_addr | client_hostname | client_port | >>> backend_start | xact_start | >>> query_start | state_change | waiting | >>> state | >>> >>> query >>> >>> >>> -------+--------------+-------+----------+----------+------------------+----------------+-----------------+-------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+---------+---------------------+-------------------- >>> >>> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- >>> 12893 | postgres | 22330 | 10 | postgres | pgxc | >>> 192.168.53.109 | | 47025 | 2013-03-31 >>> 21:42:16.724845-07 | | 2013-04-08 >>> 15:43:52.313325-07 | 2013-04-08 15:26:11.444754-07 | f | >>> idle | COMMIT PREPARED 'T1 >>> 32273' >>> 16393 | master | 4267 | 16392 | xcadmin | pgxc | >>> 192.168.53.109 | | 54961 | 2013-04-08 >>> 15:24:28.668023-07 | | 2013-04-08 >>> 15:33:17.586836-07 | 2013-04-08 15:33:17.587942-07 | f | >>> idle | SELECT count(*) FRO >>> M ONLY bicommon.account_datasource WHERE true >>> 16395 | adchemy10013 | 4363 | 16392 | xcadmin | pgxc | >>> 192.168.53.109 | | 55084 | 2013-04-08 >>> 15:28:48.822939-07 | | 2013-04-08 >>> 15:50:21.650727-07 | 2013-04-08 15:50:07.916753-07 | f | >>> idle | SELECT prd_id, prd_ >>> semid, prd_name, prd_line, prd_model, prd_brand, prd_image_url, >>> prd_dest_url, created_ts, updated_ts, source_msg_ts, modified_by FROM >>> biods.product >>> 16393 | master | 4486 | 16392 | xcadmin | pgxc | >>> 192.168.53.109 | | 55246 | 2013-04-08 >>> 15:33:21.019388-07 | | 2013-04-08 >>> 15:43:51.321376-07 | 2013-04-08 15:43:51.322675-07 | f | >>> idle | SET SESSION AUTHORI >>> ZATION DEFAULT;RESET ALL; >>> 16393 | master | 4781 | 16392 | xcadmin | pgxc | >>> 192.168.53.109 | | 55515 | 2013-04-08 >>> 15:42:42.122785-07 | | 2013-04-08 >>> 17:02:21.023713-07 | 2013-04-08 17:02:20.804751-07 | f | >>> idle | SET SESSION AUTHORI >>> ZATION DEFAULT;RESET ALL; >>> 16393 | master | 4787 | 16392 | xcadmin | pgxc | >>> 192.168.53.109 | | 55521 | 2013-04-08 >>> 15:42:42.142662-07 | | 2013-04-08 >>> 16:17:19.26364-07 | 2013-04-08 16:17:19.126163-07 | f | >>> idle | SET SESSION AUTHORI >>> ZATION DEFAULT;RESET ALL; >>> 16393 | master | 4792 | 16392 | xcadmin | pgxc | >>> 192.168.53.109 | | 55526 | 2013-04-08 >>> 15:42:42.159009-07 | | 2013-04-08 >>> 15:45:11.915026-07 | 2013-04-08 15:45:11.886392-07 | f | >>> idle | SET SESSION AUTHORI >>> ZATION DEFAULT;RESET ALL; >>> 16393 | master | 4799 | 16392 | xcadmin | pgxc | >>> 192.168.53.109 | | 55533 | 2013-04-08 >>> 15:42:42.678387-07 | | 2013-04-08 >>> 17:02:21.195332-07 | 2013-04-08 17:02:20.805074-07 | f | >>> idle | SET SESSION AUTHORI >>> ZATION DEFAULT;RESET ALL; >>> 16393 | master | 4804 | 16392 | xcadmin | pgxc | >>> 192.168.53.109 | | 55538 | 2013-04-08 >>> 15:42:42.694802-07 | | 2013-04-08 >>> 15:45:11.904619-07 | 2013-04-08 15:45:11.888493-07 | f | >>> idle | SET SESSION AUTHORI >>> ZATION DEFAULT;RESET ALL; >>> 16395 | adchemy10013 | 4977 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 55732 | 2013-04-08 >>> 15:47:34.901175-07 | 2013-04-08 15:48:08.345331-07 | 2013-04-08 >>> 15:48:08.528818-07 | 2013-04-08 15:48:08.410815-07 | f | idle in >>> transaction | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 4979 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 55734 | 2013-04-08 >>> 15:47:35.042778-07 | 2013-04-08 15:48:16.384763-07 | 2013-04-08 >>> 15:48:16.506899-07 | 2013-04-08 15:48:16.388503-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 4985 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 55740 | 2013-04-08 15:47: >>> 35.235945-07 | 2013-04-08 15:48:14.38895-07 | 2013-04-08 >>> 15:48:14.445351-07 | 2013-04-08 15:48:14.446752-07 | t | >>> active | UPDATE biods.featur >>> e SET feature_semid = $3, feature_name = $2, created_ts = $1, updated_ts >>> = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = $7) >>> 16395 | adchemy10013 | 4986 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 55741 | 2013-04-08 15:47: >>> 35.238843-07 | 2013-04-08 15:48:18.201043-07 | 2013-04-08 >>> 15:48:18.273204-07 | 2013-04-08 15:48:18.205647-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 4998 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 55753 | 2013-04-08 >>> 15:47:35.910309-07 | 2013-04-08 15:48:08.412038-07 | 2013-04-08 >>> 15:48:08.566945-07 | 2013-04-08 15:48:08.415026-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 6340 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57002 | 2013-04-08 >>> 16:31:44.414804-07 | 2013-04-08 16:31:50.293828-07 | 2013-04-08 >>> 16:31:50.433988-07 | 2013-04-08 16:31:50.297752-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 6341 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57003 | 2013-04-08 >>> 16:31:44.418356-07 | 2013-04-08 16:31:49.450704-07 | 2013-04-08 >>> 16:31:49.599946-07 | 2013-04-08 16:31:49.45562-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 6348 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57010 | 2013-04-08 16:31: >>> 45.065767-07 | 2013-04-08 16:31:50.699979-07 | 2013-04-08 >>> 16:31:50.817425-07 | 2013-04-08 16:31:50.704669-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 6349 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57011 | 2013-04-08 >>> 16:31:45.06926-07 | 2013-04-08 16:31:51.528207-07 | 2013-04-08 >>> 16:31:51.582036-07 | 2013-04-08 16:31:51.532618-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 6350 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57012 | 2013-04-08 16:31: >>> 45.072711-07 | 2013-04-08 16:31:50.085336-07 | 2013-04-08 >>> 16:31:50.223221-07 | 2013-04-08 16:31:50.088908-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 7269 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57774 | 2013-04-08 >>> 16:57:15.563006-07 | 2013-04-08 16:57:21.849156-07 | 2013-04-08 >>> 16:57:21.978984-07 | 2013-04-08 16:57:21.853289-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 7271 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57776 | 2013-04-08 >>> 16:57:15.63199-07 | 2013-04-08 16:57:16.575535-07 | 2013-04-08 >>> 16:57:17.00605-07 | 2013-04-08 16:57:17.007747-07 | t | >>> active | INSERT INTO biods.f >>> eature_value (feature_value_id, feature_value_semid, feature_value, >>> feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, >>> modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) >>> 16395 | adchemy10013 | 7283 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57788 | 2013-04-08 >>> 16:57:16.292702-07 | 2013-04-08 16:57:21.849125-07 | 2013-04-08 >>> 16:57:21.978824-07 | 2013-04-08 16:57:21.853251-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 7284 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57789 | 2013-04-08 >>> 16:57:16.295879-07 | 2013-04-08 16:57:24.233166-07 | 2013-04-08 >>> 16:57:24.321938-07 | 2013-04-08 16:57:24.237514-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 7285 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57790 | 2013-04-08 >>> 16:57:16.299271-07 | 2013-04-08 16:57:22.119868-07 | 2013-04-08 >>> 16:57:22.197213-07 | 2013-04-08 16:57:22.128357-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 7465 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57954 | 2013-04-08 >>> 17:01:54.750113-07 | 2013-04-08 17:02:00.17336-07 | 2013-04-08 >>> 17:02:00.320469-07 | 2013-04-08 17:02:00.177758-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 7466 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57955 | 2013-04-08 >>> 17:01:54.753559-07 | 2013-04-08 17:01:59.49003-07 | 2013-04-08 >>> 17:01:59.602925-07 | 2013-04-08 17:01:59.493732-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 7467 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57956 | 2013-04-08 >>> 17:01:54.75699-07 | 2013-04-08 17:01:58.262083-07 | 2013-04-08 >>> 17:01:58.349452-07 | 2013-04-08 17:01:58.350822-07 | t | >>> active | INSERT INTO biods.f >>> eature_value (feature_value_id, feature_value_semid, feature_value, >>> feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, >>> modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) >>> 16395 | adchemy10013 | 7473 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57963 | 2013-04-08 >>> 17:01:55.49134-07 | 2013-04-08 17:02:00.313138-07 | 2013-04-08 >>> 17:02:00.420405-07 | 2013-04-08 17:02:00.318887-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 16395 | adchemy10013 | 7474 | 17361 | adchemy | pgxc | >>> 192.168.53.109 | | 57964 | 2013-04-08 >>> 17:01:55.494777-07 | 2013-04-08 17:02:00.514142-07 | 2013-04-08 >>> 17:02:00.577239-07 | 2013-04-08 17:02:00.519572-07 | t | >>> active | INSERT INTO biods.p >>> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >>> feature_value_id, category_semid, prd_semid, feature_semid, >>> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >>> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >>> 12893 | postgres | 8517 | 10 | postgres | psql >>> | | | -1 | 2013-04-08 >>> 17:35:28.217934-07 | | 2013-04-08 >>> 17:35:28.220366-07 | 2013-04-08 17:35:28.220369-07 | f | >>> active | select * from pg_ca >>> talog.pg_stat_activity; >>> (30 rows) >>> >>> >>> ________________________________________ >>> >>> Venky Kandaswamy >>> >>> Principal Engineer, Adchemy Inc. >>> >>> 925-200-7124 >>> >>> >>> ------------------------------------------------------------------------------ >>> Precog is a next-generation analytics platform capable of advanced >>> analytics on semi-structured data. The platform includes APIs for >>> building >>> apps and a phenomenal toolset for data science. Developers can use >>> our toolset for easy data analysis & visualization. Get a free account! >>> http://www2.precog.com/precogplatform/slashdotnewsletter >>> _______________________________________________ >>> Postgres-xc-developers mailing list >>> Pos...@li... >>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Precog is a next-generation analytics platform capable of advanced >> analytics on semi-structured data. The platform includes APIs for building >> apps and a phenomenal toolset for data science. Developers can use >> our toolset for easy data analysis & visualization. Get a free account! >> http://www2.precog.com/precogplatform/slashdotnewsletter >> _______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> >> > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > |
From: Koichi S. <koi...@gm...> - 2013-04-11 05:43:59
|
Hi, PG-XCers; Postgres-XC is going to have its first user/developer meeting after the cluster summit. Information is as follows: When: May 21st, Tuesday, 3PM to 6PM. Where: University of Ottawa. Room TBD. Agenda: * Topics in Version 1.1 * Roadmap toward version 1.2 and beyond * Development Issues * Experiences Also, further discussion could be held on Wednesday, 22nd and/or Saturday, 25th. Details will be determined on Tuesday. Information will be found at https://wiki.postgresql.org/wiki/PgCon2013CanadaClusterSummit#PostgresXC_Summit I do hope you can join. Please feel free to register yourself and add our topics to discuss. If you have difficulty to do it. please mail to me. Thank you very much; ---------- Koichi Suzuki |
From: Venky K. <ve...@ad...> - 2013-04-11 01:22:09
|
We are processing inserts/updates using multiple threads. Here is the trace log of the actual statements that are hung. The scenario shows the statements on the coordinator and 2 datanodes. The scenario is similar across all the datanodes. The same data updates did not cause Postgres 9.1.2 to hang. This could be related to an application problem, although we could not reproduce it on Postgres 9.1.2. At a high level, there is an update on the 'feature' table that is holding an exclusive lock on the row. The inserts are inserting to another table that has a foreign key that references the row being locked by the update. Pid 7174 and 7179 are waiting to complete and they are also similar inserts. The only thing in common seems to be that the update is locking the feature row that is referenced in a foreign key in the other inserts. This should not cause a deadlock, I believe. The question in my mind is whether pids 7181 and 7186 should have been granted exclusive access to a tuple while others were granted share access. This might cause a race condition. This causes PGXC to hang. Obviously, the update is in turn waiting for something (which we cannot figure out from the logs) and therefore not committing the update. [postgres@sv4-pgxc-db01 pgxc]$ ps -ef | grep adchemy1234 <COORDINATOR> postgres 7169 7113 0 16:41 ? 00:00:02 postgres: adchemy adchemy1234 192.168.51.73(49186) INSERT postgres 7170 7113 0 16:41 ? 00:00:02 postgres: adchemy adchemy1234 192.168.51.73(49187) INSERT postgres 7171 7113 0 16:41 ? 00:00:02 postgres: adchemy adchemy1234 192.168.51.73(49188) UPDATE postgres 7172 7113 0 16:41 ? 00:00:02 postgres: adchemy adchemy1234 192.168.51.73(49189) INSERT postgres 7173 7113 0 16:41 ? 00:00:02 postgres: adchemy adchemy1234 192.168.51.73(49190) INSERT <COORDINATOR> <DATANODE1> postgres 7174 7127 0 16:41 ? 00:00:01 postgres: adchemy adchemy1234 172.17.28.61(51909) idle in transaction postgres 7175 7127 0 16:41 ? 00:00:01 postgres: adchemy adchemy1234 172.17.28.61(51910) INSERT waiting postgres 7181 7127 0 16:41 ? 00:00:01 postgres: adchemy adchemy1234 172.17.28.61(51924) UPDATE waiting postgres 7182 7127 0 16:41 ? 00:00:01 postgres: adchemy adchemy1234 172.17.28.61(51925) INSERT waiting postgres 7183 7127 0 16:41 ? 00:00:01 postgres: adchemy adchemy1234 172.17.28.61(51926) INSERT waiting <DATANODE1> <DATANODE2> postgres 7179 7140 0 16:41 ? 00:00:00 postgres: adchemy adchemy1234 172.17.28.61(48957) idle in transaction postgres 7180 7140 0 16:41 ? 00:00:00 postgres: adchemy adchemy1234 172.17.28.61(48962) INSERT waiting postgres 7184 7140 0 16:41 ? 00:00:00 postgres: adchemy adchemy1234 172.17.28.61(48970) INSERT waiting postgres 7185 7140 0 16:41 ? 00:00:00 postgres: adchemy adchemy1234 172.17.28.61(48975) INSERT waiting postgres 7186 7140 0 16:41 ? 00:00:00 postgres: adchemy adchemy1234 172.17.28.61(48980) UPDATE waiting <DATANODE2> -----LOGS----- formatted %t %u %p 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute S_1: BEGIN 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute <unnamed>: select nextval ('hibernate_sequence') 2013-04-10 16:42:16 PDT adchemy 7169 LOG: execute <unnamed>: insert into biods.product_feature (category_id, category_semid, created_ts, feature_id, feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) 2013-04-10 16:42:16 PDT adchemy 7169 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = 'description', $6 = '46105', $7 = 'description,Give your riches the designer treatment with Mcms leather heritage wallet. The logo-stamped little number stores your essentials in luxe vintage style.', $8 = NULL, $9 = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = '46455' 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute S_1: BEGIN 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute <unnamed>: select nextval ('hibernate_sequence') 2013-04-10 16:42:16 PDT adchemy 7170 LOG: execute <unnamed>: insert into biods.product_feature (category_id, category_semid, created_ts, feature_id, feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) 2013-04-10 16:42:16 PDT adchemy 7170 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up with a bold logo-stamped plaque in this utility chic wallet from Marc By Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = '2013-04-10 15:02:43.413-07', $12 = '46445' 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute S_1: BEGIN 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute <unnamed>: select feature0_.feature_id as feature1_8_1_, feature0_.created_ts as created2_8_1_, feature0_.feature_name as feature3_8_1_, feature0_.feature_semid as feature4_8_1_, feature0_.modified_by as modified5_8_1_, feature0_.source_msg_ts as source6_8_1_, feature0_.updated_ts as updated7_8_1_, featureval1_.feature_id as feature9_8_3_, featureval1_.feature_value_id as feature1_14_3_, featureval1_.feature_value_id as feature1_14_0_, featureval1_.created_ts as created2_14_0_, featureval1_.feature_id as feature9_14_0_, featureval1_.feature_semid as feature3_14_0_, featureval1_.feature_value as feature4_14_0_, featureval1_.feature_value_semid as feature5_14_0_, featureval1_.modified_by as modified6_14_0_, featureval1_.source_msg_ts as source7_14_0_, featureval1_.updated_ts as updated8_14_0_ from biods.feature feature0_ left outer join biods.feature_value featureval1_ on feature0_.feature_id=featureval1_.feature_id where feature0_.feature_id=$1 2013-04-10 16:42:15 PDT adchemy 7171 DETAIL: parameters: $1 = '42318' 2013-04-10 16:42:15 PDT adchemy 7171 LOG: execute <unnamed>: update biods.feature set created_ts=$1, feature_name=$2, feature_semid=$3, modified_by=$4, source_msg_ts=$5, updated_ts=$6 where feature_id=$7 2013-04-10 16:42:15 PDT adchemy 7171 DETAIL: parameters: $1 = '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', $7 = '42318' 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute S_1: BEGIN 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute <unnamed>: select nextval ('hibernate_sequence') 2013-04-10 16:42:17 PDT adchemy 7172 LOG: execute <unnamed>: insert into biods.product_feature (category_id, category_semid, created_ts, feature_id, feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) 2013-04-10 16:42:17 PDT adchemy 7172 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = 'description', $6 = '44831', $7 = 'description,A chic logo-detailed cosmetic case for the contemporary girl from Tory Burch. Exclusive to Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = '2013-04-10 15:02:42.003-07', $12 = '46460' 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute S_1: BEGIN 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute <unnamed>: select nextval ('hibernate_sequence') 2013-04-10 16:42:15 PDT adchemy 7173 LOG: execute <unnamed>: insert into biods.product_feature (category_id, category_semid, created_ts, feature_id, feature_semid, feature_value_id, feature_value_semid, modified_by, prd_id, prd_semid, updated_ts, prd_feature_id) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) 2013-04-10 16:42:15 PDT adchemy 7173 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = 'description', $6 = '46154', $7 = 'description,Keep the essentials close with LeSportsacs crossbody bag in matte black nylon practical interior zip compartments make those daily errands a little bit easier.', $8 = NULL, $9 = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = '46435' 2013-04-10 16:42:15 PDT adchemy 7174 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:15 PDT adchemy 7174 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:15 PDT adchemy 7174 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = 'description', $6 = '46154', $7 = 'description,Keep the essentials close with LeSportsacs crossbody bag in matte black nylon practical interior zip compartments make those daily errands a little bit easier.', $8 = NULL, $9 = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = '46435' 2013-04-10 16:42:16 PDT adchemy 7175 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:16 PDT adchemy 7175 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:16 PDT adchemy 7175 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = 'description', $6 = '46105', $7 = 'description,Give your riches the designer treatment with Mcms leather heritage wallet. The logo-stamped little number stores your essentials in luxe vintage style.', $8 = NULL, $9 = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = '46455' 2013-04-10 16:42:15 PDT adchemy 7179 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:15 PDT adchemy 7179 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:15 PDT adchemy 7179 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.674-07', $4 = '42318', $5 = 'description', $6 = '46154', $7 = 'description,Keep the essentials close with LeSportsacs crossbody bag in matte black nylon practical interior zip compartments make those daily errands a little bit easier.', $8 = NULL, $9 = '46425', $10 = '883681258669', $11 = '2013-04-10 15:02:42.674-07', $12 = '46435' 2013-04-10 16:42:16 PDT adchemy 7180 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:16 PDT adchemy 7180 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:16 PDT adchemy 7180 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.343-07', $4 = '42318', $5 = 'description', $6 = '46105', $7 = 'description,Give your riches the designer treatment with Mcms leather heritage wallet. The logo-stamped little number stores your essentials in luxe vintage style.', $8 = NULL, $9 = '46449', $10 = '7630015470685', $11 = '2013-04-10 15:02:42.343-07', $12 = '46455' 2013-04-10 16:42:15 PDT adchemy 7181 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:15 PDT adchemy 7181 LOG: execute <unnamed>: UPDATE biods.feature SET feature_semid = $3, feature_name = $2, created_ts = $1, updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = $7) 2013-04-10 16:42:15 PDT adchemy 7181 DETAIL: parameters: $1 = '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', $7 = '42318' 2013-04-10 16:42:17 PDT adchemy 7182 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:17 PDT adchemy 7182 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:17 PDT adchemy 7182 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = 'description', $6 = '44831', $7 = 'description,A chic logo-detailed cosmetic case for the contemporary girl from Tory Burch. Exclusive to Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = '2013-04-10 15:02:42.003-07', $12 = '46460' 2013-04-10 16:42:16 PDT adchemy 7183 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:16 PDT adchemy 7183 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:16 PDT adchemy 7183 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up with a bold logo-stamped plaque in this utility chic wallet from Marc By Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = '2013-04-10 15:02:43.413-07', $12 = '46445' 2013-04-10 16:42:17 PDT adchemy 7184 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:17 PDT adchemy 7184 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:17 PDT adchemy 7184 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:42.003-07', $4 = '42318', $5 = 'description', $6 = '44831', $7 = 'description,A chic logo-detailed cosmetic case for the contemporary girl from Tory Burch. Exclusive to Bloomingdales.', $8 = NULL, $9 = '46453', $10 = '885427179580', $11 = '2013-04-10 15:02:42.003-07', $12 = '46460' 2013-04-10 16:42:16 PDT adchemy 7185 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:16 PDT adchemy 7185 LOG: execute <unnamed>: INSERT INTO biods.product_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 2013-04-10 16:42:16 PDT adchemy 7185 DETAIL: parameters: $1 = '42302', $2 = 'Handbags', $3 = '2013-04-10 15:02:43.413-07', $4 = '42318', $5 = 'description', $6 = '46326', $7 = 'description,Rich leather is dressed up with a bold logo-stamped plaque in this utility chic wallet from Marc By Marc Jacobs.', $8 = NULL, $9 = '46438', $10 = '883936992041', $11 = '2013-04-10 15:02:43.413-07', $12 = '46445' 2013-04-10 16:42:15 PDT adchemy 7186 LOG: statement: START TRANSACTION ISOLATION LEVEL read committed READ WRITE 2013-04-10 16:42:15 PDT adchemy 7186 LOG: execute <unnamed>: UPDATE biods.feature SET feature_semid = $3, feature_name = $2, created_ts = $1, updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = $7) 2013-04-10 16:42:15 PDT adchemy 7186 DETAIL: parameters: $1 = '2013-04-10 15:02:34.706-07', $2 = 'description', $3 = 'description', $4 = NULL, $5 = '2013-04-10 15:02:43.576-07', $6 = '2013-04-10 15:02:43.573-07', $7 = '42318' LOCKS ON COORDINATOR: [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5432 -U postgres -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by mode;" pid | relname | locktype | mode | granted ------+--------------------+----------+------------------+--------- 7169 | hibernate_sequence | relation | AccessShareLock | t 7173 | hibernate_sequence | relation | AccessShareLock | t 7172 | hibernate_sequence | relation | AccessShareLock | t 7171 | feature_value | relation | AccessShareLock | t 7171 | feature | relation | AccessShareLock | t 7170 | hibernate_sequence | relation | AccessShareLock | t 7171 | feature | relation | RowExclusiveLock | t 7172 | product_feature | relation | RowExclusiveLock | t 7170 | product_feature | relation | RowExclusiveLock | t 7173 | product_feature | relation | RowExclusiveLock | t 7169 | product_feature | relation | RowExclusiveLock | t (11 rows) LOCKS ON DATANODE1: [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5433 -U postgres -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by mode;" pid | relname | locktype | mode | granted ------+-----------------------+----------+--------------------------+--------- 7174 | prd_id | relation | AccessShareLock | t 7182 | feature_id | relation | AccessShareLock | t 7174 | feature_value_id | relation | AccessShareLock | t 7183 | feature_id | relation | AccessShareLock | t 7174 | feature_id | relation | AccessShareLock | t 7175 | feature_id | relation | AccessShareLock | t 7181 | feature | tuple | ExclusiveLock | t 7181 | feature_semid | relation | RowExclusiveLock | t 7181 | feature_id | relation | RowExclusiveLock | t 7181 | feature | relation | RowExclusiveLock | t 7175 | cat_prd_feature_semid | relation | RowExclusiveLock | t 7183 | cat_prd_feature_semid | relation | RowExclusiveLock | t 7183 | prd_feature_id | relation | RowExclusiveLock | t 7183 | product_feature | relation | RowExclusiveLock | t 7182 | cat_prd_feature_semid | relation | RowExclusiveLock | t 7182 | prd_feature_id | relation | RowExclusiveLock | t 7182 | product_feature | relation | RowExclusiveLock | t 7175 | prd_feature_id | relation | RowExclusiveLock | t 7175 | product_feature | relation | RowExclusiveLock | t 7174 | product_feature | relation | RowExclusiveLock | t 7206 | feature_semid | relation | RowExclusiveLock | t 7206 | feature_id | relation | RowExclusiveLock | t 7174 | product | relation | RowShareLock | t 7182 | feature | relation | RowShareLock | t 7174 | feature_value | relation | RowShareLock | t 7183 | category | relation | RowShareLock | t 7174 | feature | relation | RowShareLock | t 7174 | category | relation | RowShareLock | t 7175 | category | relation | RowShareLock | t 7175 | feature | relation | RowShareLock | t 7183 | feature | relation | RowShareLock | t 7182 | category | relation | RowShareLock | t 7182 | feature | tuple | ShareLock | f 7175 | feature | tuple | ShareLock | f 7183 | feature | tuple | ShareLock | f 7206 | feature | relation | ShareUpdateExclusiveLock | t LOCKS ON DATANODE2: [venky@sv4-pgxc-db01 ~]$ /usr/local/pgsql/bin/psql -p 5434 -U postgres -d adchemy1234 -c "SELECT pid, relname, locktype, mode, granted from pg_locks, pg_class where relation=oid and relname not like 'pg_%' order by mode;" pid | relname | locktype | mode | granted ------+-----------------------+----------+--------------------------+--------- 7185 | feature_id | relation | AccessShareLock | t 7179 | feature_value_id | relation | AccessShareLock | t 7179 | prd_id | relation | AccessShareLock | t 7184 | feature_id | relation | AccessShareLock | t 7180 | feature_id | relation | AccessShareLock | t 7179 | feature_id | relation | AccessShareLock | t 7186 | feature | tuple | ExclusiveLock | t 7184 | prd_feature_id | relation | RowExclusiveLock | t 7184 | product_feature | relation | RowExclusiveLock | t 7186 | feature_semid | relation | RowExclusiveLock | t 7186 | feature_id | relation | RowExclusiveLock | t 7186 | feature | relation | RowExclusiveLock | t 7185 | cat_prd_feature_semid | relation | RowExclusiveLock | t 7185 | prd_feature_id | relation | RowExclusiveLock | t 7185 | product_feature | relation | RowExclusiveLock | t 7184 | cat_prd_feature_semid | relation | RowExclusiveLock | t 7180 | cat_prd_feature_semid | relation | RowExclusiveLock | t 7180 | prd_feature_id | relation | RowExclusiveLock | t 7180 | product_feature | relation | RowExclusiveLock | t 7179 | product_feature | relation | RowExclusiveLock | t 7202 | feature_semid | relation | RowExclusiveLock | t 7202 | feature_id | relation | RowExclusiveLock | t 7179 | product | relation | RowShareLock | t 7184 | feature | relation | RowShareLock | t 7179 | feature_value | relation | RowShareLock | t 7185 | category | relation | RowShareLock | t 7179 | feature | relation | RowShareLock | t 7179 | category | relation | RowShareLock | t 7180 | feature | relation | RowShareLock | t 7180 | category | relation | RowShareLock | t 7185 | feature | relation | RowShareLock | t 7184 | category | relation | RowShareLock | t 7185 | feature | tuple | ShareLock | f 7180 | feature | tuple | ShareLock | f 7184 | feature | tuple | ShareLock | f 7202 | feature | relation | ShareUpdateExclusiveLock | t (36 rows) ________________________________________ Venky Kandaswamy Principal Engineer, Adchemy Inc. 925-200-7124 ________________________________ From: Koichi Suzuki [koi...@gm...] Sent: Monday, April 08, 2013 10:41 PM To: Amit Khandekar Cc: Venky Kandaswamy; pos...@li... Subject: Re: [Postgres-xc-developers] PGXC hangs when run with concurrent inserts Because insert is being done in parallel, I'm afraid there could be a possibility that we have internal lock conflicts, which should not happen. Regards; ---------- Koichi Suzuki 2013/4/9 Amit Khandekar <ami...@en...<mailto:ami...@en...>> On 9 April 2013 06:46, Venky Kandaswamy <ve...@ad...<mailto:ve...@ad...>> wrote: All, We have been running into a hang issue on our app that appears to be related to PGXC. Our app processes messages from RabbitMQ and inserts/updates tables. We run 5 concurrent threads. The incoming queues are replicated, one feeding Postgres 9.1 and the other feeding PGXC (current git master). PGXC is hanging on inserts after processing a few transactions. It does not appear to be related to the actual data itself. IT looks like all the sessions are waiting for something. There is no information on locks available from pg_locks. Since most of the operations are inserts, it does not look like it is due to locks, unless something has acquired table locks. But just to rule out that possibility, it would be better if you check pg_locks on the datanodes, if you have checked it only on coordinator so far. An strace simply says recfrom(10. The are no errors in the logs from gtm, coordinator or datanodes. The tables have referential integrity and use a shared sequence to get the next id. Is it possible that something is going on with the logic to retrieve sequence numbers? The tables are all replicated. Unfortunately, we have not been able to reproduce a reliable test case. [postgres@gnode0 pgxc]$ /usr/local/pgsql/bin/psql -p 5433 -U postgres -d postgres -c 'select * from pg_catalog.pg_stat_activity;' datid | datname | pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | xact_start | query_start | state_change | waiting | state | query -------+--------------+-------+----------+----------+------------------+----------------+-----------------+-------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+---------+---------------------+-------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 12893 | postgres | 22330 | 10 | postgres | pgxc | 192.168.53.109 | | 47025 | 2013-03-31 21:42:16.724845-07 | | 2013-04-08 15:43:52.313325-07 | 2013-04-08 15:26:11.444754-07 | f | idle | COMMIT PREPARED 'T1 32273' 16393 | master | 4267 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 54961 | 2013-04-08 15:24:28.668023-07 | | 2013-04-08 15:33:17.586836-07 | 2013-04-08 15:33:17.587942-07 | f | idle | SELECT count(*) FRO M ONLY bicommon.account_datasource WHERE true 16395 | adchemy10013 | 4363 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55084 | 2013-04-08 15:28:48.822939-07 | | 2013-04-08 15:50:21.650727-07 | 2013-04-08 15:50:07.916753-07 | f | idle | SELECT prd_id, prd_ semid, prd_name, prd_line, prd_model, prd_brand, prd_image_url, prd_dest_url, created_ts, updated_ts, source_msg_ts, modified_by FROM biods.product 16393 | master | 4486 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55246 | 2013-04-08 15:33:21.019388-07 | | 2013-04-08 15:43:51.321376-07 | 2013-04-08 15:43:51.322675-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4781 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55515 | 2013-04-08 15:42:42.122785-07 | | 2013-04-08 17:02:21.023713-07 | 2013-04-08 17:02:20.804751-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4787 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55521 | 2013-04-08 15:42:42.142662-07 | | 2013-04-08 16:17:19.26364-07 | 2013-04-08 16:17:19.126163-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4792 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55526 | 2013-04-08 15:42:42.159009-07 | | 2013-04-08 15:45:11.915026-07 | 2013-04-08 15:45:11.886392-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4799 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55533 | 2013-04-08 15:42:42.678387-07 | | 2013-04-08 17:02:21.195332-07 | 2013-04-08 17:02:20.805074-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4804 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55538 | 2013-04-08 15:42:42.694802-07 | | 2013-04-08 15:45:11.904619-07 | 2013-04-08 15:45:11.888493-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16395 | adchemy10013 | 4977 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55732 | 2013-04-08 15:47:34.901175-07 | 2013-04-08 15:48:08.345331-07 | 2013-04-08 15:48:08.528818-07 | 2013-04-08 15:48:08.410815-07 | f | idle in transaction | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 4979 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55734 | 2013-04-08 15:47:35.042778-07 | 2013-04-08 15:48:16.384763-07 | 2013-04-08 15:48:16.506899-07 | 2013-04-08 15:48:16.388503-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 4985 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55740 | 2013-04-08 15:47:35.235945-07<tel:35.235945-07> | 2013-04-08 15:48:14.38895-07 | 2013-04-08 15:48:14.445351-07 | 2013-04-08 15:48:14.446752-07 | t | active | UPDATE biods.featur e SET feature_semid = $3, feature_name = $2, created_ts = $1, updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = $7) 16395 | adchemy10013 | 4986 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55741 | 2013-04-08 15:47:35.238843-07<tel:35.238843-07> | 2013-04-08 15:48:18.201043-07 | 2013-04-08 15:48:18.273204-07 | 2013-04-08 15:48:18.205647-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 4998 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55753 | 2013-04-08 15:47:35.910309-07 | 2013-04-08 15:48:08.412038-07 | 2013-04-08 15:48:08.566945-07 | 2013-04-08 15:48:08.415026-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6340 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57002 | 2013-04-08 16:31:44.414804-07 | 2013-04-08 16:31:50.293828-07 | 2013-04-08 16:31:50.433988-07 | 2013-04-08 16:31:50.297752-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6341 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57003 | 2013-04-08 16:31:44.418356-07 | 2013-04-08 16:31:49.450704-07 | 2013-04-08 16:31:49.599946-07 | 2013-04-08 16:31:49.45562-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6348 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57010 | 2013-04-08 16:31:45.065767-07<tel:45.065767-07> | 2013-04-08 16:31:50.699979-07 | 2013-04-08 16:31:50.817425-07 | 2013-04-08 16:31:50.704669-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6349 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57011 | 2013-04-08 16:31:45.06926-07 | 2013-04-08 16:31:51.528207-07 | 2013-04-08 16:31:51.582036-07 | 2013-04-08 16:31:51.532618-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6350 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57012 | 2013-04-08 16:31:45.072711-07<tel:45.072711-07> | 2013-04-08 16:31:50.085336-07 | 2013-04-08 16:31:50.223221-07 | 2013-04-08 16:31:50.088908-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7269 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57774 | 2013-04-08 16:57:15.563006-07 | 2013-04-08 16:57:21.849156-07 | 2013-04-08 16:57:21.978984-07 | 2013-04-08 16:57:21.853289-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7271 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57776 | 2013-04-08 16:57:15.63199-07 | 2013-04-08 16:57:16.575535-07 | 2013-04-08 16:57:17.00605-07 | 2013-04-08 16:57:17.007747-07 | t | active | INSERT INTO biods.f eature_value (feature_value_id, feature_value_semid, feature_value, feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) 16395 | adchemy10013 | 7283 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57788 | 2013-04-08 16:57:16.292702-07 | 2013-04-08 16:57:21.849125-07 | 2013-04-08 16:57:21.978824-07 | 2013-04-08 16:57:21.853251-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7284 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57789 | 2013-04-08 16:57:16.295879-07 | 2013-04-08 16:57:24.233166-07 | 2013-04-08 16:57:24.321938-07 | 2013-04-08 16:57:24.237514-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7285 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57790 | 2013-04-08 16:57:16.299271-07 | 2013-04-08 16:57:22.119868-07 | 2013-04-08 16:57:22.197213-07 | 2013-04-08 16:57:22.128357-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7465 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57954 | 2013-04-08 17:01:54.750113-07 | 2013-04-08 17:02:00.17336-07 | 2013-04-08 17:02:00.320469-07 | 2013-04-08 17:02:00.177758-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7466 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57955 | 2013-04-08 17:01:54.753559-07 | 2013-04-08 17:01:59.49003-07 | 2013-04-08 17:01:59.602925-07 | 2013-04-08 17:01:59.493732-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7467 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57956 | 2013-04-08 17:01:54.75699-07 | 2013-04-08 17:01:58.262083-07 | 2013-04-08 17:01:58.349452-07 | 2013-04-08 17:01:58.350822-07 | t | active | INSERT INTO biods.f eature_value (feature_value_id, feature_value_semid, feature_value, feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) 16395 | adchemy10013 | 7473 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57963 | 2013-04-08 17:01:55.49134-07 | 2013-04-08 17:02:00.313138-07 | 2013-04-08 17:02:00.420405-07 | 2013-04-08 17:02:00.318887-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7474 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57964 | 2013-04-08 17:01:55.494777-07 | 2013-04-08 17:02:00.514142-07 | 2013-04-08 17:02:00.577239-07 | 2013-04-08 17:02:00.519572-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 12893 | postgres | 8517 | 10 | postgres | psql | | | -1 | 2013-04-08 17:35:28.217934-07 | | 2013-04-08 17:35:28.220366-07 | 2013-04-08 17:35:28.220369-07 | f | active | select * from pg_ca talog.pg_stat_activity; (30 rows) ________________________________________ Venky Kandaswamy Principal Engineer, Adchemy Inc. 925-200-7124<tel:925-200-7124> ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Postgres-xc-developers mailing list Pos...@li...<mailto:Pos...@li...> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Postgres-xc-developers mailing list Pos...@li...<mailto:Pos...@li...> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers |
From: Koichi S. <ko...@in...> - 2013-04-10 13:20:13
|
Thanks. I will wait for a bit more to commit. Regards; --- Koichi Suzuki On Wed, 10 Apr 2013 21:47:00 +0900 Michael Paquier <mic...@gm...> wrote: > On Wed, Apr 10, 2013 at 9:11 PM, Koichi Suzuki <ko...@in...>wrote: > > > Hello; > > > > I had a comment from evaluating people that GTM writes too many logs. I > > reviewed the code and found that log_min_messages work correctly but there > > were too many "LOG" leve messages from gtm/gtm_proxy. Compared with > > PostgreSQL elog/ereport usage, I found most of them are for DEBUG1 or lower > > message level. > > > +1. I wanted that for a long time. > -- > Michael |
From: Michael P. <mic...@gm...> - 2013-04-10 12:47:08
|
On Wed, Apr 10, 2013 at 9:11 PM, Koichi Suzuki <ko...@in...>wrote: > Hello; > > I had a comment from evaluating people that GTM writes too many logs. I > reviewed the code and found that log_min_messages work correctly but there > were too many "LOG" leve messages from gtm/gtm_proxy. Compared with > PostgreSQL elog/ereport usage, I found most of them are for DEBUG1 or lower > message level. > +1. I wanted that for a long time. -- Michael |
From: Ashutosh B. <ash...@en...> - 2013-04-10 12:16:35
|
Following are no problem commits, I won't be sending separate mails for these commit d2a982cc1e188f6701db79affe138e186132f137 Author: Amit Khandekar <ami...@en...> Date: Thu Apr 4 12:03:24 2013 +0545 Prototype change for ExecProcNodeDMLInXC() commit e65e2daf2e8d9a2eeb2160963c6e04a6b9316df9 Author: Amit Khandekar <ami...@en...> Date: Thu Apr 4 12:22:28 2013 +0545 Add the missing trigger-function header changes. commit bddc56a2a3961ac52266b22d84e27cdb08e19017 Author: Amit Khandekar <ami...@en...> Date: Thu Apr 4 12:24:26 2013 +0545 Added missing jf_xc_node_id and jf_xc_wholerow fields in JunkFilter structure. modified: src/include/nodes/execnodes.h commit 93dd6f9ff3d535856772181929dd41ef3e25f506 Author: Amit Khandekar <ami...@en...> Date: Thu Apr 4 12:28:24 2013 +0545 Enable trigger support by removing the "ROW-trigger-feature-not-supported" message. On Fri, Apr 5, 2013 at 12:38 PM, Ashutosh Bapat < ash...@en...> wrote: > Hi Amit, > This is a general comment about trigger execution on coordinator. > > Catalog tables are local to coordinator and any modifcations to those > happen at coordinator in the same way as it would in PostgreSQL. I am not > sure if one can create a trigger on catalog table ( I think not). In case > we could create triggers on catalog tables, we will need to be careful to > make sure that they execute the same way as PostgreSQL. > > > On Thu, Apr 4, 2013 at 7:48 PM, Ashutosh Bapat < > ash...@en...> wrote: > >> Hi Amit, >> Thanks for creating the branch and the commits. >> >> I will give my comments on each of the commits in separate mail. I am >> starting with 1dc081ebe097e63009bab219231e55679db6fae0. Is that the correct >> one? >> >> >> On Thu, Apr 4, 2013 at 12:26 PM, Amit Khandekar < >> ami...@en...> wrote: >> >>> >>> >>> >>> On 3 April 2013 15:10, Ashutosh Bapat <ash...@en...>wrote: >>> >>>> Hi Amit, >>>> Given the magnitude of the change, I think we should break this work >>>> into smaller self-sufficient patches and commit them (either on master or >>>> in a separate branch for trigger work). This will allow us to review and >>>> commit small amount of work and set it aside, rather than going over >>>> everything in every round. >>>> >>> >>> I have created a new branch "rowtriggers" in >>> postgres-xc.git.sourceforge.net/gitroot/postgres-xc/postgres-xc, where >>> I have dumped incremental changes. >>> >>> >>>> >>>> On Wed, Apr 3, 2013 at 10:46 AM, Amit Khandekar < >>>> ami...@en...> wrote: >>>> >>>>> >>>>> >>>>> >>>>> On 26 March 2013 15:53, Ashutosh Bapat < >>>>> ash...@en...> wrote: >>>>> >>>>>> >>>>>> >>>>>> On Tue, Mar 26, 2013 at 8:56 AM, Amit Khandekar < >>>>>> ami...@en...> wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> On 4 March 2013 11:11, Amit Khandekar < >>>>>>> ami...@en...> wrote: >>>>>>> >>>>>>>> On 1 March 2013 13:53, Nikhil Sontakke <ni...@st...> wrote: >>>>>>>> >> >>>>>>>> >> Issue: Whether we should fetch the whole from the datanode (OLD >>>>>>>> row) and not >>>>>>>> >> just ctid and node_id and required columns and store it at the >>>>>>>> coordinator >>>>>>>> >> for the processing OR whether we should fetch each row (OLD and >>>>>>>> NEW >>>>>>>> >> variants) while processing each row. >>>>>>>> >> >>>>>>>> >> Both of them have performance impacts - the first one has disk >>>>>>>> impact for >>>>>>>> >> large number of rows whereas the second has network impact for >>>>>>>> querying >>>>>>>> >> rows. Is it possible to do some analytical assessment as to >>>>>>>> which of them >>>>>>>> >> would be better? If you can come up with something concrete (may >>>>>>>> be numbers >>>>>>>> >> or formulae) we will be able to judge better as to which one to >>>>>>>> pick up. >>>>>>>> >>>>>>>> Will check if we can come up with some sensible analysis or figures. >>>>>>>> >>>>>>>> >>>>>>> I have done some analysis on both of these approaches here: >>>>>>> >>>>>>> https://docs.google.com/document/d/10QPPq_go_wHqKqhmOFXjJAokfdLR8OaUyZVNDu47GWk/edit?usp=sharing >>>>>>> >>>>>>> In practical terms, we anyways would need to implement (B). The >>>>>>> reason is because when the trigger has conditional execution(WHEN clause) >>>>>>> we *have* to fetch the rows beforehand, so there is no point in fetching >>>>>>> all of them again at the end of the statement when we already have them >>>>>>> locally. So may be it would be too ambitious to have have both >>>>>>> implementations, at least for this release. >>>>>>> >>>>>>> >>>>>> I agree here. We can certainly optimize for various cases later, but >>>>>> we should have something which would give all the functionality (albeit at >>>>>> a lower performance for now). >>>>>> >>>>>> >>>>>>> So I am focussing on (B) right now. We have two options: >>>>>>> >>>>>>> 1. Store all rows in palloced memory, and save the HeapTuple >>>>>>> pointers in the trigger queue, and directly access the OLD and NEW rows >>>>>>> using these pointers when needed. Here we will have no control over how >>>>>>> much memory we should use for the old and new records, and this might even >>>>>>> hamper system performance, let alone XC performance. >>>>>>> 2. Other option is to use tuplestore. Here, we need to store the >>>>>>> positions of the records in the tuplestore. So for a particular tigger >>>>>>> event, fetch by the position. From what I understand, tuplestore can be >>>>>>> advanced only sequentially in either direction. So when the read pointer is >>>>>>> at position 6 and we need to fetch a record at position 10, we need to call >>>>>>> tuplestore_advance() 4 times, and this call involves palloc/pfree overhead >>>>>>> because it calls tuplestore_gettuple(). But the trigger records are not >>>>>>> distributed so randomly. In fact a set of trigger events for a particular >>>>>>> event id are accessed in the same order as the order in which they are >>>>>>> queued. So for a particular event id, only the first access call will >>>>>>> require random access. tuplestore supports multiple read pointers, so may >>>>>>> be we can make use of that to access the first record using the closest >>>>>>> read pointer. >>>>>>> >>>>>>> >>>>>> Using palloc will be a problem if the size of data fetched is more >>>>>> that what could fit in memory. Also pallocing frequently is going to be >>>>>> performance problem. Let's see how does the tuple store approach go. >>>>>> >>>>> >>>>> While I am working on the AFTER ROW optimization, here's a patch that >>>>> has only BEFORE ROW trigger support, so that it can get you started with >>>>> first round of review. The regression is not analyzed fully yet. Besides >>>>> the AR trigger related changes, I have also stripped the logic of whether >>>>> to run the trigger on datanode or coordinator; this logic depends on both >>>>> before and after triggers. >>>>> >>>>> >>>>>> >>>>>> >>>>>>> >>>>>>> >>>>>>>> >> >>>>>>>> > >>>>>>>> > Or we can consider a hybrid approach of getting the rows in >>>>>>>> batches of >>>>>>>> > 1000 or so if possible as well. That ways they get into >>>>>>>> coordinator >>>>>>>> > memory in one shot and can be processed in batches. Obviously this >>>>>>>> > should be considered if it's not going to be a complicated >>>>>>>> > implementation. >>>>>>>> >>>>>>>> It just occurred to me that it would not be that hard to optimize >>>>>>>> the >>>>>>>> row-fetching-by-ctid as shown below: >>>>>>>> 1. When it is time to fire the queued triggers at the >>>>>>>> statement/transaction end, initialize cursors - one cursor per >>>>>>>> datanode - which would do: SELECT remote_heap_fetch(table_name, >>>>>>>> '<ctidlist>'); We can form this ctidlist out of the trigger even >>>>>>>> list. >>>>>>>> 2. For each trigger event entry in the trigger queue, FETCH NEXT >>>>>>>> using >>>>>>>> the appropriate cursor name according to the datanode id to which >>>>>>>> the >>>>>>>> trigger entry belongs. >>>>>>>> >>>>>>>> > >>>>>>>> >>> Currently we fetch all attributes in the SELECT subplans. I have >>>>>>>> >>> created another patch to fetch only the required attribtues, >>>>>>>> but have >>>>>>>> >>> not merged that into this patch. >>>>>>>> > >>>>>>>> > Do we have other places where we unnecessary fetch all attributes? >>>>>>>> > ISTM, this should be fixed as a performance improvement first >>>>>>>> ahead of >>>>>>>> > everything else. >>>>>>>> >>>>>>>> I believe DML subplan is the only remaining place where we fetch all >>>>>>>> attributes. And yes, this is a must-have for triggers, otherwise, >>>>>>>> the >>>>>>>> other optimizations would be of no use. >>>>>>>> >>>>>>>> > >>>>>>>> >>> 2. One important TODO for BEFORE trigger is this: Just before >>>>>>>> >>> invoking the trigger functions, in PG, the tuple is row-locked >>>>>>>> >>> (exclusive) by GetTupleTrigger() and the locked version is >>>>>>>> fetched >>>>>>>> >>> from the table. So it is made sure that while all the triggers >>>>>>>> for >>>>>>>> >>> that table are executed, no one can update that particular row. >>>>>>>> >>> In the patch, we haven't locked the row. We need to lock it >>>>>>>> either by >>>>>>>> >>> executing : >>>>>>>> >>> 1. SELECT * from tab1 where ctid = <ctid_val> FOR UPDATE, >>>>>>>> and then >>>>>>>> >>> use the returned ROW as the OLD row. >>>>>>>> >>> OR >>>>>>>> >>> 2. The UPDATE subplan itself should have SELECT for UPDATE >>>>>>>> so that >>>>>>>> >>> the row is already locked, and we don't have to lock it again. >>>>>>>> >>> #2 is simple though it might cause some amount of longer waits >>>>>>>> in general. >>>>>>>> >>> Using #1, though the locks would be acquired only when the >>>>>>>> particular >>>>>>>> >>> row is updated, the locks would be released only after >>>>>>>> transaction >>>>>>>> >>> end, so #1 might not be worth implementing. >>>>>>>> >>> Also #1 requires another explicit remote fetch for the >>>>>>>> >>> lock-and-get-latest-version operation. >>>>>>>> >>> I am more inclined towards #2. >>>>>>>> >>> >>>>>>>> >> The option #2 however, has problem of locking too many rows if >>>>>>>> there are >>>>>>>> >> coordinator quals in the subplans IOW the number of rows finally >>>>>>>> updated are >>>>>>>> >> lesser than the number of rows fetched from the datanode. It can >>>>>>>> cause >>>>>>>> >> unwanted deadlocks. Unless there is a way to release these extra >>>>>>>> locks, I am >>>>>>>> >> afraid this option will be a problem. >>>>>>>> >>>>>>>> True. Regardless of anything else - whether it is deadlocks or >>>>>>>> longer >>>>>>>> waits, we should not lock rows that are not to be updated. >>>>>>>> >>>>>>>> There is a more general row-locking issue that we need to solve >>>>>>>> first >>>>>>>> : 3606317. I anticipate that solving this will solve the trigger >>>>>>>> specific lock issue. So for triggers, this is a must-have, and I am >>>>>>>> going to solve this issue as part of this bug 3606317. >>>>>>>> >>>>>>>> >> >>>>>>>> > Deadlocks? ISTM, we can get more lock waits because of this but I >>>>>>>> do >>>>>>>> > not see deadlock scenarios.. >>>>>>>> > >>>>>>>> > With the FQS shipping work being done by Ashutosh, will we also >>>>>>>> ship >>>>>>>> > major chunks of subplans to the datanodes? If yes, then row >>>>>>>> locking >>>>>>>> > will only involve required tuples (hopefully) from the >>>>>>>> coordinator's >>>>>>>> > point of view. >>>>>>>> > >>>>>>>> > Also, something radical is can be invent a new type of FOR [NODE] >>>>>>>> > UPDATE type lock to minimize the impact of such locking of rows on >>>>>>>> > datanodes? >>>>>>>> > >>>>>>>> > Regards, >>>>>>>> > Nikhils >>>>>>>> > >>>>>>>> >>> >>>>>>>> >>> 3. The BEFORE trigger function can change the distribution >>>>>>>> column >>>>>>>> >>> itself. We need to add a check at the end of the trigger >>>>>>>> executions. >>>>>>>> >>> >>>>>>>> >> >>>>>>>> >> Good, you thought about that. Yes we should check it. >>>>>>>> >> >>>>>>>> >>> >>>>>>>> >>> 4. Fetching OLD row for WHEN clause handling. >>>>>>>> >>> >>>>>>>> >>> 5. Testing with mix of Shippable and non-shippable ROW triggers >>>>>>>> >>> >>>>>>>> >>> 6. Other types of triggers. INSTEAD triggers are anticipated to >>>>>>>> work >>>>>>>> >>> without significant changes, but they are yet to be tested. >>>>>>>> >>> INSERT/DELETE triggers: Most of the infrastructure has been >>>>>>>> done while >>>>>>>> >>> implementing UPDATE triggers. But some changes specific to >>>>>>>> INSERT and >>>>>>>> >>> DELETE are yet to be done. >>>>>>>> >>> Deferred triggers to be tested. >>>>>>>> >>> >>>>>>>> >>> 7. Regression analysis. There are some new failures. Will post >>>>>>>> another >>>>>>>> >>> fair version of the patch after regression analysis and fixing >>>>>>>> various >>>>>>>> >>> TODOs. >>>>>>>> >>> >>>>>>>> >>> Comments welcome. >>>>>>>> >>> >>>>>>>> >>> >>>>>>>> >>> >>>>>>>> ------------------------------------------------------------------------------ >>>>>>>> >>> 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_feb >>>>>>>> >>> _______________________________________________ >>>>>>>> >>> Postgres-xc-developers mailing list >>>>>>>> >>> Pos...@li... >>>>>>>> >>> >>>>>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>>>>>> >>> >>>>>>>> >> >>>>>>>> >> >>>>>>>> >> >>>>>>>> >> -- >>>>>>>> >> Best Wishes, >>>>>>>> >> Ashutosh Bapat >>>>>>>> >> EntepriseDB Corporation >>>>>>>> >> The Enterprise Postgres Company >>>>>>>> >> >>>>>>>> >> >>>>>>>> ------------------------------------------------------------------------------ >>>>>>>> >> 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_feb >>>>>>>> >> _______________________________________________ >>>>>>>> >> Postgres-xc-developers mailing list >>>>>>>> >> Pos...@li... >>>>>>>> >> >>>>>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>>>>>> >> >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > -- >>>>>>>> > StormDB - http://www.stormdb.com >>>>>>>> > The Database Cloud >>>>>>>> > Postgres-XC Support and Service >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Best Wishes, >>>>>> Ashutosh Bapat >>>>>> EntepriseDB Corporation >>>>>> The Enterprise Postgres Company >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Best Wishes, >>>> Ashutosh Bapat >>>> EntepriseDB Corporation >>>> The Enterprise Postgres Company >>>> >>> >>> >> >> >> -- >> Best Wishes, >> Ashutosh Bapat >> EntepriseDB Corporation >> The Enterprise Postgres Company >> > > > > -- > Best Wishes, > Ashutosh Bapat > EntepriseDB Corporation > The Enterprise Postgres Company > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company |
From: Koichi S. <ko...@in...> - 2013-04-10 12:10:23
|
Hello; I had a comment from evaluating people that GTM writes too many logs. I reviewed the code and found that log_min_messages work correctly but there were too many "LOG" leve messages from gtm/gtm_proxy. Compared with PostgreSQL elog/ereport usage, I found most of them are for DEBUG1 or lower message level. The attached patch is my proposal to lower message level. Regards; --- Koichi |
From: Ashutosh B. <ash...@en...> - 2013-04-10 11:07:00
|
Hi Amit, Sorry, there is one more comment, I see that the code to add wholerow attribute has been duplicated, once for views and once for before row triggers. Is it possible not to duplicate this code? On Wed, Apr 10, 2013 at 4:33 PM, Ashutosh Bapat < ash...@en...> wrote: > Hi Amit > Not your change but, we need to update the prologue of rewriteTargetListUD > with XC specific changes. > > Again not your change, but there's comment in the function > 1256 /* > 1257 * In Postgres-XC, we need to evaluate quals of the parse tree > and determine > 1258 * if they are Coordinator quals. If they are, their attribute > need to be > 1259 * added to target list for evaluation. In case some are found, > add them as > 1260 * junks in the target list. The junk status will be used by > remote UPDATE > 1261 * planning to associate correct element to a clause. > 1262 * For DELETE, having such columns in target list helps to > evaluate Quals > 1263 * correctly on Coordinator. > 1264 * PGXCTODO: This list could be reduced to keep only in target > list the > 1265 * vars using Coordinator Quals. > 1266 */ > 1267 if (IS_PGXC_COORDINATOR && parsetree->jointree) > 1268 var_list = pull_qual_vars((Node *) parsetree->jointree, > parsetree->resultRelation); > > I think we need to do this only when these attributes are not in the > targetlist already. My guess is we don't need this code at all. Can we > check this? > > Please use RelationGetLocInfo to get location info given Relation in > 1336 if > (!IsLocatorReplicated(GetLocatorType(RelationGetRelid(target_relation)))) > > Rest of the changes look fine. > -- > Best Wishes, > Ashutosh Bapat > EntepriseDB Corporation > The Enterprise Postgres Company > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company |
From: Ashutosh B. <ash...@en...> - 2013-04-10 11:03:21
|
Hi Amit Not your change but, we need to update the prologue of rewriteTargetListUD with XC specific changes. Again not your change, but there's comment in the function 1256 /* 1257 * In Postgres-XC, we need to evaluate quals of the parse tree and determine 1258 * if they are Coordinator quals. If they are, their attribute need to be 1259 * added to target list for evaluation. In case some are found, add them as 1260 * junks in the target list. The junk status will be used by remote UPDATE 1261 * planning to associate correct element to a clause. 1262 * For DELETE, having such columns in target list helps to evaluate Quals 1263 * correctly on Coordinator. 1264 * PGXCTODO: This list could be reduced to keep only in target list the 1265 * vars using Coordinator Quals. 1266 */ 1267 if (IS_PGXC_COORDINATOR && parsetree->jointree) 1268 var_list = pull_qual_vars((Node *) parsetree->jointree, parsetree->resultRelation); I think we need to do this only when these attributes are not in the targetlist already. My guess is we don't need this code at all. Can we check this? Please use RelationGetLocInfo to get location info given Relation in 1336 if (!IsLocatorReplicated(GetLocatorType(RelationGetRelid(target_relation)))) Rest of the changes look fine. -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company |
From: Ashutosh B. <ash...@en...> - 2013-04-10 10:30:35
|
Hi Amit, In function pgxc_dml_add_qual_to_query(), INT4OID is used as default data-type of system column. Although it serves the purpose for now, if one wants to use this function for some other purpose, INT4OID would not suffice. Either please update the prologue of function to mention that system columns of INT4 type or accept type of system column as parameter. Also, the name of the function doesn't reflect the restricted purpose the function serves. It is too generic. In this commit, I see following comment, 191 + * Beware, the ordering of ctid and node_id is important ! ctid should 192 + * be followed by node_id, not vice-versa, so as to be consistent with 193 + * the data row to be generated while binding the parameters for the 194 + * update statement. Is there a way, throught code, to link the parameters added to query and those bound at the time of execution? If it's not possible right now, can we log a bug/feature and get to it later? Otherwise the patch looks good. -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company |
From: Ashutosh B. <ash...@en...> - 2013-04-09 14:21:15
|
Hi Abbas, It seems I am wrong. We need separate pooler for each coordinator. On Tue, Apr 9, 2013 at 7:26 PM, Abbas Butt <abb...@en...>wrote: > > > On Tue, Apr 9, 2013 at 5:46 PM, Ashutosh Bapat < > ash...@en...> wrote: > >> Hi Abbas, >> I reviewed both the patches --include-node and --dump-node and tested in >> the context of coordinator addition. While adding the coordinator, I found >> that the newly added coordinator tries to bool its own pooler and needs a >> separate pooler port to be specified. In the current code, I always specify >> the same pooler port for all the coordinator (even if run on the same >> machine). This looks to be a problem. >> > > Coordinator and pooler use unix domain sockets to communicate with each > other and since unix domain sockets work only locally, sharing pooler > between coordinators running on different machines is out of question. > Let us restrict our discussion to coordinators running on the same machine > and trying to share pooler. Pooler is started by PostmasterMain using this > code > > if (IS_PGXC_COORDINATOR) > { > oldcontext = MemoryContextSwitchTo(TopMemoryContext); > > /* > * Initialize the Data Node connection pool > */ > PgPoolerPID = StartPoolManager(); > > MemoryContextSwitchTo(oldcontext); > } > > StartPoolManager forks the pooler process and the pooler process issues > bind in pool_listen. > I don't see any code to facilitate coordinators running on same machine > sharing a pooler. > > Can you please elaborate on how do you start the coordinators when they > share the same pooler? > > > In the documentation, you have use &xconly for one option and a line "This >> option is available in <productname>Postgres-XC</> only", for the second. >> Which one is correct. >> > > &xconly is correct. I have used it in both the cases. > > >> Please use same thing in both the cases. Rest of the changes look fine. >> In the attached patch, I have improved the wording in documentation >> slightly. Please use that wording in the documentation. >> > > I have noted the change, I will include it in the revised patch to commit. > > >> >> >> On Sat, Apr 6, 2013 at 12:22 AM, Abbas Butt <abb...@en...>wrote: >> >>> Attached please find an updated patch that includes the documentation >>> changes as you suggested. >>> I have also attached an html file that would eventually become a new >>> chapter in Server Administration section of the documentation. This html >>> lists the steps to be performed to add a new coordinator. >>> >>> >>> On Fri, Apr 5, 2013 at 5:23 PM, Ashutosh Bapat < >>> ash...@en...> wrote: >>> >>>> And BTW, we need corresponding document changes for this one. >>>> >>>> >>>> On Fri, Apr 5, 2013 at 5:48 PM, Ashutosh Bapat < >>>> ash...@en...> wrote: >>>> >>>>> Sorry, here's the updated patch. >>>>> >>>>> >>>>> On Fri, Apr 5, 2013 at 5:46 PM, Ashutosh Bapat < >>>>> ash...@en...> wrote: >>>>> >>>>>> Hi Abbas >>>>>> I reviewed your changes, they look good. I have made some minor >>>>>> changes. Please find them in attached patch. >>>>>> >>>>>> I want to test this in a scenario on adding new node. Can you please >>>>>> point me as to what steps I should follow? I don't want to lock the >>>>>> cluster, but do this >>>>>> 1. Take the dump of existing coordinator using this patch >>>>>> 2. initdb a new coordinator >>>>>> 3. boot and use this dump to update the coordinator >>>>>> >>>>>> Now with some magic this coordinator should be useful. Can you please >>>>>> provide me with the steps to do this? I will run those thus testing your >>>>>> patch. >>>>>> >>>>>> >>>>>> On Sun, Mar 31, 2013 at 12:14 AM, Abbas Butt < >>>>>> abb...@en...> wrote: >>>>>> >>>>>>> I just realized I had attached the wrong patch file with the >>>>>>> previous mail, please ignore the previous attachment and use the one >>>>>>> attached with this email for review. >>>>>>> >>>>>>> >>>>>>> On Fri, Mar 29, 2013 at 5:33 PM, Abbas Butt < >>>>>>> abb...@en...> wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> Attached please find a revised patch that provides support in >>>>>>>> pg_dumpall to dump nodes and node groups if the command line option >>>>>>>> --dump-nodes is provided. >>>>>>>> >>>>>>>> I tested and found that pg_dumpall works as expected. >>>>>>>> >>>>>>>> >>>>>>>> On Wed, Mar 27, 2013 at 5:04 PM, Abbas Butt < >>>>>>>> abb...@en...> wrote: >>>>>>>> >>>>>>>>> Feature ID 3608376 >>>>>>>>> >>>>>>>>> On Sun, Mar 10, 2013 at 7:59 PM, Abbas Butt < >>>>>>>>> abb...@en...> wrote: >>>>>>>>> >>>>>>>>>> Hi, >>>>>>>>>> Attached please find a patch that adds support in pg_dump to dump >>>>>>>>>> nodes and node groups. This is required while adding a new node to the >>>>>>>>>> cluster. >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Abbas >>>>>>>>>> Architect >>>>>>>>>> EnterpriseDB Corporation >>>>>>>>>> The Enterprise PostgreSQL Company >>>>>>>>>> >>>>>>>>>> Phone: 92-334-5100153 >>>>>>>>>> >>>>>>>>>> Website: www.enterprisedb.com >>>>>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >>>>>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb >>>>>>>>>> >>>>>>>>>> This e-mail message (and any attachment) is intended for the use >>>>>>>>>> of >>>>>>>>>> the individual or entity to whom it is addressed. This message >>>>>>>>>> contains information from EnterpriseDB Corporation that may be >>>>>>>>>> privileged, confidential, or exempt from disclosure under >>>>>>>>>> applicable >>>>>>>>>> law. If you are not the intended recipient or authorized to >>>>>>>>>> receive >>>>>>>>>> this for the intended recipient, any use, dissemination, >>>>>>>>>> distribution, >>>>>>>>>> retention, archiving, or copying of this communication is strictly >>>>>>>>>> prohibited. If you have received this e-mail in error, please >>>>>>>>>> notify >>>>>>>>>> the sender immediately by reply e-mail and delete this message. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> -- >>>>>>>>> Abbas >>>>>>>>> Architect >>>>>>>>> EnterpriseDB Corporation >>>>>>>>> The Enterprise PostgreSQL Company >>>>>>>>> >>>>>>>>> Phone: 92-334-5100153 >>>>>>>>> >>>>>>>>> Website: www.enterprisedb.com >>>>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >>>>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb >>>>>>>>> >>>>>>>>> This e-mail message (and any attachment) is intended for the use of >>>>>>>>> the individual or entity to whom it is addressed. This message >>>>>>>>> contains information from EnterpriseDB Corporation that may be >>>>>>>>> privileged, confidential, or exempt from disclosure under >>>>>>>>> applicable >>>>>>>>> law. If you are not the intended recipient or authorized to receive >>>>>>>>> this for the intended recipient, any use, dissemination, >>>>>>>>> distribution, >>>>>>>>> retention, archiving, or copying of this communication is strictly >>>>>>>>> prohibited. If you have received this e-mail in error, please >>>>>>>>> notify >>>>>>>>> the sender immediately by reply e-mail and delete this message. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> -- >>>>>>>> Abbas >>>>>>>> Architect >>>>>>>> EnterpriseDB Corporation >>>>>>>> The Enterprise PostgreSQL Company >>>>>>>> >>>>>>>> Phone: 92-334-5100153 >>>>>>>> >>>>>>>> Website: www.enterprisedb.com >>>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >>>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb >>>>>>>> >>>>>>>> This e-mail message (and any attachment) is intended for the use of >>>>>>>> the individual or entity to whom it is addressed. This message >>>>>>>> contains information from EnterpriseDB Corporation that may be >>>>>>>> privileged, confidential, or exempt from disclosure under applicable >>>>>>>> law. If you are not the intended recipient or authorized to receive >>>>>>>> this for the intended recipient, any use, dissemination, >>>>>>>> distribution, >>>>>>>> retention, archiving, or copying of this communication is strictly >>>>>>>> prohibited. If you have received this e-mail in error, please notify >>>>>>>> the sender immediately by reply e-mail and delete this message. >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> -- >>>>>>> Abbas >>>>>>> Architect >>>>>>> EnterpriseDB Corporation >>>>>>> The Enterprise PostgreSQL Company >>>>>>> >>>>>>> Phone: 92-334-5100153 >>>>>>> >>>>>>> Website: www.enterprisedb.com >>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb >>>>>>> >>>>>>> This e-mail message (and any attachment) is intended for the use of >>>>>>> the individual or entity to whom it is addressed. This message >>>>>>> contains information from EnterpriseDB Corporation that may be >>>>>>> privileged, confidential, or exempt from disclosure under applicable >>>>>>> law. If you are not the intended recipient or authorized to receive >>>>>>> this for the intended recipient, any use, dissemination, >>>>>>> distribution, >>>>>>> retention, archiving, or copying of this communication is strictly >>>>>>> prohibited. If you have received this e-mail in error, please notify >>>>>>> the sender immediately by reply e-mail and delete this message. >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> Own the Future-Intel(R) Level Up Game Demo Contest 2013 >>>>>>> Rise to greatness in Intel's independent game demo contest. Compete >>>>>>> for recognition, cash, and the chance to get your game on Steam. >>>>>>> $5K grand prize plus 10 genre and skill prizes. Submit your demo >>>>>>> by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2 >>>>>>> _______________________________________________ >>>>>>> Postgres-xc-developers mailing list >>>>>>> Pos...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Best Wishes, >>>>>> Ashutosh Bapat >>>>>> EntepriseDB Corporation >>>>>> The Enterprise Postgres Company >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Best Wishes, >>>>> Ashutosh Bapat >>>>> EntepriseDB Corporation >>>>> The Enterprise Postgres Company >>>>> >>>> >>>> >>>> >>>> -- >>>> Best Wishes, >>>> Ashutosh Bapat >>>> EntepriseDB Corporation >>>> The Enterprise Postgres Company >>>> >>> >>> >>> >>> -- >>> -- >>> Abbas >>> Architect >>> EnterpriseDB Corporation >>> The Enterprise PostgreSQL Company >>> >>> Phone: 92-334-5100153 >>> >>> Website: www.enterprisedb.com >>> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >>> Follow us on Twitter: http://www.twitter.com/enterprisedb >>> >>> This e-mail message (and any attachment) is intended for the use of >>> the individual or entity to whom it is addressed. This message >>> contains information from EnterpriseDB Corporation that may be >>> privileged, confidential, or exempt from disclosure under applicable >>> law. If you are not the intended recipient or authorized to receive >>> this for the intended recipient, any use, dissemination, distribution, >>> retention, archiving, or copying of this communication is strictly >>> prohibited. If you have received this e-mail in error, please notify >>> the sender immediately by reply e-mail and delete this message. >>> >> >> >> >> -- >> Best Wishes, >> Ashutosh Bapat >> EntepriseDB Corporation >> The Enterprise Postgres Company >> > > > > -- > -- > Abbas > Architect > EnterpriseDB Corporation > The Enterprise PostgreSQL Company > > Phone: 92-334-5100153 > > Website: www.enterprisedb.com > EnterpriseDB Blog: http://blogs.enterprisedb.com/ > Follow us on Twitter: http://www.twitter.com/enterprisedb > > This e-mail message (and any attachment) is intended for the use of > the individual or entity to whom it is addressed. This message > contains information from EnterpriseDB Corporation that may be > privileged, confidential, or exempt from disclosure under applicable > law. If you are not the intended recipient or authorized to receive > this for the intended recipient, any use, dissemination, distribution, > retention, archiving, or copying of this communication is strictly > prohibited. If you have received this e-mail in error, please notify > the sender immediately by reply e-mail and delete this message. > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company |
From: Abbas B. <abb...@en...> - 2013-04-09 13:56:56
|
On Tue, Apr 9, 2013 at 5:46 PM, Ashutosh Bapat < ash...@en...> wrote: > Hi Abbas, > I reviewed both the patches --include-node and --dump-node and tested in > the context of coordinator addition. While adding the coordinator, I found > that the newly added coordinator tries to bool its own pooler and needs a > separate pooler port to be specified. In the current code, I always specify > the same pooler port for all the coordinator (even if run on the same > machine). This looks to be a problem. > Coordinator and pooler use unix domain sockets to communicate with each other and since unix domain sockets work only locally, sharing pooler between coordinators running on different machines is out of question. Let us restrict our discussion to coordinators running on the same machine and trying to share pooler. Pooler is started by PostmasterMain using this code if (IS_PGXC_COORDINATOR) { oldcontext = MemoryContextSwitchTo(TopMemoryContext); /* * Initialize the Data Node connection pool */ PgPoolerPID = StartPoolManager(); MemoryContextSwitchTo(oldcontext); } StartPoolManager forks the pooler process and the pooler process issues bind in pool_listen. I don't see any code to facilitate coordinators running on same machine sharing a pooler. Can you please elaborate on how do you start the coordinators when they share the same pooler? In the documentation, you have use &xconly for one option and a line "This > option is available in <productname>Postgres-XC</> only", for the second. > Which one is correct. > &xconly is correct. I have used it in both the cases. > Please use same thing in both the cases. Rest of the changes look fine. In > the attached patch, I have improved the wording in documentation slightly. > Please use that wording in the documentation. > I have noted the change, I will include it in the revised patch to commit. > > > On Sat, Apr 6, 2013 at 12:22 AM, Abbas Butt <abb...@en...>wrote: > >> Attached please find an updated patch that includes the documentation >> changes as you suggested. >> I have also attached an html file that would eventually become a new >> chapter in Server Administration section of the documentation. This html >> lists the steps to be performed to add a new coordinator. >> >> >> On Fri, Apr 5, 2013 at 5:23 PM, Ashutosh Bapat < >> ash...@en...> wrote: >> >>> And BTW, we need corresponding document changes for this one. >>> >>> >>> On Fri, Apr 5, 2013 at 5:48 PM, Ashutosh Bapat < >>> ash...@en...> wrote: >>> >>>> Sorry, here's the updated patch. >>>> >>>> >>>> On Fri, Apr 5, 2013 at 5:46 PM, Ashutosh Bapat < >>>> ash...@en...> wrote: >>>> >>>>> Hi Abbas >>>>> I reviewed your changes, they look good. I have made some minor >>>>> changes. Please find them in attached patch. >>>>> >>>>> I want to test this in a scenario on adding new node. Can you please >>>>> point me as to what steps I should follow? I don't want to lock the >>>>> cluster, but do this >>>>> 1. Take the dump of existing coordinator using this patch >>>>> 2. initdb a new coordinator >>>>> 3. boot and use this dump to update the coordinator >>>>> >>>>> Now with some magic this coordinator should be useful. Can you please >>>>> provide me with the steps to do this? I will run those thus testing your >>>>> patch. >>>>> >>>>> >>>>> On Sun, Mar 31, 2013 at 12:14 AM, Abbas Butt < >>>>> abb...@en...> wrote: >>>>> >>>>>> I just realized I had attached the wrong patch file with the previous >>>>>> mail, please ignore the previous attachment and use the one attached with >>>>>> this email for review. >>>>>> >>>>>> >>>>>> On Fri, Mar 29, 2013 at 5:33 PM, Abbas Butt < >>>>>> abb...@en...> wrote: >>>>>> >>>>>>> Hi, >>>>>>> Attached please find a revised patch that provides support in >>>>>>> pg_dumpall to dump nodes and node groups if the command line option >>>>>>> --dump-nodes is provided. >>>>>>> >>>>>>> I tested and found that pg_dumpall works as expected. >>>>>>> >>>>>>> >>>>>>> On Wed, Mar 27, 2013 at 5:04 PM, Abbas Butt < >>>>>>> abb...@en...> wrote: >>>>>>> >>>>>>>> Feature ID 3608376 >>>>>>>> >>>>>>>> On Sun, Mar 10, 2013 at 7:59 PM, Abbas Butt < >>>>>>>> abb...@en...> wrote: >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> Attached please find a patch that adds support in pg_dump to dump >>>>>>>>> nodes and node groups. This is required while adding a new node to the >>>>>>>>> cluster. >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Abbas >>>>>>>>> Architect >>>>>>>>> EnterpriseDB Corporation >>>>>>>>> The Enterprise PostgreSQL Company >>>>>>>>> >>>>>>>>> Phone: 92-334-5100153 >>>>>>>>> >>>>>>>>> Website: www.enterprisedb.com >>>>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >>>>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb >>>>>>>>> >>>>>>>>> This e-mail message (and any attachment) is intended for the use of >>>>>>>>> the individual or entity to whom it is addressed. This message >>>>>>>>> contains information from EnterpriseDB Corporation that may be >>>>>>>>> privileged, confidential, or exempt from disclosure under >>>>>>>>> applicable >>>>>>>>> law. If you are not the intended recipient or authorized to receive >>>>>>>>> this for the intended recipient, any use, dissemination, >>>>>>>>> distribution, >>>>>>>>> retention, archiving, or copying of this communication is strictly >>>>>>>>> prohibited. If you have received this e-mail in error, please >>>>>>>>> notify >>>>>>>>> the sender immediately by reply e-mail and delete this message. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> -- >>>>>>>> Abbas >>>>>>>> Architect >>>>>>>> EnterpriseDB Corporation >>>>>>>> The Enterprise PostgreSQL Company >>>>>>>> >>>>>>>> Phone: 92-334-5100153 >>>>>>>> >>>>>>>> Website: www.enterprisedb.com >>>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >>>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb >>>>>>>> >>>>>>>> This e-mail message (and any attachment) is intended for the use of >>>>>>>> the individual or entity to whom it is addressed. This message >>>>>>>> contains information from EnterpriseDB Corporation that may be >>>>>>>> privileged, confidential, or exempt from disclosure under applicable >>>>>>>> law. If you are not the intended recipient or authorized to receive >>>>>>>> this for the intended recipient, any use, dissemination, >>>>>>>> distribution, >>>>>>>> retention, archiving, or copying of this communication is strictly >>>>>>>> prohibited. If you have received this e-mail in error, please notify >>>>>>>> the sender immediately by reply e-mail and delete this message. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> -- >>>>>>> Abbas >>>>>>> Architect >>>>>>> EnterpriseDB Corporation >>>>>>> The Enterprise PostgreSQL Company >>>>>>> >>>>>>> Phone: 92-334-5100153 >>>>>>> >>>>>>> Website: www.enterprisedb.com >>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb >>>>>>> >>>>>>> This e-mail message (and any attachment) is intended for the use of >>>>>>> the individual or entity to whom it is addressed. This message >>>>>>> contains information from EnterpriseDB Corporation that may be >>>>>>> privileged, confidential, or exempt from disclosure under applicable >>>>>>> law. If you are not the intended recipient or authorized to receive >>>>>>> this for the intended recipient, any use, dissemination, >>>>>>> distribution, >>>>>>> retention, archiving, or copying of this communication is strictly >>>>>>> prohibited. If you have received this e-mail in error, please notify >>>>>>> the sender immediately by reply e-mail and delete this message. >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> -- >>>>>> Abbas >>>>>> Architect >>>>>> EnterpriseDB Corporation >>>>>> The Enterprise PostgreSQL Company >>>>>> >>>>>> Phone: 92-334-5100153 >>>>>> >>>>>> Website: www.enterprisedb.com >>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb >>>>>> >>>>>> This e-mail message (and any attachment) is intended for the use of >>>>>> the individual or entity to whom it is addressed. This message >>>>>> contains information from EnterpriseDB Corporation that may be >>>>>> privileged, confidential, or exempt from disclosure under applicable >>>>>> law. If you are not the intended recipient or authorized to receive >>>>>> this for the intended recipient, any use, dissemination, distribution, >>>>>> retention, archiving, or copying of this communication is strictly >>>>>> prohibited. If you have received this e-mail in error, please notify >>>>>> the sender immediately by reply e-mail and delete this message. >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Own the Future-Intel(R) Level Up Game Demo Contest 2013 >>>>>> Rise to greatness in Intel's independent game demo contest. Compete >>>>>> for recognition, cash, and the chance to get your game on Steam. >>>>>> $5K grand prize plus 10 genre and skill prizes. Submit your demo >>>>>> by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2 >>>>>> _______________________________________________ >>>>>> Postgres-xc-developers mailing list >>>>>> Pos...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Best Wishes, >>>>> Ashutosh Bapat >>>>> EntepriseDB Corporation >>>>> The Enterprise Postgres Company >>>>> >>>> >>>> >>>> >>>> -- >>>> Best Wishes, >>>> Ashutosh Bapat >>>> EntepriseDB Corporation >>>> The Enterprise Postgres Company >>>> >>> >>> >>> >>> -- >>> Best Wishes, >>> Ashutosh Bapat >>> EntepriseDB Corporation >>> The Enterprise Postgres Company >>> >> >> >> >> -- >> -- >> Abbas >> Architect >> EnterpriseDB Corporation >> The Enterprise PostgreSQL Company >> >> Phone: 92-334-5100153 >> >> Website: www.enterprisedb.com >> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >> Follow us on Twitter: http://www.twitter.com/enterprisedb >> >> This e-mail message (and any attachment) is intended for the use of >> the individual or entity to whom it is addressed. This message >> contains information from EnterpriseDB Corporation that may be >> privileged, confidential, or exempt from disclosure under applicable >> law. If you are not the intended recipient or authorized to receive >> this for the intended recipient, any use, dissemination, distribution, >> retention, archiving, or copying of this communication is strictly >> prohibited. If you have received this e-mail in error, please notify >> the sender immediately by reply e-mail and delete this message. >> > > > > -- > Best Wishes, > Ashutosh Bapat > EntepriseDB Corporation > The Enterprise Postgres Company > -- -- Abbas Architect EnterpriseDB Corporation The Enterprise PostgreSQL Company Phone: 92-334-5100153 Website: www.enterprisedb.com EnterpriseDB Blog: http://blogs.enterprisedb.com/ Follow us on Twitter: http://www.twitter.com/enterprisedb This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message. |
From: Ashutosh B. <ash...@en...> - 2013-04-09 08:55:32
|
Hi Abbas, I tried to follow the steps you have written for adding new node by applying the relevant patches. I restored the dump in new coordinator. But when I tried to reboot it with --coordinator, it tried to start a pooler process and exited because it couldn't start the pooler process. I have tried all the variations possible, but no success. Do you know what's happening here? [ashutosh@ubuntu coderoot]$BuildDir/bin/postgres --coordinator -D /tmp/data/coord2/ -p 10010 FATAL: lock file "/tmp/.s.PGPOOL.6667.lock" already exists HINT: Is another postmaster (PID 13354) using socket file "/tmp/.s.PGPOOL.6667"? LOG: pool manager process (PID 20170) exited with exit code 1 LOG: terminating any other active server processes LOG: startup process (PID 20169) exited with exit code 2 LOG: aborting startup due to startup process failure On Sat, Apr 6, 2013 at 12:22 AM, Abbas Butt <abb...@en...>wrote: > Attached please find an updated patch that includes the documentation > changes as you suggested. > I have also attached an html file that would eventually become a new > chapter in Server Administration section of the documentation. This html > lists the steps to be performed to add a new coordinator. > > > On Fri, Apr 5, 2013 at 5:23 PM, Ashutosh Bapat < > ash...@en...> wrote: > >> And BTW, we need corresponding document changes for this one. >> >> >> On Fri, Apr 5, 2013 at 5:48 PM, Ashutosh Bapat < >> ash...@en...> wrote: >> >>> Sorry, here's the updated patch. >>> >>> >>> On Fri, Apr 5, 2013 at 5:46 PM, Ashutosh Bapat < >>> ash...@en...> wrote: >>> >>>> Hi Abbas >>>> I reviewed your changes, they look good. I have made some minor >>>> changes. Please find them in attached patch. >>>> >>>> I want to test this in a scenario on adding new node. Can you please >>>> point me as to what steps I should follow? I don't want to lock the >>>> cluster, but do this >>>> 1. Take the dump of existing coordinator using this patch >>>> 2. initdb a new coordinator >>>> 3. boot and use this dump to update the coordinator >>>> >>>> Now with some magic this coordinator should be useful. Can you please >>>> provide me with the steps to do this? I will run those thus testing your >>>> patch. >>>> >>>> >>>> On Sun, Mar 31, 2013 at 12:14 AM, Abbas Butt < >>>> abb...@en...> wrote: >>>> >>>>> I just realized I had attached the wrong patch file with the previous >>>>> mail, please ignore the previous attachment and use the one attached with >>>>> this email for review. >>>>> >>>>> >>>>> On Fri, Mar 29, 2013 at 5:33 PM, Abbas Butt < >>>>> abb...@en...> wrote: >>>>> >>>>>> Hi, >>>>>> Attached please find a revised patch that provides support in >>>>>> pg_dumpall to dump nodes and node groups if the command line option >>>>>> --dump-nodes is provided. >>>>>> >>>>>> I tested and found that pg_dumpall works as expected. >>>>>> >>>>>> >>>>>> On Wed, Mar 27, 2013 at 5:04 PM, Abbas Butt < >>>>>> abb...@en...> wrote: >>>>>> >>>>>>> Feature ID 3608376 >>>>>>> >>>>>>> On Sun, Mar 10, 2013 at 7:59 PM, Abbas Butt < >>>>>>> abb...@en...> wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> Attached please find a patch that adds support in pg_dump to dump >>>>>>>> nodes and node groups. This is required while adding a new node to the >>>>>>>> cluster. >>>>>>>> >>>>>>>> -- >>>>>>>> Abbas >>>>>>>> Architect >>>>>>>> EnterpriseDB Corporation >>>>>>>> The Enterprise PostgreSQL Company >>>>>>>> >>>>>>>> Phone: 92-334-5100153 >>>>>>>> >>>>>>>> Website: www.enterprisedb.com >>>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >>>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb >>>>>>>> >>>>>>>> This e-mail message (and any attachment) is intended for the use of >>>>>>>> the individual or entity to whom it is addressed. This message >>>>>>>> contains information from EnterpriseDB Corporation that may be >>>>>>>> privileged, confidential, or exempt from disclosure under applicable >>>>>>>> law. If you are not the intended recipient or authorized to receive >>>>>>>> this for the intended recipient, any use, dissemination, >>>>>>>> distribution, >>>>>>>> retention, archiving, or copying of this communication is strictly >>>>>>>> prohibited. If you have received this e-mail in error, please notify >>>>>>>> the sender immediately by reply e-mail and delete this message. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> -- >>>>>>> Abbas >>>>>>> Architect >>>>>>> EnterpriseDB Corporation >>>>>>> The Enterprise PostgreSQL Company >>>>>>> >>>>>>> Phone: 92-334-5100153 >>>>>>> >>>>>>> Website: www.enterprisedb.com >>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb >>>>>>> >>>>>>> This e-mail message (and any attachment) is intended for the use of >>>>>>> the individual or entity to whom it is addressed. This message >>>>>>> contains information from EnterpriseDB Corporation that may be >>>>>>> privileged, confidential, or exempt from disclosure under applicable >>>>>>> law. If you are not the intended recipient or authorized to receive >>>>>>> this for the intended recipient, any use, dissemination, >>>>>>> distribution, >>>>>>> retention, archiving, or copying of this communication is strictly >>>>>>> prohibited. If you have received this e-mail in error, please notify >>>>>>> the sender immediately by reply e-mail and delete this message. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> -- >>>>>> Abbas >>>>>> Architect >>>>>> EnterpriseDB Corporation >>>>>> The Enterprise PostgreSQL Company >>>>>> >>>>>> Phone: 92-334-5100153 >>>>>> >>>>>> Website: www.enterprisedb.com >>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb >>>>>> >>>>>> This e-mail message (and any attachment) is intended for the use of >>>>>> the individual or entity to whom it is addressed. This message >>>>>> contains information from EnterpriseDB Corporation that may be >>>>>> privileged, confidential, or exempt from disclosure under applicable >>>>>> law. If you are not the intended recipient or authorized to receive >>>>>> this for the intended recipient, any use, dissemination, distribution, >>>>>> retention, archiving, or copying of this communication is strictly >>>>>> prohibited. If you have received this e-mail in error, please notify >>>>>> the sender immediately by reply e-mail and delete this message. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> -- >>>>> Abbas >>>>> Architect >>>>> EnterpriseDB Corporation >>>>> The Enterprise PostgreSQL Company >>>>> >>>>> Phone: 92-334-5100153 >>>>> >>>>> Website: www.enterprisedb.com >>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb >>>>> >>>>> This e-mail message (and any attachment) is intended for the use of >>>>> the individual or entity to whom it is addressed. This message >>>>> contains information from EnterpriseDB Corporation that may be >>>>> privileged, confidential, or exempt from disclosure under applicable >>>>> law. If you are not the intended recipient or authorized to receive >>>>> this for the intended recipient, any use, dissemination, distribution, >>>>> retention, archiving, or copying of this communication is strictly >>>>> prohibited. If you have received this e-mail in error, please notify >>>>> the sender immediately by reply e-mail and delete this message. >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Own the Future-Intel(R) Level Up Game Demo Contest 2013 >>>>> Rise to greatness in Intel's independent game demo contest. Compete >>>>> for recognition, cash, and the chance to get your game on Steam. >>>>> $5K grand prize plus 10 genre and skill prizes. Submit your demo >>>>> by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2 >>>>> _______________________________________________ >>>>> Postgres-xc-developers mailing list >>>>> Pos...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>>> >>>>> >>>> >>>> >>>> -- >>>> Best Wishes, >>>> Ashutosh Bapat >>>> EntepriseDB Corporation >>>> The Enterprise Postgres Company >>>> >>> >>> >>> >>> -- >>> Best Wishes, >>> Ashutosh Bapat >>> EntepriseDB Corporation >>> The Enterprise Postgres Company >>> >> >> >> >> -- >> Best Wishes, >> Ashutosh Bapat >> EntepriseDB Corporation >> The Enterprise Postgres Company >> > > > > -- > -- > Abbas > Architect > EnterpriseDB Corporation > The Enterprise PostgreSQL Company > > Phone: 92-334-5100153 > > Website: www.enterprisedb.com > EnterpriseDB Blog: http://blogs.enterprisedb.com/ > Follow us on Twitter: http://www.twitter.com/enterprisedb > > This e-mail message (and any attachment) is intended for the use of > the individual or entity to whom it is addressed. This message > contains information from EnterpriseDB Corporation that may be > privileged, confidential, or exempt from disclosure under applicable > law. If you are not the intended recipient or authorized to receive > this for the intended recipient, any use, dissemination, distribution, > retention, archiving, or copying of this communication is strictly > prohibited. If you have received this e-mail in error, please notify > the sender immediately by reply e-mail and delete this message. > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company |
From: Koichi S. <koi...@gm...> - 2013-04-09 05:41:20
|
Because insert is being done in parallel, I'm afraid there could be a possibility that we have internal lock conflicts, which should not happen. Regards; ---------- Koichi Suzuki 2013/4/9 Amit Khandekar <ami...@en...> > > > > On 9 April 2013 06:46, Venky Kandaswamy <ve...@ad...> wrote: > >> All, >> We have been running into a hang issue on our app that appears to be >> related to PGXC. Our app processes messages from RabbitMQ and >> inserts/updates tables. We run 5 concurrent threads. The incoming queues >> are replicated, one feeding Postgres 9.1 and the other feeding PGXC >> (current git master). PGXC is hanging on inserts after processing a few >> transactions. It does not appear to be related to the actual data itself. >> IT looks like all the sessions are waiting for something. There is no >> information on locks available from pg_locks. >> > > Since most of the operations are inserts, it does not look like it is due > to locks, unless something has acquired table locks. But just to rule out > that possibility, it would be better if you check pg_locks on the > datanodes, if you have checked it only on coordinator so far. > > >> >> An strace simply says recfrom(10. >> >> The are no errors in the logs from gtm, coordinator or datanodes. >> >> The tables have referential integrity and use a shared sequence to get >> the next id. Is it possible that something is going on with the logic to >> retrieve sequence numbers? The tables are all replicated. >> >> Unfortunately, we have not been able to reproduce a reliable test >> case. >> >> [postgres@gnode0 pgxc]$ /usr/local/pgsql/bin/psql -p 5433 -U postgres >> -d postgres -c 'select * from pg_catalog.pg_stat_activity;' >> datid | datname | pid | usesysid | usename | application_name | >> client_addr | client_hostname | client_port | >> backend_start | xact_start | >> query_start | state_change | waiting | >> state | >> >> query >> >> >> -------+--------------+-------+----------+----------+------------------+----------------+-----------------+-------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+---------+---------------------+-------------------- >> >> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- >> 12893 | postgres | 22330 | 10 | postgres | pgxc | >> 192.168.53.109 | | 47025 | 2013-03-31 >> 21:42:16.724845-07 | | 2013-04-08 >> 15:43:52.313325-07 | 2013-04-08 15:26:11.444754-07 | f | >> idle | COMMIT PREPARED 'T1 >> 32273' >> 16393 | master | 4267 | 16392 | xcadmin | pgxc | >> 192.168.53.109 | | 54961 | 2013-04-08 >> 15:24:28.668023-07 | | 2013-04-08 >> 15:33:17.586836-07 | 2013-04-08 15:33:17.587942-07 | f | >> idle | SELECT count(*) FRO >> M ONLY bicommon.account_datasource WHERE true >> 16395 | adchemy10013 | 4363 | 16392 | xcadmin | pgxc | >> 192.168.53.109 | | 55084 | 2013-04-08 >> 15:28:48.822939-07 | | 2013-04-08 >> 15:50:21.650727-07 | 2013-04-08 15:50:07.916753-07 | f | >> idle | SELECT prd_id, prd_ >> semid, prd_name, prd_line, prd_model, prd_brand, prd_image_url, >> prd_dest_url, created_ts, updated_ts, source_msg_ts, modified_by FROM >> biods.product >> 16393 | master | 4486 | 16392 | xcadmin | pgxc | >> 192.168.53.109 | | 55246 | 2013-04-08 >> 15:33:21.019388-07 | | 2013-04-08 >> 15:43:51.321376-07 | 2013-04-08 15:43:51.322675-07 | f | >> idle | SET SESSION AUTHORI >> ZATION DEFAULT;RESET ALL; >> 16393 | master | 4781 | 16392 | xcadmin | pgxc | >> 192.168.53.109 | | 55515 | 2013-04-08 >> 15:42:42.122785-07 | | 2013-04-08 >> 17:02:21.023713-07 | 2013-04-08 17:02:20.804751-07 | f | >> idle | SET SESSION AUTHORI >> ZATION DEFAULT;RESET ALL; >> 16393 | master | 4787 | 16392 | xcadmin | pgxc | >> 192.168.53.109 | | 55521 | 2013-04-08 >> 15:42:42.142662-07 | | 2013-04-08 >> 16:17:19.26364-07 | 2013-04-08 16:17:19.126163-07 | f | >> idle | SET SESSION AUTHORI >> ZATION DEFAULT;RESET ALL; >> 16393 | master | 4792 | 16392 | xcadmin | pgxc | >> 192.168.53.109 | | 55526 | 2013-04-08 >> 15:42:42.159009-07 | | 2013-04-08 >> 15:45:11.915026-07 | 2013-04-08 15:45:11.886392-07 | f | >> idle | SET SESSION AUTHORI >> ZATION DEFAULT;RESET ALL; >> 16393 | master | 4799 | 16392 | xcadmin | pgxc | >> 192.168.53.109 | | 55533 | 2013-04-08 >> 15:42:42.678387-07 | | 2013-04-08 >> 17:02:21.195332-07 | 2013-04-08 17:02:20.805074-07 | f | >> idle | SET SESSION AUTHORI >> ZATION DEFAULT;RESET ALL; >> 16393 | master | 4804 | 16392 | xcadmin | pgxc | >> 192.168.53.109 | | 55538 | 2013-04-08 >> 15:42:42.694802-07 | | 2013-04-08 >> 15:45:11.904619-07 | 2013-04-08 15:45:11.888493-07 | f | >> idle | SET SESSION AUTHORI >> ZATION DEFAULT;RESET ALL; >> 16395 | adchemy10013 | 4977 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 55732 | 2013-04-08 >> 15:47:34.901175-07 | 2013-04-08 15:48:08.345331-07 | 2013-04-08 >> 15:48:08.528818-07 | 2013-04-08 15:48:08.410815-07 | f | idle in >> transaction | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 4979 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 55734 | 2013-04-08 >> 15:47:35.042778-07 | 2013-04-08 15:48:16.384763-07 | 2013-04-08 >> 15:48:16.506899-07 | 2013-04-08 15:48:16.388503-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 4985 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 55740 | 2013-04-08 15:47: >> 35.235945-07 | 2013-04-08 15:48:14.38895-07 | 2013-04-08 >> 15:48:14.445351-07 | 2013-04-08 15:48:14.446752-07 | t | >> active | UPDATE biods.featur >> e SET feature_semid = $3, feature_name = $2, created_ts = $1, updated_ts >> = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = $7) >> 16395 | adchemy10013 | 4986 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 55741 | 2013-04-08 15:47: >> 35.238843-07 | 2013-04-08 15:48:18.201043-07 | 2013-04-08 >> 15:48:18.273204-07 | 2013-04-08 15:48:18.205647-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 4998 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 55753 | 2013-04-08 >> 15:47:35.910309-07 | 2013-04-08 15:48:08.412038-07 | 2013-04-08 >> 15:48:08.566945-07 | 2013-04-08 15:48:08.415026-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 6340 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57002 | 2013-04-08 >> 16:31:44.414804-07 | 2013-04-08 16:31:50.293828-07 | 2013-04-08 >> 16:31:50.433988-07 | 2013-04-08 16:31:50.297752-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 6341 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57003 | 2013-04-08 >> 16:31:44.418356-07 | 2013-04-08 16:31:49.450704-07 | 2013-04-08 >> 16:31:49.599946-07 | 2013-04-08 16:31:49.45562-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 6348 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57010 | 2013-04-08 16:31: >> 45.065767-07 | 2013-04-08 16:31:50.699979-07 | 2013-04-08 >> 16:31:50.817425-07 | 2013-04-08 16:31:50.704669-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 6349 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57011 | 2013-04-08 >> 16:31:45.06926-07 | 2013-04-08 16:31:51.528207-07 | 2013-04-08 >> 16:31:51.582036-07 | 2013-04-08 16:31:51.532618-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 6350 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57012 | 2013-04-08 16:31: >> 45.072711-07 | 2013-04-08 16:31:50.085336-07 | 2013-04-08 >> 16:31:50.223221-07 | 2013-04-08 16:31:50.088908-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 7269 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57774 | 2013-04-08 >> 16:57:15.563006-07 | 2013-04-08 16:57:21.849156-07 | 2013-04-08 >> 16:57:21.978984-07 | 2013-04-08 16:57:21.853289-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 7271 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57776 | 2013-04-08 >> 16:57:15.63199-07 | 2013-04-08 16:57:16.575535-07 | 2013-04-08 >> 16:57:17.00605-07 | 2013-04-08 16:57:17.007747-07 | t | >> active | INSERT INTO biods.f >> eature_value (feature_value_id, feature_value_semid, feature_value, >> feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, >> modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) >> 16395 | adchemy10013 | 7283 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57788 | 2013-04-08 >> 16:57:16.292702-07 | 2013-04-08 16:57:21.849125-07 | 2013-04-08 >> 16:57:21.978824-07 | 2013-04-08 16:57:21.853251-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 7284 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57789 | 2013-04-08 >> 16:57:16.295879-07 | 2013-04-08 16:57:24.233166-07 | 2013-04-08 >> 16:57:24.321938-07 | 2013-04-08 16:57:24.237514-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 7285 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57790 | 2013-04-08 >> 16:57:16.299271-07 | 2013-04-08 16:57:22.119868-07 | 2013-04-08 >> 16:57:22.197213-07 | 2013-04-08 16:57:22.128357-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 7465 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57954 | 2013-04-08 >> 17:01:54.750113-07 | 2013-04-08 17:02:00.17336-07 | 2013-04-08 >> 17:02:00.320469-07 | 2013-04-08 17:02:00.177758-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 7466 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57955 | 2013-04-08 >> 17:01:54.753559-07 | 2013-04-08 17:01:59.49003-07 | 2013-04-08 >> 17:01:59.602925-07 | 2013-04-08 17:01:59.493732-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 7467 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57956 | 2013-04-08 >> 17:01:54.75699-07 | 2013-04-08 17:01:58.262083-07 | 2013-04-08 >> 17:01:58.349452-07 | 2013-04-08 17:01:58.350822-07 | t | >> active | INSERT INTO biods.f >> eature_value (feature_value_id, feature_value_semid, feature_value, >> feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, >> modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) >> 16395 | adchemy10013 | 7473 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57963 | 2013-04-08 >> 17:01:55.49134-07 | 2013-04-08 17:02:00.313138-07 | 2013-04-08 >> 17:02:00.420405-07 | 2013-04-08 17:02:00.318887-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 16395 | adchemy10013 | 7474 | 17361 | adchemy | pgxc | >> 192.168.53.109 | | 57964 | 2013-04-08 >> 17:01:55.494777-07 | 2013-04-08 17:02:00.514142-07 | 2013-04-08 >> 17:02:00.577239-07 | 2013-04-08 17:02:00.519572-07 | t | >> active | INSERT INTO biods.p >> roduct_feature (prd_feature_id, category_id, prd_id, feature_id, >> feature_value_id, category_semid, prd_semid, feature_semid, >> feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, >> $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) >> 12893 | postgres | 8517 | 10 | postgres | psql >> | | | -1 | 2013-04-08 >> 17:35:28.217934-07 | | 2013-04-08 >> 17:35:28.220366-07 | 2013-04-08 17:35:28.220369-07 | f | >> active | select * from pg_ca >> talog.pg_stat_activity; >> (30 rows) >> >> >> ________________________________________ >> >> Venky Kandaswamy >> >> Principal Engineer, Adchemy Inc. >> >> 925-200-7124 >> >> >> ------------------------------------------------------------------------------ >> Precog is a next-generation analytics platform capable of advanced >> analytics on semi-structured data. The platform includes APIs for building >> apps and a phenomenal toolset for data science. Developers can use >> our toolset for easy data analysis & visualization. Get a free account! >> http://www2.precog.com/precogplatform/slashdotnewsletter >> _______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> >> > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > |
From: Koichi S. <koi...@gm...> - 2013-04-09 05:17:26
|
Now I'm merging 9.1.9 to our 1.0 line. Code merge itself is not painfull at all. Because I have many other code to include in 1.1 line toward the feature fix, I'd like to test 9.1.9 merge early next week for the release of 1.0.3. Regards; ---------- Koichi Suzuki 2013/4/8 Michael Paquier <mic...@gm...> > > > > On Mon, Apr 8, 2013 at 10:02 PM, Michael Meskes <me...@po...>wrote: > >> On Mon, Apr 08, 2013 at 08:14:46PM +0900, Michael Paquier wrote: >> > Yes the code is currently vulnerable on all the branches. >> >> So shouldn't there be a security release then? >> > Yes. I am sure the core team is planning a release soon. > -- > Michael > > > ------------------------------------------------------------------------------ > Minimize network downtime and maximize team effectiveness. > Reduce network management and security costs.Learn how to hire > the most talented Cisco Certified professionals. Visit the > Employer Resources Portal > http://www.cisco.com/web/learning/employer_resources/index.html > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > |
From: Koichi S. <koi...@gm...> - 2013-04-09 05:14:55
|
Yes, I think so. Only reason I'm keeping this is to use this result in real merge work for 1.1 release. No commit form this branch will be directly moved to our 1.1 branch. This branch contains many valuable work done by core member very useful in the future work. Regards; ---------- Koichi Suzuki 2013/4/9 Ashutosh Bapat <ash...@en...> > > > > On Mon, Apr 8, 2013 at 1:06 PM, Koichi Suzuki <koi...@gm...>wrote: > >> Thanks Michael for a good advice. Now I recovered our master branch to >> the status "before" 9.2.3 merge. The merge work itself is now in 923merge >> branch, which will be used to merge with 9.2.3, as well as 9.2.4, after >> REL1_1_STABLE is created. >> >> > I think we should discard this branch (unfortunately). Otherwise we may > loose the commits we do to the master while cutting 1.1. > > >> Github was recovered as well (in fact, it was so noce that 9.2.3 merge >> has not been pushed to github yet). >> >> If any local branch pulled 9.2.3 merge work, please reset them with git >> reset --hard to make your local master branch consistent. >> >> I will write how to recover them to our Wiki site. >> >> Warmest Regards; >> ---------- >> Koichi Suzuki >> >> >> 2013/4/5 Michael Paquier <mic...@gm...> >> >>> >>> >>> >>> On Fri, Apr 5, 2013 at 2:26 PM, Pavan Deolasee <pav...@gm... >>> > wrote: >>> >>>> >>>> >>>> >>>> On Thu, Apr 4, 2013 at 7:13 PM, Michael Paquier < >>>> mic...@gm...> wrote: >>>> >>>>> OK guys you just put the XC master out-of-sync with PG master: >>>>> >>>>> http://postgres-xc.git.sourceforge.net/git/gitweb.cgi?p=postgres-xc/postgres-xc;a=commit;h=52a8aea4290851e5d40c3bb4e3237ad8aeceaf68 >>>>> >>>>> On Thu, Apr 4, 2013 at 7:01 PM, Ashutosh Bapat < >>>>> ash...@en...> wrote: >>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Thu, Apr 4, 2013 at 3:20 PM, Ahsan Hadi < >>>>>> ahs...@en...> wrote: >>>>>> >>>>>>> Hi Pavan, >>>>>>> >>>>>>> Thanks for raising this. Just to make sure i understand the problem, >>>>>>> the next release of postgres-xc will be 1.1. The 1.1 release will be based >>>>>>> on PG 9.2, >>>>>>> >>>>>> >>>>>> and that we should merge from master branch of PostgreSQL upto the >>>>>> point from where REL_9_2 is cut. >>>>>> >>>>> Correcting you here, you will have to merge master branch up to a >>>>> commit which is the intersection of master and REL9_3_STABLE, the >>>>> intersection commit determined by: >>>>> git merge-base master REL9_3_STABLE. >>>>> >>>> >>>> I am sure you mean REL9_2_STABLE because thats the branch we are >>>> interested in. >>>> >>> Oh OK I missed the point. What is aimed here is the stable branch for >>> 1.1. In this case yes, it is REL9_2_STABLE. >>> I thought about merging XC-master with future PG-9.3 stable. >>> >>> >>>> >>>> >>>>> . >>>>> >>>>> Resolving it is possible of course, simply delete the existing master >>>>> branch and recreate it down to the commit before the merge. >>>>> >>>> >>>> That's not a clean way and I am not sure how it would impact the users >>>> who are already tracking the current master branch. Somebody need to study >>>> and experiment carefully before doing more damage. One way I have seen by >>>> reading docs is to use "git revert -m 1 <merge commit id>". This indeed >>>> would revert the merge commit, but unfortunately will keep the history >>>> around. Also, this would cause problems when next time we try to merge the >>>> REL9_2_STABLE branch to the corresponding XC stable branch. >>>> >>> I still vote for cleaning up history and rebasing the master branch. I >>> recall that you did it once in the past when master was synced with PG-8.4 >>> stable. >>> -- >>> Michael >>> >>> >>> ------------------------------------------------------------------------------ >>> Minimize network downtime and maximize team effectiveness. >>> Reduce network management and security costs.Learn how to hire >>> the most talented Cisco Certified professionals. Visit the >>> Employer Resources Portal >>> http://www.cisco.com/web/learning/employer_resources/index.html >>> _______________________________________________ >>> Postgres-xc-developers mailing list >>> Pos...@li... >>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Minimize network downtime and maximize team effectiveness. >> Reduce network management and security costs.Learn how to hire >> the most talented Cisco Certified professionals. Visit the >> Employer Resources Portal >> http://www.cisco.com/web/learning/employer_resources/index.html >> _______________________________________________ >> Postgres-xc-core mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-core >> >> > > > -- > Best Wishes, > Ashutosh Bapat > EntepriseDB Corporation > The Enterprise Postgres Company > |
From: Amit K. <ami...@en...> - 2013-04-09 04:53:49
|
On 9 April 2013 06:46, Venky Kandaswamy <ve...@ad...> wrote: > All, > We have been running into a hang issue on our app that appears to be > related to PGXC. Our app processes messages from RabbitMQ and > inserts/updates tables. We run 5 concurrent threads. The incoming queues > are replicated, one feeding Postgres 9.1 and the other feeding PGXC > (current git master). PGXC is hanging on inserts after processing a few > transactions. It does not appear to be related to the actual data itself. > IT looks like all the sessions are waiting for something. There is no > information on locks available from pg_locks. > Since most of the operations are inserts, it does not look like it is due to locks, unless something has acquired table locks. But just to rule out that possibility, it would be better if you check pg_locks on the datanodes, if you have checked it only on coordinator so far. > > An strace simply says recfrom(10. > > The are no errors in the logs from gtm, coordinator or datanodes. > > The tables have referential integrity and use a shared sequence to get > the next id. Is it possible that something is going on with the logic to > retrieve sequence numbers? The tables are all replicated. > > Unfortunately, we have not been able to reproduce a reliable test case. > > [postgres@gnode0 pgxc]$ /usr/local/pgsql/bin/psql -p 5433 -U postgres > -d postgres -c 'select * from pg_catalog.pg_stat_activity;' > datid | datname | pid | usesysid | usename | application_name | > client_addr | client_hostname | client_port | > backend_start | xact_start | > query_start | state_change | waiting | > state | > > query > > > -------+--------------+-------+----------+----------+------------------+----------------+-----------------+-------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+---------+---------------------+-------------------- > > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > 12893 | postgres | 22330 | 10 | postgres | pgxc | > 192.168.53.109 | | 47025 | 2013-03-31 > 21:42:16.724845-07 | | 2013-04-08 > 15:43:52.313325-07 | 2013-04-08 15:26:11.444754-07 | f | > idle | COMMIT PREPARED 'T1 > 32273' > 16393 | master | 4267 | 16392 | xcadmin | pgxc | > 192.168.53.109 | | 54961 | 2013-04-08 > 15:24:28.668023-07 | | 2013-04-08 > 15:33:17.586836-07 | 2013-04-08 15:33:17.587942-07 | f | > idle | SELECT count(*) FRO > M ONLY bicommon.account_datasource WHERE true > 16395 | adchemy10013 | 4363 | 16392 | xcadmin | pgxc | > 192.168.53.109 | | 55084 | 2013-04-08 > 15:28:48.822939-07 | | 2013-04-08 > 15:50:21.650727-07 | 2013-04-08 15:50:07.916753-07 | f | > idle | SELECT prd_id, prd_ > semid, prd_name, prd_line, prd_model, prd_brand, prd_image_url, > prd_dest_url, created_ts, updated_ts, source_msg_ts, modified_by FROM > biods.product > 16393 | master | 4486 | 16392 | xcadmin | pgxc | > 192.168.53.109 | | 55246 | 2013-04-08 > 15:33:21.019388-07 | | 2013-04-08 > 15:43:51.321376-07 | 2013-04-08 15:43:51.322675-07 | f | > idle | SET SESSION AUTHORI > ZATION DEFAULT;RESET ALL; > 16393 | master | 4781 | 16392 | xcadmin | pgxc | > 192.168.53.109 | | 55515 | 2013-04-08 > 15:42:42.122785-07 | | 2013-04-08 > 17:02:21.023713-07 | 2013-04-08 17:02:20.804751-07 | f | > idle | SET SESSION AUTHORI > ZATION DEFAULT;RESET ALL; > 16393 | master | 4787 | 16392 | xcadmin | pgxc | > 192.168.53.109 | | 55521 | 2013-04-08 > 15:42:42.142662-07 | | 2013-04-08 > 16:17:19.26364-07 | 2013-04-08 16:17:19.126163-07 | f | > idle | SET SESSION AUTHORI > ZATION DEFAULT;RESET ALL; > 16393 | master | 4792 | 16392 | xcadmin | pgxc | > 192.168.53.109 | | 55526 | 2013-04-08 > 15:42:42.159009-07 | | 2013-04-08 > 15:45:11.915026-07 | 2013-04-08 15:45:11.886392-07 | f | > idle | SET SESSION AUTHORI > ZATION DEFAULT;RESET ALL; > 16393 | master | 4799 | 16392 | xcadmin | pgxc | > 192.168.53.109 | | 55533 | 2013-04-08 > 15:42:42.678387-07 | | 2013-04-08 > 17:02:21.195332-07 | 2013-04-08 17:02:20.805074-07 | f | > idle | SET SESSION AUTHORI > ZATION DEFAULT;RESET ALL; > 16393 | master | 4804 | 16392 | xcadmin | pgxc | > 192.168.53.109 | | 55538 | 2013-04-08 > 15:42:42.694802-07 | | 2013-04-08 > 15:45:11.904619-07 | 2013-04-08 15:45:11.888493-07 | f | > idle | SET SESSION AUTHORI > ZATION DEFAULT;RESET ALL; > 16395 | adchemy10013 | 4977 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 55732 | 2013-04-08 > 15:47:34.901175-07 | 2013-04-08 15:48:08.345331-07 | 2013-04-08 > 15:48:08.528818-07 | 2013-04-08 15:48:08.410815-07 | f | idle in > transaction | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 4979 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 55734 | 2013-04-08 > 15:47:35.042778-07 | 2013-04-08 15:48:16.384763-07 | 2013-04-08 > 15:48:16.506899-07 | 2013-04-08 15:48:16.388503-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 4985 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 55740 | 2013-04-08 > 15:47:35.235945-07 | 2013-04-08 15:48:14.38895-07 | 2013-04-08 > 15:48:14.445351-07 | 2013-04-08 15:48:14.446752-07 | t | > active | UPDATE biods.featur > e SET feature_semid = $3, feature_name = $2, created_ts = $1, updated_ts = > $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = $7) > 16395 | adchemy10013 | 4986 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 55741 | 2013-04-08 > 15:47:35.238843-07 | 2013-04-08 15:48:18.201043-07 | 2013-04-08 > 15:48:18.273204-07 | 2013-04-08 15:48:18.205647-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 4998 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 55753 | 2013-04-08 > 15:47:35.910309-07 | 2013-04-08 15:48:08.412038-07 | 2013-04-08 > 15:48:08.566945-07 | 2013-04-08 15:48:08.415026-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 6340 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57002 | 2013-04-08 > 16:31:44.414804-07 | 2013-04-08 16:31:50.293828-07 | 2013-04-08 > 16:31:50.433988-07 | 2013-04-08 16:31:50.297752-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 6341 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57003 | 2013-04-08 > 16:31:44.418356-07 | 2013-04-08 16:31:49.450704-07 | 2013-04-08 > 16:31:49.599946-07 | 2013-04-08 16:31:49.45562-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 6348 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57010 | 2013-04-08 > 16:31:45.065767-07 | 2013-04-08 16:31:50.699979-07 | 2013-04-08 > 16:31:50.817425-07 | 2013-04-08 16:31:50.704669-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 6349 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57011 | 2013-04-08 > 16:31:45.06926-07 | 2013-04-08 16:31:51.528207-07 | 2013-04-08 > 16:31:51.582036-07 | 2013-04-08 16:31:51.532618-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 6350 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57012 | 2013-04-08 > 16:31:45.072711-07 | 2013-04-08 16:31:50.085336-07 | 2013-04-08 > 16:31:50.223221-07 | 2013-04-08 16:31:50.088908-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 7269 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57774 | 2013-04-08 > 16:57:15.563006-07 | 2013-04-08 16:57:21.849156-07 | 2013-04-08 > 16:57:21.978984-07 | 2013-04-08 16:57:21.853289-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 7271 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57776 | 2013-04-08 > 16:57:15.63199-07 | 2013-04-08 16:57:16.575535-07 | 2013-04-08 > 16:57:17.00605-07 | 2013-04-08 16:57:17.007747-07 | t | > active | INSERT INTO biods.f > eature_value (feature_value_id, feature_value_semid, feature_value, > feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, > modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) > 16395 | adchemy10013 | 7283 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57788 | 2013-04-08 > 16:57:16.292702-07 | 2013-04-08 16:57:21.849125-07 | 2013-04-08 > 16:57:21.978824-07 | 2013-04-08 16:57:21.853251-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 7284 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57789 | 2013-04-08 > 16:57:16.295879-07 | 2013-04-08 16:57:24.233166-07 | 2013-04-08 > 16:57:24.321938-07 | 2013-04-08 16:57:24.237514-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 7285 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57790 | 2013-04-08 > 16:57:16.299271-07 | 2013-04-08 16:57:22.119868-07 | 2013-04-08 > 16:57:22.197213-07 | 2013-04-08 16:57:22.128357-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 7465 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57954 | 2013-04-08 > 17:01:54.750113-07 | 2013-04-08 17:02:00.17336-07 | 2013-04-08 > 17:02:00.320469-07 | 2013-04-08 17:02:00.177758-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 7466 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57955 | 2013-04-08 > 17:01:54.753559-07 | 2013-04-08 17:01:59.49003-07 | 2013-04-08 > 17:01:59.602925-07 | 2013-04-08 17:01:59.493732-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 7467 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57956 | 2013-04-08 > 17:01:54.75699-07 | 2013-04-08 17:01:58.262083-07 | 2013-04-08 > 17:01:58.349452-07 | 2013-04-08 17:01:58.350822-07 | t | > active | INSERT INTO biods.f > eature_value (feature_value_id, feature_value_semid, feature_value, > feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, > modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) > 16395 | adchemy10013 | 7473 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57963 | 2013-04-08 > 17:01:55.49134-07 | 2013-04-08 17:02:00.313138-07 | 2013-04-08 > 17:02:00.420405-07 | 2013-04-08 17:02:00.318887-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 16395 | adchemy10013 | 7474 | 17361 | adchemy | pgxc | > 192.168.53.109 | | 57964 | 2013-04-08 > 17:01:55.494777-07 | 2013-04-08 17:02:00.514142-07 | 2013-04-08 > 17:02:00.577239-07 | 2013-04-08 17:02:00.519572-07 | t | > active | INSERT INTO biods.p > roduct_feature (prd_feature_id, category_id, prd_id, feature_id, > feature_value_id, category_semid, prd_semid, feature_semid, > feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, > $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) > 12893 | postgres | 8517 | 10 | postgres | psql > | | | -1 | 2013-04-08 > 17:35:28.217934-07 | | 2013-04-08 > 17:35:28.220366-07 | 2013-04-08 17:35:28.220369-07 | f | > active | select * from pg_ca > talog.pg_stat_activity; > (30 rows) > > > ________________________________________ > > Venky Kandaswamy > > Principal Engineer, Adchemy Inc. > > 925-200-7124 > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > |
From: Ashutosh B. <ash...@en...> - 2013-04-09 04:08:24
|
On Mon, Apr 8, 2013 at 1:06 PM, Koichi Suzuki <koi...@gm...>wrote: > Thanks Michael for a good advice. Now I recovered our master branch to > the status "before" 9.2.3 merge. The merge work itself is now in 923merge > branch, which will be used to merge with 9.2.3, as well as 9.2.4, after > REL1_1_STABLE is created. > > I think we should discard this branch (unfortunately). Otherwise we may loose the commits we do to the master while cutting 1.1. > Github was recovered as well (in fact, it was so noce that 9.2.3 merge has > not been pushed to github yet). > > If any local branch pulled 9.2.3 merge work, please reset them with git > reset --hard to make your local master branch consistent. > > I will write how to recover them to our Wiki site. > > Warmest Regards; > ---------- > Koichi Suzuki > > > 2013/4/5 Michael Paquier <mic...@gm...> > >> >> >> >> On Fri, Apr 5, 2013 at 2:26 PM, Pavan Deolasee <pav...@gm...>wrote: >> >>> >>> >>> >>> On Thu, Apr 4, 2013 at 7:13 PM, Michael Paquier < >>> mic...@gm...> wrote: >>> >>>> OK guys you just put the XC master out-of-sync with PG master: >>>> >>>> http://postgres-xc.git.sourceforge.net/git/gitweb.cgi?p=postgres-xc/postgres-xc;a=commit;h=52a8aea4290851e5d40c3bb4e3237ad8aeceaf68 >>>> >>>> On Thu, Apr 4, 2013 at 7:01 PM, Ashutosh Bapat < >>>> ash...@en...> wrote: >>>> >>>>> >>>>> >>>>> >>>>> On Thu, Apr 4, 2013 at 3:20 PM, Ahsan Hadi < >>>>> ahs...@en...> wrote: >>>>> >>>>>> Hi Pavan, >>>>>> >>>>>> Thanks for raising this. Just to make sure i understand the problem, >>>>>> the next release of postgres-xc will be 1.1. The 1.1 release will be based >>>>>> on PG 9.2, >>>>>> >>>>> >>>>> and that we should merge from master branch of PostgreSQL upto the >>>>> point from where REL_9_2 is cut. >>>>> >>>> Correcting you here, you will have to merge master branch up to a >>>> commit which is the intersection of master and REL9_3_STABLE, the >>>> intersection commit determined by: >>>> git merge-base master REL9_3_STABLE. >>>> >>> >>> I am sure you mean REL9_2_STABLE because thats the branch we are >>> interested in. >>> >> Oh OK I missed the point. What is aimed here is the stable branch for >> 1.1. In this case yes, it is REL9_2_STABLE. >> I thought about merging XC-master with future PG-9.3 stable. >> >> >>> >>> >>>> . >>>> >>>> Resolving it is possible of course, simply delete the existing master >>>> branch and recreate it down to the commit before the merge. >>>> >>> >>> That's not a clean way and I am not sure how it would impact the users >>> who are already tracking the current master branch. Somebody need to study >>> and experiment carefully before doing more damage. One way I have seen by >>> reading docs is to use "git revert -m 1 <merge commit id>". This indeed >>> would revert the merge commit, but unfortunately will keep the history >>> around. Also, this would cause problems when next time we try to merge the >>> REL9_2_STABLE branch to the corresponding XC stable branch. >>> >> I still vote for cleaning up history and rebasing the master branch. I >> recall that you did it once in the past when master was synced with PG-8.4 >> stable. >> -- >> Michael >> >> >> ------------------------------------------------------------------------------ >> Minimize network downtime and maximize team effectiveness. >> Reduce network management and security costs.Learn how to hire >> the most talented Cisco Certified professionals. Visit the >> Employer Resources Portal >> http://www.cisco.com/web/learning/employer_resources/index.html >> _______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> >> > > > ------------------------------------------------------------------------------ > Minimize network downtime and maximize team effectiveness. > Reduce network management and security costs.Learn how to hire > the most talented Cisco Certified professionals. Visit the > Employer Resources Portal > http://www.cisco.com/web/learning/employer_resources/index.html > _______________________________________________ > Postgres-xc-core mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-core > > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company |
From: Venky K. <ve...@ad...> - 2013-04-09 01:01:35
|
All, We have been running into a hang issue on our app that appears to be related to PGXC. Our app processes messages from RabbitMQ and inserts/updates tables. We run 5 concurrent threads. The incoming queues are replicated, one feeding Postgres 9.1 and the other feeding PGXC (current git master). PGXC is hanging on inserts after processing a few transactions. It does not appear to be related to the actual data itself. IT looks like all the sessions are waiting for something. There is no information on locks available from pg_locks. An strace simply says recfrom(10. The are no errors in the logs from gtm, coordinator or datanodes. The tables have referential integrity and use a shared sequence to get the next id. Is it possible that something is going on with the logic to retrieve sequence numbers? The tables are all replicated. Unfortunately, we have not been able to reproduce a reliable test case. [postgres@gnode0 pgxc]$ /usr/local/pgsql/bin/psql -p 5433 -U postgres -d postgres -c 'select * from pg_catalog.pg_stat_activity;' datid | datname | pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | xact_start | query_start | state_change | waiting | state | query -------+--------------+-------+----------+----------+------------------+----------------+-----------------+-------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+---------+---------------------+-------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 12893 | postgres | 22330 | 10 | postgres | pgxc | 192.168.53.109 | | 47025 | 2013-03-31 21:42:16.724845-07 | | 2013-04-08 15:43:52.313325-07 | 2013-04-08 15:26:11.444754-07 | f | idle | COMMIT PREPARED 'T1 32273' 16393 | master | 4267 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 54961 | 2013-04-08 15:24:28.668023-07 | | 2013-04-08 15:33:17.586836-07 | 2013-04-08 15:33:17.587942-07 | f | idle | SELECT count(*) FRO M ONLY bicommon.account_datasource WHERE true 16395 | adchemy10013 | 4363 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55084 | 2013-04-08 15:28:48.822939-07 | | 2013-04-08 15:50:21.650727-07 | 2013-04-08 15:50:07.916753-07 | f | idle | SELECT prd_id, prd_ semid, prd_name, prd_line, prd_model, prd_brand, prd_image_url, prd_dest_url, created_ts, updated_ts, source_msg_ts, modified_by FROM biods.product 16393 | master | 4486 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55246 | 2013-04-08 15:33:21.019388-07 | | 2013-04-08 15:43:51.321376-07 | 2013-04-08 15:43:51.322675-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4781 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55515 | 2013-04-08 15:42:42.122785-07 | | 2013-04-08 17:02:21.023713-07 | 2013-04-08 17:02:20.804751-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4787 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55521 | 2013-04-08 15:42:42.142662-07 | | 2013-04-08 16:17:19.26364-07 | 2013-04-08 16:17:19.126163-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4792 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55526 | 2013-04-08 15:42:42.159009-07 | | 2013-04-08 15:45:11.915026-07 | 2013-04-08 15:45:11.886392-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4799 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55533 | 2013-04-08 15:42:42.678387-07 | | 2013-04-08 17:02:21.195332-07 | 2013-04-08 17:02:20.805074-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16393 | master | 4804 | 16392 | xcadmin | pgxc | 192.168.53.109 | | 55538 | 2013-04-08 15:42:42.694802-07 | | 2013-04-08 15:45:11.904619-07 | 2013-04-08 15:45:11.888493-07 | f | idle | SET SESSION AUTHORI ZATION DEFAULT;RESET ALL; 16395 | adchemy10013 | 4977 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55732 | 2013-04-08 15:47:34.901175-07 | 2013-04-08 15:48:08.345331-07 | 2013-04-08 15:48:08.528818-07 | 2013-04-08 15:48:08.410815-07 | f | idle in transaction | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 4979 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55734 | 2013-04-08 15:47:35.042778-07 | 2013-04-08 15:48:16.384763-07 | 2013-04-08 15:48:16.506899-07 | 2013-04-08 15:48:16.388503-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 4985 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55740 | 2013-04-08 15:47:35.235945-07 | 2013-04-08 15:48:14.38895-07 | 2013-04-08 15:48:14.445351-07 | 2013-04-08 15:48:14.446752-07 | t | active | UPDATE biods.featur e SET feature_semid = $3, feature_name = $2, created_ts = $1, updated_ts = $6, source_msg_ts = $5, modified_by = $4 WHERE (feature_id = $7) 16395 | adchemy10013 | 4986 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55741 | 2013-04-08 15:47:35.238843-07 | 2013-04-08 15:48:18.201043-07 | 2013-04-08 15:48:18.273204-07 | 2013-04-08 15:48:18.205647-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 4998 | 17361 | adchemy | pgxc | 192.168.53.109 | | 55753 | 2013-04-08 15:47:35.910309-07 | 2013-04-08 15:48:08.412038-07 | 2013-04-08 15:48:08.566945-07 | 2013-04-08 15:48:08.415026-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6340 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57002 | 2013-04-08 16:31:44.414804-07 | 2013-04-08 16:31:50.293828-07 | 2013-04-08 16:31:50.433988-07 | 2013-04-08 16:31:50.297752-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6341 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57003 | 2013-04-08 16:31:44.418356-07 | 2013-04-08 16:31:49.450704-07 | 2013-04-08 16:31:49.599946-07 | 2013-04-08 16:31:49.45562-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6348 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57010 | 2013-04-08 16:31:45.065767-07 | 2013-04-08 16:31:50.699979-07 | 2013-04-08 16:31:50.817425-07 | 2013-04-08 16:31:50.704669-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6349 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57011 | 2013-04-08 16:31:45.06926-07 | 2013-04-08 16:31:51.528207-07 | 2013-04-08 16:31:51.582036-07 | 2013-04-08 16:31:51.532618-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 6350 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57012 | 2013-04-08 16:31:45.072711-07 | 2013-04-08 16:31:50.085336-07 | 2013-04-08 16:31:50.223221-07 | 2013-04-08 16:31:50.088908-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7269 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57774 | 2013-04-08 16:57:15.563006-07 | 2013-04-08 16:57:21.849156-07 | 2013-04-08 16:57:21.978984-07 | 2013-04-08 16:57:21.853289-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7271 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57776 | 2013-04-08 16:57:15.63199-07 | 2013-04-08 16:57:16.575535-07 | 2013-04-08 16:57:17.00605-07 | 2013-04-08 16:57:17.007747-07 | t | active | INSERT INTO biods.f eature_value (feature_value_id, feature_value_semid, feature_value, feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) 16395 | adchemy10013 | 7283 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57788 | 2013-04-08 16:57:16.292702-07 | 2013-04-08 16:57:21.849125-07 | 2013-04-08 16:57:21.978824-07 | 2013-04-08 16:57:21.853251-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7284 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57789 | 2013-04-08 16:57:16.295879-07 | 2013-04-08 16:57:24.233166-07 | 2013-04-08 16:57:24.321938-07 | 2013-04-08 16:57:24.237514-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7285 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57790 | 2013-04-08 16:57:16.299271-07 | 2013-04-08 16:57:22.119868-07 | 2013-04-08 16:57:22.197213-07 | 2013-04-08 16:57:22.128357-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7465 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57954 | 2013-04-08 17:01:54.750113-07 | 2013-04-08 17:02:00.17336-07 | 2013-04-08 17:02:00.320469-07 | 2013-04-08 17:02:00.177758-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7466 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57955 | 2013-04-08 17:01:54.753559-07 | 2013-04-08 17:01:59.49003-07 | 2013-04-08 17:01:59.602925-07 | 2013-04-08 17:01:59.493732-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7467 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57956 | 2013-04-08 17:01:54.75699-07 | 2013-04-08 17:01:58.262083-07 | 2013-04-08 17:01:58.349452-07 | 2013-04-08 17:01:58.350822-07 | t | active | INSERT INTO biods.f eature_value (feature_value_id, feature_value_semid, feature_value, feature_semid, feature_id, created_ts, updated_ts, source_msg_ts, modified_by) VALUES ($9, $5, $4, $3, $2, $1, $8, $7, $6) 16395 | adchemy10013 | 7473 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57963 | 2013-04-08 17:01:55.49134-07 | 2013-04-08 17:02:00.313138-07 | 2013-04-08 17:02:00.420405-07 | 2013-04-08 17:02:00.318887-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 16395 | adchemy10013 | 7474 | 17361 | adchemy | pgxc | 192.168.53.109 | | 57964 | 2013-04-08 17:01:55.494777-07 | 2013-04-08 17:02:00.514142-07 | 2013-04-08 17:02:00.577239-07 | 2013-04-08 17:02:00.519572-07 | t | active | INSERT INTO biods.p roduct_feature (prd_feature_id, category_id, prd_id, feature_id, feature_value_id, category_semid, prd_semid, feature_semid, feature_value_semid, created_ts, updated_ts, modified_by) VALUES ($12, $1, $9, $4, $6, $2, $10, $5, $7, $3, $11, $8) 12893 | postgres | 8517 | 10 | postgres | psql | | | -1 | 2013-04-08 17:35:28.217934-07 | | 2013-04-08 17:35:28.220366-07 | 2013-04-08 17:35:28.220369-07 | f | active | select * from pg_ca talog.pg_stat_activity; (30 rows) ________________________________________ Venky Kandaswamy Principal Engineer, Adchemy Inc. 925-200-7124 |
From: Michael P. <mic...@gm...> - 2013-04-08 13:21:15
|
On Mon, Apr 8, 2013 at 10:02 PM, Michael Meskes <me...@po...>wrote: > On Mon, Apr 08, 2013 at 08:14:46PM +0900, Michael Paquier wrote: > > Yes the code is currently vulnerable on all the branches. > > So shouldn't there be a security release then? > Yes. I am sure the core team is planning a release soon. -- Michael |
From: Michael M. <me...@po...> - 2013-04-08 13:02:17
|
On Mon, Apr 08, 2013 at 08:14:46PM +0900, Michael Paquier wrote: > Yes the code is currently vulnerable on all the branches. So shouldn't there be a security release then? Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org Jabber: michael.meskes at gmail dot com VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL |