Justin Clift jc
Wed May 19 12:06:48 PDT 2004
Hi all,

Just tried running the "slony_sample1_setup.sh" script, but it's giving 
errors.  Using FreeBSD 4.10-PRERELEASE and PostgreSQL 7.4.2.

Have done some initial investigation, but haven't quite been able to get 
it working yet.

As the first step I modified the constants in the 
"slony1_sample1.setup.sh" file with the values of the development 
servers here:

CLUSTER=test1
DBNAME1=pgbench
DBNAME2=pgbench
HOST1=xena
HOST2=tmp4
SLONY_USER=pgsql
PGBENCH_USER=justin

Then created the pgbench schema on both the master database server 
(xena) and the slave database server (tmp4) using using Jan's exact 
instruction on the page.  I think that in theory things should be ready 
at this stage to setup the replication.

Running the "slony_sample1_setup.sh" script at this stage then produced 
errors to the console (verbosity is "debug1" level for many things in 
the PostgreSQL config file):

***********

bash-2.05b$ ./slony_sample1_setup.sh
<stdin>:20: LOG:  statement: begin transaction;
<stdin>:20: LOG:  statement: select version();
<stdin>:20: LOG:  statement: rollback transaction;
<stdin>:20: LOG:  statement: begin transaction;
<stdin>:20: LOG:  statement: select 1 from "pg_catalog".pg_namespace N 
where N.nspname = '_test1';
<stdin>:20: LOG:  statement: create schema "_test1";
<stdin>:20: loading of file /usr/local/share/postgresql/xxid.v74.sql: 
PGRES_FATAL_ERROR ERROR:  current transaction is aborted, commands 
ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block
<stdin>:20: LOG:  statement: rollback transaction;
bash-2.05b$

***********

Checked for the existence of the xxid.v74.sql file at the location in 
the error message, and it's definitely there and readable.

Checking the syslog output shows these PostgreSQL error messages 
generated by the running of the slony_sample1_setup.sh script:

***********

