Skip to content

Commit

Permalink
Prevent reuse of logical replication connections (#518)
Browse files Browse the repository at this point in the history
Currently walsender cannot continue to sync tables if has synced one. So we have to open new walsender connection for each client.
  • Loading branch information
x4m authored Jul 27, 2023
1 parent 8a435dc commit 18daaa9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sources/router.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,13 @@ od_router_status_t od_router_attach(od_router_t *router, od_client_t *client,
server->idle_time = 0;
server->key_client = client->key;

/*
* walsender connections are in "graceful shutdown" mode since we cannot
* reuse it.
*/
if (route->id.physical_rep || route->id.logical_rep)
server->offline = 1;

od_route_unlock(route);

/* attach server io to clients machine context */
Expand Down

0 comments on commit 18daaa9

Please sign in to comment.