Re: GUC for temporarily disabling event triggers

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Mikhail Gribkov <youzhick(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: GUC for temporarily disabling event triggers
Date: 2023-04-05 14:30:56
Message-ID: CA+TgmoYJdpN6AJ87q0sEY+NEee9SkMyLp-W-kSdkYpwi6yP3+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 5, 2023 at 4:57 AM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
> > - Being able to write a list of event triggers working would be much
> > more interesting than just individual elements.
> > - There may be an argument for negated patterns? Say,
> > a "!sql_drop,!ddl_command_start" would cause sql_drop and
> > ddl_command_start to be disabled with all the others enabled, and one
> > should not ne able to mix negated and non-negated patterns.
>
> I'm not convinced that it's in our interest to offer a GUC to configure the
> cluster by selectively turning off SQL features. The ones we have for planner
> tuning which is a different beast. At the very least it should be in a thread
> covering that topic, as it might be a bit hidden here.

But, isn't that exactly what you're proposing?

I mean if this was just event_triggers = on | off it would be exactly
like row_security and as far as I'm concerned there would be nothing
to debate. But it sounded like you wanted something finer-grained that
could disable certain kinds of event triggers. That's also what
MIchael is proposing, just with different syntax. In other words,
where you would say ignore_event_triggers = sql_drop, he'd say
event_triggers = !sql_drop.

Maybe we should back up and ask why we need more than "on" and "off".
If somebody is using this feature in any form more than very
occasionally, they should really go home and reconsider their database
schema.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Imseih (AWS), Sami 2023-04-05 14:31:54 Re: Add index scan progress to pg_stat_progress_vacuum
Previous Message David G. Johnston 2023-04-05 14:24:16 Re: psql: Add role's membership options to the \du+ command