Re: [PATCH] BUG FIX: inconsistent page found in BRIN_REGULAR_PAGE

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Karina Litskevich <litskevichkarina(at)gmail(dot)com>
Cc: 王海洋 <wanghaiyang(dot)001(at)bytedance(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] BUG FIX: inconsistent page found in BRIN_REGULAR_PAGE
Date: 2022-12-23 16:35:09
Message-ID: 20221223163509.rwxpzy6xfemppkxd@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello,

On 2022-Dec-23, Karina Litskevich wrote:

> Is there any special reason to read WAL records until the last inserted
> record?

Hmm, no, there's no good reason to do it that way.

> It seems that in some rare situations on slower machines this test can fail.
> If any background process inserts a WAL record before lsn('insert')
> and this record isn't flushed before
> pg_get_wal_records_info('$start_lsn', '$end_lsn'),
> pg_get_wal_records_info('$start_lsn', '$end_lsn') ends with ERROR
> "cannot accept future end LSN" as it works only if record with end LSN
> is inserted.

Hmm. I've never seen that, but it sounds plausible.

> I attached two patches with two ways of fixing this minor issue.

> -my $end_lsn = $whiskey->lsn('insert');
> +my $end_lsn = $whiskey->lsn('flush');

Thank you, I used this one.

Regards

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2022-12-23 17:09:18 BUG #17730: Trigger Issue
Previous Message Karina Litskevich 2022-12-23 13:54:56 [PATCH] BUG FIX: inconsistent page found in BRIN_REGULAR_PAGE