Re: BUG #18959: Name collisions of expression indexes during parallel Index creations on a pratitioned table.

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: maximilian.chrzan@here.com, pgsql-hackers@lists.postgresql.org
Date: 2025-08-29T15:55:46Z
Lists: pgsql-bugs, pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Improve the names generated for indexes on expressions.

  2. Use SnapshotDirty when checking for conflicting index names.

  3. Change the names generated for child foreign key constraints.

Attachments

[ moving thread to -hackers for more visibility ]

Dilip Kumar <dilipbalaut@gmail.com> writes:
> On Fri, Jun 20, 2025 at 2:29 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Dilip Kumar <dilipbalaut@gmail.com> writes:
>>> I haven't reviewed the patch itself, but I like the idea.  We're now
>>> consistently using the parent index name for partitioned indexes,
>>> whether they're named or unnamed indexes. That looks like a great
>>> improvement.  And I think including the partition number of each level
>>> in the index name significantly enhances its clarity, especially
>>> within a multi-level partition hierarchy.

>> Since people seem to think this might be a good way to proceed,
>> I spent some effort on cleaning up the regression test changes.

> The patch LGTM

Attached find a rebase that copes with some recent test changes;
there's no substantive difference.

I'm surprised that this didn't break sooner, TBH, since it touches
so many test cases.  I'd kind of like to either get it pushed or
write it off as a bad idea.  Does anyone else care to comment?

			regards, tom lane