From: | Craig de Stigter <craig(dot)destigter(at)koordinates(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Should `pg_upgrade --check` check relation filenodes are present? |
Date: | 2017-01-31 21:57:01 |
Message-ID: | CAF1M8pc=xF8Wt0HUEroQ==tVxj9yrZ297LijwjouS3NeofBM4g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi list
We attempted to pg_upgrade a database on a replication slave, and got the
error:
error while creating link for relation "<schema>.<tablename>"
>> ("/var/lib/postgresql-ext/PG_9.2_201204301/19171/141610397" to
>> "/var/lib/postgresql-ext/PG_9.5_201510051/16401/9911696"): No such file or
>> directory
>
>
>
The missing table turned out to be an unlogged table, and the data file for
it was not present on the slave machine. That's reasonable. In our case we
are able to start over from a snapshot and drop all the unlogged tables
before trying again.
However, this problem was not caught by the `--check` command. I'm looking
at the source code and it appears that pg_upgrade does not attempt to
verify relation filenodes actually exist before proceeding, whether using
--check or not.
Should it? I assume the reasoning is because it would take a long time and
perhaps the benefit of doing so would be minimal?
--
Regards,
Craig de Stigter
Developer
Koordinates
+64 21 256 9488 <+64%2021%20256%209488> / koordinates.com / @koordinates
<https://twitter.com/koordinates>
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2017-01-31 21:59:19 | Re: ICU integration |
Previous Message | Andres Freund | 2017-01-31 21:55:38 | Re: Patch: Write Amplification Reduction Method (WARM) |