Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cb67e07

Browse files
committed
Do not cleanup temp tables in autovacuum in case of session pooling
1 parent f2ad960 commit cb67e07

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/backend/catalog/namespace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3227,7 +3227,7 @@ isTempNamespaceInUse(Oid namespaceId)
32273227
return false;
32283228

32293229
/* Does the backend own the temporary namespace? */
3230-
if (proc->tempNamespaceId != namespaceId)
3230+
if (SessionPoolSize == 0 && proc->tempNamespaceId != namespaceId)
32313231
return false;
32323232

32333233
/* all good to go */

src/backend/postmaster/postmaster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4376,7 +4376,7 @@ ScheduleSession(DatabasePool *pool, Port *port)
43764376
{
43774377
worker = pool->workers[j];
43784378
if (!worker->proc)
4379-
worker->proc = BackendPidGetProc(worker->pid);
4379+
worker->proc = BackendPidGetProcWithLock(worker->pid);
43804380
ws[j].worker = worker;
43814381
ws[j].load_average = (worker->proc && worker->proc->nSessionSchedules > 0)
43824382
? (double)worker->proc->nReadySessions / worker->proc->nSessionSchedules

0 commit comments

Comments
 (0)