Wed Jul 26 11:29:08 PDT 2006
- Previous message: [Slony1-commit] By darcyb: SET standard_conforming_strings to 'off' for pg 8.2 and
- Next message: [Slony1-commit] By cbbrowne: Problem with sequence handling introduced when Chris added
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
Check return codes for remaining log shipping logic points which weren't
evaluating file access return codes...
Modified Files:
--------------
slony1-engine/src/slon:
remote_worker.c (r1.116 -> r1.117)
-------------- next part --------------
Index: remote_worker.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slon/remote_worker.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -Lsrc/slon/remote_worker.c -Lsrc/slon/remote_worker.c -u -w -r1.116 -r1.117
--- src/slon/remote_worker.c
+++ src/slon/remote_worker.c
@@ -3477,6 +3477,17 @@
if (archive_dir)
{
rc = submit_string_to_archive("\\.");
+ if (rc < 0) {
+ PQclear(res2);
+ PQclear(res1);
+ slon_disconnectdb(pro_conn);
+ dstring_free(&query1);
+ dstring_free(&query2);
+ dstring_free(&query3);
+ dstring_free(&indexregenquery);
+ terminate_log_archive();
+ return -1;
+ }
}
#else /* ! HAVE_PQPUTCOPYDATA */
copydone = false;
@@ -3500,13 +3511,38 @@
case 0:
PQputline(loc_dbconn, copybuf);
PQputline(loc_dbconn, "\n");
- if (archive_dir)
- submit_string_to_archive(copybuf);
+ if (archive_dir) {
+ rc = submit_string_to_archive(copybuf);
+ if (rc < 0) {
+ PQclear(res2);
+ PQclear(res1);
+ slon_disconnectdb(pro_conn);
+ dstring_free(&query1);
+ dstring_free(&query2);
+ dstring_free(&query3);
+ dstring_free(&indexregenquery);
+ terminate_log_archive();
+ return -1;
+ }
+ }
break;
case 1:
PQputline(loc_dbconn, copybuf);
- if (archive_dir)
- submit_raw_data_to_archive(copybuf);
+ if (archive_dir) {
+ rc = submit_raw_data_to_archive(copybuf);
+ if (rc < 0) {
+ PQclear(res2);
+ PQclear(res1);
+ slon_disconnectdb(pro_conn);
+ dstring_free(&query1);
+ dstring_free(&query2);
+ dstring_free(&query3);
+ dstring_free(&indexregenquery);
+ terminate_log_archive();
+ return -1;
+ }
+
+ }
break;
}
@@ -3516,6 +3552,17 @@
if (archive_dir)
{
rc = submit_string_to_archive("\\.");
+ if (rc < 0) {
+ PQclear(res2);
+ PQclear(res1);
+ slon_disconnectdb(pro_conn);
+ dstring_free(&query1);
+ dstring_free(&query2);
+ dstring_free(&query3);
+ dstring_free(&indexregenquery);
+ terminate_log_archive();
+ return -1;
+ }
}
/*
@@ -3590,7 +3637,10 @@
}
if (archive_dir)
{
- submit_query_to_archive(&query1);
+ rc = submit_query_to_archive(&query1);
+ if (rc < 0) {
+ return -1;
+ }
}
gettimeofday(&tv_now, NULL);
@@ -3663,7 +3713,17 @@
if (archive_dir)
{
- submit_query_to_archive(&query1);
+ rc = submit_query_to_archive(&query1);
+ if (rc < 0) {
+ PQclear(res1);
+ slon_disconnectdb(pro_conn);
+ dstring_free(&query1);
+ dstring_free(&query2);
+ dstring_free(&query3);
+ dstring_free(&indexregenquery);
+ terminate_log_archive();
+ return -1;
+ }
}
}
else
@@ -6074,5 +6134,3 @@
}
slon_log(SLON_DEBUG3, " compressed actionseq subquery... %s\n", dstring_data(action_subquery));
}
-
-
- Previous message: [Slony1-commit] By darcyb: SET standard_conforming_strings to 'off' for pg 8.2 and
- Next message: [Slony1-commit] By cbbrowne: Problem with sequence handling introduced when Chris added
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list