Re: [bug fix] pg_ctl always uses the same event source
От | Amit Kapila |
---|---|
Тема | Re: [bug fix] pg_ctl always uses the same event source |
Дата | |
Msg-id | CAA4eK1+ArE_XwjE_TH5F-Lu7Qg=6xRWKxaMUQY4SntA81ijcmw@mail.gmail.com обсуждение исходный текст |
Ответ на | [bug fix] pg_ctl always uses the same event source ("MauMau" <maumau307@gmail.com>) |
Ответы |
Re: [bug fix] pg_ctl always uses the same event source
("MauMau" <maumau307@gmail.com>)
|
Список | pgsql-hackers |
On Thu, Dec 5, 2013 at 7:54 PM, MauMau <maumau307@gmail.com> wrote: > Hello, > > I've removed a limitation regarding event log on Windows with the attached > patch. I hesitate to admit this is a bug fix and want to regard this an > improvement, but maybe it's a bug fix from users' perspective. Actually, I > received problem reports from some users. > > > [Problem] > pg_ctl always uses event source "PostgreSQL" to output messages to the event > log. Some example messages are: > > server starting > server started > > This causes the problems below: > > 1. Cannot distinguish PostgreSQL instances because they use the same event > source. > > 2. If you use multiple installations of PostgreSQL on the same machine, > whether they are the same or different versions, Windows event viewer > reports an error "event source not found" in the following sequence. Other > system administration software which deal with event log may show other > anomalies. > 2-1 Install the first PostgreSQL (e.g. 9.3) into <dir_1>, register > <dir_1>\lib\pgevent.dll for event source "PostgreSQL", then creates > <instance_1>. > 2-2 Install the second PostgreSQL (e.g. 9.2) into <dir_2> as part of some > packaged application, register <dir_2>\lib\pgevent.dll for event source > "PostgreSQL", Today, I was trying to reproduce this issue and found that if user tries to register event source second time with same name, we just replace the previous event source's path in registry. Shouldn't we try to stop user at this step only, means if he tries to register with same event source name more than once return error, saying event source with same name already exists? Another thing is after register of pgevent.dll, if I just try to start PostgreSQL it shows below messages in EventLog. Although the message has information about server startup, but the start of Description is something similar to what you were reporting "event source not found". Am I missing something? Steps 1. installation of PostgreSQL from source code using Install.bat in mdvc directory 2. initdb -D <data_dir> 3. regsvr32 /n /i:PostgreSQL <install_dir_path>\lib\pgevent32.dll 4. Modify postgresql.conf to set log_destination= 'eventlog' 5. pg_ctl.exe start -D ..\..\Data Log Name: Application Source: PostgreSQL Date: 1/19/2014 7:49:54 PM Event ID: 0 Task Category: None Level: Information Keywords: Classic User: N/A Computer: WIN-NGNN8PKIMD7 Description: The description for Event ID 0 from source PostgreSQL cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: LOG: ending log output to stderr HINT: Future log output will go to log destination "eventlog". the message resource is present but the message is not found in the string/message table With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления:
Предыдущее
От: Stefan KaltenbrunnerДата:
Сообщение: Re: Changeset Extraction v7.0 (was logical changeset generation)