Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w5OLt-003Cet-17 for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Mar 2026 13:32:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5OKs-00E6zx-1I for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Mar 2026 13:31:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w5OKs-00E6zp-0W for pgsql-bugs@lists.postgresql.org; Wed, 25 Mar 2026 13:31:50 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w5OKp-000000014Xk-3CCm for pgsql-bugs@lists.postgresql.org; Wed, 25 Mar 2026 13:31:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 62PDVfW9233969; Wed, 25 Mar 2026 09:31:41 -0400 From: Tom Lane To: kuzmin.db4@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19437: temp_tablespaces doesn't work inside a cursor? In-reply-to: <19437-0a65fb52d0f13a0d@postgresql.org> References: <19437-0a65fb52d0f13a0d@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Wed, 25 Mar 2026 10:02:09 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <233967.1774445501.1@sss.pgh.pa.us> Date: Wed, 25 Mar 2026 09:31:41 -0400 Message-ID: <233968.1774445501@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > I'm seeing strange behavior in Postgres when changing the temp_tablespaces > parameter and suspect a bug. At least, I haven't found a description of this > behavior in the documentation. I think you are imagining that pg_reload_conf() is a synchronous operation. It is not. It merely signals the postmaster process to start a configuration reload. After the postmaster has done that, it in turn signals all its children to reload configuration. If memory serves, a child process honors that signal next time it arrives at its outer wait-for-a-command loop. So it's not exactly surprising if your script is able to execute a command or three before it takes up the ALTER SYSTEM changes. (Your log shows that it can get through several commands before the postmaster even gets the reload signal, let alone sends it back.) If you want to set temp_tablespaces locally and have it take effect immediately, just use SET. ALTER SYSTEM is quite the wrong tool for the job. > Ensure that temporary files are created in it: > \o /dev/null What does "\o /dev/null" have to do with this? That's a psql-side operation. regards, tom lane