Search Postgresql Archives

syslog facilites and postgres ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 


Hi,

 

Should I be able to run two syslog facilities simultaneously ( postgres local0, and a  trigger function to  local3 ) successfully ?

 

I have postgresql 9.3.1exit running on freebsd and sending errors  to “syslog_facility= local0”.

That works fine.

 

I have created an insert  trigger on one of my datatables using plperlu that opens syslog to facility local3 which directs

portions of that newly inserted record to local3. ( see below).  This works with the the following issue.

 

I find occasional notifications in my local3 log file that should I believe be in the local0 log file.  E.g. I will see some of

my RAISE LOG output in the local3 output log file rather than in the local0 output log file.   I suspect this is happening

during the window in which local3 is open and closed in the trigger function.   I note that the errant notification I find in local3 is not also found

in local0.

 

 

Any suggestions on this concept ?

 

 

Thanks

 

 

Dave Day

  

 

CREATE OR REPLACE FUNCTION log.connection_history_post_insert()

  RETURNS trigger AS

$BODY$

  use Sys::Syslog;

  openlog('smdr', 'ndelay,pid', 'local3');

  my $tmp = $_TD->{new} {orig_addr} .'->' . $_TD->{new} {term_addr} . '~' . $_TD->{new} {answer_datetime}

  syslog ("info", "data %s ", $tmp);

  closelog();

  return;

$BODY$

  LANGUAGE plperlu VOLATILE


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux