mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Add option to include WAL in base backup
When included, this makes the base backup a complete working "clone" of the initial database, ready to have a postmaster started against it without the need to set up any log archiving or similar. Magnus Hagander, reviewed by Fujii Masao and Heikki Linnakangas
This commit is contained in:
@@ -105,7 +105,6 @@ static int WalSndLoop(void);
|
||||
static void InitWalSnd(void);
|
||||
static void WalSndHandshake(void);
|
||||
static void WalSndKill(int code, Datum arg);
|
||||
static void XLogRead(char *buf, XLogRecPtr recptr, Size nbytes);
|
||||
static bool XLogSend(char *msgbuf, bool *caughtup);
|
||||
static void CheckClosedConnection(void);
|
||||
static void IdentifySystem(void);
|
||||
@@ -649,8 +648,13 @@ WalSndKill(int code, Datum arg)
|
||||
*
|
||||
* XXX probably this should be improved to suck data directly from the
|
||||
* WAL buffers when possible.
|
||||
*
|
||||
* Will open, and keep open, one WAL segment stored in the global file
|
||||
* descriptor sendFile. This means if XLogRead is used once, there will
|
||||
* always be one descriptor left open until the process ends, but never
|
||||
* more than one.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
XLogRead(char *buf, XLogRecPtr recptr, Size nbytes)
|
||||
{
|
||||
XLogRecPtr startRecPtr = recptr;
|
||||
|
||||
Reference in New Issue
Block a user