Re: set_config() documentation clarification

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Joel Jacobson <joel(at)compiler(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: set_config() documentation clarification
Date: 2021-01-05 21:48:00
Message-ID: 3425846.1609883280@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> On Tue, Jan 5, 2021 at 08:23:15PM +0100, Joel Jacobson wrote:
>> út 5. 1. 2021 v 18:51 odesílatel Bruce Momjian <bruce(at)momjian(dot)us> napsal:
>>> I think I tried to make this feature more visible a few years ago and
>>> some people said we might remove it someday, so don't do that. If that
>>> is false, I think we can make it more prominent.

>> I think it's false.

> Oh, I know it is useful. My pg_cryptokey uses it:
> https://momjian.us/download/pgcryptokey/

People use it because we don't have a better substitute. But I think
the way forward is to create a better substitute, not to encourage
abuse of custom GUCs ... and this is an abuse. Two good reasons why
are

* there's no way to declare a data type for such a variable from SQL

* guc.c is not designed to scale to large numbers of variables,
nor to heavy update activity.

I've not looked at Pavel's "schema variables" patch lately, but
maybe people who are interested in this should be pushing that
forward.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2021-01-05 21:54:30 Re: Deleting older versions in unique indexes to avoid page splits
Previous Message Tom Lane 2021-01-05 21:40:46 Re: plpgsql variable assignment with union is broken