Re: recovering from "found xmin ... from before relfrozenxid ..."

From: Jochem van Dieten <jochemd(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: recovering from "found xmin ... from before relfrozenxid ..."
Date: 2020-07-14 10:54:28
Message-ID: CABPCP-12ETaz1YyZLVM9qycwYWP3q-iPRCW7+VFnzsyRSH00iw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 14, 2020 at 3:26 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I think you're attacking a straw man. I'm well aware of how open source
> works, thanks. What I'm saying is that contrib is mostly seen to be
> reasonably harmless stuff. Sure, you can overwrite data you didn't want
> to with adminpack's pg_file_write. But that's the price of having such a
> capability at all, and in general it's not hard for users to understand
> both the uses and risks of that function. That statement does not apply
> to the functions being proposed here. It doesn't seem like they could
> possibly be safe to use without very specific expert advice --- and even
> then, we're talking rather small values of "safe".

Would it be possible to make them safe(r)? For instance, truncate
only, don't freeze; only tuples whose visibility information is
corrupted; and only in non-catalog tables. What exactly is the risk in
that case? Foreign keys might not be satisfied, which might make it
impossible to restore a dump, but is that worse than what a DBA can do
anyway? I would think that it is not and would leave the database in a
state DBAs are much better equipped to deal with.
Or would it be possible to create a table like the original table
(minus any constraints) and copy all tuples with corrupted visibility
there before truncating to a dead line pointer?

Jochem

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2020-07-14 11:24:53 Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Previous Message Daniel Gustafsson 2020-07-14 10:52:23 Re: ALTER SYSTEM between upgrades