pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Reject COPY TO of unlogged tables during recovery. 7+ messages / 1 participants [nested] [flat]
* pgsql: Reject COPY TO of unlogged tables during recovery. @ 2026-10-21 17:45 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Masahiko Sawada @ 2026-10-21 17:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject COPY TO of unlogged tables during recovery. Unlogged tables have no data on a standby, so reading one there must fail. SELECT and COPY (SELECT ...) TO already report a clear error, but COPY with a table name read the table directly and failed with a low-level error instead: ERROR: could not open file "base/5/16384": No such file or directory Check for this case in COPY TO and report the same error as SELECT. On v19 and later, also check each partition when copying from a partitioned table, so that an unlogged partition is reported too. Backpatch to all supported versions, since the low-level error looks like data corruption. Author: Jim Jones <jim.jones@uni-muenster.de> Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/b6d71815-d362-4579-bf07-73eca01aee6d@uni-muenster.de Backpatch-through: 14 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1e707d32564497ed2478f4186b90d0821719957b Modified Files -------------- src/backend/commands/copyto.c | 19 +++++++++++++++++++ src/test/recovery/t/001_stream_rep.pl | 27 +++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Reject COPY TO of unlogged tables during recovery. @ 2026-10-21 17:45 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Masahiko Sawada @ 2026-10-21 17:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject COPY TO of unlogged tables during recovery. Unlogged tables have no data on a standby, so reading one there must fail. SELECT and COPY (SELECT ...) TO already report a clear error, but COPY with a table name read the table directly and failed with a low-level error instead: ERROR: could not open file "base/5/16384": No such file or directory Check for this case in COPY TO and report the same error as SELECT. On v19 and later, also check each partition when copying from a partitioned table, so that an unlogged partition is reported too. Backpatch to all supported versions, since the low-level error looks like data corruption. Author: Jim Jones <jim.jones@uni-muenster.de> Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/b6d71815-d362-4579-bf07-73eca01aee6d@uni-muenster.de Backpatch-through: 14 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2f79b0179437bd18c2aaa550f71c80e477fcc0a7 Modified Files -------------- src/backend/commands/copyto.c | 19 +++++++++++++++++++ src/test/recovery/t/001_stream_rep.pl | 27 +++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Reject COPY TO of unlogged tables during recovery. @ 2026-10-21 17:46 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Masahiko Sawada @ 2026-10-21 17:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject COPY TO of unlogged tables during recovery. Unlogged tables have no data on a standby, so reading one there must fail. SELECT and COPY (SELECT ...) TO already report a clear error, but COPY with a table name read the table directly and failed with a low-level error instead: ERROR: could not open file "base/5/16384": No such file or directory Check for this case in COPY TO and report the same error as SELECT. On v19 and later, also check each partition when copying from a partitioned table, so that an unlogged partition is reported too. Backpatch to all supported versions, since the low-level error looks like data corruption. Author: Jim Jones <jim.jones@uni-muenster.de> Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/b6d71815-d362-4579-bf07-73eca01aee6d@uni-muenster.de Backpatch-through: 14 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/794c29dc41a6a930136cd086b22b72b8da927053 Modified Files -------------- src/backend/commands/copyto.c | 5 +++++ src/test/recovery/t/001_stream_rep.pl | 13 +++++++++++++ 2 files changed, 18 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Reject COPY TO of unlogged tables during recovery. @ 2026-10-21 17:46 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Masahiko Sawada @ 2026-10-21 17:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject COPY TO of unlogged tables during recovery. Unlogged tables have no data on a standby, so reading one there must fail. SELECT and COPY (SELECT ...) TO already report a clear error, but COPY with a table name read the table directly and failed with a low-level error instead: ERROR: could not open file "base/5/16384": No such file or directory Check for this case in COPY TO and report the same error as SELECT. On v19 and later, also check each partition when copying from a partitioned table, so that an unlogged partition is reported too. Backpatch to all supported versions, since the low-level error looks like data corruption. Author: Jim Jones <jim.jones@uni-muenster.de> Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/b6d71815-d362-4579-bf07-73eca01aee6d@uni-muenster.de Backpatch-through: 14 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/17f66a68179bfe91a57987ffafafa9063c3907c7 Modified Files -------------- src/backend/commands/copyto.c | 5 +++++ src/test/recovery/t/001_stream_rep.pl | 13 +++++++++++++ 2 files changed, 18 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Reject COPY TO of unlogged tables during recovery. @ 2026-10-21 17:46 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Masahiko Sawada @ 2026-10-21 17:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject COPY TO of unlogged tables during recovery. Unlogged tables have no data on a standby, so reading one there must fail. SELECT and COPY (SELECT ...) TO already report a clear error, but COPY with a table name read the table directly and failed with a low-level error instead: ERROR: could not open file "base/5/16384": No such file or directory Check for this case in COPY TO and report the same error as SELECT. On v19 and later, also check each partition when copying from a partitioned table, so that an unlogged partition is reported too. Backpatch to all supported versions, since the low-level error looks like data corruption. Author: Jim Jones <jim.jones@uni-muenster.de> Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/b6d71815-d362-4579-bf07-73eca01aee6d@uni-muenster.de Backpatch-through: 14 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/044887b6081239122eaa3c18fc01a14f0a1ffb45 Modified Files -------------- src/backend/commands/copyto.c | 5 +++++ src/test/recovery/t/001_stream_rep.pl | 13 +++++++++++++ 2 files changed, 18 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Reject COPY TO of unlogged tables during recovery. @ 2026-10-21 17:46 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Masahiko Sawada @ 2026-10-21 17:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject COPY TO of unlogged tables during recovery. Unlogged tables have no data on a standby, so reading one there must fail. SELECT and COPY (SELECT ...) TO already report a clear error, but COPY with a table name read the table directly and failed with a low-level error instead: ERROR: could not open file "base/5/16384": No such file or directory Check for this case in COPY TO and report the same error as SELECT. On v19 and later, also check each partition when copying from a partitioned table, so that an unlogged partition is reported too. Backpatch to all supported versions, since the low-level error looks like data corruption. Author: Jim Jones <jim.jones@uni-muenster.de> Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/b6d71815-d362-4579-bf07-73eca01aee6d@uni-muenster.de Backpatch-through: 14 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c517dbb31b1947be05203c8a95ac982a981495f7 Modified Files -------------- src/backend/commands/copyto.c | 5 +++++ src/test/recovery/t/001_stream_rep.pl | 14 ++++++++++++++ 2 files changed, 19 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Reject COPY TO of unlogged tables during recovery. @ 2026-10-21 17:46 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Masahiko Sawada @ 2026-10-21 17:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reject COPY TO of unlogged tables during recovery. Unlogged tables have no data on a standby, so reading one there must fail. SELECT and COPY (SELECT ...) TO already report a clear error, but COPY with a table name read the table directly and failed with a low-level error instead: ERROR: could not open file "base/5/16384": No such file or directory Check for this case in COPY TO and report the same error as SELECT. On v19 and later, also check each partition when copying from a partitioned table, so that an unlogged partition is reported too. Backpatch to all supported versions, since the low-level error looks like data corruption. Author: Jim Jones <jim.jones@uni-muenster.de> Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/b6d71815-d362-4579-bf07-73eca01aee6d@uni-muenster.de Backpatch-through: 14 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/599c50d25f74aae02deb9c953ccf7a9bbb3aaa7b Modified Files -------------- src/backend/commands/copyto.c | 5 +++++ src/test/recovery/t/001_stream_rep.pl | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2026-10-21 17:46 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-10-21 17:45 pgsql: Reject COPY TO of unlogged tables during recovery. Masahiko Sawada <msawada@postgresql.org> 2026-10-21 17:45 pgsql: Reject COPY TO of unlogged tables during recovery. Masahiko Sawada <msawada@postgresql.org> 2026-10-21 17:46 pgsql: Reject COPY TO of unlogged tables during recovery. Masahiko Sawada <msawada@postgresql.org> 2026-10-21 17:46 pgsql: Reject COPY TO of unlogged tables during recovery. Masahiko Sawada <msawada@postgresql.org> 2026-10-21 17:46 pgsql: Reject COPY TO of unlogged tables during recovery. Masahiko Sawada <msawada@postgresql.org> 2026-10-21 17:46 pgsql: Reject COPY TO of unlogged tables during recovery. Masahiko Sawada <msawada@postgresql.org> 2026-10-21 17:46 pgsql: Reject COPY TO of unlogged tables during recovery. Masahiko Sawada <msawada@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox