pgsql: Fix base backup streaming xlog from standby

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix base backup streaming xlog from standby
Date: 2012-05-25 09:37:18
Message-ID: E1SXqxS-0007nL-60@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix base backup streaming xlog from standby

When backing up from a standby server, the backup process
will not automatically switch xlog segment. So we must
accept a partially transferred xlog file in this case, but
rename it into position anyway.

In passing, merge the two callbacks for segment end and
stop stream into a single callback, since their implementations
were close to identical, and rename this callback to
reflect that it stops streaming rather than continues it.

Patch by Magnus Hagander, review by Fujii Masao

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/31d965819bdaa971ae007a67611e78ec1d185f14

Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c | 9 +++----
src/bin/pg_basebackup/pg_receivexlog.c | 19 ++++-------------
src/bin/pg_basebackup/receivelog.c | 33 ++++++++++++++++++-------------
src/bin/pg_basebackup/receivelog.h | 18 +++++-----------
4 files changed, 34 insertions(+), 45 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2012-05-25 13:10:10 pgsql: Have pg_upgrade only use one extra log file for Win32, not two.
Previous Message Bruce Momjian 2012-05-25 00:30:49 pgsql: On Windows, have pg_upgrade use different two files to log pg_ct