| From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
|---|---|
| To: | ssye1697 <ssye1697(at)agent(dot)qq(dot)com> |
| Cc: | pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: BUG: SIGSEGV in slot_getsomeattrs_int (populate_isnull_array two-pass deform) on 17.11 and 18.6 -- fix d260d7d was not backpatched below 19 |
| Date: | 2026-11-09 05:34:43 |
| Message-ID: | CAApHDvoLCPN72Fz7U=_wZUU_5Pcg8LGGyXCpB3RmZO+rC_OfTQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Fri, 30 Oct 2026 at 20:14, ssye1697 <ssye1697(at)agent(dot)qq(dot)com> wrote:
> We hit intermittent backend SIGSEGVs in slot_getsomeattrs_int on PostgreSQL 17.11 and 18.6 (x86_64, Debian). The crash is a genuine executor defect in the tuple-deform path introduced by commit c456e3911 (Optimize tuple deformation, 2026-03-15). Upstream commit d260d7d (2026-08-06) fixes exactly this on master/19 only (Backpatch-through: 19), so 17 and 18 remain vulnerable. Please backpatch d260d7d to REL_17_STABLE and REL_18_STABLE.
This is a rather doubtful report given that the commit you're blaming
broke v17 is in a feature that's new to v19.
Using Peter's patch from [1], on v18 and get:
$ psql postgres
psql (18.6)
Type "help" for help.
postgres=# CREATE TABLE t_missing_wholerow (rid int NOT NULL, nul "char");
INSERT INTO t_missing_wholerow (rid) VALUES (5), (6);
ALTER TABLE t_missing_wholerow ADD COLUMN m0 int NOT NULL DEFAULT 40;
ALTER TABLE t_missing_wholerow ADD COLUMN m1 bigint NOT NULL DEFAULT 41;
SELECT rid, m0, m1 FROM t_missing_wholerow ORDER BY rid;
SELECT x.m0, x::text FROM t_missing_wholerow x ORDER BY 1;
CREATE TABLE
INSERT 0 2
ALTER TABLE
ALTER TABLE
rid | m0 | m1
-----+----+----
5 | 40 | 41
6 | 40 | 41
(2 rows)
m0 | x
----+------------
40 | (5,,40,41)
40 | (6,,40,41)
(2 rows)
Whereas with d260d7d00~1, I get:
postgres=# CREATE TABLE t_missing_wholerow (rid int NOT NULL, nul "char");
INSERT INTO t_missing_wholerow (rid) VALUES (5), (6);
ALTER TABLE t_missing_wholerow ADD COLUMN m0 int NOT NULL DEFAULT 40;
ALTER TABLE t_missing_wholerow ADD COLUMN m1 bigint NOT NULL DEFAULT 41;
SELECT rid, m0, m1 FROM t_missing_wholerow ORDER BY rid;
SELECT x.m0, x::text FROM t_missing_wholerow x ORDER BY 1;
CREATE TABLE
INSERT 0 2
ALTER TABLE
ALTER TABLE
rid | m0 | m1
-----+----+----
5 | 40 | 41
6 | 40 | 41
(2 rows)
m0 | x
----+----------
40 | (5,,,41) <-- incorrect!
40 | (6,,,41) <-- incorrect!
(2 rows)
David
[1] https://postgr.es/m/CAH2-WznHo4b+6AmAj0GZ0jXqDSK69MfHe8fAQwuY_01y7cVNdw@mail.gmail.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-11-09 05:48:00 | Re: BUG #19849: queries fail after ANALYZE with expression stats on arrays |
| Previous Message | Michael Paquier | 2026-11-09 05:28:37 | Re: BUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti |