Re: Proposal: Change of pg_trigger.tg_enabled and adding

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: Change of pg_trigger.tg_enabled and adding
Date: 2007-01-26 00:25:18
Message-ID: 45B94A6E.1030606@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/25/2007 6:55 PM, Tom Lane wrote:
> Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
>> The value definitions of tg_enabled would be
>
>> A fires always
>> N fires never
>> O fires on transaction origin only
>> R fires on replica only
>
>> A new per session GUC variable, restricted to superusers, will define if
>> the session is in origin or replica mode.
>
> Are you sure two states are enough?

Good question. I don't know. I'd rather error on the safe side and make
it multiple states, for now I only have Normal and Replica mode.

>
> No particular objection, but now would be the time to think if a boolean
> is sufficient.
>
>> Likewise the system catalog pg_rewrite is extended with an attribute
>> ev_enabled. It will have the same possible values and a new command,
>
> I assume there'd be no intention of supporting on-the-fly changes of
> this setting (ie, you'd set the GUC variable once at session startup
> and not change thereafter)? Otherwise you'd have a problem with cached
> plans.

This is indeed the intended use pattern. Since it is restricted to
superusers, I don't see a particular reason why to enforce it in the
system though.

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-01-26 00:26:34 Re: No ~ operator for box, point
Previous Message Tom Lane 2007-01-25 23:55:46 Re: Proposal: Change of pg_trigger.tg_enabled and adding pg_rewrite.ev_enabled