Обсуждение: Logging for 2 instances of PostgreSQL
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
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.
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
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