bugzilla-daemon at main.slony.info bugzilla-daemon at main.slony.info
Fri Dec 12 15:51:09 PST 2014
http://www.slony.info/bugzilla/show_bug.cgi?id=352

--- Comment #6 from Christopher Browne <cbbrowne at ca.afilias.info> 2014-12-12 15:51:09 PST ---
Looks like there's further entertainment...

Compiling the log trigger stuff has some curious warnings:

gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../.. -fpic
-I/var/lib/postgresql/dbs/postgresql-HEAD/include/server/ -c -o slony1_funcs.o
slony1_funcs.c
In file included from
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/postgres.h:48:0,
                 from slony1_funcs.c:13:
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:150:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
 ^
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:156:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
 ^
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:164:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 4)));
 ^
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:164:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:170:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
 ^
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:176:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
 ^
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:182:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
 ^
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:190:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 4)));
 ^
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:190:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:198:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 4)));
 ^
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:198:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:204:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
 ^
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:221:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
 ^
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:280:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
 ^
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:290:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
 ^
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/elog.h:466:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
 ^
In file included from
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/postgres.h:49:0,
                 from slony1_funcs.c:13:
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/palloc.h:112:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
 ^
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/palloc.h:115:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 0)));
 ^
In file included from
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/nodes/plannodes.h:18:0,
                 from
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/nodes/execnodes.h:21,
                 from
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/executor/execdesc.h:18,
                 from
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/utils/portal.h:50,
                 from
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/executor/spi.h:18,
                 from slony1_funcs.c:27:
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/lib/stringinfo.h:98:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
 ^
/var/lib/postgresql/dbs/postgresql-HEAD/include/server/lib/stringinfo.h:111:1:
warning: 'PG_PRINTF_ATTRIBUTE' is an unrecognized format function type
[-Wformat=]
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0)));
 ^
slony1_funcs.c: In function '_Slony_I_2_3_0_createEvent':
slony1_funcs.c:231:10: warning: variable 'buf_size' set but not used
[-Wunused-but-set-variable]
  size_t  buf_size;
          ^

And it seems as though this causes heartburn in terms of the inserts into the
target table not getting generated properly:


Dec 12 18:46:24 cbbrowne slon-slony_regress1-2[28360]: [205-1] INFO  
remoteWorkerThread_1: syncing set 1 with 4 table(s) from provider 1
Dec 12 18:46:24 cbbrowne postgres[28374]: [3-1] ERROR:  syntax error at or near
")" at character 32
Dec 12 18:46:24 cbbrowne postgres[28374]: [3-2] QUERY:  INSERT INTO
"public"."table1" () VALUES ();
Dec 12 18:46:24 cbbrowne postgres[28374]: [3-3] CONTEXT:  COPY sl_log_1, line
1: "1#0113632#0111#0111#011public#011table1#011I#0110#011{}"
Dec 12 18:46:24 cbbrowne postgres[28374]: [3-4] STATEMENT:  COPY
"_slony_regress1"."sl_log_1" ( log_origin,
log_txid,log_tableid,log_actionseq,log_tablenspname, log_tablerelname,
log_cmdtype, log_cmdupdncols,log_cmdargs) FROM STDIN

That's definitely not the schema for public.table1...

slonyregress1 at localhost->  \d table1
                         Table "public.table1"
 Column |  Type   |                      Modifiers                      
--------+---------+-----------------------------------------------------
 id     | integer | not null default nextval('table1_id_seq'::regclass)
 data   | text    | 
Indexes:
    "table1_pkey" PRIMARY KEY, btree (id)
Referenced by:
    TABLE "table2" CONSTRAINT "table2_table1_id_fkey" FOREIGN KEY (table1_id)
REFERENCES table1(id) ON UPDATE CASCADE ON DELETE CASCADE
Triggers:
    _slony_regress1_logtrigger AFTER INSERT OR DELETE OR UPDATE ON table1 FOR
EACH ROW EXECUTE PROCEDURE _slony_regress1.logtrigger('_slony_regress1', '1',
'k')
    _slony_regress1_truncatetrigger BEFORE TRUNCATE ON table1 FOR EACH
STATEMENT EXECUTE PROCEDURE _slony_regress1.log_truncate('1')
Disabled user triggers:
    _slony_regress1_denyaccess BEFORE INSERT OR DELETE OR UPDATE ON table1 FOR
EACH ROW EXECUTE PROCEDURE _slony_regress1.denyaccess('_slony_regress1')
    _slony_regress1_truncatedeny BEFORE TRUNCATE ON table1 FOR EACH STATEMENT
EXECUTE PROCEDURE _slony_regress1.deny_truncate()

Compare with how slony1_funcs.c gets built against PG 9.3:

gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../.. -fpic
-I/var/lib/postgresql/dbs/postgresql-9.3/include/server/ -c -o slony1_funcs.o
slony1_funcs.c
slony1_funcs.c: In function '_Slony_I_2_3_0_createEvent':
slony1_funcs.c:231:10: warning: variable 'buf_size' set but not used
[-Wunused-but-set-variable]
  size_t  buf_size;
          ^
The complaints about PG_PRINTF_ATTRIBUTE seem pretty significant, despite being
mere "warnings".

-- 
Configure bugmail: http://www.slony.info/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the Slony1-bugs mailing list