pg_archive_bypass.diff
text/x-diff
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: context
| File | + | − |
|---|---|---|
| src/backend/postmaster/pgarch.c | 15 | 0 |
*** a/src/backend/postmaster/pgarch.c
--- b/src/backend/postmaster/pgarch.c
***************
*** 475,481 **** pgarch_ArchiverCopyLoop(void)
/*
* pgarch_archiveXlog
*
! * Invokes system(3) to copy one archive file to wherever it should go
*
* Returns true if successful
*/
--- 475,485 ----
/*
* pgarch_archiveXlog
*
! * Invokes system(3) to copy one archive file to wherever it should go, or
! * just return true if set to the internal command "pg_archive_bypass". That
! * allows windows users to easily have the "/usr/bin/true", and that allows
! * for setting up a archiving only when you need it by changing the command
! * and issuing a reload.
*
* Returns true if successful
*/
***************
*** 490,495 **** pgarch_archiveXlog(char *xlog)
--- 494,509 ----
const char *sp;
int rc;
+ /*
+ * If the command is "pg_archive_bypass", just return true
+ */
+ if( strcmp(XLogArchiveCommand, "pg_archive_bypass") == 0 )
+ {
+ ereport(DEBUG3,
+ (errmsg_internal("bypassing archive command")));
+ return true;
+ }
+
snprintf(pathname, MAXPGPATH, XLOGDIR "/%s", xlog);
/*