Re: pg_dump - txt sql vs binary

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ciprian(dot)hodorogea(at)bitsp(dot)com
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_dump - txt sql vs binary
Date: 2006-01-23 17:23:05
Message-ID: 6688.1138036985@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Ciprian Hodorogea <ciprian(dot)hodorogea(at)bitsp(dot)com> writes:
> This will put in the output SQL file postgres functions also (not only
> those defined by me), for example:

> CREATE FUNCTION plpgsql_call_handler() RETURNS language_handler
> AS '$libdir/plpgsql', 'plpgsql_call_handler'
> LANGUAGE c;

> CREATE TYPE tablefunc_crosstab_2 AS (
> row_name text,
> category_1 text,
> category_2 text
> );

> CREATE FUNCTION connectby(text, text, text, text, integer, text) RETURNS
> SETOF record
> AS '$libdir/tablefunc', 'connectby_text'
> LANGUAGE c STABLE STRICT;

Those *were* all defined by you, at some point, because they aren't
preloaded in the system. Perhaps you have forgotten running the
contrib-module installation scripts, but you evidently did.

If you are having difficulty in reloading the definitions it suggests
that your new installation is lacking the contrib modules. You could
install them, or manually remove the unwanted stuff from the dump file,
or drop the functions from the source installation before making a dump.
(Some but not all of the contrib modules have "uninstall" scripts, which
would help with the last alternative.)

> Anyway, my question would be: if I have postgres 8.1.x installed on
> computer A and the same version of postgres installed on computer B,
> which would be your recommended way of backing up data on computer A and
> put it on computer B?

pg_dump is certainly the preferred method.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Brian A. Seklecki 2006-01-23 17:40:10 Re: "Blueprints for High Availability"
Previous Message Oleg Bartunov 2006-01-23 16:49:56 Re: Full Text Indexing Using Tsearch2-Module