From: | Maksim Milyutin <milyutinma(at)gmail(dot)com> |
---|---|
To: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
Cc: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [BUG] Cache invalidation for queries that contains const of temporary composite type |
Date: | 2017-10-02 21:20:19 |
Message-ID: | 2f82d35e-66c2-fa94-160e-59054a75c3c1@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi, Alexander!
Thanks for the comments.
02.10.17 20:02, Alexander Korotkov wrote:
> Please, register this patch at upcoming commitfest to ensure it
> wouldn't be forgotten.
> Regression test changes (both .sql and .out) are essential parts of
> the patch. I see no point in posting them separately. Please,
> incorporate them into your patch.
OK, I'll take your advice.
> Did you check this patch with manually created composite type (made by
> CREATE TYPE typname AS ...)?
I have tested the following case:
create type pair as (x int, y int);
prepare test as select json_populate_record(null::pair, '{"x": 1, "y":
2}'::json);
drop type pair cascade;
execute test;
-- The following output is obtained before patch
ERROR: cache lookup failed for type 16419
-- After applying patch
ERROR: type "pair" does not exist
But after recreating 'pair' type I'll get the following message:
ERROR: cached plan must not change result type
I don't know whether it's right behavior. Anyhow your point is a good
motivation to experiment and investigate different scenarios of work
with cached plan that depends on non-stable type. Thanks for that.
--
Regards,
Maksim Milyutin
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-10-02 21:30:25 | Re: [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM |
Previous Message | Peter Geoghegan | 2017-10-02 21:18:22 | Re: 64-bit queryId? |