pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: John Lumby <johnlumby@hotmail.com>
To: pgsql general <pgsql-general@postgresql.org>
Subject: Re: access to original-statement predicates in an INSTEAD-OF row trigger
Date: Fri, 15 Nov 2019 14:38:14 -0800
Message-ID: <6ea3b732-1f37-41c9-29a1-65f3aaebb6cd@aklaver.com> (raw)
In-Reply-To: <DM6PR06MB5562FB8507E487AD13F2D655A3700@DM6PR06MB5562.namprd06.prod.outlook.com>
References: <DM6PR06MB55626255D26D1F4ABFB36B0EA3700@DM6PR06MB5562.namprd06.prod.outlook.com>
	<f7529e3b-330f-9d8d-6f2d-d36582e54150@aklaver.com>
	<DM6PR06MB5562745164BAFB15D805993EA3700@DM6PR06MB5562.namprd06.prod.outlook.com>
	<8abf71b6-26b0-3d7e-f02c-9c33f323d792@aklaver.com>
	<DM6PR06MB55629A7224717C7237CEB011A3700@DM6PR06MB5562.namprd06.prod.outlook.com>
	<DM6PR06MB5562FB8507E487AD13F2D655A3700@DM6PR06MB5562.namprd06.prod.outlook.com>

On 11/15/19 1:54 PM, John Lumby wrote:
> Adrian Klaver wrote :
>> 
>> Seems you are looking for Serializable Isolation Level:
>> 
> 
> True ,   that would solve the race condition,  but it is too drastic.
> We need to run with Read Committed.
> 
> I am looking for a solution which does not alter the application or 
> overall behaviour,
> but just addresses detecting which predicates to apply in some way.

Not sure how that could be pulled off with Read Committed as it would 
involve predicting the future from the POV of the transaction.

> 
> Cheers,  John
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (8+ messages)  latest in thread

Message-ID: <6ea3b732-1f37-41c9-29a1-65f3aaebb6cd@aklaver.com>
Permalink:  ../6ea3b732-1f37-41c9-29a1-65f3aaebb6cd@aklaver.com/
Also on:    postgresql.org/message-id/6ea3b732-1f37-41c9-29a1-65f3aaebb6cd@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, johnlumby@hotmail.com
  Subject: Re: access to original-statement predicates in an INSTEAD-OF row trigger
  In-Reply-To: <6ea3b732-1f37-41c9-29a1-65f3aaebb6cd@aklaver.com>
  References: <DM6PR06MB55626255D26D1F4ABFB36B0EA3700@DM6PR06MB5562.namprd06.prod.outlook.com> <f7529e3b-330f-9d8d-6f2d-d36582e54150@aklaver.com> <DM6PR06MB5562745164BAFB15D805993EA3700@DM6PR06MB5562.namprd06.prod.outlook.com> <8abf71b6-26b0-3d7e-f02c-9c33f323d792@aklaver.com> <DM6PR06MB55629A7224717C7237CEB011A3700@DM6PR06MB5562.namprd06.prod.outlook.com> <DM6PR06MB5562FB8507E487AD13F2D655A3700@DM6PR06MB5562.namprd06.prod.outlook.com> <6ea3b732-1f37-41c9-29a1-65f3aaebb6cd@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox