Re: pg_upgrade's interaction with pg_resetwal seems confusing

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Hou, Zhijie/侯 志杰 <houzj(dot)fnst(at)fujitsu(dot)com>
Subject: Re: pg_upgrade's interaction with pg_resetwal seems confusing
Date: 2023-10-12 18:30:20
Message-ID: CA+TgmoZBASARka96OXtkfnisCWeUKD5_L5T0Gkd3x8bufAd6pA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 12, 2023 at 7:17 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> Now, as mentioned in the first paragraph, it seems we anyway don't
> need to reset the WAL at the end when setting the next OID for the new
> cluster with the -o option. If that is true, then I think even without
> slots work it will be helpful to have such an option in pg_resetwal.
>
> Thoughts?

I wonder if we should instead provide a way to reset the OID counter
with a function call inside the database, gated by IsBinaryUpgrade.
Having something like pg_resetwal --but-dont-actually-reset-the-wal
seems both self-contradictory and vulnerable to abuse that we might be
better off not inviting.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2023-10-12 18:38:11 Re: Pro et contra of preserving pg_proc oids during pg_upgrade
Previous Message Robert Haas 2023-10-12 18:20:01 Re: Pro et contra of preserving pg_proc oids during pg_upgrade