Re: vac_truncate_clog()'s bogus check leads to bogusness

2023-07-13 Thread Andres Freund
On 2023-06-22 22:29:12 -0700, Noah Misch wrote: > On Thu, Jun 22, 2023 at 09:45:18AM -0700, Andres Freund wrote: > > On 2023-06-21 21:50:39 -0700, Noah Misch wrote: > > > On Wed, Jun 21, 2023 at 03:12:08PM -0700, Andres Freund wrote: > > > > When vac_truncate_clog() returns early > > > ... > > > >

Re: vac_truncate_clog()'s bogus check leads to bogusness

2023-06-25 Thread Noah Misch
On Fri, Jun 23, 2023 at 06:41:58PM -0700, Andres Freund wrote: > On 2023-06-21 21:50:39 -0700, Noah Misch wrote: > > On Wed, Jun 21, 2023 at 05:46:37PM -0700, Andres Freund wrote: > > > A related issue is that as far as I can tell the determination of what is > > > bogus is bogus. > > > > > > The

Re: vac_truncate_clog()'s bogus check leads to bogusness

2023-06-23 Thread Andres Freund
Hi, On 2023-06-23 18:41:58 -0700, Andres Freund wrote: > I guess this might be caused by 78db307bb23 adding the check, but using > GetOldestXmin(NULL, true) to determine lastSaneFrozenXid. That was changed > soon after, in 87f830e0ce03. FWIW, the discussion leading up to 87f830e0ce03 is

Re: vac_truncate_clog()'s bogus check leads to bogusness

2023-06-23 Thread Andres Freund
Hi, On 2023-06-21 21:50:39 -0700, Noah Misch wrote: > On Wed, Jun 21, 2023 at 05:46:37PM -0700, Andres Freund wrote: > > A related issue is that as far as I can tell the determination of what is > > bogus is bogus. > > > > The relevant cutoffs are determined vac_update_datfrozenxid() using: > >

Re: vac_truncate_clog()'s bogus check leads to bogusness

2023-06-22 Thread Noah Misch
On Thu, Jun 22, 2023 at 09:45:18AM -0700, Andres Freund wrote: > On 2023-06-21 21:50:39 -0700, Noah Misch wrote: > > On Wed, Jun 21, 2023 at 03:12:08PM -0700, Andres Freund wrote: > > > When vac_truncate_clog() returns early > > ... > > > we haven't released the lwlock that we acquired earlier > >

Re: vac_truncate_clog()'s bogus check leads to bogusness

2023-06-22 Thread Andres Freund
Hi, On 2023-06-21 21:50:39 -0700, Noah Misch wrote: > On Wed, Jun 21, 2023 at 03:12:08PM -0700, Andres Freund wrote: > > When vac_truncate_clog() returns early > ... > > we haven't released the lwlock that we acquired earlier > > > Until there's some cause for the session to call

Re: vac_truncate_clog()'s bogus check leads to bogusness

2023-06-21 Thread Noah Misch
On Wed, Jun 21, 2023 at 03:12:08PM -0700, Andres Freund wrote: > When vac_truncate_clog() returns early ... > we haven't released the lwlock that we acquired earlier > Until there's some cause for the session to call LWLockReleaseAll(), the lock > is held. Until then neither the process holding

Re: vac_truncate_clog()'s bogus check leads to bogusness

2023-06-21 Thread Andres Freund
Hi, On 2023-06-21 15:12:08 -0700, Andres Freund wrote: > When vac_truncate_clog() returns early, due to one of these paths: > > [...] > > Separately, I think it's quite bad that we *silently* return from > vac_truncate_clog() when finding a bogus xid. That's a quite severe condition, > we should

vac_truncate_clog()'s bogus check leads to bogusness

2023-06-21 Thread Andres Freund
Hi, When vac_truncate_clog() returns early, due to one of these paths: /* * Do not truncate CLOG if we seem to have suffered wraparound already; * the computed minimum XID might be bogus. This case should now be * impossible due to the defenses in