1
0
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:
Magnus Hagander
2014-02-09 13:10:14 +01:00
parent 1c9acd5c86
commit 63ab2befe0
3 changed files with 28 additions and 6 deletions

View File

@@ -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);