Re: using an end-of-recovery record in all cases

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, Amul Sul <sulamul(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: using an end-of-recovery record in all cases
Date: 2022-04-20 17:16:20
Message-ID: CA+hUKGJwOf0bkadnHb=tFUrRo6Pai4EGeHM3DXeaUZu1HSUEKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 21, 2022 at 5:02 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
> I do see the problem if we drop an existing relation, crash, reuse the
> filenode, and then crash again (all within the same checkpoint cycle). The
> first recovery would remove the tombstone file, and the second recovery
> would wipe out the new relation's files.

Right, the double-crash case is what I was worrying about. I'm not
sure, but it might even be more likely than usual that you'll reuse
the same relfilenode after the first crash, because the OID allocator
will start from the same value.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2022-04-20 17:21:18 Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file
Previous Message Tom Lane 2022-04-20 17:03:45 Re: Query generates infinite loop