Re: postgres 9.5 DB corruption: invalid byte sequence for encoding "UTF8"

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Thomas Tignor <tptignor(at)yahoo(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: postgres 9.5 DB corruption: invalid byte sequence for encoding "UTF8"
Date: 2019-03-26 08:25:24
Message-ID: 36fb4cf70a723ffe5ffe9dba850357fa0bc97b18.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thomas Tignor wrote:
> We are experiencing intermittent DB corruption in postgres 9.5.14. We are trying to
> identify and eliminate all sources. We are using two independent services for data
> replication, Slony-I v2.2.6 and a custom service developed in-house. Both are based
> on COPY operations. DB corruption is observed when COPY operations fail with an error
> of the form: 'invalid byte sequence for encoding "UTF8"'.
> This occurs with a frequency ranging between a few days and several weeks.

It might be a storage problem, but it could also be a problem with how the data
get into the database in the first place.

I would consider it unlikely that there is a bug in the TOAST code that changes
just one byte.

You could use block checksums to see if the storage is at fault, but unfortunately
it requires an "initdb", dump and restore to switch to checksums.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christoph Berg 2019-03-26 09:11:07 Re: Forks of pgadmin3?
Previous Message Thomas Kellerer 2019-03-26 07:20:54 Re: Forks of pgadmin3?