Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aK7S8-0005tL-ED for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Jan 2016 16:42:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aK7S8-0001Ee-0u for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Jan 2016 16:42:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aJWTK-0007sj-MQ for pgsql-bugs@postgresql.org; Thu, 14 Jan 2016 01:13:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aJWTH-0004OZ-Uf for pgsql-bugs@postgresql.org; Thu, 14 Jan 2016 01:13:06 +0000 MIME-Version: 1.0 Subject: BUG #13864: Reproducible, ERROR: could not read block 30 in file "base/16414/11914": read only 0 of 8192 bytes To: pgsql-bugs@postgresql.org From: prtkgaur1@gmail.com Date: Thu, 14 Jan 2016 01:12:09 +0000 Message-ID: <20160114011209.2145.45094@wrigleys.postgresql.org> X-Pg-Spam-Score: -0.1 (/) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 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 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