Re: [GENERAL] Logging at schema level - Mailing list pgsql-general

From John R Pierce
Subject Re: [GENERAL] Logging at schema level
Date
Msg-id 9dee4181-71aa-fec0-2ec6-4264344a61d4@hogranch.com
Whole thread Raw
In response to Re: [GENERAL] Logging at schema level  (Nikhil <nikhilsmenon@gmail.com>)
Responses Re: [GENERAL] Logging at schema level  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-general
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 database
name to the log_prefix, and B) feed your logs to a program that
understands this and splits them out to a log file per database.    you
could also do this on a  per user basis. but, schema is something very
dynamic, its a namespace within a database, and queries can touch
multiiple schemas.


--
john r pierce, recycling bits in santa cruz



pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: [GENERAL] Streaming Replication archive_command is really needed?
Next
From: Andreas Kretschmer
Date:
Subject: Re: [GENERAL] Logging at schema level