Re: alter table xxx set unlogged take long time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 26, 2022 at 5:45 AM James Pang (chaolpan) <chaolpan@xxxxxxxxx> wrote:
Without step 3 ,  copy data take long time.   Use wal_level=minimal can help make COPY load data without logging ?


I believe you are referring to:


Since the final state of your table will be "logged" relying on the above optimization is the correct path, if you enable "logged" at the end, even with wal_level=minimal, you do not benefit from the optimization and thus your data ends up being written to WAL.

Otherwise, it is overall time that matters, it's no use boasting the COPY is fast if you end up spending hours waiting for ALTER TABLE at the end.

David J.


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux