Hi all:
I've attached a patch against Slony-I 2.0.4 that we are currently using
to allow our PostgreSQL 8.4.8 + Slony-I 2.0.4 work properly with
EnterpriseDB 8.4.7.20 + EnterpriseDB's version of Slony-I 2.0.4. Please
take a look and see whether you agree that this should be incorporated
up stream.
It's a very trivial patch - but I guess it implies that Slony-I
introduces recognition of EnterpriseDB's build of PostgreSQL more
officially?
I had a similar patch against Slony-I 2.0.6 that I can provide if this
patch file isn't good enough - but due to EnterpriseDB still
distributing Slony-I 2.0.4, we're version locked on Slony-I 2.0.4 for now...
Thanks!
--
Mark Mielke<[email protected]>
diff -U5 -r original/slony1-2.0.4/src/slon/dbutils.c
slony1-2.0.4-ciena1/src/slon/dbutils.c
--- original/slony1-2.0.4/src/slon/dbutils.c 2009-12-09 15:58:15.000000000
-0500
+++ slony1-2.0.4-ciena1/src/slon/dbutils.c 2011-05-25 22:07:43.000000000
-0400
@@ -542,11 +542,12 @@
if (!res || PQresultStatus(res) != PGRES_TUPLES_OK)
{
PQclear(res);
return -1;
}
- if (sscanf(PQgetvalue(res, 0, 0), "PostgreSQL %d.%d.%d", &major,
&minor, &patch) < 2)
+ if (sscanf(PQgetvalue(res, 0, 0), "PostgreSQL %d.%d.%d", &major,
&minor, &patch) < 2 &&
+ sscanf(PQgetvalue(res, 0, 0), "EnterpriseDB %d.%d.%d", &major,
&minor, &patch) < 2)
{
PQclear(res);
return -1;
}
PQclear(res);
diff -U5 -r original/slony1-2.0.4/src/slonik/dbutil.c
slony1-2.0.4-ciena1/src/slonik/dbutil.c
--- original/slony1-2.0.4/src/slonik/dbutil.c 2010-02-11 18:09:18.000000000
-0500
+++ slony1-2.0.4-ciena1/src/slonik/dbutil.c 2011-05-25 22:07:57.000000000
-0400
@@ -395,11 +395,12 @@
dstring_free(&query);
if (res == NULL)
return -1;
- if (sscanf(PQgetvalue(res, 0, 0), "PostgreSQL %d.%d.%d", &major,
&minor, &patch) < 2)
+ if (sscanf(PQgetvalue(res, 0, 0), "PostgreSQL %d.%d.%d", &major,
&minor, &patch) < 2 &&
+ sscanf(PQgetvalue(res, 0, 0), "EnterpriseDB %d.%d.%d", &major,
&minor, &patch) < 2)
{
fprintf(stderr, "%s:%d: failed to parse %s for DB version\n",
stmt->stmt_filename, stmt->stmt_lno,
PQgetvalue(res, 0, 0));
PQclear(res);
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general