Re: vacuum_truncate configuration parameter and isset_offset

From: Nikolay Shaplov <dhyan(at)nataraj(dot)su>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Robert Treat <rob(at)xzilla(dot)net>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Albe <laurenz(dot)albe(at)cybertec(dot)at>, Gurjeet Singh <gurjeet(at)singh(dot)im>, Will Storey <will(at)summercat(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: vacuum_truncate configuration parameter and isset_offset
Date: 2025-03-24 19:12:05
Message-ID: 3179073.PIDvDuAF1L@thinkpad-pgpro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

В письме от понедельник, 24 марта 2025 г. 21:45:27 MSK пользователь Nathan
Bossart написал:
> * We'd need to decide what to say on the documentation side. My first
> instinct is that we should just leave it as "boolean" because otherwise
> we're going to describe something that sounds an awful lot like a
> Boolean.

I think that "boolean-like" is a good word for describing it.

> * I don't think this matches the parse_bool() behavior exactly. For
> example, parse_bool() appears to accept inputs like "t" to mean "true".
> This is also probably not a huge deal.

That was me, who added Enum Reloption to the postgres code, and it was Alvaro
(if I recall correctly) who improved StdRdOptIndexCleanupValues option list to
it's current state. I would trust him here, since, if I recall correctly he is
original author of reloptions the way we know them.

But if "t" is really missing I think we can patch both
StdRdOptIndexCleanupValues and StdRdOptBoolValues to have "t". But in separate
commit.

Moreover if this Boolean-Based enum is a common case, we can think about
adding some basic template, that can be extended by adding "auto" value, or
not-set value and so on. But I do not think that two cases makes it common
case.

> That being said, I'm open to applying this patch if it seems like a
> majority of folks prefer this implementation. FWIW I'm still partial to
> the isset_offset approach for the reasons I've already discussed.

I am for a long while working with reloptions, and can say, that almost nobody
fully understand the idea, how it work and how it was designed. So I would
suggest follow Alvaro, since he is keeper of that knowledge.

And second general idea: changing engine is bad, at least when you can manage
without changing it. We can, your patch proves it.

--
Nikolay Shaplov aka Nataraj
Fuzzing Engineer at Postgres Professional
Matrix IM: @dhyan:nataraj.su

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alena Rybakina 2025-03-24 19:21:24 Re: Proposal - Allow extensions to set a Plan Identifier
Previous Message Robert Haas 2025-03-24 19:11:19 Re: vacuum_truncate configuration parameter and isset_offset