Thread: pgsql: Avoid retaining multiple relation locks in RangeVarGetRelid.

pgsql: Avoid retaining multiple relation locks in RangeVarGetRelid.

From
Robert Haas
Date:
Avoid retaining multiple relation locks in RangeVarGetRelid.

If it turns out we've locked the wrong OID, release the old lock.  In
most cases, it's pretty harmless to retain the extra lock, but this
seems tidier and avoids using lock table slots unnecessarily.

Per discussion with Tom Lane.

Branch
------
master

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

Modified Files
--------------
src/backend/catalog/namespace.c |   13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)