pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: file_fdw: Fix ANALYZE crashes with DEFAULT markers 5+ messages / 1 participants [nested] [flat]
* pgsql: file_fdw: Fix ANALYZE crashes with DEFAULT markers @ 2026-11-06 14:34 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Fujii Masao @ 2026-11-06 14:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org file_fdw: Fix ANALYZE crashes with DEFAULT markers ANALYZE on a file_fdw foreign table failed an assertion when the input contained a DEFAULT marker, and could crash in builds without assertions. This happened because the sampling code passed a NULL ExprContext to NextCopyFrom(), which requires one to evaluate column defaults. Fix this by providing an expression context for sampling, allowing defaults to be evaluated without assertion failures or crashes. Backpatch to v16, which introduced DEFAULT marker support. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Jim Jones <jim.jones@uni-muenster.de> Reviewed-by: Ayoub Kazar <ayoub.kazar@data-bene.io> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/CAHGQGwGwihFV9FmfSbbrMsEr4fti7aHZFkpyMv5-byjfc2EmOw@mail.gmail.com Backpatch-through: 16 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/72b9498df9a369e747f8d96efb5a6cd33c2451e2 Modified Files -------------- contrib/file_fdw/expected/file_fdw.out | 10 ++++++++++ contrib/file_fdw/file_fdw.c | 24 +++++++++++++----------- contrib/file_fdw/sql/file_fdw.sql | 5 +++++ 3 files changed, 28 insertions(+), 11 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: file_fdw: Fix ANALYZE crashes with DEFAULT markers @ 2026-11-06 14:34 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Fujii Masao @ 2026-11-06 14:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org file_fdw: Fix ANALYZE crashes with DEFAULT markers ANALYZE on a file_fdw foreign table failed an assertion when the input contained a DEFAULT marker, and could crash in builds without assertions. This happened because the sampling code passed a NULL ExprContext to NextCopyFrom(), which requires one to evaluate column defaults. Fix this by providing an expression context for sampling, allowing defaults to be evaluated without assertion failures or crashes. Backpatch to v16, which introduced DEFAULT marker support. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Jim Jones <jim.jones@uni-muenster.de> Reviewed-by: Ayoub Kazar <ayoub.kazar@data-bene.io> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/CAHGQGwGwihFV9FmfSbbrMsEr4fti7aHZFkpyMv5-byjfc2EmOw@mail.gmail.com Backpatch-through: 16 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0b1eb8b917d860ab073c934661530c6b6b23cd63 Modified Files -------------- contrib/file_fdw/expected/file_fdw.out | 10 ++++++++++ contrib/file_fdw/file_fdw.c | 24 +++++++++++++----------- contrib/file_fdw/sql/file_fdw.sql | 5 +++++ 3 files changed, 28 insertions(+), 11 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: file_fdw: Fix ANALYZE crashes with DEFAULT markers @ 2026-11-06 14:34 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Fujii Masao @ 2026-11-06 14:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org file_fdw: Fix ANALYZE crashes with DEFAULT markers ANALYZE on a file_fdw foreign table failed an assertion when the input contained a DEFAULT marker, and could crash in builds without assertions. This happened because the sampling code passed a NULL ExprContext to NextCopyFrom(), which requires one to evaluate column defaults. Fix this by providing an expression context for sampling, allowing defaults to be evaluated without assertion failures or crashes. Backpatch to v16, which introduced DEFAULT marker support. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Jim Jones <jim.jones@uni-muenster.de> Reviewed-by: Ayoub Kazar <ayoub.kazar@data-bene.io> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/CAHGQGwGwihFV9FmfSbbrMsEr4fti7aHZFkpyMv5-byjfc2EmOw@mail.gmail.com Backpatch-through: 16 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/813a74bc5a76f13c15da902f5523d0fa755e2c5f Modified Files -------------- contrib/file_fdw/expected/file_fdw.out | 10 ++++++++++ contrib/file_fdw/file_fdw.c | 24 +++++++++++++----------- contrib/file_fdw/sql/file_fdw.sql | 5 +++++ 3 files changed, 28 insertions(+), 11 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: file_fdw: Fix ANALYZE crashes with DEFAULT markers @ 2026-11-06 14:34 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Fujii Masao @ 2026-11-06 14:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org file_fdw: Fix ANALYZE crashes with DEFAULT markers ANALYZE on a file_fdw foreign table failed an assertion when the input contained a DEFAULT marker, and could crash in builds without assertions. This happened because the sampling code passed a NULL ExprContext to NextCopyFrom(), which requires one to evaluate column defaults. Fix this by providing an expression context for sampling, allowing defaults to be evaluated without assertion failures or crashes. Backpatch to v16, which introduced DEFAULT marker support. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Jim Jones <jim.jones@uni-muenster.de> Reviewed-by: Ayoub Kazar <ayoub.kazar@data-bene.io> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/CAHGQGwGwihFV9FmfSbbrMsEr4fti7aHZFkpyMv5-byjfc2EmOw@mail.gmail.com Backpatch-through: 16 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b2b1910d9ab30bdb30b10c09e8c7813c74216b88 Modified Files -------------- contrib/file_fdw/expected/file_fdw.out | 10 ++++++++++ contrib/file_fdw/file_fdw.c | 24 +++++++++++++----------- contrib/file_fdw/sql/file_fdw.sql | 5 +++++ 3 files changed, 28 insertions(+), 11 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: file_fdw: Fix ANALYZE crashes with DEFAULT markers @ 2026-11-06 14:34 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Fujii Masao @ 2026-11-06 14:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org file_fdw: Fix ANALYZE crashes with DEFAULT markers ANALYZE on a file_fdw foreign table failed an assertion when the input contained a DEFAULT marker, and could crash in builds without assertions. This happened because the sampling code passed a NULL ExprContext to NextCopyFrom(), which requires one to evaluate column defaults. Fix this by providing an expression context for sampling, allowing defaults to be evaluated without assertion failures or crashes. Backpatch to v16, which introduced DEFAULT marker support. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Jim Jones <jim.jones@uni-muenster.de> Reviewed-by: Ayoub Kazar <ayoub.kazar@data-bene.io> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/CAHGQGwGwihFV9FmfSbbrMsEr4fti7aHZFkpyMv5-byjfc2EmOw@mail.gmail.com Backpatch-through: 16 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e9c45974adb439fcc6fee6175e11f92619fc5361 Modified Files -------------- contrib/file_fdw/expected/file_fdw.out | 10 ++++++++++ contrib/file_fdw/file_fdw.c | 24 +++++++++++++----------- contrib/file_fdw/sql/file_fdw.sql | 5 +++++ 3 files changed, 28 insertions(+), 11 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2026-11-06 14:34 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-11-06 14:34 pgsql: file_fdw: Fix ANALYZE crashes with DEFAULT markers Fujii Masao <fujii@postgresql.org> 2026-11-06 14:34 pgsql: file_fdw: Fix ANALYZE crashes with DEFAULT markers Fujii Masao <fujii@postgresql.org> 2026-11-06 14:34 pgsql: file_fdw: Fix ANALYZE crashes with DEFAULT markers Fujii Masao <fujii@postgresql.org> 2026-11-06 14:34 pgsql: file_fdw: Fix ANALYZE crashes with DEFAULT markers Fujii Masao <fujii@postgresql.org> 2026-11-06 14:34 pgsql: file_fdw: Fix ANALYZE crashes with DEFAULT markers Fujii Masao <fujii@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