Config option log_statement

Started by S Murthy Kambhampatyabout 21 years ago3 messagespatches
Jump to latest
#1S Murthy Kambhampaty
smk_va@yahoo.com

In postgresql 8.0, "create table <> as ..." statements
appear not to logged unless log_statement = 'all' in
postgresql.conf. We are trying to reduce noise in the
logs from pgAdminIII and phpPgAdmin, but we use a lot
of 'create table <> as ...' queries that need to be
logged, and their duration tracked. Is there a
combination of settings that will do the trick? Can
postgresql be upgraded to log "create table <> as ..."
statements with log_statment = 'ddl' and/or
log_statment = 'mod'?

Thanks,
Murthy

__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail

#2Bruce Momjian
bruce@momjian.us
In reply to: S Murthy Kambhampaty (#1)
Re: [ADMIN] Config option log_statement

S Murthy Kambhampaty wrote:

In postgresql 8.0, "create table <> as ..." statements
appear not to logged unless log_statement = 'all' in
postgresql.conf. We are trying to reduce noise in the
logs from pgAdminIII and phpPgAdmin, but we use a lot
of 'create table <> as ...' queries that need to be
logged, and their duration tracked. Is there a
combination of settings that will do the trick? Can
postgresql be upgraded to log "create table <> as ..."
statements with log_statment = 'ddl' and/or
log_statment = 'mod'?

Ah, I see I forgot about SELECT INTO when doing this for 8.0. The
attached patch fixes it. I will apply it to 8.0.X and CVS current.
Thanks for the report.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/pgpatches/logstmttext/plainDownload+4-3
#3Bruce Momjian
bruce@momjian.us
In reply to: S Murthy Kambhampaty (#1)
Re: [ADMIN] Config option log_statement

Fix applied. It will appear in 8.0.X. Patch attached.

---------------------------------------------------------------------------

S Murthy Kambhampaty wrote:

In postgresql 8.0, "create table <> as ..." statements
appear not to logged unless log_statement = 'all' in
postgresql.conf. We are trying to reduce noise in the
logs from pgAdminIII and phpPgAdmin, but we use a lot
of 'create table <> as ...' queries that need to be
logged, and their duration tracked. Is there a
combination of settings that will do the trick? Can
postgresql be upgraded to log "create table <> as ..."
statements with log_statment = 'ddl' and/or
log_statment = 'mod'?

Thanks,
Murthy

__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/bjm/difftext/plainDownload+4-3