On Fri, Nov 1, 2013 at 12:20 AM, Tom Lane <[email protected]> wrote: > Amit Kapila <[email protected]> writes: >> On Thu, Oct 31, 2013 at 2:41 AM, Gurjeet Singh <[email protected]> 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. >> Although savings are small considering this doesn't occur in any >> performance path, still I think this is right thing to do in code. > >> It is better to register this patch in CF app list, unless someone >> feels this is not right. > > 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. Why should > we add such an assumption here?
+1. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
