Re: vacuum_truncate configuration parameter and isset_offset - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: vacuum_truncate configuration parameter and isset_offset
Date
Msg-id Z-GoR_E3Sggfk-Fz@nathan
Whole thread Raw
In response to Re: vacuum_truncate configuration parameter and isset_offset  (Nikolay Shaplov <dhyan@nataraj.su>)
Responses Re: vacuum_truncate configuration parameter and isset_offset
Re: vacuum_truncate configuration parameter and isset_offset
Re: vacuum_truncate configuration parameter and isset_offset
List pgsql-hackers
On Mon, Mar 24, 2025 at 09:03:11PM +0300, Nikolay Shaplov wrote:
> В письме от понедельник, 24 марта 2025 г. 20:48:29 MSK пользователь Nathan 
> Bossart написал:
> 
>> For the sake of discussion, here is what the enum approach would look like.
> 
> In my point of view this solution is much-much better: it achieves all goals, 
> has no drawbacks, and do not change reloption engine. 

I think this change would probably work fine, but it does have a couple of
drawbacks:

* We'll need to make it really clear in comments why you would want to use
  this enum instead of making it a Boolean reloption.  That's not a big
  deal.

* 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 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 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.  

-- 
nathan



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Add Postgres module info
Next
From: Lukas Fittl
Date:
Subject: Re: Proposal - Allow extensions to set a Plan Identifier