Re: Allowing DML RULEs that produce Read Only actions during RO xacts

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Allowing DML RULEs that produce Read Only actions during RO xacts
Date: 2009-12-06 15:46:40
Message-ID: 1260114400.13774.45329.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 2009-12-06 at 10:26 -0500, Tom Lane wrote:
> Simon Riggs <simon(at)2ndQuadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-12-06 15:46:48 Re: operator exclusion constraints
Previous Message Tom Lane 2009-12-06 15:26:48 Re: Allowing DML RULEs that produce Read Only actions during RO xacts