Re: Reserve prefixes for loaded libraries proposal - Mailing list pgsql-hackers

From Florin Irion
Subject Re: Reserve prefixes for loaded libraries proposal
Date
Msg-id CA+HEvJDT2ZzrHFyPeOOmJDtayhzWVnJhWAruz1hPqSd2UpCj9w@mail.gmail.com
Whole thread Raw
In response to Re: Reserve prefixes for loaded libraries proposal  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Hi,

Il giorno gio 21 ott 2021 alle ore 08:02 Michael Paquier <michael@paquier.xyz> ha scritto:
>
> On Thu, Sep 30, 2021 at 11:54:04PM +0200, Florin Irion wrote:
> > We could also help users get a warning if they set a parameter with the
> > `SET`
> > command. I've seen many cases where users make typos and break things badly,
> > check the following example:
> >
> > ```
> > postgres=# BEGIN;
> > BEGIN
> > postgres=*# SET plpgsql.no_such_setting = false;
> > SET
> > postgres=*# -- do critical queries taking into account that
> > plpgsql.no_such_setting is false;
> > postgres=*# COMMIT;
> > COMMIT
> > ```
>
> Could you give a more concrete example here?  What kind of critical
> work are you talking about here when using prefixes?  Please note that
> I am not against the idea of improving the user experience in this
> area as that's inconsistent, as you say.
> --
> Michael

Thank you for the interest.

I used `plpgsql` in my example/test because it's something that many of
us know already.

However, for example, pglogical2 has the `pglogical.conflict_resolution`
configuration parameter that can be set to one of the following:

```
error
apply_remote
keep_local
last_update_wins
first_update_wins
```

You can imagine that conflicting queries could have different outcomes
based on this setting.
IMHO there are other settings like this, in other extensions, that can
be critical.

In any case, even setting something that is not critical could still
be important for a user, one example, `pg_stat_statements.track`.

Cheers,
Florin

--
Florin Irion

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: pg_dump versus ancient server versions
Next
From: Robert Haas
Date:
Subject: Re: pg_dump versus ancient server versions