Re: BUG #19780: gtsvector_picksplit() reads uninitialized data when called with three entries

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19780: gtsvector_picksplit() reads uninitialized data when called with three entries
Date: 2026-11-04 05:42:55
Message-ID: CAGRkXqTnM1a9o9raz-3qZfHagf_An5fyyNdb7=uTAREpQ9Md4w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Alexander,

Thanks for the report. With only two entries, the cache of the second
one is used before it is filled.

Your two column case is harmless. With one column, the index can miss
rows until REINDEX.

The attached patch fills the cache earlier and adds a test.

Thanks,
Shihao

Attachment Content-Type Size
v1-0001-Fix-gtsvector_picksplit-with-only-two-entries.patch application/octet-stream 3.5 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tatsuo Ishii 2026-11-04 07:44:15 Re: first_value()/nth_value() with IGNORE NULLS loop forever (EXCLUDE GROUP/TIES, frame past partition end, no ORDER BY)
Previous Message shihao zhong 2026-11-04 03:46:53 Re: set_config(‘search_path’) does not truncate names over 63 bytes, unlike SET