Re: postgres 9.5 DB corruption: invalid byte sequence for encoding"UTF8" - Mailing list pgsql-general

From Laurenz Albe
Subject Re: postgres 9.5 DB corruption: invalid byte sequence for encoding"UTF8"
Date
Msg-id 36fb4cf70a723ffe5ffe9dba850357fa0bc97b18.camel@cybertec.at
Whole thread Raw
In response to postgres 9.5 DB corruption: invalid byte sequence for encoding"UTF8"  (Thomas Tignor <tptignor@yahoo.com>)
Responses Re: postgres 9.5 DB corruption: invalid byte sequence for encoding"UTF8"  (Thomas Tignor <tptignor@yahoo.com>)
List 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



pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: Forks of pgadmin3?
Next
From: Christoph Berg
Date:
Subject: Re: Forks of pgadmin3?