pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vivek Khera <khera@kcilink.com>
To: pgsql-general@postgresql.org
Subject: Re: Backup?
Date: Fri, 05 Sep 2003 11:17:58 -0400
Message-ID: <x7smnb8dsp.fsf@yertle.int.kciLink.com> (raw)
References: <1062703912.28376.31.camel@pennywise.havleik.no>
	<m34qzsthh4.fsf@varsoon.wireboard.com>
	<1062714209.17023.143.camel@haggis>

>>>>> "RJ" == Ron Johnson <ron.l.johnson@cox.net> writes:

RJ> On Thu, 2003-09-04 at 15:40, Doug McNaught wrote:
>> Bjørn T Johansen <btj@havleik.no> writes:
>> 
>> > Should one use pg_dumpall to backup the database or is it more practical
>> > to just copy the data directory?
>> 
>> The data directory will not be consistent unless the server is
>> stopped.  pg_dumpall works well, produces a consistent backup and is
>> easily portable to a different machine architecture if need be.

RJ> And it's smaller than the data/ directory, especially when "-F c"
RJ> option is used.

That and indexes are represented as a single "CREATE INDEX" statement,
rather than possibly gigabytes of data ;-)

I had one index which I just realized was redundant to another and
deleting it saved me ~1Gb on disk.

For the curious, the indexes were like this:

PRIMARY KEY (a,b);
INDEX a ON mytable (a);

The query planner shows slightly longer plans with just the PK, but
the cost savings on mass inserts which happen often offset this
immensely, not to mention 1Gb of disk which never needs to be read
into the buffers ;-)


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@kciLink.com       Rockville, MD       +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/



view thread (57+ messages)  latest in thread

Message-ID: <x7smnb8dsp.fsf@yertle.int.kciLink.com>
Permalink:  ../x7smnb8dsp.fsf@yertle.int.kciLink.com/
Also on:    postgresql.org/message-id/x7smnb8dsp.fsf@yertle.int.kciLink.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: khera@kcilink.com
  Subject: Re: Backup?
  In-Reply-To: <x7smnb8dsp.fsf@yertle.int.kciLink.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox