Re: PATCH: Exclude unlogged tables from base backups

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: PATCH: Exclude unlogged tables from base backups
Дата
Msg-id CA+TgmoZho7rVjvSOX9r-qNAHL9oE6OH4VT=C0DUc1ye9JxF-zg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PATCH: Exclude unlogged tables from base backups  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: PATCH: Exclude unlogged tables from base backups  (Adam Brightwell <adam.brightwell@crunchydata.com>)
Re: PATCH: Exclude unlogged tables from base backups  (Masahiko Sawada <sawada.mshk@gmail.com>)
Список pgsql-hackers
On Tue, Dec 12, 2017 at 8:48 PM, Stephen Frost <sfrost@snowman.net> wrote:
> If the persistence is changed then the table will be written into the
> WAL, no?  All of the WAL generated during a backup (which is what we're
> talking about here) has to be replayed after the restore is done and is
> before the database is considered consistent, so none of this matters,
> as far as I can see, because the drop table or alter table logged or
> anything else will be in the WAL that ends up getting replayed.

I can't see a hole in this argument.  If we copy the init fork and
skip copying the main fork, then either we skipped copying the right
file, or the file we skipped copying will be recreated with the
correct contents during WAL replay anyway.

We could have a problem if wal_level=minimal, because then the new
file might not have been WAL-logged; but taking an online backup with
wal_level=minimal isn't supported precisely because we won't have WAL
replay to fix things up.

We would also have a problem if the missing file caused something in
recovery to croak on the grounds that the file was expected to be
there, but I don't think anything works that way; I think we just
assume missing files are an expected failure mode and silently do
nothing if asked to remove them.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: [HACKERS] pgbench more operators & functions
Следующее
От: Tom Lane
Дата:
Сообщение: Sun Studio 12 vs. __builtin_constant_p()