From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | stats_ext test fails with -DCATCACHE_FORCE_RELEASE |
Date: | 2018-05-01 07:16:35 |
Message-ID: | 1349aabb-3a1f-6675-9fc0-65e2ce7491dd@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi.
While playing around with a -DCATCACHE_FORCE_RELEASE build, I noticed that
stats_ext test failed with errors for multiple statements that looked like
this:
ERROR: invalid ndistinct magic 7f7f7f7f (expected a352bfa4)
I figured it's because statext_dependencies_load() and
statext_ndistinct_build() both return a pointer that points directly into
a pg_statistics_ext tuple obtained by using SearchSysCache1 that has
uncertain lifetime after subsequent call to ReleaseSysCache before returning.
I think we should be calling statext_dependencies_deserialize() and
statext_ndistinct_deserialize(), respectively, *before* we perform
ReleaseSysCache on the tuple. Attached patch does that.
Thanks,
Amit
Attachment | Content-Type | Size |
---|---|---|
extended-stat-catalog-datum-1.patch | text/plain | 1.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Liran's Lab | 2018-05-01 07:33:04 | Protecting sensitive data over NetApp |
Previous Message | Thomas Munro | 2018-05-01 05:40:18 | A few warnings on Windows |