Re: Logging (was Re: Suggestion GRANT ALTER, TRIGGER ON ALTER)
От | Bruce Momjian |
---|---|
Тема | Re: Logging (was Re: Suggestion GRANT ALTER, TRIGGER ON ALTER) |
Дата | |
Msg-id | 200306021851.h52IpN609394@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Logging (was Re: Suggestion GRANT ALTER, TRIGGER ON ALTER) (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Seems this would be the easiest way: * Allow logging of only data definition(DDL), or DDL and modification statements I can't see why someone would want to see only SELECT and not others, and I can't imagine wanting modification statements and not DDL. Added to TODO. --------------------------------------------------------------------------- Tom Lane wrote: > Josh Berkus <josh@agliodbs.com> writes: > > Actually, I can see that ... what about an option like "log_statement" which > > took an array of text which would correspond to the first part of the > > statement? Then we could leave it up to the DBA do decide what they want to > > log, with the validation list being the base list of SQL statements, i.e.: > > > log_statement = "CREATE TABLE, ALTER TABLE, CREATE VIEW, ALTER VIEW" > > Strikes me as a tad unwieldy --- the useful cases would correspond to > very long log_statement lists, and in every new release the list would > change. It's probably better to have a very small number of categories, > something like > SELECT > INSERT/UPDATE/DELETE > all DDL > and be able to flip logging on/off per category. But we need to think > about exactly what the categories are. > > A related point that I've been meaning to bring up is that I'm not sure > what sort of logging ought to happen in the new FE/BE protocol's > PARSE/BIND/EXECUTE universe. Right now, if you've got log_statement on, > the strings fed to PARSE get logged. But that's got precious little to > do with what gets executed when, if the client is actually exploiting > the opportunity to prepare statements in advance of execution. On the > other hand, I'm not sure we want three log entries for every command. > Any thoughts on this out there? > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > -- 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, Pennsylvania19073
В списке pgsql-hackers по дате отправления: