I forgot to mention that the bug can be reproduced in a hot-standby
setup with the attached isolation spec.  Note that full_page_writes must
be turned off (otherwise, the updates use full-page writes and then the
bogus code is not run).  Once the spec is executed, in the replica run

SET enable_seqscan TO off;
SELECT * FROM f WHERE a=1;

and you get no rows back.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
setup
{
        DROP TABLE IF EXISTS f;
        CREATE TABLE f (a int primary key, b int);
        INSERT INTO f values (1, 42);
}

session "s1"
step "begin"    { BEGIN; }
step "update"   { UPDATE f SET b = b + 1; }
step "commit"   { COMMIT; }

session "s2"
step "lock"     { SELECT * FROM f FOR KEY SHARE; }

permutation "begin" "update" "update" "lock" "commit"

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to