Re: Bug fix for cache lookup failure for statistic_ext type

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Bug fix for cache lookup failure for statistic_ext type
Дата
Msg-id d57cdb40-6870-bca2-224f-9728074849d0@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Bug fix for cache lookup failure for statistic_ext type  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Ответы Re: Bug fix for cache lookup failure for statistic_ext type
Список pgsql-hackers

On 8/5/21 12:32 AM, Tomas Vondra wrote:
> On 8/5/21 12:03 AM, Mark Dilger wrote:
>> 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.
>>
> 
> Yeah, you're right - this is broken since 7b504eb282c. Thanks for the 
> fix, I'll get it committed.
> 

I've pushed a fix for this. And then a fix for the fix :-( because I 
forgot about the rule that role names in regression tests should start 
with regress_ prefix, so animals enforcing this failed.


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Patch: shouldn't timezone(text, timestamp[tz]) be STABLE?
Следующее
От: "Bossart, Nathan"
Дата:
Сообщение: Re: archive status ".ready" files may be created too early