Fri Apr 27 01:40:02 PDT 2007
- Previous message: [Slony1-patches] PostgreSQL 8.3 compatibilty
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Christopher Browne wrote: > cbbrowne at dba2:Slony-I/CMD/slony1-HEAD/tests> cat > /tmp/slony-regress.c12207/slonik.log > <stdin>:4: PGRES_FATAL_ERROR load '$libdir/slony1_funcs'; - ERROR: > could not load library "/opt/OXRS/dbs/pgsql82/lib/slony1_funcs.so": > /opt/OXRS/dbs/pgsql82/lib/slony1_funcs.so: undefined symbol: SET_VARSIZE > <stdin>:4: Error: the extension for the Slony-I C functions cannot be > loaded in database 'dbname=3Dslonyregress1 host=3Dlocalhost user=3Dcbbro= wne > port=3D5882'<stdin>:4: ERROR: no admin conninfo for node 134594856 > > Note: this problem is consistent across both branches (e.g. - HEAD = and 1.2). > > I suspect that this breaks something about support of older versions. > At some point, that may be acceptable for CVS HEAD, but I rather think > it won't be OK for 1.2 :-). > > I don't have time to explore that this afternoon; hopefully our > timezones differ sufficiently appropriately that you either see this > tonight or tomorrow morning. Sorry - thinko on my part combined with lack of testing on 8.2 (too = intent on making 8.3 work :-( ) Updated patches attached, each minus the extra =3D char that they were = previously sporting! Regards, Dave -------------- next part -------------- Index: Makefile.global.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /slony1/slony1-engine/Makefile.global.in,v retrieving revision 1.35 diff -c -r1.35 Makefile.global.in *** Makefile.global.in 26 Oct 2006 19:07:18 -0000 1.35 --- Makefile.global.in 26 Apr 2007 15:17:38 -0000 *************** *** 9,14 **** --- 9,19 ---- # $Id: Makefile.global.in,v 1.35 2006-10-26 19:07:18 wieck Exp $ # ---------- = + # PostgreSQL Version + PG_VERSION_MAJOR=3D @PG_VERSION_MAJOR@ + PG_VERSION_MINOR=3D @PG_VERSION_MINOR@ + PG_VERSION=3D @PG_VERSION@ + = #location substitutions = pgincludedir=3D @PGINCLUDEDIR@ Index: configure.ac =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /slony1/slony1-engine/configure.ac,v retrieving revision 1.60 diff -c -r1.60 configure.ac *** configure.ac 20 Feb 2007 11:20:44 -0000 1.60 --- configure.ac 26 Apr 2007 15:17:38 -0000 *************** *** 162,167 **** --- 162,171 ---- ACX_LIBSNMP() ACX_SLONYTOOLS() + AC_SUBST(PG_VERSION_MAJOR, $PG_VERSION_MAJOR) + AC_SUBST(PG_VERSION_MINOR, $PG_VERSION_MINOR) + AC_SUBST(PG_VERSION, $PG_VERSION) + = AC_SUBST(PGINCLUDEDIR, $PG_INCLUDEDIR) AC_SUBST(PGINCLUDESERVERDIR, $PG_INCLUDESERVERDIR) AC_SUBST(PGLIBDIR, $PG_LIBDIR) Index: src/backend/slony1_funcs.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /slony1/slony1-engine/src/backend/slony1_funcs.c,v retrieving revision 1.59 diff -c -r1.59 slony1_funcs.c *** src/backend/slony1_funcs.c 18 Apr 2007 21:20:22 -0000 1.59 --- src/backend/slony1_funcs.c 26 Apr 2007 15:17:39 -0000 *************** *** 44,51 **** #endif = /* -- Change from PostgreSQL Ver 8.3 -- */ ! #ifndef VARATT_SIZEP ! #define VARATT_SIZEP VARATT_SIZEP_DEPRECATED #endif = PG_FUNCTION_INFO_V1(_Slony_I_createEvent); --- 44,51 ---- #endif = /* -- Change from PostgreSQL Ver 8.3 -- */ ! #if !((PG_VERSION_MAJOR > 8) || ((PG_VERSION_MAJOR =3D=3D 8) && (PG_VERSI= ON_MINOR >=3D 3))) ! #define SET_VARSIZE(datum, size) (VARATT_SIZEP(datum)=3D(size)) #endif = PG_FUNCTION_INFO_V1(_Slony_I_createEvent); *************** *** 310,316 **** = len =3D strlen(SLONY_I_VERSION_STRING); retval =3D palloc(VARHDRSZ + len); ! VARATT_SIZEP(retval) =3D VARHDRSZ + len; memcpy(VARDATA(retval), SLONY_I_VERSION_STRING, len); = PG_RETURN_TEXT_P(retval); --- 310,317 ---- = len =3D strlen(SLONY_I_VERSION_STRING); retval =3D palloc(VARHDRSZ + len); ! = ! SET_VARSIZE(retval,VARHDRSZ + len); memcpy(VARDATA(retval), SLONY_I_VERSION_STRING, len); = PG_RETURN_TEXT_P(retval); *************** *** 383,401 **** case SLON_ROLE_UNSET: cs->session_role =3D SLON_ROLE_NORMAL; retval =3D palloc(VARHDRSZ + 6); ! VARATT_SIZEP(retval) =3D VARHDRSZ + 6; memcpy(VARDATA(retval), "normal", 6); break; = case SLON_ROLE_NORMAL: retval =3D palloc(VARHDRSZ + 6); ! VARATT_SIZEP(retval) =3D VARHDRSZ + 6; memcpy(VARDATA(retval), "normal", 6); break; = case SLON_ROLE_SLON: retval =3D palloc(VARHDRSZ + 4); ! VARATT_SIZEP(retval) =3D VARHDRSZ + 4; memcpy(VARDATA(retval), "slon", 4); break; } --- 384,402 ---- case SLON_ROLE_UNSET: cs->session_role =3D SLON_ROLE_NORMAL; retval =3D palloc(VARHDRSZ + 6); ! SET_VARSIZE(retval, VARHDRSZ + 6); memcpy(VARDATA(retval), "normal", 6); break; = case SLON_ROLE_NORMAL: retval =3D palloc(VARHDRSZ + 6); ! SET_VARSIZE(retval, VARHDRSZ + 6); memcpy(VARDATA(retval), "normal", 6); break; = case SLON_ROLE_SLON: retval =3D palloc(VARHDRSZ + 4); ! SET_VARSIZE(retval, VARHDRSZ + 4); memcpy(VARDATA(retval), "slon", 4); break; } *************** *** 490,496 **** elog(ERROR, "Slony-I: cannot determine log status"); if (SPI_processed !=3D 1) elog(ERROR, "Slony-I: cannot determine log status"); ! = log_status =3D DatumGetInt32(SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, NULL)); SPI_freetuptable(SPI_tuptable); --- 491,497 ---- elog(ERROR, "Slony-I: cannot determine log status"); if (SPI_processed !=3D 1) elog(ERROR, "Slony-I: cannot determine log status"); ! = log_status =3D DatumGetInt32(SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, NULL)); SPI_freetuptable(SPI_tuptable); *************** *** 636,643 **** */ *cp++ =3D ')'; *cp =3D '\0'; ! VARATT_SIZEP(cs->cmddata_buf) =3D ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)); } else if (TRIGGER_FIRED_BY_UPDATE(tg->tg_event)) { --- 637,644 ---- */ *cp++ =3D ')'; *cp =3D '\0'; ! SET_VARSIZE(cs->cmddata_buf, = ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf))); } else if (TRIGGER_FIRED_BY_UPDATE(tg->tg_event)) { *************** *** 874,881 **** cp +=3D len_value; } *cp =3D '\0'; ! VARATT_SIZEP(cs->cmddata_buf) =3D ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)); } else if (TRIGGER_FIRED_BY_DELETE(tg->tg_event)) { --- 875,882 ---- cp +=3D len_value; } *cp =3D '\0'; ! SET_VARSIZE(cs->cmddata_buf, ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf))); } else if (TRIGGER_FIRED_BY_DELETE(tg->tg_event)) { *************** *** 941,948 **** cp +=3D len_value; } *cp =3D '\0'; ! VARATT_SIZEP(cs->cmddata_buf) =3D ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)); } else elog(ERROR, "Slony-I: logTrigger() fired for unhandled event"); --- 942,949 ---- cp +=3D len_value; } *cp =3D '\0'; ! SET_VARSIZE(cs->cmddata_buf, ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf))); } else elog(ERROR, "Slony-I: logTrigger() fired for unhandled event"); *************** *** 1250,1256 **** = len =3D strlen(qstr); result =3D (text *) palloc(len + VARHDRSZ); ! VARATT_SIZEP(result) =3D len + VARHDRSZ; memcpy(VARDATA(result), qstr, len); = PG_RETURN_TEXT_P(result); --- 1251,1257 ---- = len =3D strlen(qstr); result =3D (text *) palloc(len + VARHDRSZ); ! SET_VARSIZE(result, len + VARHDRSZ); memcpy(VARDATA(result), qstr, len); = PG_RETURN_TEXT_P(result); *************** *** 1492,1504 **** * parameter and initialize the cmddata_buf. */ cs->cmdtype_I =3D malloc(VARHDRSZ + 1); ! VARATT_SIZEP(cs->cmdtype_I) =3D VARHDRSZ + 1; *VARDATA(cs->cmdtype_I) =3D 'I'; cs->cmdtype_U =3D malloc(VARHDRSZ + 1); ! VARATT_SIZEP(cs->cmdtype_U) =3D VARHDRSZ + 1; *VARDATA(cs->cmdtype_U) =3D 'U'; cs->cmdtype_D =3D malloc(VARHDRSZ + 1); ! VARATT_SIZEP(cs->cmdtype_D) =3D VARHDRSZ + 1; *VARDATA(cs->cmdtype_D) =3D 'D'; = /* --- 1493,1505 ---- * parameter and initialize the cmddata_buf. */ cs->cmdtype_I =3D malloc(VARHDRSZ + 1); ! SET_VARSIZE(cs->cmdtype_I, VARHDRSZ + 1); *VARDATA(cs->cmdtype_I) =3D 'I'; cs->cmdtype_U =3D malloc(VARHDRSZ + 1); ! SET_VARSIZE(cs->cmdtype_U, VARHDRSZ + 1); *VARDATA(cs->cmdtype_U) =3D 'U'; cs->cmdtype_D =3D malloc(VARHDRSZ + 1); ! SET_VARSIZE(cs->cmdtype_D, VARHDRSZ + 1); *VARDATA(cs->cmdtype_D) =3D 'D'; = /* -------------- next part -------------- Index: Makefile.global.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /slony1/slony1-engine/Makefile.global.in,v retrieving revision 1.34.2.1 diff -c -r1.34.2.1 Makefile.global.in *** Makefile.global.in 26 Oct 2006 18:55:05 -0000 1.34.2.1 --- Makefile.global.in 26 Apr 2007 16:07:07 -0000 *************** *** 9,14 **** --- 9,19 ---- # $Id: Makefile.global.in,v 1.34.2.1 2006-10-26 18:55:05 wieck Exp $ # ---------- = + # PostgreSQL Version + PG_VERSION_MAJOR=3D @PG_VERSION_MAJOR@ + PG_VERSION_MINOR=3D @PG_VERSION_MINOR@ + PG_VERSION=3D @PG_VERSION@ + = #location substitutions = pgincludedir=3D @PGINCLUDEDIR@ Index: configure.ac =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /slony1/slony1-engine/configure.ac,v retrieving revision 1.57.2.2 diff -c -r1.57.2.2 configure.ac *** configure.ac 20 Feb 2007 11:29:39 -0000 1.57.2.2 --- configure.ac 26 Apr 2007 16:07:07 -0000 *************** *** 162,167 **** --- 162,171 ---- ACX_LIBSNMP() ACX_SLONYTOOLS() = + AC_SUBST(PG_VERSION_MAJOR, $PG_VERSION_MAJOR) + AC_SUBST(PG_VERSION_MINOR, $PG_VERSION_MINOR) + AC_SUBST(PG_VERSION, $PG_VERSION) + = AC_SUBST(PGINCLUDEDIR, $PG_INCLUDEDIR) AC_SUBST(PGINCLUDESERVERDIR, $PG_INCLUDESERVERDIR) AC_SUBST(PGLIBDIR, $PG_LIBDIR) Index: src/backend/slony1_funcs.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /slony1/slony1-engine/src/backend/slony1_funcs.c,v retrieving revision 1.53.2.1 diff -c -r1.53.2.1 slony1_funcs.c *** src/backend/slony1_funcs.c 18 Apr 2007 19:28:27 -0000 1.53.2.1 --- src/backend/slony1_funcs.c 26 Apr 2007 16:07:08 -0000 *************** *** 41,48 **** #endif = /* -- Change from PostgreSQL Ver 8.3 -- */ ! #ifndef VARATT_SIZEP ! #define VARATT_SIZEP VARATT_SIZEP_DEPRECATED #endif = PG_FUNCTION_INFO_V1(_Slony_I_createEvent); --- 41,48 ---- #endif = /* -- Change from PostgreSQL Ver 8.3 -- */ ! #if !((PG_VERSION_MAJOR > 8) || ((PG_VERSION_MAJOR =3D=3D 8) && (PG_VERSI= ON_MINOR >=3D 3))) ! #define SET_VARSIZE(datum, size) (VARATT_SIZEP(datum)=3D(size)) #endif = PG_FUNCTION_INFO_V1(_Slony_I_createEvent); *************** *** 295,301 **** = len =3D strlen(SLONY_I_VERSION_STRING); retval =3D palloc(VARHDRSZ + len); ! VARATT_SIZEP(retval) =3D VARHDRSZ + len; memcpy(VARDATA(retval), SLONY_I_VERSION_STRING, len); = PG_RETURN_TEXT_P(retval); --- 295,302 ---- = len =3D strlen(SLONY_I_VERSION_STRING); retval =3D palloc(VARHDRSZ + len); ! = ! SET_VARSIZE(retval,VARHDRSZ + len); memcpy(VARDATA(retval), SLONY_I_VERSION_STRING, len); = PG_RETURN_TEXT_P(retval); *************** *** 368,386 **** case SLON_ROLE_UNSET: cs->session_role =3D SLON_ROLE_NORMAL; retval =3D palloc(VARHDRSZ + 6); ! VARATT_SIZEP(retval) =3D VARHDRSZ + 6; memcpy(VARDATA(retval), "normal", 6); break; = case SLON_ROLE_NORMAL: retval =3D palloc(VARHDRSZ + 6); ! VARATT_SIZEP(retval) =3D VARHDRSZ + 6; memcpy(VARDATA(retval), "normal", 6); break; = case SLON_ROLE_SLON: retval =3D palloc(VARHDRSZ + 4); ! VARATT_SIZEP(retval) =3D VARHDRSZ + 4; memcpy(VARDATA(retval), "slon", 4); break; } --- 369,387 ---- case SLON_ROLE_UNSET: cs->session_role =3D SLON_ROLE_NORMAL; retval =3D palloc(VARHDRSZ + 6); ! SET_VARSIZE(retval, VARHDRSZ + 6); memcpy(VARDATA(retval), "normal", 6); break; = case SLON_ROLE_NORMAL: retval =3D palloc(VARHDRSZ + 6); ! SET_VARSIZE(retval, VARHDRSZ + 6); memcpy(VARDATA(retval), "normal", 6); break; = case SLON_ROLE_SLON: retval =3D palloc(VARHDRSZ + 4); ! SET_VARSIZE(retval, VARHDRSZ + 4); memcpy(VARDATA(retval), "slon", 4); break; } *************** *** 475,481 **** elog(ERROR, "Slony-I: cannot determine log status"); if (SPI_processed !=3D 1) elog(ERROR, "Slony-I: cannot determine log status"); ! = log_status =3D DatumGetInt32(SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, NULL)); SPI_freetuptable(SPI_tuptable); --- 476,482 ---- elog(ERROR, "Slony-I: cannot determine log status"); if (SPI_processed !=3D 1) elog(ERROR, "Slony-I: cannot determine log status"); ! = log_status =3D DatumGetInt32(SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, NULL)); SPI_freetuptable(SPI_tuptable); *************** *** 621,628 **** */ *cp++ =3D ')'; *cp =3D '\0'; ! VARATT_SIZEP(cs->cmddata_buf) =3D ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)); } else if (TRIGGER_FIRED_BY_UPDATE(tg->tg_event)) { --- 622,629 ---- */ *cp++ =3D ')'; *cp =3D '\0'; ! SET_VARSIZE(cs->cmddata_buf, = ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf))); } else if (TRIGGER_FIRED_BY_UPDATE(tg->tg_event)) { *************** *** 859,866 **** cp +=3D len_value; } *cp =3D '\0'; ! VARATT_SIZEP(cs->cmddata_buf) =3D ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)); } else if (TRIGGER_FIRED_BY_DELETE(tg->tg_event)) { --- 860,867 ---- cp +=3D len_value; } *cp =3D '\0'; ! SET_VARSIZE(cs->cmddata_buf, ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf))); } else if (TRIGGER_FIRED_BY_DELETE(tg->tg_event)) { *************** *** 926,933 **** cp +=3D len_value; } *cp =3D '\0'; ! VARATT_SIZEP(cs->cmddata_buf) =3D ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)); } else elog(ERROR, "Slony-I: logTrigger() fired for unhandled event"); --- 927,934 ---- cp +=3D len_value; } *cp =3D '\0'; ! SET_VARSIZE(cs->cmddata_buf, ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf))); } else elog(ERROR, "Slony-I: logTrigger() fired for unhandled event"); *************** *** 1235,1241 **** = len =3D strlen(qstr); result =3D (text *) palloc(len + VARHDRSZ); ! VARATT_SIZEP(result) =3D len + VARHDRSZ; memcpy(VARDATA(result), qstr, len); = PG_RETURN_TEXT_P(result); --- 1236,1242 ---- = len =3D strlen(qstr); result =3D (text *) palloc(len + VARHDRSZ); ! SET_VARSIZE(result, len + VARHDRSZ); memcpy(VARDATA(result), qstr, len); = PG_RETURN_TEXT_P(result); *************** *** 1477,1489 **** * parameter and initialize the cmddata_buf. */ cs->cmdtype_I =3D malloc(VARHDRSZ + 1); ! VARATT_SIZEP(cs->cmdtype_I) =3D VARHDRSZ + 1; *VARDATA(cs->cmdtype_I) =3D 'I'; cs->cmdtype_U =3D malloc(VARHDRSZ + 1); ! VARATT_SIZEP(cs->cmdtype_U) =3D VARHDRSZ + 1; *VARDATA(cs->cmdtype_U) =3D 'U'; cs->cmdtype_D =3D malloc(VARHDRSZ + 1); ! VARATT_SIZEP(cs->cmdtype_D) =3D VARHDRSZ + 1; *VARDATA(cs->cmdtype_D) =3D 'D'; = /* --- 1478,1490 ---- * parameter and initialize the cmddata_buf. */ cs->cmdtype_I =3D malloc(VARHDRSZ + 1); ! SET_VARSIZE(cs->cmdtype_I, VARHDRSZ + 1); *VARDATA(cs->cmdtype_I) =3D 'I'; cs->cmdtype_U =3D malloc(VARHDRSZ + 1); ! SET_VARSIZE(cs->cmdtype_U, VARHDRSZ + 1); *VARDATA(cs->cmdtype_U) =3D 'U'; cs->cmdtype_D =3D malloc(VARHDRSZ + 1); ! SET_VARSIZE(cs->cmdtype_D, VARHDRSZ + 1); *VARDATA(cs->cmdtype_D) =3D 'D'; = /*
- Previous message: [Slony1-patches] PostgreSQL 8.3 compatibilty
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-patches mailing list