Christopher Browne cbbrowne at afilias.info
Wed Oct 24 14:58:41 PDT 2012
On Wed, Oct 24, 2012 at 4:23 PM, Joe Conway <mail at joeconway.com> wrote:
> In the fine manual it says:
>
>     "If you pg_dump your database avoid dumping your Slony schemas or
>      else pg_dump's locking will compete with Slony's own locking which
>      could stop Slony replication for the duration of the pg_dump.
>      Exclude the Slony schemas from pg_dump with
>      --exclude-schema=schemaname to specifically exclude your Slony
>      schema."
>
> Question: if I exclude dumping the slony schema, how can I successfully
> restore my tables? My tables all have dependencies on the slony
> triggers, which will then be missing when I go to restore the tables.

It all depends on whether you treat that failure as an error or not.

Arguably, the failure to restore the triggers isn't a "real" error, if
you squint at things in a particular way.

Alternatively, I suppose you could do a separate dump of *just* the
Slony schema.  That has *some* risk of locking conflict, but it should
be an entirely smaller risk, as it's not encompassing the likely-large
backup of your application's schema and data.  Dump the Slony schema,
and load it first, and that would allow the
schema-excluding-Slony-bits to work.

But my preference would be to squint at things sideways and say, "It's
OK that those triggers didn't load in."


More information about the Slony1-general mailing list