From: | Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | Joel Jacobson <joel(at)trustly(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com> |
Subject: | Re: Autonomous Transaction is back |
Date: | 2015-07-28 06:31:06 |
Message-ID: | CAFjFpRe5dx1aWTEin9zgAB_pkFFa9ciSUNSDRvObEQiF8Vd4ZA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Ah, you're missing how commits in ATX are expected to work. Let me
> illustrate:
>
> X (
> Data write A1
> call Y(
> Start ATX
> Data write B1
> Commit ATX
> )
> Data write A2
> Exception
> )
>
> In this workflow, B1 would be committed and persistent. Neither A1 nor
> A2 would be committed, or visible to other users. Depending on what
> implementation we end up with, A1 might not even be visible to Y().
>
>
A1 should never be visible to Y(), else we will end up with
inconsistencies. E.g.
A1 is a primary key and B1 writes a foreign key referencing A1. Commit ATX,
will not complain as it sees A1, but in case X rolls back, we may have B1
referencing nothing.
Am I missing something?
--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-07-28 07:10:29 | Re: WIP: Make timestamptz_out less slow. |
Previous Message | Amit Langote | 2015-07-28 05:48:38 | Re: [DESIGN] ParallelAppend |