Re: 2.5TB Migration from SATA to SSD disks - PostgreSQL 9.2
От | Jim Nasby |
---|---|
Тема | Re: 2.5TB Migration from SATA to SSD disks - PostgreSQL 9.2 |
Дата | |
Msg-id | 65fc964b-a5f5-8c9b-37d6-a74ccd80feed@BlueTreble.com обсуждение исходный текст |
Ответ на | Re: 2.5TB Migration from SATA to SSD disks - PostgreSQL 9.2 (David Gibbons <david@dgibbons.net>) |
Ответы |
Re: 2.5TB Migration from SATA to SSD disks - PostgreSQL 9.2
|
Список | pgsql-general |
On 9/2/16 11:44 AM, David Gibbons wrote: > rsync -va /var/lib/pgsql/ /var/lib/pgsql2/ > service postgres stop > rsync -va /var/lib/pgsql/ /var/lib/pgsql2/ > > The second rsync will only copy the deltas from the first, it still has > to go in and determine what needs to be copied/what changed but the bulk > of it can be prepared/migrated before the actual downtime window. That is NOT safe. The problem is it allows rsync to use mtime alone to decide that a file is in sync, and that will fail if Postgres writes to a file in the same second that the first rsync reads from it (assuming Postgres writes after rsync reads). You need to add the --checksum flag to rsync (which means it will still have to read everything that's in /var/lib/pgsql). -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data Architecture and PostgreSQL Data in Trouble? Get it in Treble! http://BlueTreble.com 855-TREBLE2 (855-873-2532) mobile: 512-569-9461
В списке pgsql-general по дате отправления: