Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitac5bdf6

Browse files
committed
Fix buggy logic in isTempNamespaceInUse()
The logic introduced in this routine as of246a6c8 would report anincorrect result when a session calls it to check if the temporarynamespace owned by the session is in use or not. It is possible tooptimize more the routine in this case to avoid a PGPROC lookup, butlet's keep the logic simple. As this routine is used only by autovacuumfor now, there were no live bugs, still let's be correct for any futurecode involving it.Author: Michael PaquierReviewed-by: Julien RouhaudDiscussion:https://postgr.es/m/20200113093703.GA41902@paquier.xyzBackpatch-through: 11
1 parent4d8a8d0 commitac5bdf6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/catalog/namespace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3235,8 +3235,8 @@ isTempNamespaceInUse(Oid namespaceId)
32353235

32363236
backendId=GetTempNamespaceBackendId(namespaceId);
32373237

3238-
if (backendId==InvalidBackendId||
3239-
backendId==MyBackendId)
3238+
/* No such temporary namespace? */
3239+
if (backendId==InvalidBackendId)
32403240
return false;
32413241

32423242
/* Is the backend alive? */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp