mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Kill pg_basebackup background process when exiting
If an error occurs in the foreground (backup) process of pg_basebackup, and we exit in a controlled way, the background process (streaming xlog process) would stay around and keep streaming.
This commit is contained in:
@@ -11,10 +11,4 @@ extern char *replication_slot;
|
||||
/* Connection kept global so we can disconnect easily */
|
||||
extern PGconn *conn;
|
||||
|
||||
#define disconnect_and_exit(code) \
|
||||
{ \
|
||||
if (conn != NULL) PQfinish(conn); \
|
||||
exit(code); \
|
||||
}
|
||||
|
||||
extern PGconn *GetConnection(void);
|
||||
|
||||
Reference in New Issue
Block a user