Re: pg_rewind fails on Windows where tablespaces are used
| От | Andrew Dunstan |
|---|---|
| Тема | Re: pg_rewind fails on Windows where tablespaces are used |
| Дата | |
| Msg-id | 5169f6d5-240e-49ec-9265-ddafa6e863bd@dunslane.net обсуждение исходный текст |
| Ответ на | Re: pg_rewind fails on Windows where tablespaces are used (Michael Paquier <michael@paquier.xyz>) |
| Ответы |
Re: pg_rewind fails on Windows where tablespaces are used
|
| Список | pgsql-bugs |
On Wed, May 08, 2024 at 03:02:21PM +0700, Chris Travers wrote:Setup is PostgreSQL on Windows with a tablespace on a separate drive. When I go to run pg_rewind it consistently fails with the following error:(Chris has poked me regarding this issue last week in Vancouver.)pg_rewind: servers diverged at WAL location 39B/7EC6F60 on timeline 2 pg_rewind: rewinding from last common checkpoint at 39B/7E8E3F8 on timeline 2 pg_rewind: error: file "pg_tblspc/34244696" is of different type in source and target The file is confirmed to be a JUNCTION to the correct location on both the source and target. So the error looks like a problem interacting with Windows and detecting JUNCTION types in this case.
An EDB customer has encountered the same issue. They are not using in-place tablespaces.
I have reproduced this problem on release 15, not using an in-place tablespace.
The solution I came up with was to backpatch commits c5cb8f3b, 387803d8 and 5fc88c5d53.
I don't think we need to do anything relating to in-place tablespaces. These are documented as a developer only option and not for production.
The only question in my mind is whether those patches should be backpatched. It's a couple of hundred lines, and I think it's safe, but I'd welcome other opinions. If we are going to backpatch them we should also look at adding to adding tests for use of tablespaces with pg_rewind on the back branches. Ideally we'd get this done in time for the next maintenance release.
cheers
andrew
-- Andrew Dunstan EDB: https://www.enterprisedb.com
В списке pgsql-bugs по дате отправления: