1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

Reorganize logical replication worker disconnect code

Move the walrcv_disconnect() calls into the before_shmem_exit handler.
This makes sure the call is always made even during exit by signal, it
saves some duplicate code, and it makes the logic more similar to
walreceiver.c.

Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
This commit is contained in:
Peter Eisentraut
2017-06-01 23:05:47 -04:00
parent 2d460179ba
commit 6812330f1c
3 changed files with 6 additions and 9 deletions

View File

@ -140,7 +140,6 @@ finish_sync_worker(void)
CommitTransactionCommand();
/* Stop gracefully */
walrcv_disconnect(wrconn);
proc_exit(0);
}