From: | "Imseih (AWS), Sami" <simseih(at)amazon(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: False "pg_serial": apparent wraparound” in logs |
Date: | 2023-10-14 19:29:54 |
Message-ID: | 873B5D7F-41EB-401A-92D8-68768FBC4006@amazon.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Sorry for the delay in response.
> Back then, we were pretty much OK with the amount of space that could
> be wasted even in this case. Actually, how much space are we talking
> about here when a failed truncation happens?
It is a transient waste in space as it will eventually clean up.
> As this is basically
> harmless, still leads to a confusing message,
Correct, and especially because the message has
"wraparound" in the text.
> do we really need a backpatch here?
No, I don't think a backpatch is necessary.
> Anyway, it looks like you're right, we don't really need the SLRU once
> the tail is ahead of the tail because the SLRU has wrapped around due
> to the effect of transactions aging out, so making the truncation a
> bit smarter should be OK.
I assume you meant " the tail is ahead of the head".
SummarizeOldestCommittedSxact advances the headXid, but if we
checkpoint before this is called, then the tail could be ahead. The tail is
advanced by SerialSetActiveSerXmin whenever there is a new serializable
transaction.
> Hmm. This doesn't seem enough. Shouldn't we explain at least in
> which scenarios the tail can get ahead of the head (aka at least
> with long running transactions that make the SLRU wrap-around)?
> Except if I am missing something, there is no explanation of that in
> predicate.c.
After looking at this a bit more, I don't think the previous rev is correct.
We should not fall through to the " The SLRU is no longer needed." Which
also sets the headPage to invalid. We should only truncate up to the
head page.
Please see attached v3.
Regards,
Sami
Attachment | Content-Type | Size |
---|---|---|
0001-v3-Fix-false-apparent-wraparound-detected-in-pg_serial.patch | application/octet-stream | 2.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Steele | 2023-10-14 19:45:33 | Re: Requiring recovery.signal or standby.signal when recovering with a backup_label |
Previous Message | David E. Wheeler | 2023-10-14 19:27:07 | Re: JSON Path and GIN Questions |