Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita466eea

Browse files
committed
minor bugfix: in asynchronous execution of pg_stop_backup() was small risk of ignoring server side error. Reported by Alex Ignatov alexign@ozon.ru
1 parent9af4c7b commita466eea

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

‎src/backup.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,11 @@ pg_stop_backup(pgBackup *backup, PGconn *pg_startbackup_conn)
16891689

16901690
while (1)
16911691
{
1692-
if (!PQconsumeInput(conn)||PQisBusy(conn))
1692+
if (!PQconsumeInput(conn))
1693+
elog(ERROR,"pg_stop backup() failed: %s",
1694+
PQerrorMessage(conn));
1695+
1696+
if (PQisBusy(conn))
16931697
{
16941698
pg_stop_backup_timeout++;
16951699
sleep(1);
@@ -1755,6 +1759,9 @@ pg_stop_backup(pgBackup *backup, PGconn *pg_startbackup_conn)
17551759
char*xlog_path,
17561760
stream_xlog_path[MAXPGPATH];
17571761

1762+
elog(WARNING,"Invalid stop_backup_lsn value %X/%X",
1763+
(uint32) (stop_backup_lsn >>32), (uint32) (stop_backup_lsn));
1764+
17581765
if (stream_wal)
17591766
{
17601767
pgBackupGetPath2(backup,stream_xlog_path,
@@ -1885,10 +1892,6 @@ pg_stop_backup(pgBackup *backup, PGconn *pg_startbackup_conn)
18851892
char*xlog_path,
18861893
stream_xlog_path[MAXPGPATH];
18871894

1888-
/* Wait for stop_lsn to be received by replica */
1889-
/* XXX Do we need this? */
1890-
//if (current.from_replica)
1891-
//wait_replica_wal_lsn(stop_backup_lsn, false);
18921895
/*
18931896
* Wait for stop_lsn to be archived or streamed.
18941897
* We wait for stop_lsn in stream mode just in case.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp