Re: [Patch] Make pg_checksums skip foreign tablespace directories

Поиск
Список
Период
Сортировка
От David Steele
Тема Re: [Patch] Make pg_checksums skip foreign tablespace directories
Дата
Msg-id 498eb329-19a6-14bc-cd75-39187d7bc1fb@pgmasters.net
обсуждение исходный текст
Ответ на Re: [Patch] Make pg_checksums skip foreign tablespace directories  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: [Patch] Make pg_checksums skip foreign tablespace directories  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi Michael,

On 2/20/20 11:07 PM, Michael Paquier wrote:
 >   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.

Yeah, that's what I was thinking as well, since there is already a 
directory scan there and doing the check would be very cheap.  It's not 
obvious how to combine these in the right way without moving a lot of 
code around to non-obvious places.

One solution might be to have each subsystem register a function that 
does checks/cleanup as each path/file is found in a common scan 
function.  That's a pretty major rework though, and I doubt there would 
be much appetite for it to solve such a minor problem.

 >> 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.

Do you have the thread?  I'd like to see what was proposed and what the 
objections were.

Regards,
-- 
-David
david@pgmasters.net



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Juan José Santamaría Flecha
Дата:
Сообщение: Re: False failure during repeated windows build.
Следующее
От: David Steele
Дата:
Сообщение: Re: [Patch] Make pg_checksums skip foreign tablespace directories