pgsql: pgrowlocks: Reject unlogged and temp tables during recovery

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pgrowlocks: Reject unlogged and temp tables during recovery
Date: 2026-11-06 05:01:54
Message-ID: E1xPC5L-00000000Pws-14je@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pgrowlocks: Reject unlogged and temp tables during recovery

Unlogged and temporary tables have no data on a standby, and attempting
to use pgrowlocks() in this case led to this failure:

ERROR: could not open file "base/MMM/NNN": No such file or directory

These cases are now checked, failing with a proper failure. Temporary
tables from other sessions cannot be accessed, as the streaming read
APIs prevent that already.

Author: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Reported-by: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Reviewed-by: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Reviewed-by: Michael Paquier <michael(at)paquier(dot)xyz>
Reviewed-by: Surya Poondla <suryapoondla4(at)gmail(dot)com>
Discussion: https://postgr.es/m/82ba0876-6127-4770-b900-aa1bd52abfed@uni-muenster.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3c5a4dcaaa8d5bef429bd8143d1a6e9f92fa0b74

Modified Files
--------------
contrib/pgrowlocks/pgrowlocks.c | 6 ++++++
1 file changed, 6 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Tatsuo Ishii 2026-11-06 05:25:22 pgsql: Fix wrong results of some window functions with IGNORE NULLS.
Previous Message Tatsuo Ishii 2026-11-06 04:42:43 Re: pgsql: Fix infinite loop in first_value()/nth_value() with IGNORE NULLS