Re: [GENERAL] Logging at schema level

2017-07-21 Thread Scott Mead
On Fri, Jul 21, 2017 at 2:11 AM, Nikhil 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 (t

Re: [GENERAL] Logging at schema level

2017-07-20 Thread Michael Paquier
On Fri, Jul 21, 2017 at 8:21 AM, John R Pierce wrote: > if you have per schema logging, where should that get logged ? > > you could implement per DATABASE logging, if you A) add the database name to > the log_prefix, and B) feed your logs to a program that understands this and > splits them out t

Re: [GENERAL] Logging at schema level

2017-07-20 Thread Andreas Kretschmer
Am 21.07.2017 um 08:11 schrieb Nikhil: Schema = tenant. So basically tenant level logging. On 21-Jul-2017 11:21 AM, "Andreas Kretschmer" > wrote: On 21 July 2017 07:10:42 GMT+02:00, Nikhil mailto:nikhilsme...@gmail.com>> wrote: >Hello, > >I am

Re: [GENERAL] Logging at schema level

2017-07-20 Thread John R Pierce
On 7/20/2017 11:11 PM, Nikhil wrote: Schema = tenant. So basically tenant level logging. select from schema1.table1 join schema2.table2 on where .; if you have per schema logging, where should that get logged ? you could implement per DATABASE logging, if you A) add the

Re: [GENERAL] Logging at schema level

2017-07-20 Thread Nikhil
Schema = tenant. So basically tenant level logging. On 21-Jul-2017 11:21 AM, "Andreas Kretschmer" wrote: > On 21 July 2017 07:10:42 GMT+02:00, Nikhil wrote: > >Hello, > > > >I am using postgresql schema feature for multi-tenancy. can we get > >postgresql logs at schema level. Currently it is fo

Re: [GENERAL] Logging at schema level

2017-07-20 Thread Andreas Kretschmer
On 21 July 2017 07:10:42 GMT+02:00, Nikhil 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, An

Re: [GENERAL] Logging at schema level

2017-07-20 Thread Michael Paquier
On Fri, Jul 21, 2017 at 7:10 AM, Nikhil wrote: > 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) Not directly. All the log-related parameters can be controlled by a superuser, so you cou

Re: [GENERAL] Logging at schema level

2017-07-20 Thread John R Pierce
On 7/20/2017 10:10 PM, Nikhil wrote: 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) if you /were/ able to split the logs by schema, and a query touched multiple schemas, then where wo

[GENERAL] Logging at schema level

2017-07-20 Thread Nikhil
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) Best Regards, Nikhil