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

Reply via email to