public inbox for [email protected]  
help / color / mirror / Atom feed
From: Junior Longtom <[email protected]>
To: [email protected]
Subject: Update documentation to note that REFRESH MATERIALIZED VIEW CONCURRENTLY uses the pg_temp tablespace
Date: Tue, 10 Feb 2026 14:36:43 +0200
Message-ID: <CAH6w847gyfxK7pamDutZCoW5n7DAdwo8LnHZSDTMMFhSU8i41g@mail.gmail.com> (raw)

Good day,

Currently the documentation for REFRESH MATERIALIZED VIEW does not contain
a note that the temporary tablespace is used. It is an implementation
detail, but using the temporary tablespace will block PREPARE TRANSACTION
with an error. I think it would be useful to note that on the docs:

ERROR:  cannot PREPARE a transaction that has operated on temporary objects

I think it is worth adding a note to the CONCURRENTLY section on the docs
to state that it will use the temporary tablespace and prevent using
PREPARE TRANSACTION.

It might make sense to update the error message as well. Let me know and I
will raise it on another mailing list as well.

The code that shows the use of the temp tablespace (it was a quick check
from my end, so my conclusion might be wrong):
https://github.com/postgres/postgres/blob/f33c585774223757b01c8eddd134d364492ed94c/src/backend/comma...

Let me know if you need more information.

Kind Regards
Herman


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]
  Subject: Re: Update documentation to note that REFRESH MATERIALIZED VIEW CONCURRENTLY uses the pg_temp tablespace
  In-Reply-To: <CAH6w847gyfxK7pamDutZCoW5n7DAdwo8LnHZSDTMMFhSU8i41g@mail.gmail.com>

* 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