Обсуждение: Statement logging

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

Statement logging

От
Hannes Dorbath
Дата:
Is there any way to enable statement logging at runtime without a restart?

If not I think that would be a nice feature, as one sometimes need to
debug applications that are already in production..


Thanks!


--
Regards,
Hannes Dorbath

Re: Statement logging

От
"A. Kretschmer"
Дата:
am  Wed, dem 14.03.2007, um  9:57:41 +0100 mailte Hannes Dorbath folgendes:
> Is there any way to enable statement logging at runtime without a restart?
>
> If not I think that would be a nice feature, as one sometimes need to
> debug applications that are already in production..

set log_statement = 'all';

Without restart, simply at runtime.


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

Re: Statement logging

От
"hubert depesz lubaczewski"
Дата:
On 3/14/07, Hannes Dorbath <light@theendofthetunnel.de> wrote:
> Is there any way to enable statement logging at runtime without a restart?
> If not I think that would be a nice feature, as one sometimes need to
> debug applications that are already in production..

change log_min_duration_statement and do pg_ctl reload
works without restart.

depesz

Re: Statement logging

От
"A. Kretschmer"
Дата:
am  Wed, dem 14.03.2007, um 10:10:02 +0100 mailte hubert depesz lubaczewski folgendes:
> On 3/14/07, Hannes Dorbath <light@theendofthetunnel.de> wrote:
> >Is there any way to enable statement logging at runtime without a restart?
> >If not I think that would be a nice feature, as one sometimes need to
> >debug applications that are already in production..
>
> change log_min_duration_statement and do pg_ctl reload
> works without restart.

Not necessary, you can set it via session without reload or restart.


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

Re: Statement logging

От
"hubert depesz lubaczewski"
Дата:
On 3/14/07, A. Kretschmer <andreas.kretschmer@schollglas.com> wrote:
> Not necessary, you can set it via session without reload or restart.

but then it will work only for the connection that did set it. and i
understood that hannes wanted to profile working application - so it's
not really useful.

depesz

--
http://www.depesz.com/ - nowy, lepszy depesz

Re: Statement logging

От
Richard Huxton
Дата:
hubert depesz lubaczewski wrote:
> On 3/14/07, A. Kretschmer <andreas.kretschmer@schollglas.com> wrote:
>> Not necessary, you can set it via session without reload or restart.
>
> but then it will work only for the connection that did set it. and i
> understood that hannes wanted to profile working application - so it's
> not really useful.

Ah, but you can do ALTER USER ... SET or ALTER DATABASE ... SET too.

--
   Richard Huxton
   Archonet Ltd

Re: Statement logging

От
Hannes Dorbath
Дата:
On 14.03.2007 10:10, hubert depesz lubaczewski wrote:
> On 3/14/07, Hannes Dorbath <light@theendofthetunnel.de> wrote:
>> Is there any way to enable statement logging at runtime without a
>> restart?
>> If not I think that would be a nice feature, as one sometimes need to
>> debug applications that are already in production..
>
> change log_min_duration_statement and do pg_ctl reload
> works without restart.

Great. Thanks!


--
Regards,
Hannes Dorbath