pgsql: Fix buggy logic in isTempNamespaceInUse()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix buggy logic in isTempNamespaceInUse()
Date: 2020-01-15 05:00:04
Message-ID: E1irami-0006lV-7A@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix buggy logic in isTempNamespaceInUse()

The logic introduced in this routine as of 246a6c8 would report an
incorrect result when a session calls it to check if the temporary
namespace owned by the session is in use or not. It is possible to
optimize more the routine in this case to avoid a PGPROC lookup, but
let's keep the logic simple. As this routine is used only by autovacuum
for now, there were no live bugs, still let's be correct for any future
code involving it.

Author: Michael Paquier
Reviewed-by: Julien Rouhaud
Discussion: https://postgr.es/m/20200113093703.GA41902@paquier.xyz
Backpatch-through: 11

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ac5bdf62617507b1942f6124a2696c04a16fca04

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

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2020-01-15 14:10:28 pgsql: Remove libpq.rc, use win32ver.rc for libpq
Previous Message Amit Kapila 2020-01-15 01:57:34 pgsql: Introduce IndexAM fields for parallel vacuum.