Re: How to log query's from servers?

Поиск
Список
Период
Сортировка
От Condor
Тема Re: How to log query's from servers?
Дата
Msg-id 6dd5261723283881ff6f888d4fbeecbd@stz-bg.com
обсуждение исходный текст
Ответ на Re: How to log query's from servers ?  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-general
On Tue, 07 Jun 2011 06:44:02 +0800, Craig Ringer wrote:
> On 06/06/2011 09:26 PM, Condor wrote:
>
>> Can you explain little more how i can use database-level or
>> user-level
>> SET commands to set log_statement for only one of them ?
>
> http://www.postgresql.org/docs/current/static/sql-set.html
>
> http://www.postgresql.org/docs/current/static/runtime-config-logging.html
> http://www.postgresql.org/docs/current/static/sql-alteruser.html
> http://www.postgresql.org/docs/current/static/sql-alterdatabase.html
>
> You might, for example:
>
> ALTER USER user1 SET log_statement = 'all';
> ALTER USER user2 SET log_statement = 'none';
>
> or do the same with ALTER DATABASE ... SET if you wanted to log on a
> per-database level.
>
>> Probably, a little filter or patch on postgresql source code file
>> which
>> manage logs to write log file
>> only if ip is the ip that i want will save me.
>
>
> Rather than patching PostgreSQL I would recommend configuring
> PostgreSQL to log through a smarter syslog daemon like rsyslogd or
> syslogd-ng . You should then be able to use regular expression
> filters
> in the syslog daemon to discard log messages you are not interested
> in
> before they are written to disk.
>
> --
> Craig Ringer


Thank you to you and Scott for help.
--
Regards,
Condor

В списке pgsql-general по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: maximum size limit for a query string?
Следующее
От: Thomas Guettler
Дата:
Сообщение: Re: Recurring events