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

Commitbe40dd6

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 parentde2dfa0 commitbe40dd6

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
@@ -9836,7 +9836,7 @@ KeepLogSeg(XLogRecPtr recptr, XLogSegNo *logSegNo)
98369836
* max_slot_wal_keep_size.
98379837
*/
98389838
keep=XLogGetReplicationSlotMinimumLSN();
9839-
if (keep!=InvalidXLogRecPtr)
9839+
if (keep!=InvalidXLogRecPtr&&keep<recptr)
98409840
{
98419841
XLByteToSeg(keep,segno,wal_segment_size);
98429842

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp