Re: Question about RI checks - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: Question about RI checks
Date
Msg-id 05D9F5C7-36C5-4A8B-AE8C-D77B247D10A8@phlo.org
Whole thread Raw
In response to Re: Question about RI checks  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: Question about RI checks
List pgsql-hackers
> This should not be considered a problem for repeatable read
> transactions because the change in visible rows meet the definition
> of phantom reads, which are allowed in repeatable read: "A
> transaction re-executes a query returning a set of rows that
> satisfy a search condition and finds that the set of rows
> satisfying the condition has changed due to another
> recently-committed transaction."

Now I'm confused. Isn't the whole point of REPEATABLE READ to provide, well, repeatable reads? Also, note that after
theDELETE FROM parent, further SELECTS in the same transaction will use the original snapshot again, und thus will see
theconflicting child rows again that were ignored by the RI trigger. But they won't, of course, see the parent row. 

IOW, transaction A will, after the delete, see a state of the database in which the PK constraint is broken. I don't
thinkthat's acceptable in any isolation level. 

Best regards,
Florian Pflug


pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: idea: allow AS label inside ROW constructor
Next
From: Kevin Grittner
Date:
Subject: Re: Question about RI checks