pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Thom Brown <thom@linux.com>
Cc: Dimitri Fontaine <dimitri@2ndquadrant.fr>
Cc: pgsql-hackers@postgresql.org, Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Command Triggers, patch v11
Date: Fri, 09 Mar 2012 18:29:55 +0100
Message-ID: <m2eht1ptrg.fsf@2ndQuadrant.fr> (raw )
In-Reply-To: <CA+TgmoYPSkm7BVaNZasKXB3O=bh1ewX3PzWKF8pODMRzXS5HaQ@mail.gmail.com >
References: <m24nufq466.fsf@2ndQuadrant.fr >
<CAA-aLv4kv3DXuwXdDyU2qcWLjvYCsVo5=qTZq+t8uk5S9sAkqQ@mail.gmail.com >
<CAA-aLv5paBN4P-cXUsu=KMQva-SCSjo9MpzM6szYFt5wqeFkeg@mail.gmail.com >
<201203041650.39826.andres@anarazel.de >
<CAA-aLv66UQ3mqsk96AUhc9zqw8hwEPdCrGHv81+F3=puSiw5Jg@mail.gmail.com >
<m2mx7uye3r.fsf@2ndQuadrant.fr >
<CAA-aLv6SioRE8MAED2z=0c2NZpf1q5jztwjzE6+gvGLbniV7aw@mail.gmail.com >
<m2ty21fnkw.fsf@2ndQuadrant.fr >
<CAA-aLv5-KAMD_PMEUK=SiG_OBdM4jiQ3O=kpw8fZM+-Uq4PJ1g@mail.gmail.com >
<CAA-aLv46eeyi_ecPLOaY61OL5e+BWkba4_qrJ7V+=u2afbwCMg@mail.gmail.com >
<CAA-aLv6qP56ktrjmfqPpOQHySCXU9b5Dz-ZJvNq1M9XP2cPhHw@mail.gmail.com >
<CA+TgmoajeRakMPes_b63T++e9idLSZLnPC2WgL9fPAOXeMveVQ@mail.gmail.com >
<CAA-aLv5ORQ5YhcFnPphLYjpYgAVqXBbGtdMVTitGhAqw2b2PWg@mail.gmail.com >
<CA+TgmoYPSkm7BVaNZasKXB3O=bh1ewX3PzWKF8pODMRzXS5HaQ@mail.gmail.com >
Robert Haas <robertmhaas@gmail.com> writes:
> I'm not convinced. Right now, it's fairly useless - all the triggers
> could possibly do is throw an error, and an error is going to get
> thrown anyway, so it's only a question of which error message the user
> will see. But we discussed before the idea of adding a capability for
> BEFORE triggers to request that the actual execution of the command
> get skipped, and then it's possible to imagine this being useful.
> Someone could even use a command trigger that detects which machine
> it's running on, and if it's the standby, uses dblink to execute the
> command on the master, or something crazy like that. Command triggers
> could also be useful for logging all attempts to execute a particular
> command, which is probably still appropriate on the standby.
There are some other use cases, like using plsh to go apt-get install an
extension's package when you see the master just created it, so that
your read only queries on the hot standby have a chance of loading the
code you need.
Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
view thread (115+ messages) latest in thread
Message-ID: <m2eht1ptrg.fsf@2ndQuadrant.fr>
Permalink: ../m2eht1ptrg.fsf@2ndQuadrant.fr/
Also on: postgresql.org/message-id/m2eht1ptrg.fsf@2ndQuadrant.fr
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: dimitri@2ndQuadrant.fr, robertmhaas@gmail.com, thom@linux.com, andres@anarazel.de, tgl@sss.pgh.pa.us
Subject: Re: Command Triggers, patch v11
In-Reply-To: <m2eht1ptrg.fsf@2ndQuadrant.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox