Re: pg_restore enhancements

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_restore enhancements
Дата
Msg-id 2659882.1700754936@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_restore enhancements  (Ron Johnson <ronljohnsonjr@gmail.com>)
Ответы Re: pg_restore enhancements
Список pgsql-general
Ron Johnson <ronljohnsonjr@gmail.com> writes:
> On Thu, Nov 23, 2023 at 3:37 AM Laurenz Albe <laurenz.albe@cybertec.at>
> wrote:
>> You can avoidwriting WAL if you set "wal_level = minimal", restart
>> PostgreSQL
>> and restore the dump with the --single-transaction option.

> Why does "--single-transaction" prevent WAL writes?  I'd expect _more_
> pg_wal growth from One Ginormous Transaction.

I don't recall all the details offhand, but there's some optimization
concerned with not writing WAL if COPY's target table was created in
the current transaction.  WAL will still be made for the catalog
changes, but usually the bulk of the WAL for a pg_restore run comes
from loading data, and this recipe eliminates that.  (Of course,
you cannot use it on a replication primary.)

            regards, tom lane



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Inquiry Regarding Initial Seed for pgsql Protocol Fuzz Testing
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Check Code Correction Current Period Prior Period Movement