Christopher Browne cbbrowne at ca.afilias.info
Fri May 1 08:17:13 PDT 2009
Melvin Davidson <melvin6925 at yahoo.com> writes:
>  2009-04-29 09:42:45 EDT ERROR  cleanupThread: " analyze "_mas_rep".sl_seqlog;" - 2009-04-29 09:42:45 EDT DEBUG1 cleanupThread:  analyze "_mas_r 
>  2009-04-29 09:42:45 EDT ERROR  cleanupThread: " analyze "_mas_rep".sl_archive_counter;" - 2009-04-29 09:42:45 EDT DEBUG1 cleanupThread:  analyz 
>  2009-04-29 09:42:45 EDT ERROR  cleanupThread: " analyze "pg_catalog".pg_listener;" - 2009-04-29 09:42:45 EDT DEBUG1 cleanupThread:  analyze "pg 
>  2009-04-29 09:42:45 EDT ERROR  cleanupThread: " analyze "pg_catalog".pg_statistic;" - 2009-04-29 09:42:45 EDT INFO   cleanupThread:    0.007 se 
>  I still have no clue as to why this is occurring. These errors are only reported in the slony log, The postgres log shows nothing related.      
>  Could it possibly be related to the O/S? It is CentOS-5.3. Once again I am using Slony version 2.0.1.                                           

I found it; it's not a terribly big deal.

The problem is that the result code coming back from the vacuum was
being interpreted badly, though fortunately, the only result was the
spurious error message you were getting.  No damage is being done,
save for spurious error messages in the log file.

Here's the patch I'm putting in to clean this up:

% cvs diff -u cleanup_thread.c
Index: cleanup_thread.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/cleanup_thread.c,v
retrieving revision 1.45
diff -c -u -r1.45 cleanup_thread.c
cvs diff: conflicting specifications of output style
--- cleanup_thread.c	28 May 2008 19:09:37 -0000	1.45
+++ cleanup_thread.c	1 May 2009 15:14:51 -0000
@@ -189,6 +189,7 @@
 			{
 				char	   *tab_nspname = PQgetvalue(res, t, 0);
 				char	   *tab_relname = PQgetvalue(res, t, 1);
+				ExecStatusType vrc;
 
 				slon_log(SLON_DEBUG1, "cleanupThread: %s analyze \"%s\".%s;\n",
 						 vacuum_action, tab_nspname, tab_relname);
@@ -196,15 +197,23 @@
 				slon_mkquery(&query_pertbl, "%s analyze \"%s\".%s;",
 							 vacuum_action, tab_nspname, tab_relname);
 				res2 = PQexec(dbconn, dstring_data(&query_pertbl));
-				if (PQresultStatus(res) != PGRES_COMMAND_OK)	/* query error */
+				vrc = PQresultStatus(res);
+				if (vrc == PGRES_FATAL_ERROR)
 				{
 					slon_log(SLON_ERROR,
 							 "cleanupThread: \"%s\" - %s",
-					dstring_data(&query_pertbl), PQresultErrorMessage(res2));
+							 dstring_data(&query_pertbl), PQresultErrorMessage(res2));
 
 					/*
 					 * slon_retry(); break;
 					 */
+				} else {
+					if (vrc == PGRES_NONFATAL_ERROR) {
+						slon_log(SLON_WARN,
+								 "cleanupThread: \"%s\" - %s",
+								 dstring_data(&query_pertbl), PQresultErrorMessage(res2));
+						
+					}
 				}
 				PQclear(res2);
 				dstring_reset(&query_pertbl);

-- 
select 'cbbrowne' || '@' || 'ca.afilias.info';
<http://dba2.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)
"Bother,"  said Pooh,  "Eeyore, ready  two photon  torpedoes  and lock
phasers on the Heffalump, Piglet, meet me in transporter room three"


More information about the Slony1-general mailing list