Hello all,
Cache invalidation mechanism was much improved.
Thanks to Tom.
But as far as I see,neither relation cache nor system catalog cache
aren't be rollbacked correctly.
This should be solved if we would execute DDL statement inside
transactions.
For example,
create table t1 (id int4);CREATEbegin;BEGINalter table t1 add column dt1 text;ADDselect * from t1;id|dt1--+---(0 rows)
abort;ABORTvisco=> select * from t1;id|dt1--+---(0 rows)
I added time_qualification_check to SearchSysCache() on trial
(see the patch at the end of this posting).
After this change,..abort;ABORTselect * from t1;ERROR: Relation t1 does not have attribute dt1
Seems relation cache is not invalidated yet.
I also tried to add time_qualification_check to RelationId(Name)-
CacheGetRelation(). But unfortunately,Relation doesn't have
such a information.
Any ideas ?
Comments ?
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
*** utils/cache/catcache.c.orig Mon Jul 26 12:45:14 1999
--- utils/cache/catcache.c Fri Sep 17 08:57:50 1999
***************
*** 872,878 **** cache->cc_skey, res); if (res)
! break; } /* ----------------
--- 872,881 ---- cache->cc_skey, res); if (res)
! {
! if (HeapTupleSatisfiesNow(ct->ct_tup->t_data))
! break;
! } } /* ----------------