For those of you that don't monitor the pgsql-bugs mailing list, this interesting bug was posted recently:
>> I have encountered a bug in PostgreSQL 10.1: when the target
>> directory for pg_rewind contains a read-only file (e.g. server.key),
>> pg_rewind exits with "could not open target file" (legitimate) and
>> corrupts the control file global/pg_control to size 0 (bug). From now
>> on, pg_rewind always exits with "unexpected control file size 0,
>> expected 8192" and a restore from pg_basebackup is needed.
>
> Likely that's reproducible down to 9.5 where pg_rewind has been
> introduced. I agree that we should do better with failure handling
> here. Corrupting the control file is not cool.
I can already confirm that this also occurs with PostgreSQL 9.6.
So if you want to use pg_rewind, then make sure you don't have any read-only files in your $PGDATA directory... otherwise your control file will get overwritten. :-O
I suspect this will get fixed in v9.5.11, v9.6.7, and v10.2... but there are no guarantees yet.
Here's the link to the original chat:
https://www.postgresql.org/message-id/20180104200633.17004.16377%40wrigleys.postgresql.org
I'm a PostgreSQL DBA, and when I run across interesting facts then I'll post them here.
Subscribe to:
Post Comments (Atom)
New PostgreSQL RDS versions - v10.14 , v11.9, and v12.4
It appears that new patch versions of PostgreSQL RDS are being rolled out in AWS.. so we should expect an announcement soon: REGION: us-east...
-
I realise it's a blanket statement to say NEVER to use pg_resetwal / pg_resetxlog , but in almost 100% of cases this will be true. One...
-
Have you ever restarted your PostgreSQL cluster and wondered why it's taking so long? The cause of this is generally one of these: Y...
-
It's always something that comes up, even in today's vitrualised and containerised environments... "How can I run multiple Post...
No comments:
Post a Comment