pgsql: More cleanup after failed reduced-lock-levels-for-DDL feature. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: More cleanup after failed reduced-lock-levels-for-DDL feature.
Date
Msg-id E1RHJEy-0005GV-82@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: More cleanup after failed reduced-lock-levels-for-DDL feature.  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-committers
More cleanup after failed reduced-lock-levels-for-DDL feature.

Turns out that use of ShareUpdateExclusiveLock or ShareRowExclusiveLock
to protect DDL changes had gotten copied into several places that were
not touched by either of Simon's original patches for the feature, and
thus neither he nor I thought to revert them.  (Indeed, it appears that
two of these uses were committed *after* the reversion, which just goes
to show that git merging is no panacea.)  Change these places to use
AccessExclusiveLock again.  If we ever manage to resurrect that feature,
we're going to have to think a bit harder about how to keep lock level
usage in sync for DDL operations that aren't within the AlterTable
infrastructure.

Two of these bugs are only in HEAD, but one is in the 9.1 branch too.
Alvaro found one of them, I found the other two.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5ac5980744149f062ec599015ffe7a7689dd117b

Modified Files
--------------
src/backend/catalog/toasting.c      |   10 ++++++----
src/backend/commands/trigger.c      |    2 +-
src/backend/rewrite/rewriteRemove.c |    4 ++--
3 files changed, 9 insertions(+), 7 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Try to log current the query string when a backend crashes.
Next
From: Tom Lane
Date:
Subject: pgsql: More cleanup after failed reduced-lock-levels-for-DDL feature.