Re: Reject COPY TO of unlogged relations during recovery

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Reject COPY TO of unlogged relations during recovery
Date: 2026-10-15 21:38:11
Message-ID: CAN4CZFMCuiya7d5sRQ-xm=hKnADiT_jrppSTo+a_WxktuPk2LQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Nice catch!

Claude pointed out that a few contrib modules are also affected
(pgstattuple, pg_visibility, pageinspect and pgrowlocks)

I think the location is right for the COPY TO case, but maybe it would
be the best to handle all locations in the same patch(set)?

+ foreach_oid(child, children)
+ {
+ if (get_rel_persistence(child) != RELPERSISTENCE_PERMANENT)

Can we put this check in the existing loop above? And maybe the error
detail could also name the specific relation?

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bilal Kahraman 2026-10-15 21:52:23 Re: index prefetching
Previous Message David Rowley 2026-10-15 21:36:41 Re: [PATCH 0/2] Improve ndistinct estimates for flattened UNION ALL