After replication failover: could not read block X in file Y read only 0 of 8192 bytes - Mailing list pgsql-general

From Brian Sutherland
Subject After replication failover: could not read block X in file Y read only 0 of 8192 bytes
Date
Msg-id 20160530133721.GA16218@Admins-MacBook-Air-2.local
Whole thread Raw
Responses Re: After replication failover: could not read block X in file Y read only 0 of 8192 bytes
List pgsql-general
I'm running a streaming replication setup with PostgreSQL 9.5.2 and have
started seeing these errors on a few INSERTs:

    ERROR:  could not read block 8 in file "base/3884037/3885279": read only 0 of 8192 bytes

on a few tables. If I look at that specific file, it's only 6 blocks
long:

    # ls -la base/3884037/3885279
    -rw------- 1 postgres postgres 49152 May 30 12:56 base/3884037/3885279

It seems that this is the case on most tables in this state. I havn't
seen any error on SELECT and I can SELECT * on the all tables I know
have this problem. The database is machine is under reasonable load.

On some tables an "ANALYZE tablename" causes the error.

We recently had a streaming replication failover after loading a large
amount of data with pg_restore. The problems seem to have started after
that, but I'm not perfectly sure.

I have data_checksums switched on so am suspecting a streaming
replication bug.  Anyone know of a recent bug which could have caused
this?

--
Brian Sutherland


pgsql-general by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Slides for PGCon2016; "FTS is dead ? Long live FTS !"
Next
From: Adrian Klaver
Date:
Subject: Re: How to find business partners from PostgreSQL communities?