From: | "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | "pgsql-hackers" <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | couldn't rollback cache ? |
Date: | 1999-09-17 01:40:48 |
Message-ID: | 000501bf00ad$aacd80c0$2801007e@cadzone.tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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);
CREATE
begin;
BEGIN
alter table t1 add column dt1 text;
ADD
select * from t1;
id|dt1
--+---
(0 rows)
abort;
ABORT
visco=> 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;
ABORT
select * 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(at)tpf(dot)co(dot)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;
! }
}
/* ----------------
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-09-17 01:49:31 | Re: attdisbursion |
Previous Message | Mike Mascari | 1999-09-17 01:06:18 | TRUNCATE TABLE patch |