Re: Reject access to unlogged tables in contrib modules

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Subject: Re: Reject access to unlogged tables in contrib modules
Date: 2026-10-25 11:15:59
Message-ID: fefeac18-c533-4c5a-bb42-73b73ab735b1@uni-muenster.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Kirill

On 25/10/2026 07:11, Kirill Reshke wrote:
> Then on standby:
>
> reshke=# table u_toast;
> ERROR: cannot access temporary or unlogged relations during recovery
> reshke=# SELECT octet_length(t_attrs[1])
> FROM u_snapshot,
> LATERAL heap_page_item_attrs(raw, 'u_toast'::regclass, true);
> ERROR: could not open file "base/16384/16393": No such file or directory
> CONTEXT: SQL function "heap_page_item_attrs" statement 1

Nice catch! I could reproduce the error and can confirm that your patch
fixes it -- now merged into 0001. The remaining patches 0002 - 0004
remain unchanged.
>
> attached fixes an issue.
> Also, Im +0.5 on not creating a TAP test for that -- too many cpu
> cycles for too little benefit.

Yeah, this is was my rationale as well.

v2 attached.

Thanks!

Best, Jim

Attachment Content-Type Size
v2-0001-pageinspect-Reject-unlogged-relations-during-reco.patch text/x-patch 5.8 KB
v2-0002-pgrowlocks-Reject-unlogged-tables-during-recovery.patch text/x-patch 1.8 KB
v2-0003-pgstattuple-Reject-unlogged-relations-during-reco.patch text/x-patch 5.6 KB
v2-0004-pg_visibility-Reject-unlogged-tables-during-recov.patch text/x-patch 3.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-10-25 11:42:09 Re: convert CI CompilerWarnings job to meson
Previous Message Zhijie Hou 2026-10-25 10:11:14 Re: [PATCH] Disallow column lists on tables with REPLICA IDENTITY FULL when publishing updates/deletes