Re: Bug in slot.c and are replication slots ever used at Window?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Bug in slot.c and are replication slots ever used at Window?
Дата
Msg-id 20180830182731.GE15446@paquier.xyz
обсуждение исходный текст
Ответ на Bug in slot.c and are replication slots ever used at Window?  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Ответы Re: Bug in slot.c and are replication slots ever used at Window?  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Thu, Aug 30, 2018 at 11:00:43AM +0300, Konstantin Knizhnik wrote:
> So if "isdir" is true (and it is true in this case), it sets O_RDONLY
> flag.  Then fsync_fname successfully opens slot file in readonly mode
> and calls fsync() which at windows is substituted with _commit() which
> in turn is wrapper for FlushFileBuffers.

It seems to me that you are right here, "path" points to
pg_replslot/$SLOTNAME/state which is a file so the fsync is incorrect.
I am not sure that we'd want to publish fsync_parent_path out of fd.c
though, so perhaps we could just save the slot path in a different
variable and use it?
--
Michael

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Online verification of checksums
Следующее
От: Alexander Kukushkin
Дата:
Сообщение: Re: BUG #15346: Replica fails to start after the crash