Sync production DB with development? - Mailing list pgsql-general

From Israel Brewster
Subject Sync production DB with development?
Date
Msg-id 83347676-2497-432A-8987-E91DD81D6FE0@ravnalaska.net
Whole thread Raw
Responses Re: Sync production DB with development?
Re: Sync production DB with development?
List pgsql-general
I am currently doing periodic syncs of one of my production databases to my development database using the command pg_dump -ch <production host> <database name> | psql <database name>, run on my development server. This works well enough, but as the size of the production database grows, this command is, for obvious reasons, getting progressively slower (a full sync like this currently takes about 35 seconds). Is there a better way? Something that will only transfer records that are different on the production server, like rsync does for files perhaps?

My main concern here is the time it takes to sync, given that the database size will only continue growing as time passes (unless I start implementing an archive at some point). The current database has two years worth of records. I would assume that the time the sync takes would grow roughly linearly with the number of records, so I could easily be over a minute of sync time in another two years. I would really rather not have to wait several minutes every time I want to update my development data.
-----------------------------------------------
Israel Brewster
Systems Analyst II
Ravn Alaska
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7293
-----------------------------------------------



Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Convert raw fields into Datum
Next
From: Emanuel Calvo
Date:
Subject: Re: Sync production DB with development?