temp tables failes in transaction mode

From: Petter Reinholdtsen <pere(at)hungry(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: temp tables failes in transaction mode
Date: 1999-09-01 09:07:31
Message-ID: 199909010907.LAA06846@minerva.cc.uit.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Your name : Petter Reinholdtsen
Your email address : pere(at)td(dot)org(dot)uit(dot)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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message hecong 1999-09-02 09:22:05 Possible bug in postgres || libpq
Previous Message The Hermit Hacker 1999-08-30 19:20:34 Test, ignore ...