From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Rethinking parallel-scan relation identity checks |
Date: | 2024-09-19 23:45:24 |
Message-ID: | 2127254.1726789524@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
In [1] I whined about how the parallel heap scan machinery should have
noticed that the same ParallelTableScanDesc was being used to give out
block numbers for two different relations. Looking closer, there
are Asserts that mean to catch this type of error --- but they are
comparing relation OIDs, whereas what would have been needed to detect
the problem was to compare RelFileLocators.
It seems to me that a scan is fundamentally operating at the physical
relation level, and therefore these tests should check RelFileLocators
not OIDs. Hence I propose the attached. (For master only, of course;
this would be an ABI break in the back branches.) This passes
check-world and is able to catch the problem exposed in the other
thread.
Another possible view is that we should check both physical and
logical relation IDs, but that seems like overkill to me.
Thoughts?
regards, tom lane
[1] https://www.postgresql.org/message-id/2042942.1726781733%40sss.pgh.pa.us
Attachment | Content-Type | Size |
---|---|---|
check-parallel-scan-locators-not-OIDs.patch | text/x-diff | 3.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-09-19 23:59:51 | Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bind |
Previous Message | David Rowley | 2024-09-19 23:43:41 | Re: Using per-transaction memory contexts for storing decoded tuples |