From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | David Gibbons <david(at)dgibbons(dot)net>, Patrick B <patrickbakerbr(at)gmail(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: 2.5TB Migration from SATA to SSD disks - PostgreSQL 9.2 |
Date: | 2016-09-07 23:00:59 |
Message-ID: | 65fc964b-a5f5-8c9b-37d6-a74ccd80feed@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Ken Tanzer | 2016-09-07 23:03:26 | Re: How to assemble all fields of (any) view into a string? |
Previous Message | Jim Nasby | 2016-09-07 22:55:47 | Re: Privileges on public schema can't be revoked? |