public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: BUG #19437: temp_tablespaces doesn't work inside a cursor?
Date: Wed, 25 Mar 2026 09:31:41 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

PG Bug reporting form <[email protected]> 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






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: BUG #19437: temp_tablespaces doesn't work inside a cursor?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox