Re: [Patch] Make pg_checksums skip foreign tablespace directories

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: David Steele <david(at)pgmasters(dot)net>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, michael(dot)banck(at)credativ(dot)de, pgsql-hackers(at)postgresql(dot)org, Stephen Frost <sfrost(at)snowman(dot)net>
Subject: Re: [Patch] Make pg_checksums skip foreign tablespace directories
Date: 2020-02-21 06:07:12
Message-ID: 20200221060712.GD3260@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 20, 2020 at 07:37:15AM -0600, David Steele wrote:
> But since the name includes the backend's pid you would need to get lucky
> and have a new backend with the same pid create the file after a restart. I
> tried it and the old temp file was left behind after restart and first
> connection to the database.
>
> I doubt this is a big issue in the field, but it seems like it would be nice
> to do something about it.

The natural area to do that would be around ResetUnloggedRelations().
Still that would require combine both operations to not do any
unnecessary lookups at the data folder paths.

> I'm not excited about the amount of code duplication between these three
> tools. I know this was because of back-patching various issues in the past,
> but I really think we need to unify these data structures/functions in HEAD.

The lists are duplicated because we have never really figured out how
to combine this code in one place. The idea was to have all the data
folder path logic and the lists within one header shared between the
frontend and backend but there was not much support for that on HEAD.

>> For now, my proposal is to fix the prefix first, and then let's look
>> at the business with tablespaces where needed.
>
> OK.

I'll let this patch round for a couple of extra day, and revisit it at
the beginning of next week.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message yuzuko 2020-02-21 06:14:05 Re: Autovacuum on partitioned table
Previous Message Tom Lane 2020-02-21 04:30:07 Re: pgsql: Add kqueue(2) support to the WaitEventSet API.