Re: [GENERAL] copying a large database to change encoding

2014-10-15 Thread Albe Laurenz
Matthew Chambers wrote: > Would something like this work best, or is it better to use pgdump? > > CREATE DATABASE newDatabase TEMPLATE oldDatabase ENCODING 'UTF8' > > Does using a template do a file system copy or just SQL copy everything over? Using the old database as template will not change

Re: [GENERAL] copying a large database to change encoding

2014-10-14 Thread Vick Khera
It should take about as much time as cp -r of the directory for that DB would take. On Tue, Oct 14, 2014 at 1:58 PM, Adrian Klaver wrote: > On 10/14/2014 10:43 AM, Matthew Chambers wrote: >> >> Thanks, >> >> How long did it take to complete? >> > > I did not time that copy. I just tried with a s

Re: [GENERAL] copying a large database to change encoding

2014-10-14 Thread Adrian Klaver
On 10/14/2014 10:43 AM, Matthew Chambers wrote: Thanks, How long did it take to complete? I did not time that copy. I just tried with a small database(76 MB on disk) and it took 27 secs. This is using Linux on an older(3 yrs+) i386 machine. -- Adrian Klaver adrian.kla...@aklaver.com --

Re: [GENERAL] copying a large database to change encoding

2014-10-14 Thread Matthew Chambers
Thanks, How long did it take to complete? On 15/10/14 06:39, Adrian Klaver wrote: On 10/14/2014 10:31 AM, Matthew Chambers wrote: Would something like this work best, or is it better to use pgdump? CREATE DATABASE newDatabase TEMPLATE oldDatabase ENCODING 'UTF8' I actually just did that fo

Re: [GENERAL] copying a large database to change encoding

2014-10-14 Thread Adrian Klaver
On 10/14/2014 10:31 AM, Matthew Chambers wrote: Would something like this work best, or is it better to use pgdump? CREATE DATABASE newDatabase TEMPLATE oldDatabase ENCODING 'UTF8' I actually just did that for a database. Does using a template do a file system copy or just SQL copy everyth

[GENERAL] copying a large database to change encoding

2014-10-14 Thread Matthew Chambers
Would something like this work best, or is it better to use pgdump? CREATE DATABASE newDatabase TEMPLATE oldDatabase ENCODING 'UTF8' Does using a template do a file system copy or just SQL copy everything over? -Matt