archivecleanup_line_break_v1.patch
application/octet-stream
Filename: archivecleanup_line_break_v1.patch
Type: application/octet-stream
Part: 0
Message:
Re: debug log in pg_archivecleanup
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
Series: patch v1
| File | + | − |
|---|---|---|
| contrib/pg_archivecleanup/pg_archivecleanup.c | 3 | 0 |
*** a/contrib/pg_archivecleanup/pg_archivecleanup.c
--- b/contrib/pg_archivecleanup/pg_archivecleanup.c
***************
*** 122,140 **** CleanupPriorWALFiles(void)
#endif
if (debug)
! fprintf(stderr, "\n%s: removing \"%s\"", progname, WALFilePath);
rc = unlink(WALFilePath);
if (rc != 0)
{
! fprintf(stderr, "\n%s: ERROR failed to remove \"%s\": %s",
progname, WALFilePath, strerror(errno));
break;
}
}
}
- if (debug)
- fprintf(stderr, "\n");
}
else
fprintf(stderr, "%s: archiveLocation \"%s\" open error\n", progname, archiveLocation);
--- 122,138 ----
#endif
if (debug)
! fprintf(stderr, "%s: removing \"%s\"\n", progname, WALFilePath);
rc = unlink(WALFilePath);
if (rc != 0)
{
! fprintf(stderr, "%s: ERROR failed to remove \"%s\": %s",
progname, WALFilePath, strerror(errno));
break;
}
}
}
}
else
fprintf(stderr, "%s: archiveLocation \"%s\" open error\n", progname, archiveLocation);
***************
*** 305,311 **** main(int argc, char **argv)
if (debug)
{
! fprintf(stderr, "%s: keep WAL file %s and later", progname, exclusiveCleanupFileName);
fflush(stderr);
}
--- 303,309 ----
if (debug)
{
! fprintf(stderr, "%s: keep WAL file %s and later\n", progname, exclusiveCleanupFileName);
fflush(stderr);
}