| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
| Cc: | archeron(at)wavefire(dot)com, pgsql-hackers(at)postgreSQL(dot)org, Jan Wieck <JanWieck(at)Yahoo(dot)com> |
| Subject: | Re: invalid tid errors in latest 7.3.4 stable. |
| Date: | 2003-09-25 19:09:15 |
| Message-ID: | 27660.1064516955@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I said:
> Okay, I'll work out some extension of the APIs to let us propagate the
> snapshot request down through SPI and into the Executor, rather than
> using a global variable for it. (Unless someone has a better idea...)
I've committed the attached patch into CVS HEAD. I am now wondering
whether to back-patch it to the 7.3 branch or not. It's a bit larger
than I would have liked, and really needs more testing before being
shoved into a stable branch.
The simplest test case I was able to generate for Wade's bug is this:
-----------
create table t1 (f1 int primary key);
create table t2 (f1 int references t1 on delete cascade);
create table t3 (f1 int);
create or replace function t2del() returns trigger as '
begin
update t3 set f1 = f1 + 1;
return old;
end' language plpgsql;
create trigger t2del before delete on t2 for each row
execute procedure t2del();
create or replace function t3upd() returns trigger as '
begin
perform count(*) from t3;
return new;
end' language plpgsql;
create trigger t3upd before update on t3 for each row
execute procedure t3upd();
insert into t1 values(1);
insert into t2 values(1);
insert into t3 values(1);
delete from t1;
-----------
Until this commit, CVS HEAD generated
ERROR: attempted to mark4update invisible tuple
CONTEXT: PL/pgSQL function "t2del" line 2 at SQL statement
7.3 branch generates a different spelling of the same error:
WARNING: Error occurred while executing PL/pgSQL function t2del
WARNING: line 2 at SQL statement
ERROR: heap_mark4update: (am)invalid tid
AFAICT you need a minimum of two levels of triggers invoked by an RI
trigger to make this happen, so it may be a corner case best left
unfixed in the 7.3 branch.
Opinions anyone?
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| unknown_filename | text/plain | 22.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Keith Bottner | 2003-09-25 19:16:24 | Re: [HACKERS] Threads vs Processes (was: NuSphere and PostgreSQL for windows) |
| Previous Message | Tom Lane | 2003-09-25 18:46:32 | Re: Question on adding new indexes to Postgresql |