Re: stale WAL files?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: stale WAL files?
Дата
Msg-id 20190329125811.GF1954@paquier.xyz
обсуждение исходный текст
Ответ на Re: stale WAL files?  (Rob Sargent <robjsargent@gmail.com>)
Ответы Re: stale WAL files?  (Rob Sargent <robjsargent@gmail.com>)
Re: stale WAL files?  (Gmail <robjsargent@gmail.com>)
Re: stale WAL files?  (Gmail <robjsargent@gmail.com>)
Re: stale WAL files?  (Gmail <robjsargent@gmail.com>)
Список pgsql-general
On Thu, Mar 28, 2019 at 09:53:16AM -0600, Rob Sargent wrote:
> This is pg10 so it's pg_wal.  ls -ltr
>
>
> -rw-------. 1 postgres postgres 16777216 Mar 16 16:33
> 0000000100000CEA000000B1
> -rw-------. 1 postgres postgres 16777216 Mar 16 16:33
> 0000000100000CEA000000B2
>
>  ... 217 more on through to ...
>
> -rw-------. 1 postgres postgres 16777216 Mar 16 17:01
> 0000000100000CEA000000E8
> -rw-------. 1 postgres postgres 16777216 Mar 16 17:01
> 0000000100000CEA000000E9
> -rw-------. 1 postgres postgres 16777216 Mar 28 09:46
> 0000000100000CEA0000000E

In Postgres 10 and older versions, the server keeps WAL segment for
the last completed segment, and the previous completed segment.  So
even if a checkpoint is issued, the current WAL insert point is never
really going to be on the first segment in pg_wal.  Isn't that the
origin of what you think is a problem?  So, say, if you issue a
checkpoint again, don't you see 0000000100000CEA000000B1 going away?

In Postgres 11, WAL segments worth only one checkpoint are kept
around.
--
Michael

Вложения

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

Предыдущее
От: "Vadi"
Дата:
Сообщение: Re: PostgreSQL equivalent of Oracle "member of"
Следующее
От: Rob Sargent
Дата:
Сообщение: Re: stale WAL files?