Re: Catalog version access

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Catalog version access
Дата
Msg-id Ye4daRe1ytSBE64/@paquier.xyz
обсуждение исходный текст
Ответ на Re: Catalog version access  ("Bossart, Nathan" <bossartn@amazon.com>)
Ответы Re: Catalog version access  ("Bossart, Nathan" <bossartn@amazon.com>)
Список pgsql-hackers
On Mon, Aug 16, 2021 at 06:12:54PM +0000, Bossart, Nathan wrote:
> I was looking at the --check switch for the postgres binary recently
> [0], and this sounds like something that might fit in nicely there.
> In the attached patch, --check will also check the control file if one
> exists.

This would not work on a running postmaster as CreateDataDirLockFile()
is called beforehand, but we want this capability, no?

Abusing a bootstrap option for this purpose does not look like a good
idea, to be honest, especially for something only used internally now
and undocumented, but we want to use something aimed at an external
use with some documentation.  Using a separate switch would be more
adapted IMO.  Also, I think that we should be careful with the read of
the control file to avoid false positives?   We can rely on an atomic
read/write thanks to its maximum size of 512 bytes, but this looks
like a lot what has been done recently with postgres -C for runtime
GUCs, that *require* a read of the control file before grabbing the
values we are interested in.
--
Michael

Вложения

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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: makefiles writing to $@ should first write to $@.new
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Skipping logical replication transactions on subscriber side