Обсуждение: Logging for 2 instances of PostgreSQL

Поиск
Список
Период
Сортировка

Logging for 2 instances of PostgreSQL

От
George Weaver
Дата:
Good afternoon,

I have set up 2 instances of PostgreSQL 9.6 on the same Windows server.
I noticed when I ran initdb for the second instance that it did not
create a pg_log folder in the new cluster, and that all logging is going
to the pg_log folder in the original cluster.

Is it possible to have a separate log for the second instance in the new
cluster?

Thanks,
George


Re: Logging for 2 instances of PostgreSQL

От
"David G. Johnston"
Дата:
On Wed, Nov 30, 2016 at 4:01 PM, George Weaver <gweaver@shaw.ca> wrote:
Good afternoon,

I have set up 2 instances of PostgreSQL 9.6 on the same Windows server.  I noticed when I ran initdb for the second instance that it did not create a pg_log folder in the new cluster, and that all logging is going to the pg_log folder in the original cluster.

Is it possible to have a separate log for the second instance in the new cluster?

​Yes, it is.  It would take some effort to not have it behave that way.

I'd suggest you try to supply more details if you want others to help you figure out either where you went wrong or what you are mis-understanding.  The actual commands you use, and how you obtained PostgreSQL, would be a good place to start.  Detailing the file system hierarchy as it stands wouldn't hurt either.

David J.

Re: Logging for 2 instances of PostgreSQL

От
John R Pierce
Дата:
On 11/30/2016 3:01 PM, George Weaver wrote:
> I have set up 2 instances of PostgreSQL 9.6 on the same Windows
> server.  I noticed when I ran initdb for the second instance that it
> did not create a pg_log folder in the new cluster, and that all
> logging is going to the pg_log folder in the original cluster.

look at the postgresql.conf file in the 2nd instance, is the path to the
log file directory hard coded?


--
john r pierce, recycling bits in santa cruz



Re: Logging for 2 instances of PostgreSQL

От
George Weaver
Дата:
On 30/11/2016 9:16 PM, John R Pierce wrote:
> On 11/30/2016 3:01 PM, George Weaver wrote:
>> I have set up 2 instances of PostgreSQL 9.6 on the same Windows
>> server.  I noticed when I ran initdb for the second instance that it
>> did not create a pg_log folder in the new cluster, and that all
>> logging is going to the pg_log folder in the original cluster.
>
> look at the postgresql.conf file in the 2nd instance, is the path to
> the log file directory hard coded?

No it wasn't.  Specifying the path in the .conf file did the trick.

Thanks John!
George