Skip site navigation (1) Skip section navigation (2)

Re: Proposal: Change of pg_trigger.tg_enabled and adding

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jim Nasby <decibel(at)decibel(dot)org>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: Change of pg_trigger.tg_enabled and adding
Date: 2007-02-03 21:50:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Attached is the implementation of the proposed changes as a patch for 

The chosen syntax is backward compatible and uses

ALTER TABLE <tab> ENABLE TRIGGER <trig> (fires on origin - default)
ALTER TABLE <tab> DISABLE TRIGGER <trig> (disabled)
ALTER TABLE <tab> ENABLE REPLICA TRIGGER <trig> (fires on replica only)
ALTER TABLE <tab> ENABLE ALWAYS TRIGGER <trig> (fires always)

A sessions current role is controlled by the PG_SUSET GUC 
session_replication_role. The possible states are origin, replica and 
local. The local state is identical to origin with respect to trigger 
firing. It is intended to be used to issue statements that do not get 
replicated at all.

The commands psql and pg_dump are adjusted in a backward compatible 
manner. Although I noticed that psql currently is incompatible with at 
least 8.1 databases due to querying indisvalid on \d.



# 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 #

Attachment: replica_trigger.diff
Description: text/plain (26.7 KB)

In response to


pgsql-hackers by date

Next:From: Theo SchlossnagleDate: 2007-02-03 21:58:27
Subject: Re: Proposal: Commit timestamp
Previous:From: Jan WieckDate: 2007-02-03 21:38:51
Subject: Re: Proposal: Commit timestamp

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group