Re: Shortest offline window on database migration

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Shortest offline window on database migration
Дата
Msg-id CAMkU=1z+9WGq4Mbw1V-HXWo8CKw_esS+G6mVjKx9VA-X3LZ17Q@mail.gmail.com
обсуждение исходный текст
Ответ на Shortest offline window on database migration  (Haroldo Kerry <hkerry@callix.com.br>)
Ответы Re: Shortest offline window on database migration  (Haroldo Kerry <hkerry@callix.com.br>)
Список pgsql-performance
On Thu, May 30, 2019 at 11:08 AM Haroldo Kerry <hkerry@callix.com.br> wrote:
Hello,

We are migrating our PostgreSQL 9.6.10 database (with streaming replication active) to a faster disk array.
We are using this opportunity to enable checksums, so we will have to do a full backup-restore.
The database size is about 500GB, it takes about 2h:30min for a full backup, and then about 1h to fully restore it with checksum enabled on the new array, plus 2h to recreate the replica on the old array.

As others have noticed, your "trick" won't work.  So back to basics.  Are you using the best degree of parallelization on each one of these tasks?  What is the bottleneck of each one (CPU, disk, network)? how are you creating the replica?  Can you share the actual command lines for each one?  It seems odd that the dump (which only needs to dump the index and constraint definitions) is so much slower than the restore (which actually needs to build those indexes and validate the constraints). Is that because the dump is happening from the old slow disk and restore a new fast ones?  Same with creating the replica, why is that slower than actually doing the restore?

It sounds like you are planning on blowing away the old master server on the old array as soon as the upgrade is complete, so you can re-use that space to build the new replica?  That doesn't seem very safe to me--what if during the rebuilding of the replica you run into a major problem and have to roll the whole thing back?  What will the old array which is holding the current replica server be doing in all of this?

Cheers,

Jeff

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

Предыдущее
От: Haroldo Kerry
Дата:
Сообщение: Re: Shortest offline window on database migration
Следующее
От: Ian Lawrence Barwick
Дата:
Сообщение: Re: Shortest offline window on database migration