Re: pg_resetwal --next-transaction-id may cause database failed to restart. - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pg_resetwal --next-transaction-id may cause database failed to restart.
Date
Msg-id CA+TgmobWvNwAod-TBZ-BHRRYXmMGrzHWvmYQNA+o=j72rvbu6g@mail.gmail.com
Whole thread Raw
In response to Re: pg_resetwal --next-transaction-id may cause database failed torestart.  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Wed, Jun 24, 2020 at 11:04 AM Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> ISTM that a reasonable compromise is that if you use -x (or -c, -m, -O)
> and the input value is outside the range supported by existing files,
> then it's a fatal error; unless you use --force, which turns it into
> just a warning.

One potential problem is that you might be using --force for some
other reason and end up forcing this, too. But maybe that's OK.

Perhaps we should consider the idea of having pg_resetwal create the
relevant clog file and zero-fill it, if it doesn't exist already,
rather than leaving that to to the DBA or the postmaster binary to do
it. It seems like that is what people would want to happen in this
situation.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Juan José Santamaría Flecha
Date:
Subject: Re: TAP tests and symlinks on Windows
Next
From: Fujii Masao
Date:
Subject: Re: max_slot_wal_keep_size and wal_keep_segments