Re: PATCH: Exclude unlogged tables from base backups

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: PATCH: Exclude unlogged tables from base backups
Дата
Msg-id 20171213150456.GI4628@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: PATCH: Exclude unlogged tables from base backups  (David Steele <david@pgmasters.net>)
Ответы Re: PATCH: Exclude unlogged tables from base backups  (David Steele <david@pgmasters.net>)
Список pgsql-hackers
David,

* David Steele (david@pgmasters.net) wrote:
> On 12/12/17 8:48 PM, Stephen Frost wrote:
> > I don't think there is, because, as David points out, the unlogged
> > tables are cleaned up first and then WAL replay happens during recovery,
> > so the init fork will cause the relation to be overwritten, but then
> > later the logged 'drop table' and subsequent re-use of the relfilenode
> > to create a new table (or persistence change) will all be in the WAL and
> > will be replayed over top and will take care of this.
>
> Files can be copied in any order, so if an OID is recycled the backup
> could copy its first, second, or nth incarnation.  It doesn't really
> matter since all of it will be clobbered by WAL replay.
>
> The new base backup code just does the non-init fork removal in advance,
> following the same rules that would apply on recovery given the same
> file set.

Just to be clear- the new base backup code doesn't actually *do* the
non-init fork removal, it simply doesn't include the non-init fork in
the backup when there is an init fork, right?

We certainly wouldn't want a basebackup actually running around removing
the main fork for unlogged tables on a running and otherwise healthy
system. ;)

Thanks!

Stephen

Вложения

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

Предыдущее
От: Dmitry Dolgov
Дата:
Сообщение: Re: [HACKERS] eval_const_expresisions and ScalarArrayOpExpr
Следующее
От: Mark Dilger
Дата:
Сообщение: Re: [HACKERS] Something for the TODO list: deprecating abstime and friends