May 19 21:55:47 xena postgres[68911]: [9-1] NOTICE:  type "_test1.xxid" 
is not yet defined
May 19 21:55:47 xena postgres[68911]: [9-2] DETAIL:  Creating a shell 
type definition.
May 19 21:55:47 xena postgres[68911]: [9-3] STATEMENT:  -- ----------
May 19 21:55:47 xena postgres[68911]: [9-4]     -- xxid.v73.sql.in
May 19 21:55:47 xena postgres[68911]: [9-5]     --
May 19 21:55:47 xena postgres[68911]: [9-6]     --      SQL script for 
loading the transaction ID compatible datatype
May 19 21:55:47 xena postgres[68911]: [9-7]     --
May 19 21:55:47 xena postgres[68911]: [9-8]     --      Copyright (c) 
2003-2004, PostgreSQL Global Development Group
May 19 21:55:47 xena postgres[68911]: [9-9]     --      Author: Jan 
Wieck, Afilias USA INC.
May 19 21:55:47 xena postgres[68911]: [9-10]    --
May 19 21:55:47 xena postgres[68911]: [9-11]    -- $Id: xxid.v73.sql,v 
1.1 2004/03/30 17:49:38 wieck Exp $
May 19 21:55:47 xena postgres[68911]: [9-12]    -- ----------
May 19 21:55:47 xena postgres[68911]: [9-13]
May 19 21:55:47 xena postgres[68911]: [9-14]    --
May 19 21:55:47 xena postgres[68911]: [9-15]    -- Type specific input 
and output functions
May 19 21:55:47 xena postgres[68911]: [9-16]    --
May 19 21:55:47 xena postgres[68911]: [9-17]    CREATE FUNCTION 
"_test1"."xxidin"(cstring) RETURNS "_test1"."xxid"
May 19 21:55:47 xena postgres[68911]: [9-18]            AS 
'$libdir/xxid', '_Slony_I_xxidin'
May 19 21:55:47 xena postgres[68911]: [9-19]            LANGUAGE C;
May 19 21:55:47 xena postgres[68911]: [9-20]    CREATE FUNCTION 
"_test1"."xxidout"("_test1"."xxid") RETURNS cstring
May 19 21:55:47 xena postgres[68911]: [9-21]            AS 
'$libdir/xxid', '_Slony_I_xxidout'
May 19 21:55:47 xena postgres[68911]: [9-22]            LANGUAGE C;
May 19 21:55:47 xena postgres[68911]: [9-23]
May 19 21:55:47 xena postgres[68911]: [9-24]
May 19 21:55:47 xena postgres[68911]: [9-25]    --
May 19 21:55:47 xena postgres[68911]: [9-26]    -- The data type itself
May 19 21:55:47 xena postgres[68911]: [9-27]    --
May 19 21:55:47 xena postgres[68911]: [9-28]    CREATE TYPE 
"_test1"."xxid" (
May 19 21:55:47 xena postgres[68911]: [9-29]            INPUT = 
"_test1"."xxidin",
May 19 21:55:47 xena postgres[68911]: [9-30]            OUTPUT = 
"_test1"."xxidout",
May 19 21:55:47 xena postgres[68911]: [9-31]            EXTERNALLENGTH = 12,
May 19 21:55:47 xena postgres[68911]: [9-32]            INTERNALLENGTH = 4,
May 19 21:55:47 xena postgres[68911]: [9-33]            PASSEDBYVALUE,
May 19 21:55:47 xena postgres[68911]: [9-34]            ALIGNMENT = int4
May 19 21:55:47 xena postgres[68911]: [9-35]    );
May 19 21:55:47 xena postgres[68911]: [9-36]
May 19 21:55:47 xena postgres[68911]: [9-37]
May 19 21:55:47 xena postgres[68911]: [9-38]    --
May 19 21:55:47 xena postgres[68911]: [9-39]    -- Since our xxid type 
has special cases for values 0-3, it
May 19 21:55:47 xena postgres[68911]: [9-40]    -- in fact IS xid, so 
allow implicit type casting to and from.
May 19 21:55:47 xena postgres[68911]: [9-41]    --
May 19 21:55:47 xena postgres[68911]: [9-42]    CREATE CAST (xid AS 
"_test1".xxid)
May 19 21:55:47 xena postgres[68911]: [9-43]            WITHOUT FUNCTION 
AS IMPLICIT;
May 19 21:55:47 xena postgres[68911]: [9-44]    CREATE CAST 
("_test1".xxid AS xid)
May 19 21:55:47 xena postgres[68911]: [9-45]            WITHOUT FUNCTION 
AS IMPLICIT;
May 19 21:55:47 xena postgres[68911]: [9-46]
May 19 21:55:47 xena postgres[68911]: [9-47]
May 19 21:55:47 xena postgres[68911]: [9-48]    --
May 19 21:55:47 xena postgres[68911]: [9-49]    -- Comparision functions 
for the new datatype
May 19 21:55:47 xena postgres[68911]: [9-74]            LANGUAGE C;
May 19 21:55:47 xena postgres[68911]: [9-75]    CREATE FUNCTION 
"_test1".getMinXid() RETURNS "_test1"."xxid"
May 19 21:55:47 xena postgres[68911]: [9-76]            AS 
'$libdir/xxid', '_Slony_I_getMinXid'
May 19 21:55:47 xena postgres[68911]: [9-77]            LANGUAGE C;
May 19 21:55:47 xena postgres[68911]: [9-78]    CREATE FUNCTION 
"_test1".getMaxXid() RETURNS "_test1"."xxid"
May 19 21:55:47 xena postgres[68911]: [9-79]            AS 
'$libdir/xxid', '_Slony_I_getMaxXid'
May 19 21:55:47 xena postgres[68911]: [9-80]            LANGUAGE C;
May 19 21:55:47 xena postgres[68911]: [9-81]
May 19 21:55:47 xena postgres[68911]: [9-82]
May 19 21:55:47 xena postgres[68911]: [9-83]    --
May 19 21:55:47 xena postgres[68911]: [9-84]    -- Operators on these 
comparision functions
May 19 21:55:47 xena postgres[68911]: [9-85]    --
May 19 21:55:47 xena postgres[68911]: [9-86]    CREATE OPERATOR < (
May 19 21:55:47 xena postgres[68911]: [9-87]            PROCEDURE = 
"_test1"."xxidlt",
May 19 21:55:47 xena postgres[68911]: [9-88]            LEFTARG = 
"_test1"."xxid",
May 19 21:55:47 xena postgres[68911]: [9-89]            RIGHTARG = 
"_test1"."xxid",
May 19 21:55:47 xena postgres[68911]: [9-90]            COMMUTATOR = >, 
NEGATOR = >=,
May 19 21:55:47 xena postgres[68911]: [9-91]            RESTRICT = 
scalarltsel, JOIN = scalarltjoinsel
May 19 21:55:47 xena postgres[68911]: [9-92]    );
May 19 21:55:47 xena postgres[68911]: [9-93]    CREATE OPERATOR = (
May 19 21:55:47 xena postgres[68911]: [9-94]            PROCEDURE = 
"_test1"."xxideq",
May 19 21:55:47 xena postgres[68911]: [9-95]            LEFTARG = 
"_test1"."xxid",
May 19 21:55:47 xena postgres[68911]: [9-96]            RIGHTARG = 
"_test1"."xxid",
May 19 21:55:47 xena postgres[68911]: [9-97]            COMMUTATOR = =, 
NEGATOR = <>,
May 19 21:55:47 xena postgres[68911]: [9-98]            RESTRICT = 
eqsel, JOIN = eqjoinsel,
May 19 21:55:47 xena postgres[68911]: [9-99]            SORT1 = <, SORT2 
= <,
May 19 21:55:47 xena postgres[68911]: [9-100]           HASHES
May 19 21:55:47 xena postgres[68911]: [9-101]   );
May 19 21:55:47 xena postgres[68911]: [9-102]   CREATE OPERATOR <> (
May 19 21:55:47 xena postgres[68911]: [9-103]           PROCEDURE = 
"_test1"."xxidne",
May 19 21:55:47 xena postgres[68911]: [9-104]           LEFTARG = 
"_test1"."xxid",
May 19 21:55:47 xena postgres[68911]: [9-105]           RIGHTARG = 
"_test1"."xxid",
May 19 21:55:47 xena postgres[68911]: [9-106]           COMMUTATOR = <>, 
NEGATOR = =,
May 19 21:55:47 xena postgres[68911]: [9-107]           RESTRICT = 
neqsel, JOIN = neqjoinsel
May 19 21:55:47 xena postgres[68911]: [9-108]   );
May 19 21:55:47 xena postgres[68911]: [9-109]   CREATE OPERATOR > (
May 19 21:55:47 xena postgres[68911]: [9-110]           PROCEDURE = 
"_test1"."xxidgt",
May 19 21:55:47 xena postgres[68911]: [9-111]           LEFTARG = 
"_test1"."xxid",
May 19 21:55:47 xena postgres[68911]: [9-112]           RIGHTARG = 
"_test1"."xxid",
May 19 21:55:47 xena postgres[68911]: [9-113]           COMMUTATOR = <, 
NEGATOR = <=,
May 19 21:55:47 xena postgres[68911]: [9-114]           RESTRICT = 
scalargtsel, JOIN = scalargtjoinsel
May 19 21:55:47 xena postgres[68911]: [9-115]   );
May 19 21:55:47 xena postgres[68911]: [9-116]   CREATE OPERATOR <= (
May 19 21:55:47 xena postgres[68911]: [9-117]           PROCEDURE = 
"_test1"."xxidle",
May 19 21:55:47 xena postgres[68911]: [9-118]           LEFTARG = 
"_test1"."xxid",
May 19 21:55:47 xena postgres[68911]: [9-119]           RIGHTARG = 
"_test1"."xxid",
May 19 21:55:47 xena postgres[68911]: [9-120]           COMMUTATOR = >=, 
NEGATOR = >,
May 19 21:55:47 xena postgres[68911]: [9-122]   );
May 19 21:55:47 xena postgres[68911]: [10-2] STATEMENT:  -- ----------
May 19 21:55:47 xena postgres[68911]: [12-1] ERROR:  current transaction 
is aborted, commands ignored until end of transaction block
May 19 21:55:47 xena postgres[68911]: [12-2] STATEMENT:  select 1;

***********

In the last CREATE OPERATOR statement, for the "<=" operatot, it looks 
like there's supposed to be something after the "NEGATOR = >," bit and 
before the closing bracket.  Not sure if that's what was really executed 
or if it's just the way the logging is showing.

Sorry for the lengthy email, but I felt it best to include everything 
just in case.  If someone wants me to re-run this with different 
options, different PostgreSQL configuration, different verbosity, or 
whatever, just let me know.

Hope this is useful.

:-)

Regards and best wishes,

Justin Clift


More information about the Slony1-general mailing list