From 86486e1a942c68c528205037c8244ef9046a8b83 Mon Sep 17 00:00:00 2001
From: Daniil Davidov <d.davydov@postgrespro.ru>
Date: Tue, 21 Apr 2026 20:03:52 +0700
Subject: [PATCH v1 2/2] Improve error message for accessing temp buffers in
 parallel worker

Replace the word "table" with "relaton" as we do in the previous patch,
since temp buffers initialization may be caused by accessing any type
of object (table, index, etc.)
---
 src/backend/storage/buffer/localbuf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c
index 396da84b25c..4572511c044 100644
--- a/src/backend/storage/buffer/localbuf.c
+++ b/src/backend/storage/buffer/localbuf.c
@@ -748,7 +748,7 @@ InitLocalBuffers(void)
 	int			i;
 
 	/*
-	 * Parallel workers can't access data in temporary tables, because they
+	 * Parallel workers can't access data in temporary relations, because they
 	 * have no visibility into the local buffers of their leader.  This is a
 	 * convenient, low-cost place to provide a backstop check for that.  Note
 	 * that we don't wish to prevent a parallel worker from accessing catalog
@@ -758,7 +758,7 @@ InitLocalBuffers(void)
 	if (IsParallelWorker())
 		ereport(ERROR,
 				(errcode(ERRCODE_INVALID_TRANSACTION_STATE),
-				 errmsg("cannot access temporary tables during a parallel operation")));
+				 errmsg("cannot access temporary relations during a parallel operation")));
 
 	/* Allocate and zero buffer headers and auxiliary arrays */
 	LocalBufferDescriptors = (BufferDesc *) calloc(nbufs, sizeof(BufferDesc));
-- 
2.43.0

