Re: [HACKERS] Shave a few instructions from child-process startup sequence

2014-03-08 Thread Tom Lane
Bruce Momjian writes: > On Sun, Dec 1, 2013 at 12:07:21PM -0500, Gurjeet Singh wrote: >> Yes, this is a performance patch, but as the subject says, it saves a few >> instructions. I don't know how to write a test case that can measure savings >> of >> skipping a few instructions in a startup seq

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2014-03-07 Thread Bruce Momjian
On Sun, Dec 1, 2013 at 12:07:21PM -0500, Gurjeet Singh wrote: > On Wed, Nov 27, 2013 at 9:12 AM, Robert Haas wrote: > > > This is a performance patch, so it should come with benchmark results > demonstrating that it accomplishes its intended purpose. I don't see > any. > > > Yes,

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2014-01-30 Thread Peter Eisentraut
On 1/20/14, 8:08 PM, Alvaro Herrera wrote: > Peter Eisentraut escribió: >> src/backend/postmaster/postmaster.c:2255: indent with spaces. >> +else >> src/backend/postmaster/postmaster.c:2267: indent with spaces. >> +break; > > I just checked the Jenkins page for this patch: > ht

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2014-01-20 Thread Alvaro Herrera
Peter Eisentraut escribió: > src/backend/postmaster/postmaster.c:2255: indent with spaces. > +else > src/backend/postmaster/postmaster.c:2267: indent with spaces. > +break; I just checked the Jenkins page for this patch: http://pgci.eisentraut.org/jenkins/job/postgresql_commitf

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2013-12-01 Thread Gurjeet Singh
On Wed, Nov 27, 2013 at 9:12 AM, Robert Haas wrote: > > This is a performance patch, so it should come with benchmark results > demonstrating that it accomplishes its intended purpose. I don't see > any. > Yes, this is a performance patch, but as the subject says, it saves a few instructions. I

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2013-11-27 Thread Robert Haas
On Tue, Nov 26, 2013 at 10:12 PM, Gurjeet Singh wrote: > On Tue, Nov 26, 2013 at 9:42 PM, Peter Eisentraut wrote: >> >> src/backend/postmaster/postmaster.c:2255: indent with spaces. >> +else >> src/backend/postmaster/postmaster.c:2267: indent with spaces. >> +break > > > Not s

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2013-11-26 Thread Gurjeet Singh
On Tue, Nov 26, 2013 at 9:42 PM, Peter Eisentraut wrote: > src/backend/postmaster/postmaster.c:2255: indent with spaces. > +else > src/backend/postmaster/postmaster.c:2267: indent with spaces. > +break Not sure how that happened! Attached is the updated patch. Best regards,

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2013-11-26 Thread Peter Eisentraut
src/backend/postmaster/postmaster.c:2255: indent with spaces. +else src/backend/postmaster/postmaster.c:2267: indent with spaces. +break; -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/ma

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2013-11-22 Thread Gurjeet Singh
On Wed, Nov 20, 2013 at 10:21 AM, Peter Eisentraut wrote: > On 11/5/13, 2:47 AM, Gurjeet Singh wrote: > > On Mon, Nov 4, 2013 at 12:20 AM, Tom Lane > > wrote: > > > > But we're not buying much. A few instructions during postmaster > > shutdown > > is entir

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2013-11-20 Thread Peter Eisentraut
On 11/5/13, 2:47 AM, Gurjeet Singh wrote: > On Mon, Nov 4, 2013 at 12:20 AM, Tom Lane > wrote: > > But we're not buying much. A few instructions during postmaster > shutdown > is entirely negligible. > > > The patch is for ClosePostmasterPorts(), which is

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2013-11-04 Thread Gurjeet Singh
On Mon, Nov 4, 2013 at 12:20 AM, Tom Lane wrote: > But we're not buying much. A few instructions during postmaster shutdown > is entirely negligible. > The patch is for ClosePostmasterPorts(), which is called from every child process startup sequence (as $subject also implies), not in postmaste

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2013-11-03 Thread Tom Lane
Amit Kapila writes: > On Fri, Nov 1, 2013 at 9:50 AM, Tom Lane wrote: >> I think this is adding fragility for absolutely no meaningful savings. >> The existing code does not depend on the assumption that the array >> is filled consecutively and no entries are closed early. >As I could see, i

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2013-11-03 Thread Amit Kapila
On Fri, Nov 1, 2013 at 9:50 AM, Tom Lane wrote: > Amit Kapila writes: >> On Thu, Oct 31, 2013 at 2:41 AM, Gurjeet Singh wrote: >>> Just a small patch; hopefully useful. > >> This is valid saving as we are filling array ListenSocket[] in >> StreamServerPort() serially, so during ClosePostmasterPo

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2013-11-01 Thread Gurjeet Singh
On Thu, Oct 31, 2013 at 11:20 PM, Tom Lane wrote: > Amit Kapila writes: > > On Thu, Oct 31, 2013 at 2:41 AM, Gurjeet Singh wrote: > >> Just a small patch; hopefully useful. > > > This is valid saving as we are filling array ListenSocket[] in > > StreamServerPort() serially, so during ClosePostm

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2013-10-31 Thread Robert Haas
On Fri, Nov 1, 2013 at 12:20 AM, Tom Lane wrote: > Amit Kapila writes: >> On Thu, Oct 31, 2013 at 2:41 AM, Gurjeet Singh wrote: >>> Just a small patch; hopefully useful. > >> This is valid saving as we are filling array ListenSocket[] in >> StreamServerPort() serially, so during ClosePostmasterP

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2013-10-31 Thread Tom Lane
Amit Kapila writes: > On Thu, Oct 31, 2013 at 2:41 AM, Gurjeet Singh wrote: >> Just a small patch; hopefully useful. > This is valid saving as we are filling array ListenSocket[] in > StreamServerPort() serially, so during ClosePostmasterPorts() once if > it encountered PGINVALID_SOCKET, it is v

Re: [HACKERS] Shave a few instructions from child-process startup sequence

2013-10-31 Thread Amit Kapila
On Thu, Oct 31, 2013 at 2:41 AM, Gurjeet Singh wrote: > Just a small patch; hopefully useful. This is valid saving as we are filling array ListenSocket[] in StreamServerPort() serially, so during ClosePostmasterPorts() once if it encountered PGINVALID_SOCKET, it is valid to break the loop. Althou

[HACKERS] Shave a few instructions from child-process startup sequence

2013-10-30 Thread Gurjeet Singh
Just a small patch; hopefully useful. Best regards, -- Gurjeet Singh http://gurjeet.singh.im/ EnterpriseDB Inc. diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index ccb8b86..48dc7af 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postma