From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't throw an error for LOCK TABLE on a self-referential view.
Date: Thu, 05 Nov 2020 16:44:48 +0000
Message-ID: <E1kaiNU-00049n-A6@gemulon.postgresql.org> (raw)
Don't throw an error for LOCK TABLE on a self-referential view.
LOCK TABLE has complained about "infinite recursion" when applied
to a self-referential view, ever since we made it recurse into views
in v11. However, that breaks pg_dump's new assumption that it's
okay to lock every relation. There doesn't seem to be any good
reason to throw an error: if we just abandon the recursion, we've
still satisfied the requirement of locking every referenced relation.
Per bug #16703 from Andrew Bille (via Alexander Lakhin).
Discussion: https://postgr.es/m/16703-e348f58aab3cf6cc@postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5b7bfc39726ff9f6c52dd73e337c34e74e0d1f39
Modified Files
--------------
src/backend/commands/lockcmds.c | 21 ++++++++++++---------
src/test/regress/expected/lock.out | 4 +---
src/test/regress/sql/lock.sql | 2 +-
3 files changed, 14 insertions(+), 13 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Don't throw an error for LOCK TABLE on a self-referential view.
In-Reply-To: <E1kaiNU-00049n-A6@gemulon.postgresql.org>
References: <E1kaiNU-00049n-A6@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox