mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
Split out recovery confing-writing code from pg_basebackup
... into a new file, fe_utils/recovery_gen.c. This can later be used by pg_rewind. Authors: Paul Guo, Jimmy Yih, Ashwin Agrawal. A few tweaks by Álvaro Herrera Reviewed-by: Michaël Paquier Discussion: https://postgr.es/m/CAEET0ZEffUkXc48pg2iqARQgGRYDiiVxDu+yYek_bTwJF+q=Uw@mail.gmail.com
This commit is contained in:
28
src/include/fe_utils/recovery_gen.h
Normal file
28
src/include/fe_utils/recovery_gen.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Generator for recovery configuration
|
||||
*
|
||||
* Portions Copyright (c) 2011-2019, PostgreSQL Global Development Group
|
||||
*
|
||||
* src/include/fe_utils/recovery_gen.h
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef RECOVERY_GEN_H
|
||||
#define RECOVERY_GEN_H
|
||||
|
||||
#include "libpq-fe.h"
|
||||
#include "pqexpbuffer.h"
|
||||
|
||||
/*
|
||||
* recovery configuration is part of postgresql.conf in version 12 and up, and
|
||||
* in recovery.conf before that.
|
||||
*/
|
||||
#define MINIMUM_VERSION_FOR_RECOVERY_GUC 120000
|
||||
|
||||
extern PQExpBuffer GenerateRecoveryConfig(PGconn *pgconn,
|
||||
char *pg_replication_slot);
|
||||
extern void WriteRecoveryConfig(PGconn *pgconn, char *target_dir,
|
||||
PQExpBuffer contents);
|
||||
|
||||
#endif /* RECOVERY_GEN_H */
|
Reference in New Issue
Block a user