pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Displaying ProcessList to Users
5+ messages / 2 participants
[nested] [flat]

* Displaying ProcessList to Users
@ 2017-01-05 07:55 Günce Kaya <guncekaya14@gmail.com>
  2017-01-05 07:59 ` Re: Displaying ProcessList to Users Gunnar "Nick" Bluth <gunnar.bluth.extern@elster.de>
  0 siblings, 1 reply; 5+ messages in thread

From: Günce Kaya @ 2017-01-05 07:55 UTC (permalink / raw)
  To: pgsql-admin

Hi All,

I'm curious about can I display or list users who execute which queries in
databases.

Any help would be appreciated.

Regards,
-- 
Gunce Kaya

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Displaying ProcessList to Users
  2017-01-05 07:55 Displaying ProcessList to Users Günce Kaya <guncekaya14@gmail.com>
@ 2017-01-05 07:59 ` Gunnar "Nick" Bluth <gunnar.bluth.extern@elster.de>
  2017-01-05 08:12   ` Re: Displaying ProcessList to Users Günce Kaya <guncekaya14@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Gunnar \"Nick\" Bluth @ 2017-01-05 07:59 UTC (permalink / raw)
  To: pgsql-admin

Am 05.01.2017 um 08:55 schrieb Günce Kaya:
> Hi All,

Hi Günce,


> I'm curious about can I display or list users who execute which queries
> in databases.
> 
> Any help would be appreciated.

Have a look at pg_stat_activity.

Regards,
-- 
Gunnar "Nick" Bluth
DBA ELSTER

Tel:   +49 911/991-4665
Mobil: +49 172/8853339


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Displaying ProcessList to Users
  2017-01-05 07:55 Displaying ProcessList to Users Günce Kaya <guncekaya14@gmail.com>
  2017-01-05 07:59 ` Re: Displaying ProcessList to Users Gunnar "Nick" Bluth <gunnar.bluth.extern@elster.de>
@ 2017-01-05 08:12   ` Günce Kaya <guncekaya14@gmail.com>
  2017-01-05 08:32     ` Re: Displaying ProcessList to Users Gunnar "Nick" Bluth <gunnar.bluth.extern@elster.de>
  0 siblings, 1 reply; 5+ messages in thread

From: Günce Kaya @ 2017-01-05 08:12 UTC (permalink / raw)
  To: Gunnar Nick Bluth <gunnar.bluth.extern@elster.de>; +Cc: pgsql-admin

Hi Gunnar,

When I select pg_stat_activity table, I can see only a row to my user but I
have executed lots of queries. I can only see latest executed query to me.

Is there any way to list users with whole queries that executed before by
users?

Regards,

Gunce Kaya

2017-01-05 10:59 GMT+03:00 Gunnar "Nick" Bluth <
gunnar.bluth.extern@elster.de>:

> Am 05.01.2017 um 08:55 schrieb Günce Kaya:
> > Hi All,
>
> Hi Günce,
>
>
> > I'm curious about can I display or list users who execute which queries
> > in databases.
> >
> > Any help would be appreciated.
>
> Have a look at pg_stat_activity.
>
> Regards,
> --
> Gunnar "Nick" Bluth
> DBA ELSTER
>
> Tel:   +49 911/991-4665
> Mobil: +49 172/8853339
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>



-- 
Gunce Kaya

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Displaying ProcessList to Users
  2017-01-05 07:55 Displaying ProcessList to Users Günce Kaya <guncekaya14@gmail.com>
  2017-01-05 07:59 ` Re: Displaying ProcessList to Users Gunnar "Nick" Bluth <gunnar.bluth.extern@elster.de>
  2017-01-05 08:12   ` Re: Displaying ProcessList to Users Günce Kaya <guncekaya14@gmail.com>
@ 2017-01-05 08:32     ` Gunnar "Nick" Bluth <gunnar.bluth.extern@elster.de>
  2017-01-06 08:47       ` Re: Displaying ProcessList to Users Günce Kaya <guncekaya14@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Gunnar \"Nick\" Bluth @ 2017-01-05 08:32 UTC (permalink / raw)
  To: pgsql-admin

Am 05.01.2017 um 09:12 schrieb Günce Kaya:
> Hi Gunnar,

Hi Günce,

> When I select pg_stat_activity table, I can see only a row to my user
> but I have executed lots of queries. I can only see latest executed
> query to me. 
> 
> Is there any way to list users with whole queries that executed before
> by users?

Well, you'd need full statement logging to achieve that. And the
information will be in the log, not the DB:

https://www.postgresql.org/docs/current/static/runtime-config-logging.html#GUC-LOG-STATEMENT

Cheers,

Nick

