@@ -1689,7 +1689,11 @@ pg_stop_backup(pgBackup *backup, PGconn *pg_startbackup_conn)
1689
1689
1690
1690
while (1 )
1691
1691
{
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 ))
1693
1697
{
1694
1698
pg_stop_backup_timeout ++ ;
1695
1699
sleep (1 );
@@ -1755,6 +1759,9 @@ pg_stop_backup(pgBackup *backup, PGconn *pg_startbackup_conn)
1755
1759
char * xlog_path ,
1756
1760
stream_xlog_path [MAXPGPATH ];
1757
1761
1762
+ elog (WARNING ,"Invalid stop_backup_lsn value %X/%X" ,
1763
+ (uint32 ) (stop_backup_lsn >>32 ), (uint32 ) (stop_backup_lsn ));
1764
+
1758
1765
if (stream_wal )
1759
1766
{
1760
1767
pgBackupGetPath2 (backup ,stream_xlog_path ,
@@ -1885,10 +1892,6 @@ pg_stop_backup(pgBackup *backup, PGconn *pg_startbackup_conn)
1885
1892
char * xlog_path ,
1886
1893
stream_xlog_path [MAXPGPATH ];
1887
1894
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);
1892
1895
/*
1893
1896
* Wait for stop_lsn to be archived or streamed.
1894
1897
* We wait for stop_lsn in stream mode just in case.