Fri Nov 18 06:13:55 PST 2011
- Previous message: [Slony1-general] Strange bug with slony 2.0.7 and postgresql 9.1.1
- Next message: [Slony1-general] error while slonik_execute_script(slony 2.1.0+postgresql 8.3.16)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
If you parse your schema to perl script below, it will be 'slony' clean:
#!/usr/bin/perl
#
my $TriggerFound=0;
my $SchemaToRemove="_replication";
while (<>)
{
if ( /$SchemaToRemove/ )
{
$TriggerFound=1;
}
if ($TriggerFound == 0)
{
print $_;
}
if (( /;/ ) && ($TriggerFound == 1))
{
$TriggerFound = 0;
}
}
Regards,
Ger Timmens
On 11/17/2011 09:00 PM, slony1-general-request at lists.slony.info wrote:
> Send Slony1-general mailing list submissions to
> slony1-general at lists.slony.info
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.slony.info/mailman/listinfo/slony1-general
> or, via email, send a message with subject or body 'help' to
> slony1-general-request at lists.slony.info
>
> You can reach the person managing the list at
> slony1-general-owner at lists.slony.info
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Slony1-general digest..."
>
>
> Today's Topics:
>
> 1. --exclude-schema skipping operators? (Brian Fehrle)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 17 Nov 2011 10:51:55 -0700
> From: Brian Fehrle <brianf at consistentstate.com>
> Subject: [Slony1-general] --exclude-schema skipping operators?
> To: slony1-general at lists.slony.info
> Message-ID: <4EC549BB.1040205 at consistentstate.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi all,
> (postgres version 8.3, slony version 1.2.21)
>
> Quick question. I want to create a schema only dump of a database
> (pg_dump -s), but I don't want any slony elements in the dump. I
> excluded the slony schema via --exclude-schema="_slony", and nothing in
> that schema was dumped.
>
> I do however, get some operators dumped that were not in the slony
> schema, but reference it.
>
> Example:
> --
> -- Name: <=; Type: OPERATOR; Schema: public; Owner: slony
> --
>
> CREATE OPERATOR <= (
> PROCEDURE = _slony.xxidle,
> LEFTARG = _slony.xxid,
> RIGHTARG = _slony.xxid,
> COMMUTATOR = >=,
> NEGATOR = >,
> RESTRICT = scalarltsel,
> JOIN = scalarltjoinsel
> );
> ALTER OPERATOR public.<= (_slony.xxid, _slony.xxid) OWNER TO slony;
>
>
> This operator lives in the public schema, but since it references things
> in _slony, when applying the dump to a new database, it fails (because
> the _slony schema isn't created, as intended).
>
> I don't remember ever seeing anything put into the public schema by
> slony before, am I mistaken? Or was my original setup of this slony
> cluster messed up where it put operators in the wrong schema in the
> first place? Does slony 2.x have the same behavior or has it changed?
>
> Thanks,
> - Brian F
>
>
> ------------------------------
>
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-general
>
>
> End of Slony1-general Digest, Vol 57, Issue 13
> **********************************************
- Previous message: [Slony1-general] Strange bug with slony 2.0.7 and postgresql 9.1.1
- Next message: [Slony1-general] error while slonik_execute_script(slony 2.1.0+postgresql 8.3.16)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list