lio bod liobod.slony at gmail.com
Thu Mar 13 10:44:02 PDT 2008
Is the option used for pg_dump visible in slony1_extract_schema.sh ?
Are they any constraints on how to use pg_restore with the dump?

Are there any restrictions using this scripts while slon process are
running?

You said : "It is warning you that it can't keep the promise it wanted to
keep"
Could you precise?.

For my weird test I did run it on the origin node (i.e my master).  the
'mytmpbase' already exits with a user is connected. I confirm the remaining
(impossible to delete) 'mytmpbase'  is corrupted.

With a proper use of slony1_extract_schema.sh, I confirm also my restore
seems ok.
I'll check that in deep tomorrow...

Thx for your very quick answers,


2008/3/13, Christopher Browne <cbbrowne at ca.afilias.info>:
>
> "lio bod" <liobod.slony at gmail.com> writes:
> > Hello world,
> >
> >
> >
> > May i have more info about 'slony1_extract_schema.sh ' command.
> >
> > I'm not sure to understand what it it it supposed to do.
> >
> >
> >
> > For instance, looking at the doc (
> http://slony.info/documentation/adminscripts.html 19.4.
> slony1_extract_schema.sh) :
> >
> >
> >
> >    o "It dumps the origin node's schema, including the data in the
> Slony-I cluster schema."
> >      What is called 'origin node's schema' : My schema database before
> intrusive slony hacks?
> >    o "A slonik script is run to perform UNINSTALL NODE on the temporary
> database. This eliminates all the special Slony-I tables, schema, and
> removes Slony-I triggers
> >      from replicated tables."
> >      At this step, does it mean i got my schema and data before any
> intrusive slony hacks?
> >    o " Finally, pg_dump is run against the temporary database,
> delivering a copy of the cleaned up schema to standard output"
> >
> >
> >
> >
> > I expected a dumped file or new 'mytmpbase' in postgres.
> > I understand this a design choice.
> > Why not making a real dump on disk?
> > Why removing the mytmpbase after the treatment?
>
> It's working "the UNIX way;"
>
> - By delivering output to STDOUT, *you* get to choose what you do with
>    the output
>
> - It removes the temporary database in order to attempt to be an
>    idempotent operation, so that you could run this a second time
>    without needing some special cleanup procedure.
>
>
> > Btw i would like to submit here a weird test : i perform the command
> > wheras the 'mytmpbase' already exits with a user is connected :
>
> That obviously won't work, as creation of the database will fail, and
> we really can't predict what that user might do, while connected.
>
> That will injure the process, so don't do it.
>
> >    o Btw, it always says at the begining of its process :
> >      Warning: Set 1 does not origin on node 1 - original triggers and
> constraints will not be included in the dump
> >      What are the potential impacts on my dump and on my 'mytmpbase'?
> >      Is that in contradiction with the sentence 'delivering copy of the
> cleaned up schema' ?
>
> It is warning you that it can't keep the promise it wanted to keep.
>
> If you run it against a non-origin node, you will not get a totally
> "cleaned up" schema.
>
> >    o
> >
> >
> >    o At the end of this treatment:
> >
> >      dropdb: =E9chec de la suppression de la base de donn=E9es: ERREUR:=
  La
> base de donn=E9es =AB mytmpbase=BB est actuellement acc=E9d=E9e par d'aut=
res
> utilisateurs
> >      As my terminal are still french go on approximatively translating :
> >      dropdb: error on deleting database : ERROR: database  =AB mytmpbas=
e=BB
> is beeing accessed by other users
> >
> >      Indeed, 'mytmpbase' is not removed. May i trust it just like the
> dump into standard output? Will the restore of the dump be an image of
> 'mytmpbase'?
> >
> > Forgive me if this too dense, but i think any piece of answer will be
> usful not only for me but for the whole community,
>
> Apparently you ran it on other than the origin node, so the result
> will be a broken schema.
>
> Evidently I need to add a warning to the documentation to indicate
> that you shouldn't run this against a slave.  Done...
>
> <http://lists.slony.info/pipermail/slony1-commit/2008-March/002213.html>
> --
> "cbbrowne","@","linuxdatabases.info"
> http://linuxdatabases.info/info/spreadsheets.html
> DO IT -- it's easier to get forgiveness than permission.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20080313/=
f238c447/attachment.htm


More information about the Slony1-general mailing list