pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: prtkgaur1@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #13864: Reproducible, ERROR: could not read block 30 in file "base/16414/11914": read only 0 of 8192 bytes
Date: Thu, 14 Jan 2016 01:12:09 +0000
Message-ID: <20160114011209.2145.45094@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      13864
Logged by:          Prateek Gaur
Email address:      prtkgaur1@gmail.com
PostgreSQL version: 9.4.5
Operating system:   Ubuntu 12.04.5 LTS
Description:        

I have a healthy 9.3 postgres backup taken by running
/usr/lib/postgresql/9.3/bin/pg_basebackup -D postgres_clone -l initial -U
postgres -h localhost -p XXX -X stream

After starting postgres from this backup by command :
/usr/lib/9.3/bin/pg_ctl -postgres_clone -l <logpath> start
we run certain commands against this database. These commands are :

BEGIN TRANSACTION;
Create View A;
Create View B;
Create View C; ( Note C builds on top of Views A and B ).
COMMIT;

These commands work fine for postgres version 9.3.

But after upgrading to version 9.4.5 with command .
/usr/lib/postgresql/9.4/bin/pg_upgrade \                                    
                      
    -b /usr/lib/postgresql/9.3/bin/pg_upgrade \                             
                        
    -B /usr/lib/postgresql/9.4/bin/pg_upgrade \                             
                        
    -d ./postgres_clone \
    -D ./9.4_postgres_clone \
    -U postgres -v

and starting a 9.4 database with : /usr/lib/9.4/bin/pg_ctl -postgres_clone
-l <logpath> start

The commands described above end up in a failure message 'ERROR:  could not
read block 30 in file "base/16414/11914": read only 0 of 8192 bytes'.
The failure happens while running Create View C.
The failure is very deterministic after upgrading to postgres 9.4.5 but
never happens if I stick to version 9.3.

But interestingly when I break above set of commands into two transactions.
Something like :
BEGIN TRANSACTION;
Create View A;
Create View B;
COMMIT;
BEGIN TRANSACTION;
Create View C;
COMMIT:

I stop seeing the failure for version 9.4.5

Unfortunately I can't use this fix as I want the three statements to be a
part of a single transaction.

Have we seen a scenario where 'could not read block ... ' goes away by
pre-apending a 'COMMIT' statement to the the offending statement?


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



view thread (2+ messages)  latest in thread

Message-ID: <20160114011209.2145.45094@wrigleys.postgresql.org>
Permalink:  ../20160114011209.2145.45094@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20160114011209.2145.45094@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: prtkgaur1@gmail.com
  Subject: Re: BUG #13864: Reproducible, ERROR: could not read block 30 in file "base/16414/11914": read only 0 of 8192 bytes
  In-Reply-To: <20160114011209.2145.45094@wrigleys.postgresql.org>
  References: <20160114011209.2145.45094@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox