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/commands/matview.c#L301-L306

Let me know if you need more information.

Kind Regards
Herman

Reply via email to