Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-21 Thread Magnus Hagander
On Sun, Jul 20, 2014 at 7:44 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Fri, Jul 18, 2014 at 7:08 PM, MauMau maumau...@gmail.com wrote: From: Magnus Hagander mag...@hagander.net On Fri, Jul 18, 2014 at 5:33 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jul 17, 2014 at 4:51

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-19 Thread Amit Kapila
On Fri, Jul 18, 2014 at 7:08 PM, MauMau maumau...@gmail.com wrote: From: Magnus Hagander mag...@hagander.net On Fri, Jul 18, 2014 at 5:33 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jul 17, 2014 at 4:51 PM, Magnus Hagander mag...@hagander.net wrote: Did anyone actually test

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-18 Thread Magnus Hagander
On Fri, Jul 18, 2014 at 5:33 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jul 17, 2014 at 4:51 PM, Magnus Hagander mag...@hagander.net wrote: Did anyone actually test this patch? :) I admit I did not build it on Windows specifically because I assumed that was done as part of the

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-18 Thread MauMau
From: Magnus Hagander mag...@hagander.net On Fri, Jul 18, 2014 at 5:33 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jul 17, 2014 at 4:51 PM, Magnus Hagander mag...@hagander.net wrote: Did anyone actually test this patch? :) I admit I did not build it on Windows specifically because

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-17 Thread Magnus Hagander
On Wed, Jul 16, 2014 at 2:01 PM, MauMau maumau...@gmail.com wrote: From: Amit Kapila amit.kapil...@gmail.com So as a conclusion, the left over items to be handled for patch are: 1. Remove the new usage related to use of same event source name for registration from pgevent. 2. Document the

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-17 Thread Magnus Hagander
On Thu, Jul 17, 2014 at 12:45 PM, Magnus Hagander mag...@hagander.net wrote: On Wed, Jul 16, 2014 at 2:01 PM, MauMau maumau...@gmail.com wrote: From: Amit Kapila amit.kapil...@gmail.com So as a conclusion, the left over items to be handled for patch are: 1. Remove the new usage related to

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-17 Thread Amit Kapila
On Thu, Jul 17, 2014 at 4:51 PM, Magnus Hagander mag...@hagander.net wrote: Did anyone actually test this patch? :) I admit I did not build it on Windows specifically because I assumed that was done as part of the development and review. And the changes to pg_event.c can never have built,

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-16 Thread Magnus Hagander
On Wed, Jul 16, 2014 at 6:37 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Jul 15, 2014 at 8:57 PM, MauMau maumau...@gmail.com wrote: From: Magnus Hagander mag...@hagander.net Well, it does in a couple of places. I'm nto sure it's that important (as nobody has AFAIK ever requested

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-16 Thread Amit Kapila
On Wed, Jul 16, 2014 at 2:11 PM, Magnus Hagander mag...@hagander.net wrote: On Wed, Jul 16, 2014 at 6:37 AM, Amit Kapila amit.kapil...@gmail.com wrote: There's also the change to throw an error if the source is already registered, which is potentially a bigger problem. I think generally if

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-16 Thread Magnus Hagander
On Wed, Jul 16, 2014 at 12:31 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Jul 16, 2014 at 2:11 PM, Magnus Hagander mag...@hagander.net wrote: On Wed, Jul 16, 2014 at 6:37 AM, Amit Kapila amit.kapil...@gmail.com wrote: There's also the change to throw an error if the source is

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-16 Thread Amit Kapila
On Wed, Jul 16, 2014 at 4:06 PM, Magnus Hagander mag...@hagander.net wrote: On Wed, Jul 16, 2014 at 12:31 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Jul 16, 2014 at 2:11 PM, Magnus Hagander mag...@hagander.net wrote: On Wed, Jul 16, 2014 at 6:37 AM, Amit Kapila

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-16 Thread MauMau
From: Magnus Hagander mag...@hagander.net There's also the change to throw an error if the source is already registered, which is potentially a bigger problem. Since the default will be the same everywhere, do we really want to throw an error when you install a second version, now that this is

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-16 Thread MauMau
From: Amit Kapila amit.kapil...@gmail.com So as a conclusion, the left over items to be handled for patch are: 1. Remove the new usage related to use of same event source name for registration from pgevent. 2. Document the information to prevent loss of messages in some scenarios as explained

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-15 Thread Magnus Hagander
On Sat, May 10, 2014 at 4:10 PM, MauMau maumau...@gmail.com wrote: From: Amit Kapila amit.kapil...@gmail.com I think it's bit late for this patch for 9.4, you might want to move it to next CF. Thanks, I've moved it. It's a regret that this very small patch wasn't put in 9.4. i took a

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-15 Thread MauMau
From: Magnus Hagander mag...@hagander.net Is there a reason for there still being changes in guc.c, pgevent.c etc? Shouldn't it all be confined to pg_ctl now? That's my understanding from the thread that that's the only part we care about. Yes, strictly speaking, those are useful for the

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-15 Thread Magnus Hagander
On Tue, Jul 15, 2014 at 4:01 PM, MauMau maumau...@gmail.com wrote: From: Magnus Hagander mag...@hagander.net Is there a reason for there still being changes in guc.c, pgevent.c etc? Shouldn't it all be confined to pg_ctl now? That's my understanding from the thread that that's the only part

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-15 Thread MauMau
From: Magnus Hagander mag...@hagander.net Well, it does in a couple of places. I'm nto sure it's that important (as nobody has AFAIK ever requested that change from for example EDB), but it's not a bad thing. However, with a hardcoded service name, I think the changes to pg_event.c are probably

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-07-15 Thread Amit Kapila
On Tue, Jul 15, 2014 at 8:57 PM, MauMau maumau...@gmail.com wrote: From: Magnus Hagander mag...@hagander.net Well, it does in a couple of places. I'm nto sure it's that important (as nobody has AFAIK ever requested that change from for example EDB), but it's not a bad thing. I think this is

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-05-10 Thread MauMau
From: Amit Kapila amit.kapil...@gmail.com I think it's bit late for this patch for 9.4, you might want to move it to next CF. Thanks, I've moved it. It's a regret that this very small patch wasn't put in 9.4. Regards MauMau -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-05-09 Thread Amit Kapila
On Thu, May 8, 2014 at 4:47 PM, MauMau maumau...@gmail.com wrote: I rebased the patch to HEAD and removed the compilation error on Linux. I made event_source variable on all platforms like register_servicename, although they are not necessary on non-Windows platforms. I have verified that

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-05-08 Thread MauMau
From: Amit Kapila amit.kapil...@gmail.com Only one minor suggestion: +Name of the event source for pg_ctl to use for event log. The +default is PostgreSQL. From this description, it is not clear when the event log will be used in pg_ctl. For example, if user uses -e option

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-05-03 Thread Amit Kapila
On Fri, Apr 18, 2014 at 5:21 PM, MauMau maumau...@gmail.com wrote: From: Amit Kapila amit.kapil...@gmail.com Currently -e option is accepted with all the options that can be provided in pg_ctl. Shouldn't we accept it only with options related to service, because that is only when it will be

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-04-18 Thread MauMau
From: Amit Kapila amit.kapil...@gmail.com Currently -e option is accepted with all the options that can be provided in pg_ctl. Shouldn't we accept it only with options related to service, because that is only when it will be used. Basically write_stderr() will write to event log only incase of

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-04-17 Thread Amit Kapila
On Sat, Apr 12, 2014 at 1:21 PM, MauMau maumau...@gmail.com wrote: Hello, Amit san, Tom san, I'm sorry for my late response. I've just caught up with the discussion. I'm almost convinced. Please find attached the revised patch. I'd like to follow the idea of adding a switch to pg_ctl.

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-04-12 Thread MauMau
Hello, Amit san, Tom san, I'm sorry for my late response. I've just caught up with the discussion. I'm almost convinced. Please find attached the revised patch. I'd like to follow the idea of adding a switch to pg_ctl. The newly added -e event_source sets the event source name for pg_ctl

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-04-09 Thread Amit Kapila
On Mon, Apr 7, 2014 at 7:10 PM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com writes: On Sat, Apr 5, 2014 at 8:24 PM, Tom Lane t...@sss.pgh.pa.us wrote: AFAICS, pg_ctl already reports to stderr if stderr is a tty. This whole issue only comes up when pg_ctl itself is

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-04-07 Thread Tom Lane
Amit Kapila amit.kapil...@gmail.com writes: On Sat, Apr 5, 2014 at 8:24 PM, Tom Lane t...@sss.pgh.pa.us wrote: How's that going to work during pg_ctl stop? There's no -o switch provided. As there's no -o switch, so there won't be problem of getting wrong event source name from server due to

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-04-07 Thread Robert Haas
On Sat, Apr 5, 2014 at 10:54 AM, Tom Lane t...@sss.pgh.pa.us wrote: So basically, I think having pg_ctl try to do what this patch proposes is a bad idea. I'm not a Windows person either, but I tend to agree. I can't think that this is going to be very robust ... and if it's not going to be

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-04-06 Thread Amit Kapila
On Sat, Apr 5, 2014 at 8:24 PM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com writes: Are you concerned about the case when user passes event_source name in command line at the time of start: pg_ctl start -o -c event_source=PG9.4 -D data_dir Right. If my

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-04-05 Thread Amit Kapila
On Sat, Apr 5, 2014 at 4:58 AM, Tom Lane t...@sss.pgh.pa.us wrote: MauMau maumau...@gmail.com writes: [ pg_ctl_eventsrc_v6.patch ] I looked at this patch a bit. As a non-Windows person I have no intention of being the committer, since I can't test the Windows-specific changes. However, I do

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-04-05 Thread Tom Lane
Amit Kapila amit.kapil...@gmail.com writes: Are you concerned about the case when user passes event_source name in command line at the time of start: pg_ctl start -o -c event_source=PG9.4 -D data_dir Right. If my understanding is right about your concern, then I think it will consider the

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-04-04 Thread Tom Lane
MauMau maumau...@gmail.com writes: [ pg_ctl_eventsrc_v6.patch ] I looked at this patch a bit. As a non-Windows person I have no intention of being the committer, since I can't test the Windows-specific changes. However, I do want to object to the business about having pg_ctl use postgres -C to

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-03-21 Thread MauMau
From: Alvaro Herrera alvhe...@2ndquadrant.com MauMau escribió: The raw link only gave the mail in text format. I hoped to import the mail into Windows Mail on Windows Vista, but I couldn't. You might need to run a conversion process by which you transform the raw file (in mbox format) into

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-03-12 Thread MauMau
From: Alvaro Herrera alvhe...@2ndquadrant.com MauMau escribió: Do you know how I can reply to an email which was deleted locally? I thought I could download an old mail by clicking raw link and import it to the mailer. However, it requires username/password input, and it seems to be different

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-03-12 Thread Alvaro Herrera
MauMau escribió: The raw link only gave the mail in text format. I hoped to import the mail into Windows Mail on Windows Vista, but I couldn't. You might need to run a conversion process by which you transform the raw file (in mbox format) into EML format or whatever it is that Windows Mail

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-03-11 Thread Alvaro Herrera
MauMau escribió: Hi, Amit san, I'm replying to your previous email. I wanted to reply to your latest mail below, but I removed it from my mailer by mistake. http://www.postgresql.org/message-id/CAA4eK1LAg6ndZdWLb5e=Ep5DzcE8KZU=JbmO+tFwySYHm2ja=q...@mail.gmail.com Do you know how I can

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-03-10 Thread MauMau
From: Amit Kapila amit.kapil...@gmail.com If I understand correctly that objection was on changing Default Event Source name, and the patch now doesn't contain that change, it's just a bug fix for letting pg_ctl know the non-default event source set by user. Please clarify if I misunderstood

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-03-10 Thread Amit Kapila
On Mon, Mar 10, 2014 at 2:39 PM, MauMau maumau...@gmail.com wrote: From: Amit Kapila amit.kapil...@gmail.com If I understand correctly that objection was on changing Default Event Source name, and the patch now doesn't contain that change, it's just a bug fix for letting pg_ctl know the

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-03-09 Thread Amit Kapila
On Mon, Feb 17, 2014 at 9:17 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Sat, Feb 1, 2014 at 12:31 PM, Amit Kapila amit.kapil...@gmail.com wrote: I think it's just a very minor coding style thing, so I am marking this patch as Ready For Committer. I could see that this patch has been

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-02-16 Thread Amit Kapila
On Sat, Feb 1, 2014 at 12:31 PM, Amit Kapila amit.kapil...@gmail.com wrote: I think it's just a very minor coding style thing, so I am marking this patch as Ready For Committer. I could see that this patch has been marked as Needs Review in CF app. suggesting that it should be rejected based

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-31 Thread MauMau
Hi, Amit san, I'm replying to your previous email. I wanted to reply to your latest mail below, but I removed it from my mailer by mistake. http://www.postgresql.org/message-id/CAA4eK1LAg6ndZdWLb5e=Ep5DzcE8KZU=JbmO+tFwySYHm2ja=q...@mail.gmail.com Do you know how I can reply to an email

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-31 Thread Amit Kapila
On Fri, Jan 31, 2014 at 8:20 PM, MauMau maumau...@gmail.com wrote: Hi, Amit san, I'm replying to your previous email. I wanted to reply to your latest mail below, but I removed it from my mailer by mistake.

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-28 Thread Amit Kapila
On Fri, Jan 24, 2014 at 4:38 PM, MauMau maumau...@gmail.com wrote: How about below message: event source event_source_name is already registered. OK, I added several lines for this. Please check the attached patch. It gives the proper message, but even after error, the second message box

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-27 Thread Tom Lane
Amit Kapila amit.kapil...@gmail.com writes: On Fri, Jan 24, 2014 at 9:10 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Fri, Jan 24, 2014 at 2:38 AM, Robert Haas robertmh...@gmail.com wrote: I mean, if there's a GUC that controls the event source name, then it can be changed between

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-27 Thread Amit Kapila
On Fri, Jan 24, 2014 at 9:10 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Fri, Jan 24, 2014 at 2:38 AM, Robert Haas robertmh...@gmail.com wrote: On Thu, Jan 23, 2014 at 9:23 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jan 23, 2014 at 10:26 AM, Tom Lane t...@sss.pgh.pa.us wrote:

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-27 Thread Amit Kapila
On Mon, Jan 27, 2014 at 9:01 PM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com writes: On Fri, Jan 24, 2014 at 9:10 AM, Amit Kapila amit.kapil...@gmail.com wrote: To proceed with the review of this patch, I need to know about whether appending version number or any

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-24 Thread MauMau
From: MauMau maumau...@gmail.com OK, I added several lines for this. Please check the attached patch. I'm sorry, I attached the old patch as v5 in my previous mail. Attached on this mail is the correct one. I'll update the CommitFest entry soon. Regards MauMau pg_ctl_eventsrc_v5.patch

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-23 Thread Amit Kapila
On Thu, Jan 23, 2014 at 10:26 AM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com writes: On Wed, Jan 22, 2014 at 9:03 PM, Tom Lane t...@sss.pgh.pa.us wrote: So? Anything which can know the value of a GUC parameter can certainly know the selected port number. 1. In

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-23 Thread Robert Haas
On Thu, Jan 23, 2014 at 9:23 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jan 23, 2014 at 10:26 AM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com writes: On Wed, Jan 22, 2014 at 9:03 PM, Tom Lane t...@sss.pgh.pa.us wrote: So? Anything which can know the

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-23 Thread MauMau
From: Amit Kapila amit.kapil...@gmail.com How about below message: event source event_source_name is already registered. OK, I added several lines for this. Please check the attached patch. What I had in mind was to change it during initdb, we are already doing it for some other parameter

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-23 Thread Peter Eisentraut
On 1/23/14, 4:08 PM, Robert Haas wrote: Why wouldn't that be necessary with your approach, too? I mean, if there's a GUC that controls the event source name, then it can be changed between restarts, regardless of what you call it. I don't know if it's practical, but the logical conclusion

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-23 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On 1/23/14, 4:08 PM, Robert Haas wrote: Why wouldn't that be necessary with your approach, too? I mean, if there's a GUC that controls the event source name, then it can be changed between restarts, regardless of what you call it. I don't know if

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-23 Thread Alvaro Herrera
Tom Lane escribió: Peter Eisentraut pete...@gmx.net writes: On 1/23/14, 4:08 PM, Robert Haas wrote: Why wouldn't that be necessary with your approach, too? I mean, if there's a GUC that controls the event source name, then it can be changed between restarts, regardless of what you call

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-23 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane escribió: That particular ID would be a horrid choice, because we don't try very hard to ensure it's unique. In particular, a standby server on the same machine as the master (not an uncommon case, at least for testing purposes) would

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-23 Thread MauMau
From: Tom Lane t...@sss.pgh.pa.us I'm still not clear on why we can't just use the port number. It will be possible to use port to set the default value of event_source GUC when starting postmaster. But using port during event source registration will involve much more. To use port, we have

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-23 Thread Tom Lane
MauMau maumau...@gmail.com writes: From: Tom Lane t...@sss.pgh.pa.us I'm still not clear on why we can't just use the port number. To use port, we have to tell the location of $PGDATA to regsvr32.exe. [ scratches head... ] Exactly which of the other proposals *doesn't* require that?

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-23 Thread Amit Kapila
On Fri, Jan 24, 2014 at 2:38 AM, Robert Haas robertmh...@gmail.com wrote: On Thu, Jan 23, 2014 at 9:23 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jan 23, 2014 at 10:26 AM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com writes: On Wed, Jan 22, 2014 at 9:03

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-23 Thread Amit Kapila
On Fri, Jan 24, 2014 at 4:22 AM, Tom Lane t...@sss.pgh.pa.us wrote: MauMau maumau...@gmail.com writes: From: Tom Lane t...@sss.pgh.pa.us I'm still not clear on why we can't just use the port number. To use port, we have to tell the location of $PGDATA to regsvr32.exe. [ scratches head... ]

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-22 Thread Robert Haas
On Tue, Jan 21, 2014 at 11:20 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Jan 22, 2014 at 9:19 AM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com writes: On Tue, Jan 21, 2014 at 6:57 PM, MauMau maumau...@gmail.com wrote: To follow this, we have the line as:

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-22 Thread Amit Kapila
On Wed, Jan 22, 2014 at 6:54 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Jan 21, 2014 at 11:20 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Jan 22, 2014 at 9:19 AM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com writes: On Tue, Jan 21, 2014 at 6:57

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-22 Thread Tom Lane
Amit Kapila amit.kapil...@gmail.com writes: On Wed, Jan 22, 2014 at 6:54 PM, Robert Haas robertmh...@gmail.com wrote: I wonder if the port number wouldn't be a better choice. And that could even be done without adding a parameter. We need this for register of event source which might be done

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-22 Thread Amit Kapila
On Wed, Jan 22, 2014 at 9:03 PM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com writes: On Wed, Jan 22, 2014 at 6:54 PM, Robert Haas robertmh...@gmail.com wrote: I wonder if the port number wouldn't be a better choice. And that could even be done without adding a

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-22 Thread Tom Lane
Amit Kapila amit.kapil...@gmail.com writes: On Wed, Jan 22, 2014 at 9:03 PM, Tom Lane t...@sss.pgh.pa.us wrote: So? Anything which can know the value of a GUC parameter can certainly know the selected port number. 1. In case of registration of event source, either user has to pass the name

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-21 Thread MauMau
From: Amit Kapila amit.kapil...@gmail.com How about below message: event source event_source_name is already registered. Thanks. I'll use this, making the initial letter the capital E like other messages in the same source file. I'm going to submit the final patch and update the

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-21 Thread Amit Kapila
On Tue, Jan 21, 2014 at 6:57 PM, MauMau maumau...@gmail.com wrote: From: Amit Kapila amit.kapil...@gmail.com Today, I reviewed the patch again and found it okay, except a small inconsistency which is about default event source name in postgresql.conf, all other places it's changed except in

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-21 Thread Tom Lane
Amit Kapila amit.kapil...@gmail.com writes: On Tue, Jan 21, 2014 at 6:57 PM, MauMau maumau...@gmail.com wrote: To follow this, we have the line as: #event_source = 'PostgreSQL 9.4' But this requires us to change this line for each major release. That's a maintenance headache. What I

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-21 Thread Amit Kapila
On Wed, Jan 22, 2014 at 9:19 AM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com writes: On Tue, Jan 21, 2014 at 6:57 PM, MauMau maumau...@gmail.com wrote: To follow this, we have the line as: #event_source = 'PostgreSQL 9.4' But this requires us to change this line

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-20 Thread MauMau
From: Amit Kapila amit.kapil...@gmail.com Do you think without this the problem reported by you is resolved completely. User can hit same problem, if he tries to follow similar steps mentioned in your first mail. I had tried below steps based on description in your first mail: If user

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-20 Thread Amit Kapila
On Mon, Jan 20, 2014 at 5:38 PM, MauMau maumau...@gmail.com wrote: From: Amit Kapila amit.kapil...@gmail.com Do you think without this the problem reported by you is resolved completely. User can hit same problem, if he tries to follow similar steps mentioned in your first mail. I had

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-19 Thread Amit Kapila
On Thu, Dec 5, 2013 at 7:54 PM, MauMau maumau...@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.

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-19 Thread MauMau
From: Amit Kapila amit.kapil...@gmail.com 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

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-19 Thread Amit Kapila
On Mon, Jan 20, 2014 at 4:05 AM, MauMau maumau...@gmail.com wrote: From: Amit Kapila amit.kapil...@gmail.com 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

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-22 Thread Amit Kapila
On Fri, Dec 20, 2013 at 5:26 PM, MauMau maumau...@gmail.com wrote: From: Amit Kapila amit.kapil...@gmail.com Few other points: - 1. #ifdef WIN32 /* Get event source from postgresql.conf for eventlog output */ get_config_value(event_source, event_source,

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-20 Thread MauMau
From: Amit Kapila amit.kapil...@gmail.com Few other points: - 1. #ifdef WIN32 /* Get event source from postgresql.conf for eventlog output */ get_config_value(event_source, event_source, sizeof(event_source)); #endif event logging is done for both win32 and cygwin env.

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-17 Thread MauMau
From: Amit Kapila amit.kapil...@gmail.com Few minor things: 1. evtHandle = RegisterEventSource(NULL, *event_source? event_source: DEFAULT_EVENT_SOURCE); In this code, you are trying to access the value (*event_source) and incase it is not initialised, it will not contain the value and could

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-17 Thread Amit Kapila
On Tue, Dec 17, 2013 at 5:33 PM, MauMau maumau...@gmail.com wrote: From: Amit Kapila amit.kapil...@gmail.com Few minor things: event_source here is a global static char array, so it's automatically initialized with zeros and safe to access. Right, I had missed that point. 2. minor

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-15 Thread Amit Kapila
On Thu, Dec 12, 2013 at 4:43 PM, MauMau maumau...@gmail.com wrote: Hi, Amit san, From: Amit Kapila amit.kapil...@gmail.com [elog.c] Writing the default value in this file was redundant, because event_source cannot be NULL. So change I think this change might not be safe as

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-12 Thread MauMau
Hi, Amit san, From: Amit Kapila amit.kapil...@gmail.com [elog.c] Writing the default value in this file was redundant, because event_source cannot be NULL. So change I think this change might not be safe as write_eventlog() gets called from write_stderr() which might get called before

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-11 Thread MauMau
From: Amit Kapila amit.kapil...@gmail.com I think it is better to keep it like what I suggested above, because in that case it will assign default name even if postgres -C fails due to some reason. 2. What will happen if user doesn't change the name in event_source or kept the same name,

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-11 Thread Amit Kapila
On Wed, Dec 11, 2013 at 8:31 PM, MauMau maumau...@gmail.com wrote: From: Amit Kapila amit.kapil...@gmail.com I re-considered that. As you suggested, I think I'll do as follows. Would this be OK? [pg_ctl.c] evtHandle = RegisterEventSource(NULL, *event_source ? event_source : PostgreSQL

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-09 Thread MauMau
From: Amit Kapila amit.kapil...@gmail.com 1. isn't it better to handle as it is done in write_eventlog() which means if string is empty then use PostgreSQL. evtHandle = RegisterEventSource(NULL, event_source ? event_source : PostgreSQL); Thank you for reviewing. Yes, I did so with the

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-09 Thread Amit Kapila
On Mon, Dec 9, 2013 at 5:52 PM, MauMau maumau...@gmail.com wrote: From: Amit Kapila amit.kapil...@gmail.com 1. isn't it better to handle as it is done in write_eventlog() which means if string is empty then use PostgreSQL. evtHandle = RegisterEventSource(NULL, event_source ? event_source

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-08 Thread Magnus Hagander
On Sun, Dec 8, 2013 at 3:41 AM, MauMau maumau...@gmail.com wrote: From: MauMau maumau...@gmail.com 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

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-08 Thread MauMau
From: Magnus Hagander mag...@hagander.net Not having looked at it in detail yet, but this seems to completely remove the default value. What happens if the error that needs to be logged is the one saying that it couldn't exec postgres to find out the value in the config file? AFAICT it's going

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-08 Thread Amit Kapila
On Mon, Dec 9, 2013 at 2:25 AM, MauMau maumau...@gmail.com wrote: From: Magnus Hagander mag...@hagander.net Not having looked at it in detail yet, but this seems to completely remove the default value. What happens if the error that needs to be logged is the one saying that it couldn't exec

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-07 Thread MauMau
From: MauMau maumau...@gmail.com 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