Re: archive status ".ready" files may be created too early

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: archive status ".ready" files may be created too early
Дата
Msg-id 20210831171836.ww43agvczffdultp@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: archive status ".ready" files may be created too early  ("Bossart, Nathan" <bossartn@amazon.com>)
Ответы Re: archive status ".ready" files may be created too early  ("Bossart, Nathan" <bossartn@amazon.com>)
Список pgsql-hackers
Hi,

On 2021-08-31 17:01:31 +0000, Bossart, Nathan wrote:
> > If the record ending at s4 + 10 isn't an async commit (and thus
> > XLogCtl->asyncXactLSN is smaller), and there are no further records, we can
> > end up waiting effectively forever for s2 (and s3) to be archived. If all
> > other connections (and autovac etc) are idle, there will be no XLogFlush()
> > calls, nor will XLogBackgroundFlush() do anything, because it'll hit the "If
> > already known flushed" path, because the the first page in s4 is only
> > partially filled.
> 
> I'm not following why s4 wouldn't be flushed in this example.  Even if
> the first page in s4 is only partially filled, that portion of the
> record should still get flushed, and we'll create the .ready files for
> s2 and s3 at that time.

What would trigger the flushing? We don't write out partially filled pages
unless
a) we're explicitly flushing an LSN on the partial page (e.g. because a
   synchronous commit record resides on it)
b) there's an async commit (i.e. commit with synchronous_commit=off) on the
   page

Greetings,

Andres Freund



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

Предыдущее
От: Pavel Luzanov
Дата:
Сообщение: Re: psql: \dl+ to list large objects privileges
Следующее
От: Zhihong Yu
Дата:
Сообщение: Re: suboverflowed subtransactions concurrency performance optimize