[Patch] Make pg_checksums skip foreign tablespace directories
От | Michael Banck |
---|---|
Тема | [Patch] Make pg_checksums skip foreign tablespace directories |
Дата | |
Msg-id | 62031974fd8e941dd8351fbc8c7eff60d59c5338.camel@credativ.de обсуждение исходный текст |
Ответы |
Re: [Patch] Make pg_checksums skip foreign tablespace directories
|
Список | pgsql-hackers |
Hi, we had a customer who ran pg_checksums on their v12 cluster and got a confusing error: |pg_checksums: error: invalid segment number 0 in file name "/PG- |Data/foo_12_data/pg_tblspc/16402/PG_10_201707211/16390/pg_internal.init |.10028" Turns out the customer ran a pg_ugprade in copy mode before and started up the old cluster again which pg_checksums decided to checked as well - note the PG_10_201707211 in the error message. The attached patch is a stab at teaching pg_checksums to only check its own TABLESPACE_VERSION_DIRECTORY directory. I guess this implies that it would ignore tablespace directories of outdated catversion instances during development, which I think should be ok, but others might not agree? The other question is whether it is possible to end up with a pg_internal.init.$PID file in a running cluster. E.g. if an instance crashes and gets started up again - are those cleaned up during crash recovery, or should pg_checksums ignore them? Right now pg_checksums only checks against a list of filenames and only skips on exact matches not prefixes so that might take a bit of work. Michael -- Michael Banck Projektleiter / Senior Berater Tel.: +49 2166 9901-171 Fax: +49 2166 9901-100 Email: michael.banck@credativ.de credativ GmbH, HRB Mönchengladbach 12080 USt-ID-Nummer: DE204566209 Trompeterallee 108, 41189 Mönchengladbach Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer Unser Umgang mit personenbezogenen Daten unterliegt folgenden Bestimmungen: https://www.credativ.de/datenschutz
Вложения
В списке pgsql-hackers по дате отправления: