pgsql: Use weaker locks when updating pg_subscription_rel

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use weaker locks when updating pg_subscription_rel
Date: 2017-04-10 19:14:07
Message-ID: E1cxelL-00071n-BW@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use weaker locks when updating pg_subscription_rel

The previously used ShareRowExclusiveLock, while technically probably
more correct, led to deadlocks during seemingly unrelated operations and
thus a poor experience. Use RowExclusiveLock, like for most similar
catalog operations. In some care cases, the user might see an error
from DDL commands.

Discussion: https://www.postgresql.org/message-id/flat/13592.1490851519%40sss.pgh.pa.us

Author: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/521fd4795e3ec3d0b263b62e5eb58e1557be9c86

Modified Files
--------------
src/backend/catalog/pg_subscription.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2017-04-10 23:57:15 pgsql: Run most pg_dump and pg_dumpall tests with --no-sync
Previous Message Andres Freund 2017-04-10 19:02:20 pgsql: Fix initialization of dsa.c free area counter.