Your name : Petter Reinholdtsen
Your email address : pere@td.org.uit.no
System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel Pentium
Operating System (example: Linux 2.0.26 ELF) : RedHat Linux 5.2
PostgreSQL version (example: PostgreSQL-6.5) : PostgreSQL-6.5
Compiler used (example: gcc 2.8.0) : GCC 2.7.2.3
Please enter a FULL description of your problem:
------------------------------------------------
It seems that using a temp table in transaction mode makes the backend
crash. On the other end I get the following message:
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
We have lost the connection to the backend, so further processing is
impossible.
I discovered the problem using update on a temp table, but have
discovered later that select also triggers this bug.
There is no messages in syslog when this happends.
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
Enter the following in psql:
BEGIN WORK;
SELECT 'Testing temp tables'::text AS n1, ''::text AS n2
INTO TEMP TABLE testing;
SELECT * FROM testing;
UPDATE testing
SET n1 = SUBSTR(n1, 0, POSITION(' ' in n1)),
n2 = SUBSTR(n1, POSITION(' ' in n1)+1);
SELECT * FROM testing;
COMMIT WORK;
It will crash on the first select, and on the update if the first
select is removed.
If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
My workaround will probably to make a permanent table to insert my
values in. Another workaround is to remove 'begin work' and not work
in transaction mode.