pg_log - automatic logging of every transaction? how to access?

From: Richard Fromm <rfromm(at)re(dot)cs(dot)berkeley(dot)edu>
To: pgsql-novice(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Cc: rfromm(at)re(dot)cs(dot)berkeley(dot)edu
Subject: pg_log - automatic logging of every transaction? how to access?
Date: 1998-12-23 21:19:11
Message-ID: 199812232119.NAA13381@re.cs.berkeley.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to figure out if postgres logs every transaction somewhere, and if
so, how to access that.

>From my own exploring, as well as reading the archives of the pgsql-novice,
pgsql-general, and pgsql-questions mailing lists, I'm assuming that this is
the purpose of pg_log (and/or pg_time?).

I see that the modification times of those files are updated whenever I
perform an SQL query, but I can't directly access them:

lounge=> select * from pg_log;
WARN:pg_log cannot be accessed by users
lounge=> select * from pg_time;
WARN:pg_time cannot be accessed by users

Is this the purpose of these files, and if so, how do I get at them?

Or if I want to keep track of certain transactions, do I have to create a log
relation within the database and update it with transactions that I care
about? (Which seems like a hack that I'm assuming is unnecessary.)

Numerous people have asked questions about this in the past, but I have not
been able to find a single response. The only responses had to do with a (now
fixed) postgres bug that caused pg_time and pg_log to grow unnecessarily large.

- Rich Fromm
rfromm(at)cs(dot)berkeley(dot)edu

p.s. Apologies in advance for cross-posting to pgsql-novice and pgsql-general;
I wasn't sure which was more appropriate.

Browse pgsql-general by date

  From Date Subject
Next Message Hiroshi Inoue 1998-12-24 02:05:01 RE: [GENERAL] Postgres 6.4.1 on DEC-ALPHA
Previous Message Bruce Momjian 1998-12-23 21:14:02 Re: [GENERAL] Postgres 6.4.1 on DEC-ALPHA