On Fri, Jul 21, 2017 at 2:11 AM, Nikhil <nikhilsmenon@xxxxxxxxx> wrote:
Schema = tenant. So basically tenant level logging.
If each tenant uses a separate user, you could parse this by that user. You can't separate the logs by user, but, you could use a tool like pgBadger to parse reports for each individual user (tenant) in the system and present the logs that way:
From: https://github.com/dalibo/pgbadger
....
-u | --dbuser username : only report on entries for the given user.
From: https://github.com/dalibo/pgbadger
....
-u | --dbuser username : only report on entries for the given user.
On 21-Jul-2017 11:21 AM, "Andreas Kretschmer" <andreas@xxxxxxxxxxxxxxx> wrote:On 21 July 2017 07:10:42 GMT+02:00, Nikhil <nikhilsmenon@xxxxxxxxx> wrote:
>Hello,
>
>I am using postgresql schema feature for multi-tenancy. can we get
>postgresql logs at schema level. Currently it is for the whole database
>server (pg_log)
>
What do you want to achieve? Logging of data-changes per tenant?
Regards, Andreas.
--
2ndQuadrant - The PostgreSQL Support Company