Обсуждение: Postgres Table level statement logging

Поиск
Список
Период
Сортировка

Postgres Table level statement logging

От
Madhu S R
Дата:
Hi,

I need to log the statements executed for a list of tables. It will be Data Modification statements like INSERT/UPDATE/DELETE on any of these tables. Please let me know if this is possible in postgres logging.

Regards,
Madhu

Re: Postgres Table level statement logging

От
Vibhor Kumar
Дата:
On Feb 7, 2012, at 5:42 AM, Madhu S R wrote:

> I need to log the statements executed for a list of tables. It will be Data Modification statements like
INSERT/UPDATE/DELETEon any of these tables. Please let me know if this is possible in postgres logging. 

Yes, this possible. You can set log_statement parameter.
http://www.postgresql.org/docs/current/static/runtime-config-logging.html#GUC-LOG-STATEMENT


Thanks & Regards,
Vibhor Kumar
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Blog: http://vibhork.blogspot.com


Re: Postgres Table level statement logging

От
Andreas Kretschmer
Дата:
Madhu S R <s_r_madhu@yahoo.co.in> wrote:

> Hi,
>
> I need to log the statements executed for a list of tables. It will be Data
> Modification statements like INSERT/UPDATE/DELETE on any of these tables.
> Please let me know if this is possible in postgres logging.

http://andreas.scherbaum.la/blog/archives/100-Log-Table-Changes-in-PostgreSQL-with-tablelog.html

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

Log statement with timestamp

От
Madhu S R
Дата:
Hi,

    I need to log DDL or MOD statements with current time when the statement executed. Please let me know if this is possible.

Regards,
Madhu

Re: Log statement with timestamp

От
Raghavendra
Дата:
Need to enable log_line_prefix with timestamp "%t".
http://www.postgresql.org/docs/9.1/static/runtime-config-logging.html 

---
Regards,
Raghavendra
EnterpriseDB Corporation



On Thu, Feb 23, 2012 at 2:15 PM, Madhu S R <s_r_madhu@yahoo.co.in> wrote:
Hi,

    I need to log DDL or MOD statements with current time when the statement executed. Please let me know if this is possible.

Regards,
Madhu