Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hik0b-0003hg-Qq for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jul 2019 18:29:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hik0a-0001sm-6b for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jul 2019 18:29:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hik0Z-0001sf-Ns for pgsql-hackers@lists.postgresql.org; Wed, 03 Jul 2019 18:29:31 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hik0W-00018j-68 for pgsql-hackers@lists.postgresql.org; Wed, 03 Jul 2019 18:29:30 +0000 Received: by mail-qt1-x843.google.com with SMTP id d17so3534688qtj.8 for ; Wed, 03 Jul 2019 11:29:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Qu+uY4tjrd3Yhea+ksPOj42CpI5wgBAmpHjMPIkyWRc=; b=PbQs0uCMLuh6TS8cDhhkW4uVFOslsFLPRqf+j2dMlqLObQc4ow4Fionk0ejS0FTs7a VsKpjFq696cUmNjUiSD9i1EC7fjo2XPQEuQhYR9G1Qkjf3JpO3UsQeO66CtCZ725b/oz TgVdcWClcF8gkqIIA1/lRew07aBN/2ld5i6LTpRAdoxRvHgar0As1ergMKChg6AF0H8o HW/jXBYlnfUlKUCpTtfEP77kpw4Vm4poAHFVwirfxyst+c9hnnHvKgI4FT/u3DIu9FK6 HgNouG8XnmZEMxEoIJdALzAqVEs8XzlMKZ+q0hLLzd7fDoUMAVVBdu7jVIxKW2qEGu1u Pr8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Qu+uY4tjrd3Yhea+ksPOj42CpI5wgBAmpHjMPIkyWRc=; b=uTZtnYZm//TOwl8eRcsZRDJT3ebU6AQpmfQ49ZRMRNTPGYEwXhTPNxZCLb3W7Vx6cA lJLtmv83GXC8bqz5p0SlzqUQDLXprNXbXxSOJG7ZXu7JQopHNR4b0jnMKjqNbLBf5EaF gKstldAoxFHv3+13QSyeYXW8IwDmVjG2zc0DJ+eNvUi6vx+Pprl0E8ormitVTQfacAgJ WMDmJvZBo5/9orC+uFqncCNMQodJNVb/LJvRXOXhJBbyN2Nl4qUfwo+bzod1hwxv8nwP 6h0cvISaTOSvqa4Z01BjX0VqahsWn0B3P4EStHvZS6Vdk+Zw3UWLB9pygDWOe3iDrmXy 866Q== X-Gm-Message-State: APjAAAWzdVK2gLaLbcOGvd0j8C7016LPxtF3NIaXnRAXUqtVL/h3Tq84 kWOidaSKHVE7rxkxd+k89/3mZA== X-Google-Smtp-Source: APXvYqzwh4jJ6W9pg/Av/uKAjzvbt/2JAJzq2Byh5Bc0uvwP4wykJcke84jHBuZZF23ZQs94Yq857A== X-Received: by 2002:aed:38c2:: with SMTP id k60mr30349780qte.83.1562178566235; Wed, 03 Jul 2019 11:29:26 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id v126sm1306913qkd.27.2019.07.03.11.29.25 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 03 Jul 2019 11:29:25 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 9E1A21207DB; Wed, 3 Jul 2019 14:29:22 -0400 (-04) Date: Wed, 3 Jul 2019 14:29:22 -0400 From: Alvaro Herrera To: Tom Lane Cc: David Rowley , Jesper Pedersen , Andres Freund , Robert Haas , PostgreSQL Hackers Subject: Re: POC: converting Lists into arrays Message-ID: <20190703182922.GA14665@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <31425.1562177722@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jul-03, Tom Lane wrote: > David Rowley writes: > > 10. I wonder if we can reduce a bit of pain for extension authors by > > back patching a macro that wraps up a lnext() call adding a dummy > > argument for the List. > > I was wondering about a variant of that yesterday; specifically, > I thought of naming the new 2-argument function list_next() not lnext(). > Then we could add "#define list_next(l,c) lnext(c)" in the back branches. > This would simplify back-patching code that used the new definition, and > it might save some effort for extension authors who are trying to maintain > cross-branch code. On the other hand, it's more keystrokes forevermore, > and I'm not entirely convinced that code that's using lnext() isn't likely > to need other adjustments anyway. So I didn't pull the trigger on that, > but if people like the idea I'd be okay with doing it like that. I was thinking about this issue too earlier today, and my conclusion is that the way you have it in v7 is fine, because lnext() callsites are not that numerous, so the cost to third-party code authors is not that high; the other arguments trump this consideration IMO. I say this as someone who curses every time he has to backpatch things across the heap_open / table_open change -- but there are a lot more calls of that. > Indeed. I don't want to expend a lot of effort keeping it in sync > with master over a long period, either. Opinions? Yeah, let's get it done soon. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services