Re: [PATCH] Corruption Issue: Fix missing tts_tid in ExecForceStoreHeapTuple

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Greg Burd <greg(at)burd(dot)me>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Nikolay Samokhvalov <nik(at)postgres(dot)ai>, Virender Singla <virender(dot)cse(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Subject: Re: [PATCH] Corruption Issue: Fix missing tts_tid in ExecForceStoreHeapTuple
Date: 2026-10-19 03:55:36
Message-ID: CAGRkXqT4npzcEzxupZY-AuLyFMeZPh87wzaZFGbfq_Z+PMKwMw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Greg,

The thread only tested the FOR UPDATE case with asserts, so I tried
it on a normal build. After the FOR UPDATE and a restart, the table
cannot be read or vacuumed:

create table tri (id int, p polygon);
insert into tri select i, format('((%s,0),(%s,9),(%s,0))',
i * 10, i * 10 + 9, i * 10 + 9)::polygon
from generate_series(1, 20) i;
create index on tri using gist (p);
vacuum analyze tri;
set enable_seqscan = off;
begin;
select id from tri order by p <-> point(100,4) limit 5 for update;
rollback;
checkpoint;

Then restart the server and run

select count(*) from tri;
ERROR: invalid page in block 1 of relation "base/5/16384"

With v8 the FOR UPDATE returns 5 rows and the count is 20. I think
it is ready for committer.

Thanks,
Shihao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vaibhav Dalvi 2026-10-19 04:13:51 Re: walreceiver: stale hot_standby_feedback xmin on primary when wal_receiver_status_interval = 0 (PG16 and later)
Previous Message Fujii Masao 2026-10-19 03:42:35 Re: [PATCH v1] Fix tab completion for DROP INDEX CONCURRENTLY