turn of param logging for the build_status and build_status_log tables, to avoid...
authorAndrew Dunstan <andrew@dunslane.net>
Wed, 10 Nov 2010 01:27:23 +0000 (01:27 +0000)
committerAndrew Dunstan <andrew@dunslane.net>
Wed, 10 Nov 2010 01:27:23 +0000 (01:27 +0000)
trunk/cgi-bin/pgstatus.pl

index 481eb5ad3855035488f6938ce6374260eb320996..5291b0eea024a183850a46b8590d15d8735ff044 100755 (executable)
@@ -295,6 +295,16 @@ my $logst = <<EOSQL;
     values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
 EOSQL
 ;
+
+
+# this transaction lets us set log_error_verbosity to terse
+# just for the duration of the transaction. That turns off logging the
+# bind params, so all the logs don't get stuffed on the postgres logs
+
+$db->begin_work;
+$db->do("select set_local_error_terse()");
+
+
 $sth=$db->prepare($logst);
 
 $sth->bind_param(1,$animal);
@@ -318,6 +328,8 @@ $sth->bind_param(16,$frozen_sconf,{ pg_type => DBD::Pg::PG_BYTEA });
 $sth->execute;
 $sth->finish;
 
+
+
 my $logst2 = <<EOSQL;
 
   insert into build_status_log 
@@ -348,9 +360,10 @@ foreach my $log_file( @log_file_names )
                  "$stage_interval seconds");
 }
 
-
 $sth->finish;
 
+$db->commit;
+
 my $prevst = <<EOSQL;
 
   select coalesce((select distinct on (snapshot) stage