Re: Good News Everyone! + feature proposal

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Jon Erdman <jon(at)thewickedtribe(dot)net>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Good News Everyone! + feature proposal
Date: 2023-10-05 19:54:29
Message-ID: 232d4e8eb1ca286d86deb605a478badea3be55df.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2023-10-05 at 14:58 +0000, Jon Erdman wrote:
> > > > For the proposal (this one is a bit Apple specific): because my team
> > > > offers managed postgres to our Apple-internal customers, many of whom
> > > > are not database experts, or at least not postgres experts, we'd like to
> > > > be able to toggle the availability of UNLOGGED tables in
> > > > postgresql.conf, so our less clueful users have fewer footguns.
>
> Someone on linked-in suggested an event trigger, so now I'm thinking of
> a custom extension that would do nothing but create said event trigger,
> and maybe could be toggled with a customized setting (but that might
> allow users to turn it off themselves...which is maybe ok).

An event trigger is the perfect solution for this requirement.

> If the extension were installed by the DBA user, the customer wouldn't
> be able to drop it, and if we decided to give them an exception, we just
> drop or disable the extension.

Right. Also, only a superuser can create or drop event triggers.

> As a second more general question: could my original idea (i.e. sans
> event trigger) be implemented in an extension somehow, or is that not
> technically possible (I suspect not)?

You could perhaps use "object_access_hook" in an extension.

Yours,
Laurenz Albe

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-10-05 20:04:04 Re: Allow tests to pass in OpenSSL FIPS mode
Previous Message Nico Williams 2023-10-05 19:52:37 Re: Pre-proposal: unicode normalized text