Thread: per-database logging

per-database logging

From
bkim
Date:
Dear list,

Is it possible to use a dedicated log file for each database? I think
it's possible in other database servers, but couldn't find the same from
postgresql documents or web search.

Regards,
Ben


Re: per-database logging

From
Bruce Momjian
Date:
bkim wrote:
> Dear list,
>
> Is it possible to use a dedicated log file for each database? I think
> it's possible in other database servers, but couldn't find the same from
> postgresql documents or web search.

No, it is not.  7.5 will have the ability to add the database name as a
prefix to ever log line, but that's about all we have.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: per-database logging

From
Tom Lane
Date:
bkim <bkim@coe.tamu.edu> writes:
> Is it possible to use a dedicated log file for each database?

Sure, if you run a separate postmaster for each database.

            regards, tom lane

Re: per-database logging

From
Ben Kim
Date:
Thanks. Is there a disadvantage of running separate postmaster compared to
running one postmaster with multiple databases?

Regards,
Ben

On Sat, 6 Mar 2004, Tom Lane wrote:

> bkim <bkim@coe.tamu.edu> writes:
> > Is it possible to use a dedicated log file for each database?
>
> Sure, if you run a separate postmaster for each database.
>
>             regards, tom lane
>


Re: per-database logging

From
Tom Lane
Date:
Ben Kim <bkim@coe.tamu.edu> writes:
> Thanks. Is there a disadvantage of running separate postmaster compared to
> running one postmaster with multiple databases?

More resource consumption, since each postmaster needs its own
shared-memory area.  Also possibly confusion, since you have to remember
which port number to connect to for each database.

            regards, tom lane

Re: per-database logging

From
"scott"
Date:
Take me off your silly list or address book!
----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Ben Kim" <bkim@coe.tamu.edu>
Cc: <pgsql-admin@postgresql.org>
Sent: Wednesday, March 10, 2004 7:08 AM
Subject: Re: [ADMIN] per-database logging


> Ben Kim <bkim@coe.tamu.edu> writes:
> > Thanks. Is there a disadvantage of running separate postmaster compared
to
> > running one postmaster with multiple databases?
>
> More resource consumption, since each postmaster needs its own
> shared-memory area.  Also possibly confusion, since you have to remember
> which port number to connect to for each database.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend