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

From: "MauMau" <maumau307(at)gmail(dot)com>
To: "Amit Kapila" <amit(dot)kapila16(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Robert Haas" <robertmhaas(at)gmail(dot)com>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bug fix] pg_ctl always uses the same event source
Date: 2014-01-31 14:50:32
Message-ID: A75272C26149438B8701E43B8BE1101C@maumau
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 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 from the one for editing CommitFest. I couldn't find how to
authenticate myself.

Anyway, the revised patch is attached.

From: "Amit Kapila" <amit(dot)kapila16(at)gmail(dot)com>
> It gives the proper message, but even after error, the second message
> box it shows "DLLInstall ... succeeded." I think the reason is that caller
> of function DllRegisterServer() doesn't check the return value.

I see. Corrected by checking the return value of DllRegisterServer().

> + char message[1024];

> why you have kept message as a global buffer, can't we just declare
> locally
> inside the function?

I made it a local variable. At first, I thought we might use it in other
functions in the future.

> Okay, I think we can leave it and also remove it from other parts of
> patch.
> Although I found it is the right way, but Tom is not convinced with the
> idea,
> so lets keep the Default event source name handling as it is.

OK, I changed the value of DEFAULT_EVENT_SOURCE to "PostgreSQL".

> As suggested by Tom, please update documentation.
> "> Possibly there's room for a documentation patch reminding users to
> > make sure that event_source is set appropriately before they turn
> > on eventlog."
> I think right place to update this information is where we are explaining
> about setting of event log i.e at below link or may be if you find some
> other
> better place:
> http://www.postgresql.org/docs/devel/static/runtime-config-logging.html#GUC-LOG-DESTINATION

Please let us make this a separate patch. I agree with you about the place
in the manual.

Regards
MauMau

Attachment Content-Type Size
pg_ctl_eventsrc_v6.patch application/octet-stream 9.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2014-01-31 14:53:06 Re: jsonb and nested hstore
Previous Message Andres Freund 2014-01-31 14:45:18 Re: Recovery inconsistencies, standby much larger than primary