mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Make pg_recievexlog by default loop on connection failures
Avoids the need for an external script in the most common scenario. Behavior can be overridden using the -n/--noloop commandline parameter.
This commit is contained in:
@@ -279,6 +279,9 @@ StartLogStreamer(char *startpos, uint32 timeline, char *sysidentifier)
|
||||
|
||||
/* Get a second connection */
|
||||
param->bgconn = GetConnection();
|
||||
if (!param->bgconn)
|
||||
/* Error message already written in GetConnection() */
|
||||
exit(1);
|
||||
|
||||
/*
|
||||
* Always in plain format, so we can write to basedir/pg_xlog. But the
|
||||
@@ -915,6 +918,9 @@ BaseBackup(void)
|
||||
* Connect in replication mode to the server
|
||||
*/
|
||||
conn = GetConnection();
|
||||
if (!conn)
|
||||
/* Error message already written in GetConnection() */
|
||||
exit(1);
|
||||
|
||||
/*
|
||||
* Run IDENTIFY_SYSTEM so we can get the timeline
|
||||
|
||||
Reference in New Issue
Block a user