Database Administrators
Q&A for database professionals who wish to improve their database skills
Latest Questions
0
votes
1
answers
482
views
Postgres-XL adding GTM Proxy seems to do nothing
I've set up a Postgres-XL cluster using [this][1] recipe: GTM: hostname=host1 nodename=gtm Coordinator: hostname=host2 nodename=coord1 Datanode1: hostname=host3 nodename=datanode1 Datanode2: hostname=host4 nodename=datanode2 When I ran a load test against it, the GTM would fallover. I tweak settings...
I've set up a Postgres-XL cluster using this recipe:
GTM:
hostname=host1
nodename=gtm
Coordinator:
hostname=host2
nodename=coord1
Datanode1:
hostname=host3
nodename=datanode1
Datanode2:
hostname=host4
nodename=datanode2
When I ran a load test against it, the GTM would fallover. I tweak settings until the GTM didn't fall over but only reported errors - thus kept on working after the load test.
I the added a GTM Proxy. I did not do
init all
but rather only init the proxy. When I restarted the cluster, the GTM reported that the GTM proxy was up and running. When I looked at the GTM proxy's log, it looked like it started up and was connected.
But when I ran the load test again, I got the same result with no log entries for the GTM proxy. Thus it seems like the GTM Proxy didn't pick up the load processing as I expected it to do.
I don't know how to trouble shoot this. Any pointers on where to look next?
(I don't know what extra info to post here)
TungstenX
(61 rep)
Jun 30, 2017, 11:15 AM
• Last activity: Aug 4, 2025, 05:07 PM
2
votes
0
answers
45
views
UPDATE ... RETURNING * with large results error
I am using Postgres-XL (Distributed version of Postgres) When I run the query: `UPDATE SET = WHERE RETURNING *;` and the result has about 600-700 rows. Then it works correctly, giving back results -- But if the number of results is in the range of 2000 - 3000 results then I get the error: `portal ""...
I am using Postgres-XL (Distributed version of Postgres)
When I run the query:
UPDATE SET = WHERE RETURNING *;
and the result has about 600-700 rows. Then it works correctly, giving back results -- But if the number of results is in the range of 2000 - 3000 results then I get the error:
portal "" does not exist
This happens both from code and the psql command line.
Is there some configuration I can tune that controls how much data I can fetch or any way to increase the number of results I am able to pull from this query. Any pointers will be helpful.
DMin
(163 rep)
Sep 25, 2019, 09:33 AM
2
votes
1
answers
326
views
Postgres-XL: SQueue timeout while waiting for Consumers finishing
We are running a pg-xl cluster: 1 gtm 2 coords 2 datanodes (+2 slaves) Everything works ok except for some medium queries (10 joins + group by). These queries always take 10.xx seconds. There is a 10-second timeout somewhere in pg-xl. If I analyze the query I can see that it takes way less: Planning...
We are running a pg-xl cluster:
1 gtm
2 coords
2 datanodes (+2 slaves)
Everything works ok except for some medium queries (10 joins + group by). These queries always take 10.xx seconds. There is a 10-second timeout somewhere in pg-xl.
If I analyze the query I can see that it takes way less:
Planning time: 5.718 ms
Execution time: 57.537 ms
On the datanode logs, after 10 second, I can see:
WARNING: SQueue p_1_3831_11, timeout while waiting for Consumers finishing
I tried to play with the shared_queues/shared_queue_size parameters but no luck.
Does anyone of you know where this timeout can come from?
Thanks in advance for your help.
EDIT:
I can reproduce with a simple LEFT JOIN (invoice table has 900k rows and quote table has 150k):
EXPLAIN
SELECT *
FROM quote
LEFT JOIN invoice ON invoice.doc_id = quote.doc_id AND invoice.account_id = 99171 AND invoice.state = 0
WHERE quote.quote_id = 5880 AND quote.account_id = 99171 AND quote.state = 0;
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------
Remote Subquery Scan on all (data01,data02) (cost=0.28..16.33 rows=1 width=4910)
-> Nested Loop Left Join (cost=0.28..16.33 rows=1 width=4910)
Join Filter: (invoice.doc_id = quote.doc_id)
-> Remote Subquery Scan on all (data01,data02) (cost=100.14..109.31 rows=1 width=1142)
Distribute results by H: doc_id
-> Index Scan using idx_81855_account_id_3 on quote (cost=0.14..8.16 rows=1 width=1142)
Index Cond: ((account_id = 99171) AND (state = 0))
Filter: (quote_id = 5880)
-> Materialize (cost=100.14..111.93 rows=1 width=3768)
-> Remote Subquery Scan on all (data01,data02) (cost=100.14..111.93 rows=1 width=3768)
Distribute results by H: doc_id
-> Index Scan using idx_82126_account_id_6 on invoice (cost=0.14..8.16 rows=1 width=3768)
Index Cond: ((account_id = 99171) AND (state = 0))
(13 rows)
On data-01, the transactions are fine:
LOG: duration: 0.088 ms statement: SET global_session TO coord01_23261;SET parentPGXCPid TO 23261;
LOG: duration: 0.012 ms statement: BEGIN
LOG: duration: 0.020 ms statement: SET LOCAL coordinator_lxid TO "24";
LOG: duration: 0.738 ms parse p_1_5add_3a: Remote Subplan
LOG: duration: 0.063 ms statement: SET global_session TO coord01_23261;SET parentpgxcpid TO "23261";SET parentPGXCPid TO 13090;
LOG: duration: 0.011 ms statement: BEGIN
LOG: duration: 0.016 ms statement: SET LOCAL coordinator_lxid TO "45";
LOG: duration: 0.194 ms parse p_1_5add_38: Remote Subplan
LOG: duration: 0.069 ms statement: SET global_session TO coord01_23261;SET parentpgxcpid TO "23261";SET parentPGXCPid TO 10474;
LOG: duration: 1.667 ms bind p_1_5add_3a/p_1_5add_3a: Remote Subplan
LOG: duration: 0.011 ms statement: BEGIN
LOG: duration: 0.194 ms parse p_1_5add_39: Remote Subplan
LOG: duration: 0.062 ms bind p_1_5add_38/p_1_5add_38: Remote Subplan
LOG: duration: 0.053 ms execute p_1_5add_38/p_1_5add_38: Remote Subplan
LOG: duration: 0.018 ms statement: SET LOCAL coordinator_lxid TO "45";
LOG: duration: 0.520 ms execute p_1_5add_3a/p_1_5add_3a: Remote Subplan
LOG: duration: 0.176 ms parse p_1_5add_38: Remote Subplan
LOG: duration: 0.157 ms parse p_1_5add_39: Remote Subplan
LOG: duration: 0.029 ms bind p_1_5add_38/p_1_5add_38: Remote Subplan
LOG: duration: 0.011 ms execute p_1_5add_38/p_1_5add_38: Remote Subplan
LOG: duration: 0.045 ms bind p_1_5add_39/p_1_5add_39: Remote Subplan
LOG: duration: 0.462 ms execute p_1_5add_39/p_1_5add_39: Remote Subplan
LOG: duration: 0.023 ms statement: COMMIT TRANSACTION
LOG: duration: 0.036 ms statement: RESET ALL;RESET SESSION AUTHORIZATION;RESET transaction_isolation;
LOG: duration: 0.488 ms statement: COMMIT TRANSACTION
WARNING: SQueue p_1_5add_39, timeout while waiting for Consumers finishing
LOG: duration: 0.053 ms statement: COMMIT TRANSACTION
LOG: duration: 0.044 ms statement: RESET ALL;RESET SESSION AUTHORIZATION;RESET transaction_isolation;
LOG: duration: 0.046 ms statement: RESET ALL;RESET SESSION AUTHORIZATION;RESET transaction_isolation;
But on data-02, we can see the 10 second timeout
LOG: duration: 0.087 ms statement: SET global_session TO coord01_23261;SET parentPGXCPid TO 23261;
LOG: duration: 0.013 ms statement: BEGIN
LOG: duration: 0.020 ms statement: SET LOCAL coordinator_lxid TO "24";
LOG: duration: 0.060 ms statement: SET global_session TO coord01_23261;SET parentpgxcpid TO "23261";SET parentPGXCPid TO 13090;
LOG: duration: 0.773 ms parse p_1_5add_3a: Remote Subplan
LOG: duration: 0.010 ms statement: BEGIN
LOG: duration: 0.016 ms statement: SET LOCAL coordinator_lxid TO "45";
LOG: duration: 0.057 ms statement: SET global_session TO coord01_23261;SET parentpgxcpid TO "23261";SET parentPGXCPid TO 10474;
LOG: duration: 0.177 ms parse p_1_5add_38: Remote Subplan
LOG: duration: 0.173 ms parse p_1_5add_39: Remote Subplan
LOG: duration: 0.037 ms bind p_1_5add_38/p_1_5add_38: Remote Subplan
LOG: duration: 0.035 ms execute p_1_5add_38/p_1_5add_38: Remote Subplan
LOG: duration: 0.010 ms statement: BEGIN
LOG: duration: 0.016 ms statement: SET LOCAL coordinator_lxid TO "45";
LOG: duration: 0.194 ms parse p_1_5add_38: Remote Subplan
LOG: duration: 1.666 ms bind p_1_5add_3a/p_1_5add_3a: Remote Subplan
LOG: duration: 0.165 ms parse p_1_5add_39: Remote Subplan
LOG: duration: 0.026 ms bind p_1_5add_38/p_1_5add_38: Remote Subplan
LOG: duration: 0.003 ms execute p_1_5add_38/p_1_5add_38: Remote Subplan
LOG: duration: 0.038 ms bind p_1_5add_39/p_1_5add_39: Remote Subplan
LOG: duration: 0.454 ms execute p_1_5add_39/p_1_5add_39: Remote Subplan
LOG: duration: 1.506 ms execute p_1_5add_3a/p_1_5add_3a: Remote Subplan
LOG: duration: 0.018 ms statement: COMMIT TRANSACTION
LOG: duration: 0.032 ms statement: RESET ALL;RESET SESSION AUTHORIZATION;RESET transaction_isolation;
WARNING: SQueue p_1_5add_39, timeout while waiting for Consumers finishing
LOG: duration: 0.050 ms statement: COMMIT TRANSACTION
LOG: duration: 0.048 ms statement: RESET ALL;RESET SESSION AUTHORIZATION;RESET transaction_isolation;
LOG: duration: 10010.353 ms statement: COMMIT TRANSACTION
LOG: duration: 0.047 ms statement: RESET ALL;RESET SESSION AUTHORIZATION;RESET transaction_isolation;
dbaq
(121 rep)
Jun 21, 2017, 12:40 AM
• Last activity: Apr 2, 2019, 03:06 PM
0
votes
1
answers
1324
views
Postgres-XL cluster
I'm trying to create a Postgres-XL cluster on 4 servers. I've followed the recipe on https://ruihaijiang.wordpress.com/2015/09/17/postgres-xl-installation-example-on-linux/ (Note: update to *pgxc_ctl.conf* by adding `tmpDir=/tmp` and `localTmpDir=$tmpDir`) I get to `pgxc_ctl init all` and then the f...
I'm trying to create a Postgres-XL cluster on 4 servers. I've followed the recipe on https://ruihaijiang.wordpress.com/2015/09/17/postgres-xl-installation-example-on-linux/
(Note: update to *pgxc_ctl.conf* by adding
tmpDir=/tmp
and localTmpDir=$tmpDir
)
I get to pgxc_ctl init all
and then the following error:
postgres@ls $ pgxc_ctl init all
/bin/bash
Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.
Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.
Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf
Finished reading configuration.
******** PGXC_CTL START ***************
Current directory: /home/postgres/pgxc_ctl
Initialize GTM master
bash: initgtm: command not found
bash: gtm: command not found
bash: gtm_ctl: command not found
Done.
Start GTM master
bash: gtm_ctl: command not found
Initialize all the coordinator masters.
Initialize coordinator master coord1.
bash: initdb: command not found
Done.
Starting coordinator master.
Starting coordinator master coord1
bash: pg_ctl: command not found
Done.
Initialize all the datanode masters.
Initialize the datanode master datanode1.
Initialize the datanode master datanode2.
bash: initdb: command not found
bash: initdb: command not found
Done.
Starting all the datanode masters.
Starting datanode master datanode1.
Starting datanode master datanode2.
bash: pg_ctl: command not found
bash: pg_ctl: command not found
Done.
psql: could not connect to server: Connection refused
Is the server running on host "197.242.148.228" and accepting
TCP/IP connections on port 6029?
Done.
Done.
There seems to be more than one issue (command not found
and Connection refused
)
TungstenX
(61 rep)
Jun 13, 2017, 01:00 PM
• Last activity: Jun 13, 2017, 04:05 PM
1
votes
1
answers
399
views
Failed To Insert Data Into Tables Using Postgres-XL and 4 Datanode
Recently, I have installed Postgres-XL-9.5r1.5 in a R630, 16 cores, 16 GB RAM. I configured 1 GTM, 1 Coordinator, and 4 Datanodes. I created a simple table **sales_small_cat** CREATE TABLE sales_small_cat ( date_sales timestamp NOT NULL, store_sid integer NOT NULL, branch_sid integer, small_cat_sid...
Recently, I have installed Postgres-XL-9.5r1.5 in a R630, 16 cores, 16 GB RAM.
I configured 1 GTM, 1 Coordinator, and 4 Datanodes.
I created a simple table **sales_small_cat**
CREATE TABLE sales_small_cat
(
date_sales timestamp NOT NULL,
store_sid integer NOT NULL,
branch_sid integer,
small_cat_sid integer NOT NULL,
total_receipt_amount integer,
qty_sales_nonpromo numeric,
qty_sales_promo_rep numeric,
qty_sales_promo_avp numeric,
total_sales numeric,
pi numeric,
is_festive boolean,
is_store_closed boolean
)
DISTRIBUTED BY (store_sid)
TO NODE (dnode1,dnode2,dnode3,dnode4);
ALTER TABLE sales_small_cat
ADD CONSTRAINT pk_sales_small_cat
PRIMARY KEY (store_sid, small_cat_sid, date_sales);
I want to insert dummy data using
WITH
trxDates AS ( SELECT generate_series('2017-01-01'::DATE,'2017-01-01'::DATE,'1 day'::INTERVAL) AS trx_date),
idmStores AS ( SELECT generate_series(1,100,1) AS store_sid),
scat AS ( SELECT generate_series(1,40,1) AS scat_sid),
temp AS (
SELECT trx_date,store_sid,round(random()*10+1) AS branch_sid,scat_sid
FROM trxDates CROSS JOIN idmStores CROSS JOIN scat
),
temp2 AS (
SELECT
*, round(random()*1000) AS receipt_amount,
random()*1000 AS non_promo, random()*1000 AS promo_rep, random()*1000 AS promo_avp
FROM temp
),
finale AS (
SELECT *,(non_promo+promo_rep+promo_avp) AS total_sales, random()*1000 AS purchase_index, false AS is_festive, false AS is_store_closed
FROM temp2
ORDER BY 1,2,4
)
INSERT INTO sales_small_cat
SELECT * FROM finale;
And I get
An error occurred when executing the SQL command:
WITH
trxDates AS ( SELECT generate_series('2017-01-01'::DATE,'2017-01-01'::DATE,'1 day'::INTERVAL) AS trx_date),
idmStores AS ( SELECT generate_series...
ERROR: unrecognized node type: 119
Execution time: 0.02s
1 statement failed.
I traced the log of datanode below:
[postgres@serveragci ~]$ tail -f pgxc/nodes/dn_master/dnode1/pg_log/datanode-20170508.log
ERROR: unrecognized node type: 119
STATEMENT: Remote Subplan
ERROR: unrecognized node type: 119
STATEMENT: Remote Subplan
LOG: disconnection: session time: 0:15:19.504 user=postgres database=postgres host=192.168.101.111 port=37161
LOG: disconnection: session time: 0:16:52.181 user=admindb database=test host=192.168.101.111 port=37209
LOG: connection received: host=192.168.101.111 port=37432
LOG: connection authorized: user=admindb database=test
ERROR: unrecognized node type: 119
STATEMENT: Remote Subplan
Is it a bug or my mistake?
Please, enlight me.
Thank you very much.
Dwi Santoso
(11 rep)
May 8, 2017, 09:48 AM
• Last activity: May 9, 2017, 01:24 AM
Showing page 1 of 5 total questions