Subject: Re: Raising the SCRAM iteration count

From: "Jonathan S. Katz" <[email-masked]>
Date: Wed, 22 Feb 2023 12:21:03 -0500

On 2/22/23 8:39 AM, Daniel Gustafsson wrote:
>> On 17 Dec 2022, at 04:27, Michael Paquier <[email-masked]> wrote:
>>

>> Superuser-only GUCs should be documented as such, or do you intend to
>> make it user-settable like I suggested upthread :) ?
> 
> I don't really have strong feelings, so I reverted to being user-settable since
> I can't really present a strong argument for superuser-only.

I was going to present some weak arguments, but not worth it. Anything 
around using up CPU cycles would be true of just writing plain old queries.

> The attached is a rebase on top of master with no other additional hacking done
> on top of the above review comments.

Generally LGTM. I read through earlier comments (sorry I missed 
replying) and have nothing to add or object to.

Jonathan

---

From: Daniel Gustafsson <[email-masked]>
Date: Thu, 23 Feb 2023 15:10:05 +0100

> On 22 Feb 2023, at 18:21, Jonathan S. Katz <[email-masked]> wrote:

> Generally LGTM. I read through earlier comments (sorry I missed replying) and have nothing to add or object to.

Thanks for reviewing!

In fixing the CFBot test error in the previous version I realized through
off-list discussion that the GUC name was badly chosen.  Incorporating the
value of another GUC in the name is a bad idea, so the attached version reverts
to "scram_iterations=<int>".  Should there ever be another SCRAM method
standardized (which seems a slim chance to happen before the v17 freeze) we can
make a backwards compatible change to "<method>:<iterations> | <iterations>"
where the latter is a default for all.  Internally the variable contains
sha_256 though, that part I think is fine for readability.

--
Daniel Gustafsson