Re: Small improvements to pg_list.h's linitial(), lsecond(), lthird() etc macros
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2020-09-28T23:58:35Z
Lists: pgsql-hackers
On Tue, 29 Sep 2020 at 12:42, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > David Rowley <dgrowleyml@gmail.com> writes: > > It does seem fairly low risk and having personally experienced > > backpatching pain, I understand your motivation to backpatch. I > > certainly wouldn't object to backpacking but will defer to your better > > judgement on whether you choose to or not. > > A key point here is that everyplace I'm proposing to touch was already > changed in v13 (a fortiori, because list_second_cell wasn't there in v12). > So we can either have two different coding patterns in these areas, or > three. Two's better from a backpatching standpoint. The fact that > v13 is barely out the door also factors into this ... a year from now, > my judgment would probably be different. Yeah, I understand that part. The pain I was talking about was writing a patch for master, trying to apply it to the previous version only to find it does not apply. After fixing it up for that version trying to apply that patch to the version before that and getting more conflicts. Repeating that down to our earliest supported version is something I'd really love to never have to do again. It's an exhausting process. It's also risky having to custom write a version of the patch for each release. So I understand and agree with your reasoning to backpatch as it could reduce the number of versions of a patch that must be written to fix a bug. That could reduce the chances of someone messing up a backpatch at some later date so might be a safe option. aka. I'm not going to object to you backpatching this. :) David
Commits
-
Add for_each_from, to simplify loops starting from non-first list cells.
- 56fe008996bc 14.0 landed
- 67b2ceea0157 13.1 landed
-
Minor mop-up for List improvements.
- 9d299a492454 14.0 landed
-
Improve pg_list.h's linitial(), lsecond() and co macros
- cc99baa43e0e 14.0 landed