Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/test/regress/expected/failure_copy_on_hash.out
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ SELECT citus.mitmproxy('conn.kill()');

(1 row)

\COPY test_table_2 FROM stdin delimiter ',';
-- Deliberately use zero-row input; modern psql drains failed COPY input
-- through the next \. (#8780).
\COPY test_table_2 FROM PROGRAM 'true' delimiter ',';
Comment thread
ihalatci marked this conversation as resolved.
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: connection not open
SELECT citus.mitmproxy('conn.allow()');
mitmproxy
Expand Down
8 changes: 5 additions & 3 deletions src/test/regress/expected/failure_copy_to_reference.out
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ SELECT citus.mitmproxy('conn.kill()');

(1 row)

\copy test_table FROM STDIN DELIMITER ','
-- Deliberately use zero-row input for the next three failures; modern psql
-- drains failed COPY input through the next \. (#8780).
\copy test_table FROM PROGRAM 'true' DELIMITER ','
ERROR: failure on connection marked as essential: localhost:xxxxx
SELECT citus.mitmproxy('conn.allow()');
mitmproxy
Expand All @@ -61,7 +63,7 @@ SELECT citus.mitmproxy('conn.onQuery(query="^BEGIN TRANSACTION ISOLATION LEVEL R

(1 row)

\copy test_table FROM STDIN DELIMITER ','
\copy test_table FROM PROGRAM 'true' DELIMITER ','
ERROR: failure on connection marked as essential: localhost:xxxxx
SELECT citus.mitmproxy('conn.allow()');
mitmproxy
Expand All @@ -88,7 +90,7 @@ SELECT citus.mitmproxy('conn.onQuery(query="^BEGIN TRANSACTION ISOLATION LEVEL R

(1 row)

\copy test_table FROM STDIN DELIMITER ','
\copy test_table FROM PROGRAM 'true' DELIMITER ','
ERROR: canceling statement due to user request
SELECT citus.mitmproxy('conn.allow()');
mitmproxy
Expand Down
4 changes: 3 additions & 1 deletion src/test/regress/sql/failure_copy_on_hash.sql
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ SELECT create_distributed_table('test_table_2','id');

SELECT citus.mitmproxy('conn.kill()');

\COPY test_table_2 FROM stdin delimiter ',';
-- Deliberately use zero-row input; modern psql drains failed COPY input
-- through the next \. (#8780).
\COPY test_table_2 FROM PROGRAM 'true' delimiter ',';

SELECT citus.mitmproxy('conn.allow()');
SELECT pds.logicalrelid, pdsd.shardid, pdsd.shardstate
Expand Down
8 changes: 5 additions & 3 deletions src/test/regress/sql/failure_copy_to_reference.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,23 @@ CREATE VIEW unhealthy_shard_count AS
-- in the first test, kill just in the first
Comment thread
ihalatci marked this conversation as resolved.
-- response we get from the worker
SELECT citus.mitmproxy('conn.kill()');
\copy test_table FROM STDIN DELIMITER ','
-- Deliberately use zero-row input for the next three failures; modern psql
-- drains failed COPY input through the next \. (#8780).
\copy test_table FROM PROGRAM 'true' DELIMITER ','
SELECT citus.mitmproxy('conn.allow()');
SELECT * FROM unhealthy_shard_count;
SELECT count(*) FROM test_table;

-- kill as soon as the coordinator sends begin
SELECT citus.mitmproxy('conn.onQuery(query="^BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED").kill()');
\copy test_table FROM STDIN DELIMITER ','
\copy test_table FROM PROGRAM 'true' DELIMITER ','
SELECT citus.mitmproxy('conn.allow()');
SELECT * FROM unhealthy_shard_count;
SELECT count(*) FROM test_table;

-- cancel as soon as the coordinator sends begin
SELECT citus.mitmproxy('conn.onQuery(query="^BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED").cancel(' || pg_backend_pid() || ')');
\copy test_table FROM STDIN DELIMITER ','
\copy test_table FROM PROGRAM 'true' DELIMITER ','
SELECT citus.mitmproxy('conn.allow()');
SELECT * FROM unhealthy_shard_count;
SELECT count(*) FROM test_table;
Expand Down
Loading