pgsql: Fix possible "tuple concurrently updated" error in ALTER TABLE.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix possible "tuple concurrently updated" error in ALTER TABLE.
Date: 2011-03-19 02:12:43
Message-ID: E1Q0lel-0003LF-5E@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix possible "tuple concurrently updated" error in ALTER TABLE.

When adding an inheritance parent to a table, an AccessShareLock on the
parent isn't strong enough to prevent trouble, so take
ShareUpdateExclusiveLock instead. Since this is a behavior change,
albeit a fairly unobtrusive one, and since we have only one report
from the field, no back-patch.

Report by Jon Nelson, analysis by Alvaro Herrera, fix by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/fbcf4b92aa64d4577bcf25925b055316b978744a

Modified Files
--------------
src/backend/commands/tablecmds.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2011-03-19 02:19:09 Re: pgsql: Document the all-balls IPv6 address.
Previous Message Robert Haas 2011-03-19 01:47:24 pgsql: Move synchronous_standbys_defined updates from WAL writer to BG