Christopher Browne cbbrowne at afilias.info
Fri Nov 18 10:18:54 PST 2011
On Thu, Nov 17, 2011 at 12:51 PM, Brian Fehrle
<brianf at consistentstate.com> wrote:
> 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?

That's arguably a bug; I haven't reviewed the code, but it seems not
overly appropriate for Slony to be creating operators in other than
its own schema.

After all, someone might not *have* a public schema :-(.

At any rate, that operator is gone as of version 2.  The kind folks
from Skype got XID functions and such added into core in PostgreSQL
8.3, and as of Slony 2.0, we use the built-in functions rather than
having our own XXID type.


More information about the Slony1-general mailing list