Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7a424ec

Browse files
author
Amit Kapila
committed
Add more LOG and DEBUG messages for slot synchronization.
This provides more information about remote slots during synchronizationwhich helps in debugging bugs and BF failures due to test case issues. Wemight later want to change the LOG message added by this patch to DEBUG1.Author: Hou ZhijieReviewed-by: Amit Kapila, Bertrand DrouvotDiscussion:https://postgr.es/m/514f6f2f-6833-4539-39f1-96cd1e011f23@enterprisedb.comDiscussion:https://postgr.es/m/OS0PR01MB571633C23B2A4CAC5FB0371A944C2@OS0PR01MB5716.jpnprd01.prod.outlook.com
1 parent1fe6668 commit7a424ec

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

‎src/backend/replication/logical/slotsync.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ reserve_wal_for_local_slot(XLogRecPtr restart_lsn)
321321
oldest_segno=XLogGetOldestSegno(cur_timeline);
322322
}
323323

324+
elog(DEBUG1,"segno: %ld of purposed restart_lsn for the synced slot, oldest_segno: %ld available",
325+
segno,oldest_segno);
326+
324327
/*
325328
* If all required WAL is still there, great, otherwise retry. The
326329
* slot should prevent further removal of WAL, unless there's a
@@ -361,7 +364,18 @@ update_and_persist_local_synced_slot(RemoteSlot *remote_slot, Oid remote_dbid)
361364
* current location when recreating the slot in the next cycle. It may
362365
* take more time to create such a slot. Therefore, we keep this slot
363366
* and attempt the synchronization in the next cycle.
367+
*
368+
* XXX should this be changed to elog(DEBUG1) perhaps?
364369
*/
370+
ereport(LOG,
371+
errmsg("could not sync slot information as remote slot precedes local slot:"
372+
" remote slot \"%s\": LSN (%X/%X), catalog xmin (%u) local slot: LSN (%X/%X), catalog xmin (%u)",
373+
remote_slot->name,
374+
LSN_FORMAT_ARGS(remote_slot->restart_lsn),
375+
remote_slot->catalog_xmin,
376+
LSN_FORMAT_ARGS(slot->data.restart_lsn),
377+
slot->data.catalog_xmin));
378+
365379
return;
366380
}
367381

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp