Michael Guerin <guerin@rentec.com> writes:
> FATAL: block 26 of 1663/17228/3425958479 is still referenced (local 2)
> LOG: server process (PID 1887) exited with exit code 1
After some contemplation of the source code I was able to isolate a
possibly-related failure case:
regression=# create temp table foo (f1 int) on commit delete rows;
CREATE TABLE
regression=# begin;
BEGIN
regression=# insert into foo values(1);
INSERT 1926679 1
regression=# insert into foo values(2);
INSERT 1926680 1
regression=# declare c cursor for select * from foo;
DECLARE CURSOR
regression=# fetch 1 from c;
f1
----
1
(1 row)
regression=# commit;
ERROR: block 0 of 1663/1788591/1926677 is still referenced (local 2)
regression=#
but as you can see this isn't FATAL, so I dunno if its the same as what
you are seeing.
This particular bug occurs because of a wrong order of operations during
COMMIT: we ought to close cursors *before* executing ON COMMIT actions.
regards, tom lane