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

Commitd1ffcc7

Browse files
author
Amit Kapila
committed
Fix an assert in CheckPointReplicationSlots().
Commite0b2eed assumed that the confirmed_flush LSN can't go backward.However, it is possible that confirmed_flush LSN can go backwardtemporarily when the client acknowledges a prior value of flush location.This can happen when the client (subscriber in this case) acknowledges anLSN it doesn't have to do anything for (say for DDLs) and thus didn'tstore persistently. After restart, the client sends the prior value offlush LSN which it had stored persistently and the server updates theconfirmed_flush LSN with that value.The fix is to remove the assumption and not allow the prior value ofconfirmed_flush LSN to be flushed to the disk.Author: Vignesh CReviewed-by: Amit Kapila, Shlok KyalDiscussion:https://postgr.es/m/CALDaNm3hgow2+oEov5jBk4iYP5eQrUCF1yZtW7+dV3J__p4KLQ@mail.gmail.com
1 parent3470391 commitd1ffcc7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

‎src/backend/replication/slot.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1874,10 +1874,8 @@ CheckPointReplicationSlots(bool is_shutdown)
18741874
{
18751875
SpinLockAcquire(&s->mutex);
18761876

1877-
Assert(s->data.confirmed_flush >=s->last_saved_confirmed_flush);
1878-
18791877
if (s->data.invalidated==RS_INVAL_NONE&&
1880-
s->data.confirmed_flush!=s->last_saved_confirmed_flush)
1878+
s->data.confirmed_flush>s->last_saved_confirmed_flush)
18811879
{
18821880
s->just_dirtied= true;
18831881
s->dirty= true;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp