Re: Allowing DML RULEs that produce Read Only actions during RO xacts - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Allowing DML RULEs that produce Read Only actions during RO xacts
Date
Msg-id 1260114400.13774.45329.camel@ebony
Whole thread Raw
In response to Re: Allowing DML RULEs that produce Read Only actions during RO xacts  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Allowing DML RULEs that produce Read Only actions during RO xacts
List pgsql-hackers
On Sun, 2009-12-06 at 10:26 -0500, Tom Lane wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
> > I would like to allow RULEs ON INSERT, ON UPDATE and ON DELETE during
> > read only transactions iff they generate only SELECT statements that act
> > INSTEAD OF the actual event.
> 
> I don't actually believe there is any use case for such a thing.
> 
> > This would be a small, but useful additional feature for Hot Standby,
> > since it would allow INSERT, UPDATE, DELETE statements to be re-routed,
> > for various applications.
> 
> How would you "reroute" them without a non-read-only operation happening
> somewhere along the line?

I showed how in my example. The non-read-only operation happens on a
remote server.

If there are additional technical reasons why not, that's fine.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Allowing DML RULEs that produce Read Only actions during RO xacts
Next
From: Tom Lane
Date:
Subject: Re: operator exclusion constraints