send_xlog_upto_shutdown_ckpt_v1.patch
application/octet-stream
Filename: send_xlog_upto_shutdown_ckpt_v1.patch
Type: application/octet-stream
Part: 0
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 | + | − |
|---|---|---|
| src/backend/replication/walsender.c | 5 | 0 |
*** a/src/backend/replication/walsender.c
--- b/src/backend/replication/walsender.c
***************
*** 394,401 **** WalSndLoop(void)
*/
if (ready_to_stop)
{
! XLogSend(&output_message, &caughtup);
! shutdown_requested = true;
}
/* Normal exit from the walsender is here */
--- 394,403 ----
*/
if (ready_to_stop)
{
! if (!XLogSend(&output_message, &caughtup))
! goto eof;
! if (caughtup)
! shutdown_requested = true;
}
/* Normal exit from the walsender is here */
***************
*** 458,464 **** eof:
static void
InitWalSnd(void)
{
- /* use volatile pointer to prevent code rearrangement */
int i;
/*
--- 460,465 ----
***************
*** 474,479 **** InitWalSnd(void)
--- 475,481 ----
*/
for (i = 0; i < max_wal_senders; i++)
{
+ /* use volatile pointer to prevent code rearrangement */
volatile WalSnd *walsnd = &WalSndCtl->walsnds[i];
SpinLockAcquire(&walsnd->mutex);