On 1/25/2007 6:55 PM, Tom Lane wrote:
> Jan Wieck <JanWieck@Yahoo.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@Yahoo.com #