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

Commit5ec7bd8

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 parent749f702 commit5ec7bd8

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
@@ -3233,8 +3233,8 @@ isTempNamespaceInUse(Oid namespaceId)
32333233

32343234
backendId=GetTempNamespaceBackendId(namespaceId);
32353235

3236-
if (backendId==InvalidBackendId||
3237-
backendId==MyBackendId)
3236+
/* No such temporary namespace? */
3237+
if (backendId==InvalidBackendId)
32383238
return false;
32393239

32403240
/* Is the backend alive? */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp