Re: [15] Custom WAL resource managers, single user mode, and recovery

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [15] Custom WAL resource managers, single user mode, and recovery
Date: 2022-07-19 03:26:02
Message-ID: CAD21AoBmK0Mi4FyF-RaAKdLv2Lf10drL6g4SjjKuWe31_se0WA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Jul 15, 2022 at 12:58 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> Hi,
>
> On 2022-07-14 23:42:56 -0400, Tom Lane wrote:
> > Andres Freund <andres(at)anarazel(dot)de> writes:
> > > On 2022-07-14 20:48:57 -0400, Tom Lane wrote:
> > >> (I wonder if we shouldn't refactor this so that the postmaster
> > >> and standalone mode share more of the initialization logic.
> > >> Keeping these bits in sync seems unlikely to happen otherwise.)
> >
> > > Yes, that might be worthwhile. OTOH, I wonder if we should spend that time to
> > > remove single user mode instead - the architectural complexity really doesn't
> > > seem worth it anymore, and IMO my prototype from a few months back showed that
> > > it's feasible.
> >
> > I dunno ... if your DB is in bad enough shape that you need to resort
> > to single-user mode, you probably don't want any more moving parts
> > in the system than you absolutely have to have.
>
> Well, right now the main reason people need single user is anti-wraparound
> stuff. And there it's actively harmful (requiring a shutdown checkpoint,
> emptying shared buffers, foreground checkpoints, foreground writing of all
> WAL, etc).

IIUC single user mode is not necessarily required for anti-wraparound
vacuum cases since in failsafe mode (or disabling heap truncation etc)
we can vacuum table and advance relfrozenxid without XID allocation.

Regards,

--
Masahiko Sawada
EDB: https://www.enterprisedb.com/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Devrim Gündüz 2022-07-19 09:00:34 Re: BUG #17555: Missing rhel-9 repo
Previous Message David G. Johnston 2022-07-18 22:17:11 Re: BUG #17434: CREATE/DROP DATABASE can be executed in the same transaction with other commands