On 11-02-22 03:47 AM, Sachin Srivastava wrote:
Hello All,
I have built PostgreSQL 9.0.3 on MinGW and then using the same I was
building slony1-2.0.6.
The first error i got was
i) error: storage size of 'act' isn't known
I got this around by changing the ifdef on line 1065 in slon.c from
"#ifndef CYGWIN to #ifndef WIN32".
ii) Now I am getting :
/gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../..
-I../../sr//c/slon -o slon.exe slon.o runtime_config.o local_listen.o
remote_listen.o remote//_worker.o sync_thread.o cleanup_thread.o
scheduler.o dbutils.o conf-file.o confo//ptions.o misc.o
../parsestatements/scanner.o port/pipe.o port/win32service.o
win//32ver.o -lpgport -L/c/pgsql-9.0.3/lib -L/c/pgsql-9.0.3/lib -lpq
-lpthread -lws//ock32/
/c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingwex.a(getopt.o):getopt.c:(//.text+0xb40):
multiple definition of `getopt'/
/c:/pgsql-9.0.3/lib/libpgport.a(getopt.o):getopt.c:(.text+0x0): first
defined her//e/
/remote_worker.o: In function `copy_set':/
/c:\slony1-2.0.6\src\slon/remote_worker.c:2553: undefined reference to
`slon_term//inate_worker'/
/c:\slony1-2.0.6\src\slon/remote_worker.c:2542: undefined reference to
`slon_term//inate_worker'/
It seems I broke this with
http://git.postgresql.org/gitweb?p=slony1-engine.git;a=commit;h=6c7c91252f437e9dd5c86b6f2a0f92840c135b6d
but I am not sure what the correct fix is.
a) Do we include that slon_terminate_worker function - as written for
WIN32 ? Would that even compile?
b) Do we change the calls in copy_set that call slon_terminate_worker to
slon_retry() calls ?
I'm leaning towards (b) with the attached patch (untested)
Sachin, the slony binaries enterprise db distributes with the one-click
installers, are they built with visual studio or MinGW
I should spend some time getting a proper Win32 slony built environment
setup (but I won't get to that in the next few weeks)
/collect2: ld returned 1 exit status/
/make[2]: *** [slon.exe] Error 1/
/make[2]: Leaving directory `/c/slony1-2.0.6/src/slon'/
/make[1]: *** [all] Error 2/
/make[1]: Leaving directory `/c/slony1-2.0.6/src'/
/make: *** [all] Error 2/
/
/
/
/
In PostgreSQL 9.0.3 they have included (which was not there in 9.0.2 and
thus slony builds fine there.):
#mingw has adopted a GNU-centric interpretation of optind/optreset,
# so always use our version on Windows.
if test "$PORTNAME" = "win32"; then
case " $LIBOBJS " in
*" getopt.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS getopt.$ac_objext"
;;
esac
Any help to make me go forward with this would be highly appreciated.
Thanks a lot.
/
/
/
/
/
/
/
/
--Regards,
Sachin Srivastava
EnterpriseDB <http://www.enterprisedb.com>, the Enterprise PostgreSQL
<http://www.enterprisedb.com> company.
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general
diff --git a/src/slon/remote_worker.c b/src/slon/remote_worker.c
index 13b4d43..55c8905 100644
*** a/src/slon/remote_worker.c
--- b/src/slon/remote_worker.c
*************** extern int STMTS[MAXSTATEMENTS];
*** 30,36 ****
* want to group together??? */
! void slon_terminate_worker(void);
/* ----------
* Local definitions
* ----------
--- 30,36 ----
* want to group together??? */
!
/* ----------
* Local definitions
* ----------
*************** remoteWorkerThread_main(void *cdata)
*** 1547,1553 ****
else
{
(void) slon_mkquery(&query1, "rollback transaction;");
! archive_terminate(node);
}
if (query_execute(node, local_dbconn, &query1) < 0)
slon_retry();
--- 1547,1553 ----
else
{
(void) slon_mkquery(&query1, "rollback transaction;");
! slon_retry();
}
if (query_execute(node, local_dbconn, &query1) < 0)
slon_retry();
*************** copy_set(SlonNode *node, SlonConn *local
*** 2539,2545 ****
node->no_id,
sub_provider,
set_id);
! slon_terminate_worker();
return -1;
}
--- 2539,2545 ----
node->no_id,
sub_provider,
set_id);
! slon_retry();
return -1;
}
*************** copy_set(SlonNode *node, SlonConn *local
*** 2550,2556 ****
node->no_id,
set_origin,
set_id);
! slon_terminate_worker();
return -1;
}
if (set == NULL)
--- 2550,2556 ----
node->no_id,
set_origin,
set_id);
! slon_retry();
return -1;
}
if (set == NULL)
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general