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

Commit1370030

Browse files
Prevent underflow in KeepLogSeg().
The call to XLogGetReplicationSlotMinimumLSN() might return agreater LSN than the one given to the function. Subsequent segmentnumber calculations might then underflow, which could result inunexpected behavior when removing or recyling WAL files. This wasintroduced with max_slot_wal_keep_size inc655077. To fix, skipthe block of code for replication slots if the LSN is greater.Reported-by: Xu XingwangAuthor: Kyotaro HoriguchiReviewed-by: Junwang ZhaoDiscussion:https://postgr.es/m/17903-4288d439dee856c6%40postgresql.orgBackpatch-through: 13
1 parentc74f88c commit1370030

File tree

1 file changed

+1
-1
lines changed
  • src/backend/access/transam

1 file changed

+1
-1
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10037,7 +10037,7 @@ KeepLogSeg(XLogRecPtr recptr, XLogSegNo *logSegNo)
1003710037
* max_slot_wal_keep_size.
1003810038
*/
1003910039
keep=XLogGetReplicationSlotMinimumLSN();
10040-
if (keep!=InvalidXLogRecPtr)
10040+
if (keep!=InvalidXLogRecPtr&&keep<recptr)
1004110041
{
1004210042
XLByteToSeg(keep,segno,wal_segment_size);
1004310043

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp