Thu Nov 4 09:13:34 PDT 2010
- Previous message: [Slony1-bugs] [Bug 17] slony doesn't build with a 'virtual' postgresql installation done with DESTDIR
- Next message: [Slony1-bugs] [Bug 144] replicate_partition stored procedure doesn't start replicating changes to the new table
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
http://www.slony.info/bugzilla/show_bug.cgi?id=156 --- Comment #6 from Christopher Browne <cbbrowne at ca.afilias.info> 2010-11-04 09:13:34 PDT --- (In reply to comment #5) > The latest version of the patch seems to introduce the following compiler > warning > > slon.c: In function ‘SlonMain’: > slon.c:460: warning: comparison between pointer and integer > > from the line > if (PQgetvalue(res, 0, 0) == 'f') { > slon_log(SLON_FATAL, > "slon_node_health_check > > I am surprised that your testing was able to get this warning to show up. > > PQgetvalue(..) will return a char * to a null terminated string not a char. > strncmp is probably what we want to be using. > > 2. If I modify the code to work around that issue this is all I see when I see > in the slon output. > > 2010-11-03 10:19:30 EDTCONFIG main: local node id = 1 > 2010-11-03 10:19:30 EDTFATAL could not call slon_node_health_check() - > 2010-11-03 10:19:30 EDTCONFIG slon: child terminated status: 9; pid: 31474, > current worker pid: 31474 > 2010-11-03 10:19:30 EDTINFO slon: done > 2010-11-03 10:19:30 EDTINFO slon: exit(0) > > > I'm not seeing the details. (ie the specific table that is the issue) Right you are... I have changed it to if (*(PQgetvalue(res, 0, 0)) == 'f') { which is consistent with what is done elsewhere: postgres at cbbrowne [12:08:05] [~/slony1-engine.github/src/slon] [bug156 *] -> % grep -n PQgetvalue *.c | grep "*" | grep "'" remote_worker.c:2661: if (*(PQgetvalue(res1, 0, 0)) == 't') slon.c:460: if (*(PQgetvalue(res, 0, 0)) == 'f') { slon.c:550: int no_active = (*PQgetvalue(res, i, 1) == 't') ? 1 : 0; (Of course, the second instance is for this patch! :-)) Here is a self-contained test of this, run against a node that was initialized and had tables added in. I mess with it by breaking sl_table.tab_reloid values. postgres at cbbrowne [12:10:00] [~/slony1-engine.github/src/slon] [bug156 *] -> % psql -d slonyregress1 -c "update _slony_regress1.sl_table set tab_reloid=tab_id;" UPDATE 4 postgres at cbbrowne [12:10:47] [~/slony1-engine.github/src/slon] [bug156 *] -> % slon slony_regress1 'dbname=slonyregress1' > /tmp/stdout.txt 2> /tmp/stderr.txt postgres at cbbrowne [12:10:55] [~/slony1-engine.github/src/slon] [bug156 *] -> % cat /tmp/stdout.txt 2010-11-04 12:10:55 EDTCONFIG main: slon version 2.0.5 starting up 2010-11-04 12:10:55 EDTINFO slon: watchdog process started 2010-11-04 12:10:55 EDTCONFIG slon: watchdog ready - pid = 29512 2010-11-04 12:10:55 EDTCONFIG slon: worker process created - pid = 29513 2010-11-04 12:10:55 EDTCONFIG main: Integer option vac_frequency = 3 2010-11-04 12:10:55 EDTCONFIG main: Integer option log_level = 0 2010-11-04 12:10:55 EDTCONFIG main: Integer option sync_interval = 2000 2010-11-04 12:10:55 EDTCONFIG main: Integer option sync_interval_timeout = 10000 2010-11-04 12:10:55 EDTCONFIG main: Integer option sync_group_maxsize = 20 2010-11-04 12:10:55 EDTCONFIG main: Integer option desired_sync_time = 60000 2010-11-04 12:10:55 EDTCONFIG main: Integer option syslog = 0 2010-11-04 12:10:55 EDTCONFIG main: Integer option quit_sync_provider = 0 2010-11-04 12:10:55 EDTCONFIG main: Integer option quit_sync_finalsync = 0 2010-11-04 12:10:55 EDTCONFIG main: Integer option sync_max_rowsize = 8192 2010-11-04 12:10:55 EDTCONFIG main: Integer option sync_max_largemem = 5242880 2010-11-04 12:10:55 EDTCONFIG main: Integer option remote_listen_timeout = 300 2010-11-04 12:10:55 EDTCONFIG main: Boolean option log_pid = 0 2010-11-04 12:10:55 EDTCONFIG main: Boolean option log_timestamp = 1 2010-11-04 12:10:55 EDTCONFIG main: Boolean option cleanup_deletelogs = 0 2010-11-04 12:10:55 EDTCONFIG main: Real option real_placeholder = 0.000000 2010-11-04 12:10:55 EDTCONFIG main: String option cluster_name = slony_regress1 2010-11-04 12:10:55 EDTCONFIG main: String option conn_info = dbname=slonyregress1 2010-11-04 12:10:55 EDTCONFIG main: String option pid_file = [NULL] 2010-11-04 12:10:55 EDTCONFIG main: String option log_timestamp_format = %Y-%m-%d %H:%M:%S %Z 2010-11-04 12:10:55 EDTCONFIG main: String option archive_dir = [NULL] 2010-11-04 12:10:55 EDTCONFIG main: String option sql_on_connection = [NULL] 2010-11-04 12:10:55 EDTCONFIG main: String option lag_interval = [NULL] 2010-11-04 12:10:55 EDTCONFIG main: String option command_on_logarchive = [NULL] 2010-11-04 12:10:55 EDTCONFIG main: String option syslog_facility = LOCAL0 2010-11-04 12:10:55 EDTCONFIG main: String option syslog_ident = slon 2010-11-04 12:10:55 EDTCONFIG main: String option cleanup_interval = 10 minutes 2010-11-04 12:10:55 EDTCONFIG main: local node id = 1 2010-11-04 12:10:55 EDTFATAL slon_node_health_check() returned false - fatal health problem! REPAIR CONFIG may be helpful to rectify this problem2010-11-04 12:10:55 EDTCONFIG slon: child terminated status: 9; pid: 29513, current worker pid: 29513 2010-11-04 12:10:55 EDTINFO slon: done 2010-11-04 12:10:55 EDTINFO slon: exit(0) postgres at cbbrowne [12:11:03] [~/slony1-engine.github/src/slon] [bug156 *] -> % cat /tmp/stderr.txt WARNING: table [id,nsp,name]=[1,table1,public] - sl_table does not match pg_class/pg_namespace WARNING: table [id,nsp,name]=[2,table2,public] - sl_table does not match pg_class/pg_namespace WARNING: table [id,nsp,name]=[4,table4,public] - sl_table does not match pg_class/pg_namespace WARNING: table [id,nsp,name]=[5,table5,public] - sl_table does not match pg_class/pg_namespace WARNING: Mismatch found between sl_table and pg_class. Slonik command REPAIR CONFIG may be useful to rectify this. postgres at cbbrowne [12:11:07] [~/slony1-engine.github/src/slon] [bug156 *] -> % -- Configure bugmail: http://www.slony.info/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
- Previous message: [Slony1-bugs] [Bug 17] slony doesn't build with a 'virtual' postgresql installation done with DESTDIR
- Next message: [Slony1-bugs] [Bug 144] replicate_partition stored procedure doesn't start replicating changes to the new table
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-bugs mailing list