pgsql: pgrowlocks: Reject unlogged and temp tables during recovery

Started by Michael Paquier16 days ago1 messagescommitters
Jump to latest
#1Michael Paquier
michael@paquier.xyz

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.jones@uni-muenster.de>
Reported-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Surya Poondla <suryapoondla4@gmail.com>
Discussion: /messages/by-id/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(+)