From: | Maksim Milyutin <milyutinma(at)gmail(dot)com> |
---|---|
To: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, a(dot)korotkov(at)postgrespro(dot)ru |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [BUG] Cache invalidation for queries that contains const of temporary composite type |
Date: | 2017-10-03 21:36:00 |
Message-ID: | 76c8a750-201a-bc06-9d29-90a5725b0ae7@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi HORIGUCHI-san!
Thanks for the valuable comments.
03.10.17 4:30, Kyotaro HORIGUCHI wrote:
> The first thought that patch gave me is that the problem is not
> limited to constants. Actually the following sequence also
> reproduces similar failure even with this patch.
>
> create table t2 (x int , y int);
> create type pair as (x int, y int);
> prepare test as select row(x, y)::pair from t2;
> drop type pair;
> execute test;
> | ERROR: cache lookup failed for type 16410
>
> In this case the causal expression is in the following form.
>
> TargetEntry (
> expr = (
> RowExpr:
> typeid = 16410,
> row_format = COERCE_EXPLICIT_CAST,
> args = List (Var(t2.x), Var(t2.y))
> )
> )
Yeah, RowExpr has no dependency from type relation with oid=16410. I
think the routine 'fix_expr_common' needs to be reworked to take into
account any possible dependencies of expression from composite type.
On November commitfest I'll lay out patch that covers your case.
--
Regards,
Maksim Milyutin
From | Date | Subject | |
---|---|---|---|
Next Message | Petr Jelinek | 2017-10-03 21:40:28 | Re: [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM |
Previous Message | Nico Williams | 2017-10-03 21:32:00 | Re: [PATCH] WIP Add ALWAYS DEFERRED option for constraints |