Skip to content

Commit

Permalink
Make data node command execution interruptible
Browse files Browse the repository at this point in the history
The function to execute remote commands on data nodes used a blocking
libpq API that doesn't integrate with PostgreSQL interrupt handling,
making it impossible for a user or statement timeout to cancel a
remote command.

Refactor the remote command execution function to use a non-blocking
API and integrate with PostgreSQL signal handling via WaitEventSets.

Partial fix for #4958.
  • Loading branch information
erimatnor committed Feb 1, 2023
1 parent 739fd00 commit e778a6a
Show file tree
Hide file tree
Showing 14 changed files with 368 additions and 79 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ accidentally triggering the load of a previous DB version.**
* #5241 Allow RETURNING clause when inserting into compressed chunks
* #5245 Mange life-cycle of connections via memory contexts
* #5246 Make connection establishment interruptible
* #5253 Make data node command execution interruptible

**Bugfixes**
* #4804 Skip bucketing when start or end of refresh job is null
Expand Down
1 change: 0 additions & 1 deletion tsl/src/data_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ data_node_get_connection(const char *const data_node, RemoteTxnPrepStmtOption co
const ForeignServer *server;
TSConnectionId id;

Assert(data_node != NULL);
server = data_node_get_foreign_server(data_node, ACL_NO_CHECK, false, false);
id = remote_connection_id(server->serverid, GetUserId());

Expand Down
Loading

0 comments on commit e778a6a

Please sign in to comment.