This one time, at band camp, Paolo Lucente wrote:
>Hello Jamie,
>
>On Fri, Aug 12, 2005 at 04:01:51PM +1000, Jamie Wilkinson wrote:
>> Is it true that stamp_inserted and stamp_updated don't get touched unless
>> sql_history and sql_history_roundoff are also set?  If so, when did this
>> change?
>
>Absolutely true.
>
>> I was running 0.7.4 for a while and I didn't have these set, recently I
>> upgraded and have found data missing.  I'm a bit surprised that this might
>> be the cause, though the documentation in CONFIG-KEYS leads me to believe
>> this is the case... also I wonder what the pmacctd processes might have done
>> when trying to write NULL data to a NOT NULL column in the database (namely,
>> stamp_inserted).
>
>This is very likely to be the cause. In previous ( < 0.7.9 pmacct release )
>PostgreSQL schemas, the 'stamp_inserted' column was lacking the trailing
>'DEFAULT' modifier into its declaration. This give origin to some troubles
>because the 'stamp_inserted' is definitely an optional field: the 'NOT NULL'
>was leading to loss of data. 

Ok.  Does this mean that unless the config options 'sql_history' and
'sql_history_roundoff' exist, then pmacctd will not write time stamps to the
database?

>Please, alter the table manually (using the 'ALTER TABLE ... SET DEFAULT')
>or apply the SQL script (of the new pmacct release) to create the new table of
>the same version you are currently using.

I've done so, but I've also added these two config options back to my config
file, and I'm seeing a lot of 'We are missing data' errors in the syslog.

Reply via email to