From: | Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Bug fix for cache lookup failure for statistic_ext type |
Date: | 2021-08-04 22:03:57 |
Message-ID: | 1F238937-7CC2-4703-A1B1-6DC225B8978A@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hackers,
You can easily get a cache lookup failure by changing the regression tests as included in this small patch. The failure looks thus:
+COMMENT ON STATISTICS ab1_a_b_stats IS 'new comment';
+CREATE ROLE temp_role;
+SET SESSION AUTHORIZATION temp_role;
+COMMENT ON STATISTICS ab1_a_b_stats IS 'changed comment';
+ERROR: cache lookup failed for type 27447
+DROP STATISTICS ab1_a_b_stats;
+ERROR: cache lookup failed for type 27447
+ALTER STATISTICS ab1_a_b_stats RENAME TO ab1_a_b_stats_new;
+ERROR: must be owner of statistics object ab1_a_b_stats
+RESET SESSION AUTHORIZATION;
+DROP ROLE temp_role;
I believe this case simply has not had any test coverage, as I don't see any way the current code would ever work. It treats the Oid of the statistics object as a type, which it is not.
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Fix-cache-lookup-error-in-ownership-check.patch | application/octet-stream | 3.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-08-04 22:15:34 | Another regexp performance improvement: skip useless paren-captures |
Previous Message | Paul Martinez | 2021-08-04 21:49:41 | Re: [PATCH] Partial foreign key updates in referential integrity triggers |