pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Andres Freund <andres@anarazel.de>
Cc: bossartn@amazon.com, Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: sulamul@gmail.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: inefficient loop in StandbyReleaseLockList()
Date: Thu, 04 Nov 2021 22:47:23 -0400
Message-ID: <373296.1636080443@sss.pgh.pa.us> (raw)
In-Reply-To: <YYSZgNdteRBtfyLR@paquier.xyz>
References: <1138901.1635782315@sss.pgh.pa.us>
	<C84534A6-2E66-47FF-B193-EBB566544D49@amazon.com>
	<1311319.1635804078@sss.pgh.pa.us>
	<20211102.114313.713245704579079227.horikyota.ntt@gmail.com>
	<1376384.1635862908@sss.pgh.pa.us>
	<1512317.1635867355@sss.pgh.pa.us>
	<20211104221248.pgo4h6wvnjl6uvkb@alap3.anarazel.de>
	<364794.1636071716@sss.pgh.pa.us>
	<YYSZgNdteRBtfyLR@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:
> On Thu, Nov 04, 2021 at 08:21:56PM -0400, Tom Lane wrote:
>> Hm.  I think it's not the only list function with O(N) behavior;
>> in fact there used to be more such functions than there are now.
>> But I could get behind a patch that annotates all of them.

> Documenting that makes sense.  Shouldn't we be careful to do that in
> both pg_list.h and list.c, then?

We have seldom, if ever, put function API-definition comments into .h files.
I do not see a reason why this case deserves an exception.  (It's tough
enough to get people to maintain definition comments that are right beside
the code they describe --- I think putting them in .h files would be a
disaster.)

			regards, tom lane





view thread (41+ messages)  latest in thread

Message-ID: <373296.1636080443@sss.pgh.pa.us>
Permalink:  ../373296.1636080443@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/373296.1636080443@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, andres@anarazel.de, horikyota.ntt@gmail.com, sulamul@gmail.com
  Subject: Re: inefficient loop in StandbyReleaseLockList()
  In-Reply-To: <373296.1636080443@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox