Re: BUG #18545: \dt breaks transaction, calling error when executed in SET SESSION AUTHORIZATION
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Андрей Рачицкий <therealgofman@mail.ru>, pgsql-hackers@lists.postgresql.org
Date: 2024-09-19T03:30:24Z
Lists: pgsql-bugs, pgsql-hackers
Justin Pryzby <pryzby@telsasoft.com> writes: > This commit seems to trigger elog(), not reproducible in the > parent commit. > 6e086fa2e77 Allow parallel workers to cope with a newly-created session user ID. > postgres=# SET min_parallel_table_scan_size=0; CLUSTER pg_attribute USING pg_attribute_relid_attnum_index; > ERROR: pg_attribute catalog is missing 26 attribute(s) for relation OID 70321 I've been poking at this all day, and I still have little idea what's going on. I've added a bunch of throwaway instrumentation, and have managed to convince myself that the problem is that parallel heap scan is broken. The scans done to rebuild pg_attribute's indexes seem to sometimes miss heap pages or visit pages twice (in different workers). I have no idea why this is, and even less idea how 6e086fa2e is provoking it. As you say, the behavior isn't entirely reproducible, but I couldn't make it happen at all after reverting 6e086fa2e's changes in transam/parallel.c, so apparently there is some connection. Another possibly useful data point is that for me it reproduces fairly well (more than one time in two) on x86_64 Linux, but I could not make it happen on macOS ARM64. If it's a race condition, which smells plausible, that's perhaps not hugely surprising. regards, tom lane
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix parallel worker tracking of new catalog relfilenumbers.
- 67bab53d6442 18.0 landed
-
Restore relmapper state early enough in parallel workers.
- 126ec0bc76d0 18.0 landed
-
Allow parallel workers to cope with a newly-created session user ID.
- 6e086fa2e771 18.0 landed
- f5f30c22ed69 18.0 landed
- 97380d4803d1 14.13 landed
- 849326e49a5d 16.4 landed
- 68855c03878c 12.20 landed
- 5887dd4894db 17.0 landed
- 48536305370a 15.8 landed
- 216201027d90 13.16 landed
-
Clean up handling of client_encoding GUC in parallel workers.
- 0ae5b763ea0e 18.0 landed
-
Fix rd_firstRelfilenodeSubid for nailed relations, in parallel workers.
- fe4d022c8e17 14.0 cited
-
Fix several mistakes around parallel workers and client_encoding.
- 10c0558ffefc 9.6.0 cited