Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints
Date: 2022-02-13 04:42:38
Message-ID: CAFiTN-uEyFbON5md0UAB8Y=k8J7V-Jt2uiJcNY1zW-G6BZjeqQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Feb 12, 2022 at 2:38 AM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> On 2022-Feb-11, Robert Haas wrote:
>
> > What I find difficult about doing that is that this is all a bunch of
> > technical details that users may have difficulty understanding. If we
> > say WAL_LOG or WAL_LOG_DATA, a reasonably but not incredibly
> > well-informed user will assume that skipping WAL is not really an
> > option. If we say CHECKPOINT, a reasonably but not incredibly
> > well-informed user will presume they don't want one (I think).
> > CHECKPOINT also seems like it's naming the switch by the unwanted side
> > effect, which doesn't seem too flattering to the existing method.
>
> It seems you're thinking deciding what to do based on an option that
> gets a boolean argument. But what about making the argument be an enum?
> For example
>
> CREATE DATABASE ... WITH (STRATEGY = LOG); -- default if option is omitted
> CREATE DATABASE ... WITH (STRATEGY = CHECKPOINT);
>
> So the user has to think about it in terms of some strategy to choose,
> rather than enabling or disabling some flag with nontrivial
> implications.

Yeah I think being explicit about giving the strategy to the user
looks like a better option. Now they can choose whether they want it
to create using WAL log or using CHECKPOINT. Otherwise, if we give a
flag then we will have to give an explanation that if they choose not
to WAL log then we will have to do a checkpoint internally. So I
think giving LOG vs CHECKPOINT as an explicit option looks better to
me.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-02-13 04:50:41 Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set
Previous Message Tom Lane 2022-02-13 04:12:50 Re: pgsql: Add suport for server-side LZ4 base backup compression.