Thread: RE: [GENERAL] Transaction logging

RE: [GENERAL] Transaction logging

From
Michael Davis
Date:
This is a great idea.  I have not been successful in tracking any
information on syslog.  Any suggestions on where I might find some good
documentation on syslog?

    -----Original Message-----
    From:    Peter T Mount [SMTP:peter@retep.org.uk]
    Sent:    Tuesday, February 23, 1999 3:40 AM
    To:    Michael Davis
    Cc:    'pgsql-general@postgreSQL.org'
    Subject:    Re: [GENERAL] Transaction logging

    On Mon, 22 Feb 1999, Michael Davis wrote:

    > Has anyone implemented transaction logging in Postgres?  Any
suggestions on
    > how to easily implement transaction logging?  Storing the log file
in a text
    > file seems best but I am not sure out to open and write to a text
file from
    > a trigger.  I would also be nice to post this transaction log
against a back
    > up server.

    Just a quick thought, but how about using syslog? That can be used
to post
    queries to a remote server, and it can be told to store the
"postgres"
    stuff to a seperate file on that server.

    Just an idea...

    --
           Peter T Mount peter@retep.org.uk
          Main Homepage: http://www.retep.org.uk
    PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
     Java PDF Generator: http://www.retep.org.uk/pdf

Re: [GENERAL] Transaction logging

From
jim@reptiles.org (Jim Mercer)
Date:
> This is a great idea.  I have not been successful in tracking any
> information on syslog.  Any suggestions on where I might find some good
> documentation on syslog?
>
>     Just a quick thought, but how about using syslog? That can be used
> to post queries to a remote server, and it can be told to store the
> "postgres" stuff to a seperate file on that server.

i don't know that syslog is robust enough for what you want.

i don't think it has any error checking to verify that a message was
received, etc.

most BSD's and linux would have good refernce ports of syslogd, etc.

--
[ Jim Mercer    Reptilian Research      jim@reptiles.org   +1 416 410-5633 ]
[ The telephone, for those of you who  have forgotten, was a commonly used ]
[ communications technology in the days before electronic mail.            ]
[ They're still easy to find in most large cities. -- Nathaniel Borenstein ]

Re: [GENERAL] Transaction logging

From
Thomas Reinke
Date:
Don't use syslog under any circumstances!!!!

1. Syslog breaks up records longer than X number of bytes - you'd
   have to piece them together.

2. Communication to syslog is over udp - (i.e. unreliable message
   sends) thus message loss can occur.

3. All the other complaints about syslog already mentioned: additional
   data added to the logs, etc.

Jim Mercer wrote:
>
> > This is a great idea.  I have not been successful in tracking any
> > information on syslog.  Any suggestions on where I might find some good
> > documentation on syslog?
> >
> >       Just a quick thought, but how about using syslog? That can be used
> > to post queries to a remote server, and it can be told to store the
> > "postgres" stuff to a seperate file on that server.
>
> i don't know that syslog is robust enough for what you want.
>
> i don't think it has any error checking to verify that a message was
> received, etc.
>
> most BSD's and linux would have good refernce ports of syslogd, etc.
>
> --
> [ Jim Mercer    Reptilian Research      jim@reptiles.org   +1 416 410-5633 ]
> [ The telephone, for those of you who  have forgotten, was a commonly used ]
> [ communications technology in the days before electronic mail.            ]
> [ They're still easy to find in most large cities. -- Nathaniel Borenstein ]

--
------------------------------------------------------------
Thomas Reinke                            Tel: (416) 460-7021
Director of Technology                   Fax: (416) 598-2319
E-Soft Inc.                         http://www.e-softinc.com

Re: [GENERAL] Transaction logging

From
jim@reptiles.org (Jim Mercer)
Date:
> Don't use syslog under any circumstances!!!!

on a slightly different tact, it would be a good thing(tm) if postmaster
and the postgres backends used syslog for logging debug and other information.

i've tried enabling debug via the postmaster command, and haven't ever seen
anything overly useful.

--
[ Jim Mercer    Reptilian Research      jim@reptiles.org   +1 416 410-5633 ]
[ The telephone, for those of you who  have forgotten, was a commonly used ]
[ communications technology in the days before electronic mail.            ]
[ They're still easy to find in most large cities. -- Nathaniel Borenstein ]

Re: [GENERAL] non-Transaction logging

From
Dustin Sallings
Date:
On Tue, 23 Feb 1999, Jim Mercer wrote:

# on a slightly different tact, it would be a good thing(tm) if postmaster
# and the postgres backends used syslog for logging debug and other
# information.
#
# i've tried enabling debug via the postmaster command, and haven't ever
# seen anything overly useful.

    For this type of logging, I pipe my postmaster to logger.

--
SA, beyond.com           My girlfriend asked me which one I like better.
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net>
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________


RE: [GENERAL] Transaction logging

From
"Daryl W. Dunbar"
Date:
I evoke postmaster this way from an rc script:

su - postgres -c "/usr/local/pgsql/bin/postmaster -d 2 -i 2>&1 |
logger -p local7.notice -tPOSTMASTER &"

And I get copious debugging information (-d takes 1, 2 or 3)...

Don't forget to edit /etc/syslog.conf to direct local7.notice to a
file, ala:

local7.notice                           /var/adm/postmaster.log


DwD

> -----Original Message-----
> From: owner-pgsql-general@postgreSQL.org
> [mailto:owner-pgsql-general@postgreSQL.org]On Behalf Of Jim Mercer
> Sent: Tuesday, February 23, 1999 12:18 PM
> To: Thomas Reinke
> Cc: pgsql-general@postgreSQL.org
> Subject: Re: [GENERAL] Transaction logging
>
>
> > Don't use syslog under any circumstances!!!!
>
> on a slightly different tact, it would be a good
> thing(tm) if postmaster
> and the postgres backends used syslog for logging debug
> and other information.
>
> i've tried enabling debug via the postmaster command, and
> haven't ever seen
> anything overly useful.
>
> --
> [ Jim Mercer    Reptilian Research      jim@reptiles.org
>  +1 416 410-5633 ]
> [ The telephone, for those of you who  have forgotten,
> was a commonly used ]
> [ communications technology in the days before electronic
> mail.            ]
> [ They're still easy to find in most large cities. --
> Nathaniel Borenstein ]
>


Re: [GENERAL] Transaction logging

From
Peter T Mount
Date:
On Tue, 23 Feb 1999, Thomas Reinke wrote:

> Don't use syslog under any circumstances!!!!

Which is why I added: Just an Idea.

At least it got people thinking about the problem.

--
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf