pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Who altered the database?
4+ messages / 4 participants
[nested] [flat]

* Who altered the database?
@ 2021-04-09 11:14  Durumdara <durumdara@gmail.com>
  0 siblings, 3 replies; 4+ messages in thread

From: Durumdara @ 2021-04-09 11:14 UTC (permalink / raw)
  To: pgsql-general

Dear Members!

We have a server.
Because of high usage we can't log DDL-s. There are too many temporary
tables created by users, so it would slow down the server.
A database owner changed.

What can we do to get info about the change (who did it, from what IP, when
it happened) in the future?

As I see we can't define precisely what we want to log... All or nothing.

Do you know any tricks to do it?

For example: DB level trigger, or other thing?

Thank you for the answer!

Best regards

dd

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

* Re: Who altered the database?
@ 2021-04-09 15:56  Ron <ronljohnsonjr@gmail.com>
  parent: Durumdara <durumdara@gmail.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Ron @ 2021-04-09 15:56 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 4/9/21 6:14 AM, Durumdara wrote:
> Dear Members!
>
> We have a server.
> Because of high usage we can't log DDL-s. There are too many temporary 
> tables created by users, so it would slow down the server.
> A database owner changed.
>
> What can we do to get info about the change (who did it, from what IP, 
> when it happened) in the future?
>
> As I see we can't define precisely what we want to log... All or nothing.
>
> Do you know any tricks to do it?
>
> For example: DB level trigger, or other thing?

pg_audit?

-- 
Angular momentum makes the world go 'round.





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

* Re: Who altered the database?
@ 2021-04-09 17:00  Ganesh Korde <ganeshakorde@gmail.com>
  parent: Durumdara <durumdara@gmail.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Ganesh Korde @ 2021-04-09 17:00 UTC (permalink / raw)
  To: Durumdara <durumdara@gmail.com>; +Cc: pgsql-general

On Fri, 9 Apr 2021, 4:44 pm Durumdara, <durumdara@gmail.com> wrote:

> Dear Members!
>
> We have a server.
> Because of high usage we can't log DDL-s. There are too many temporary
> tables created by users, so it would slow down the server.
> A database owner changed.
>
> What can we do to get info about the change (who did it, from what IP,
> when it happened) in the future?
>
> As I see we can't define precisely what we want to log... All or nothing.
>
> Do you know any tricks to do it?
>
> For example: DB level trigger, or other thing?
>
> Thank you for the answer!
>
> Best regards
>
> dd
>
>
>
You can use different options in log_line_prefix parameter in
postgresql.conf
You can also log connection and disconnection, each has separate parameter
in configuration file.

Regards,
Ganesh Korde.

>

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

* Re: Who altered the database?
@ 2021-04-11 15:03  Vincent Veyron <vv.lists@wanadoo.fr>
  parent: Durumdara <durumdara@gmail.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Vincent Veyron @ 2021-04-11 15:03 UTC (permalink / raw)
  To: Durumdara <durumdara@gmail.com>; +Cc: pgsql-general

On Fri, 9 Apr 2021 13:14:17 +0200
Durumdara <durumdara@gmail.com> wrote:
> 
> What can we do to get info about the change (who did it, from what IP, when
> it happened) in the future?
> 
> As I see we can't define precisely what we want to log... All or nothing.
> 

Create a web interface to apply the changes and have the web server log the info in its own logs?

Apache has this directive :

https://httpd.apache.org/docs/2.4/mod/mod_log_config.html#logformat

-- 
					Bien à vous, Vincent Veyron 

https://marica.fr/ 
Logiciel de suivi des contentieux juridiques, des sinistres d'assurance et des contrats






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


end of thread, other threads:[~2021-04-11 15:03 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 11:14 Who altered the database? Durumdara <durumdara@gmail.com>
2021-04-09 15:56 ` Ron <ronljohnsonjr@gmail.com>
2021-04-09 17:00 ` Ganesh Korde <ganeshakorde@gmail.com>
2021-04-11 15:03 ` Vincent Veyron <vv.lists@wanadoo.fr>

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