> 
> Regards,
> 
> Gunce Kaya
> 
> 2017-01-05 10:59 GMT+03:00 Gunnar "Nick" Bluth
> <gunnar.bluth.extern@elster.de <mailto:gunnar.bluth.extern@elster.de>>:
> 
>     Am 05.01.2017 um 08:55 schrieb Günce Kaya:
>     > Hi All,
> 
>     Hi Günce,
> 
> 
>     > I'm curious about can I display or list users who execute which queries
>     > in databases.
>     >
>     > Any help would be appreciated.
> 
>     Have a look at pg_stat_activity.
> 
>     Regards,
>     --
>     Gunnar "Nick" Bluth
>     DBA ELSTER
> 
>     Tel:   +49 911/991-4665 <tel:%2B49%20911%2F991-4665>
>     Mobil: +49 172/8853339 <tel:%2B49%20172%2F8853339>
> 
> 
>     --
>     Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org
>     <mailto:pgsql-admin@postgresql.org>)
>     To make changes to your subscription:
>     http://www.postgresql.org/mailpref/pgsql-admin
>     <http://www.postgresql.org/mailpref/pgsql-admin;
> 
> 
> 
> 
> -- 
> Gunce Kaya


-- 
Gunnar "Nick" Bluth
DBA ELSTER

Tel:   +49 911/991-4665
Mobil: +49 172/8853339


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Displaying ProcessList to Users
  2017-01-05 07:55 Displaying ProcessList to Users Günce Kaya <guncekaya14@gmail.com>
  2017-01-05 07:59 ` Re: Displaying ProcessList to Users Gunnar "Nick" Bluth <gunnar.bluth.extern@elster.de>
  2017-01-05 08:12   ` Re: Displaying ProcessList to Users Günce Kaya <guncekaya14@gmail.com>
  2017-01-05 08:32     ` Re: Displaying ProcessList to Users Gunnar "Nick" Bluth <gunnar.bluth.extern@elster.de>
@ 2017-01-06 08:47       ` Günce Kaya <guncekaya14@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Günce Kaya @ 2017-01-06 08:47 UTC (permalink / raw)
  To: Gunnar Nick Bluth <gunnar.bluth.extern@elster.de>; +Cc: pgsql-admin

Hi,

Thank you for your response. I modified some parameters in postgres.conf
file like added log_line_prefix='%m %u@%d %r'
and log_min_duration_statement=0 than I executed a script. So the result
gave me what I need it.

Thank you again.

Regards,

Gunce Kaya

2017-01-05 11:32 GMT+03:00 Gunnar "Nick" Bluth <
gunnar.bluth.extern@elster.de>:

> Am 05.01.2017 um 09:12 schrieb Günce Kaya:
> > Hi Gunnar,
>
> Hi Günce,
>
> > When I select pg_stat_activity table, I can see only a row to my user
> > but I have executed lots of queries. I can only see latest executed
> > query to me.
> >
> > Is there any way to list users with whole queries that executed before
> > by users?
>
> Well, you'd need full statement logging to achieve that. And the
> information will be in the log, not the DB:
>
> https://www.postgresql.org/docs/current/static/runtime-
> config-logging.html#GUC-LOG-STATEMENT
>
> Cheers,
>
> Nick
>
> >
> > Regards,
> >
> > Gunce Kaya
> >
> > 2017-01-05 10:59 GMT+03:00 Gunnar "Nick" Bluth
> > <gunnar.bluth.extern@elster.de <mailto:gunnar.bluth.extern@elster.de>>:
> >
> >     Am 05.01.2017 um 08:55 schrieb Günce Kaya:
> >     > Hi All,
> >
> >     Hi Günce,
> >
> >
> >     > I'm curious about can I display or list users who execute which
> queries
> >     > in databases.
> >     >
> >     > Any help would be appreciated.
> >
> >     Have a look at pg_stat_activity.
> >
> >     Regards,
> >     --
> >     Gunnar "Nick" Bluth
> >     DBA ELSTER
> >
> >     Tel:   +49 911/991-4665 <tel:%2B49%20911%2F991-4665>
> >     Mobil: +49 172/8853339 <tel:%2B49%20172%2F8853339>
> >
> >
> >     --
> >     Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org
> >     <mailto:pgsql-admin@postgresql.org>)
> >     To make changes to your subscription:
> >     http://www.postgresql.org/mailpref/pgsql-admin
> >     <http://www.postgresql.org/mailpref/pgsql-admin;
> >
> >
> >
> >
> > --
> > Gunce Kaya
>
>
> --
> Gunnar "Nick" Bluth
> DBA ELSTER
>
> Tel:   +49 911/991-4665
> Mobil: +49 172/8853339
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>



-- 
Gunce Kaya

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2017-01-06 08:47 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-01-05 07:55 Displaying ProcessList to Users Günce Kaya <guncekaya14@gmail.com>
2017-01-05 07:59 ` Gunnar "Nick" Bluth <gunnar.bluth.extern@elster.de>
2017-01-05 08:12   ` Günce Kaya <guncekaya14@gmail.com>
2017-01-05 08:32     ` Gunnar "Nick" Bluth <gunnar.bluth.extern@elster.de>
2017-01-06 08:47       ` Günce Kaya <guncekaya14@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox