Re: Breakage with VACUUM ANALYSE + partitions - Mailing list pgsql-bugs

From Robert Haas
Subject Re: Breakage with VACUUM ANALYSE + partitions
Date
Msg-id CA+TgmoY+jsmZDiRBoNXoYrpM=AkjWx-o_v3pxLo1RPu0JkD17A@mail.gmail.com
Whole thread Raw
In response to Breakage with VACUUM ANALYSE + partitions  (Thom Brown <thom@linux.com>)
Responses Re: Breakage with VACUUM ANALYSE + partitions
List pgsql-bugs
On Sun, Mar 20, 2016 at 3:55 PM, Thom Brown <thom@linux.com> wrote:
> I've not determined what's causing the following issue, but this is
> the simplest reproducible test case I've managed to create so far in
> 9.6 latest git master:
>
> postgresql.conf:
>   shared_buffers = 256MB
>
> createdb pgbench
> pgbench -i -s 80 pgbench
>
> psql pgbench
>   \pset pager off
>   CREATE TABLE pgbench_accounts_1 (CHECK (bid % 2 = 0)) INHERITS
> (pgbench_accounts);
>   CREATE TABLE pgbench_accounts_2 (CHECK (bid % 2 = 1)) INHERITS
> (pgbench_accounts);
>   WITH del AS (DELETE FROM pgbench_accounts WHERE bid % 2 = 0
> RETURNING *) INSERT INTO pgbench_accounts_1 SELECT * FROM del;
>   WITH del AS (DELETE FROM pgbench_accounts WHERE bid % 2 = 1
> RETURNING *) INSERT INTO pgbench_accounts_2 SELECT * FROM del;
>   VACUUM ANALYSE;
>   EXPLAIN ANALYSE SELECT count(*) FROM pgbench_accounts;
>
> This last statement produces:
>   ERROR:  could not read block 0 in file "base/35160/35173": read only
> 0 of 8192 bytes

Hmm.  The natural thing to suspect here would be a problem with the
freeze map changes.  But I tried this and I couldn't reproduce it.
Any chance you can try this on each of the following commits?

fd31cd265138019dcccc9b5fe53043670898bc9f
77a1d1e79892a20ed15a67be42b96949b8546bf6
a892234f830e832110f63fc0a2afce2fb21d1584
68c521eb92c3515e3306f51a7fd3f32d16c97524

Make sure to re-initdb each time.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)
Next
From: Robert Haas
Date:
Subject: Re: Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)