Re: pg_options ?

From: Blashko Alexander <black(at)lins(dot)ospu(dot)odessa(dot)ua>
To: Massimo Dal Zotto <dz(at)cs(dot)unitn(dot)it>
Cc: PostgreSQL Hackers <hackers(at)postgreSQL(dot)org>
Subject: Re: pg_options ?
Date: 1999-01-05 08:10:07
Message-ID: Pine.LNX.3.96.990105100342.776A-100000@lins.ospu.odessa.ua
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Mon, 4 Jan 1999, Massimo Dal Zotto wrote:

> >
> >
> > Hi everybody.
> > I tried to use pg_options for monitoring sql-query.
> > pg_options: all=1
> > /ets/syslog.conf:
> > local5.* /var/log/postgres
> > for postgres start i use script src/contrib/linux/postgres.init.csh:
> > (postmaster -d 2 2>&1 | logger -p local5.notice) &
> >
> > In /var/log/postgres i have:
> > Jan 4 17:13:09 SantaMariya logger: StartTransactionCommand
> >
> >
> > How can i give syslog information in form:
> > #timestamp #pid #message
> >
> > For example:
> > Jan 4 17:13:09.173 [29271] StartTransactionCommand
> > ^^^ ^^^^^
> > I need this
> > information.
> >
> > Thank you for your answer.
>
> There is a better way to do it. Compile postgres with -DUSE_SYSLOG, add
> syslog=1 or syslog=2 into pg_options and it will output all elog messages
> to the syslog facility with the pid. See trace.c for details.
> But you won't be able to see the milliseconds fields because syslog
> doesn't handle this information.

Thank you for your answer.
But in doc (pg-options.html) you got example:
#timestamp #pid #message
980127.17:52:14.173 [29271] StartTransactionCommand
980127.17:52:14.174 [29271] ProcessUtility: drop table t;
980127.17:52:14.186 [29271] SIIncNumEntries: table is 70% full

How can i get this information with milliseconds without using syslog ?

Thank you for your answer.
>
> --
> Massimo Dal Zotto
>
> +----------------------------------------------------------------------+
> | Massimo Dal Zotto email: dz(at)cs(dot)unitn(dot)it |
> | Via Marconi, 141 phone: ++39-0461534251 |
> | 38057 Pergine Valsugana (TN) www: http://www.cs.unitn.it/~dz/ |
> | Italy pgp: finger dz(at)tango(dot)cs(dot)unitn(dot)it |
> +----------------------------------------------------------------------+
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Anatoly K. Lasareff 1999-01-05 09:15:43 Re: [GENERAL] Triggers and sql functions not working...
Previous Message Anand Surelia 1999-01-05 02:48:31 Regression test failing on Sparc Solaris 2.5.1

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Broytmann 1999-01-05 08:49:18 Re: Date/time fixes for HAVE_TM_ZONE platforms
Previous Message Marc G. Fournier 1999-01-05 08:03:08 [test] ignore this