Re: pg_rewind and xlogtemp files

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Vladimir Borodin <root(at)simply(dot)name>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_rewind and xlogtemp files
Date: 2015-06-17 12:07:19
Message-ID: CAHGQGwF8LK19kpz-Ac5gZQCS8J-BoEZj2AWCWOGR8KuLb-XVJg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 17, 2015 at 4:57 PM, Vladimir Borodin <root(at)simply(dot)name> wrote:
>
> 17 июня 2015 г., в 9:48, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
> написал(а):
>
> On Wed, Jun 17, 2015 at 3:17 PM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)com> wrote:
>
> As pointed by dev1ant on the original bug report, process_remote_file
> should ignore files named as pg_xlog/xlogtemp.*, and I think that this
> is the right thing to do. Any objections for a patch that at the same
> time makes "xlogtemp." a define declaration in xlog_internal.h?
>
>
> Declaration seems to be the right thing.
>
> Another problem I’ve caught twice already in the same test:
>
> error reading xlog record: record with zero length at 0/78000090
> unexpected result while fetching remote files: ERROR: could not open file
> "base/13003/t6_2424967" for reading: No such file or directory
> The servers diverged at WAL position 0/76BADD50 on timeline 303.
> Rewinding from Last common checkpoint at 0/7651F870 on timeline 303
>
> I don’t know if this problem could be solved the same way (by skipping such
> files)… Should I start a new thread for that?

That's the file of the temporary table, so there is no need to copy it
from the source server. pg_rewind can safely skip such file, I think.

But even if we make pg_rewind skip such file, we would still get the
similar problem. You can see the problem that I reported in other thread.
In order to address this type of problem completely, we would need
to apply the fix that is been discussed in that thread.
http://www.postgresql.org/message-id/CAHGQGwEdsNgeNZo+GyrzZtjW_TkC=XC6XxrjuAZ7=X_cj1aHHg@mail.gmail.com

BTW, even pg_basebackup doesn't skip the file of temporary table.
But maybe we should change this, too.

Also pg_rewind doesn't skip the files that pg_basebackup does. ISTM
that basically pg_rewind can safely skip any files that pg_basebackup does.
So probably we need to reconsider which file to make pg_rewind skip.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-06-17 12:21:46 Re: pg_rewind and xlogtemp files
Previous Message Brendan Jurd 2015-06-17 10:31:28 [PATCH] Function to get size of asynchronous notification queue