Subject: no response from backend, exiting...

From: [email-masked] (Alfredo Sanchez)
Date: Fri, 14 Feb 92 10:32:56 -0800

hello there,
i'm using postgres 3.0 in a sparcstation.
i have a c program that performs queries
creating temporary classes and then destroying
them, but it works properly only the first time
it runs. 
the second time it fails to open a postgres
temporary file. 
so, i manually deleted this file, but now 
i cannot access my database at all. i keep
receiving the message

   Error: No response from the backend, exiting...

both when i run my program or i try to use
the terminal monitor.

the order in which my program executes the postquel
queries (thru PQlib) is the following:
--------------------------------------
begin
retrieve into temp1 (e1.sid) 
                      from e1 in SIDES 
                      where e1.appid = "X"

retrieve into temp2 (e2.associd) 
                      from e1 in temp1, 
                           e2 in ASSOCS 
                      where e1.sid = e2.sid

retrieve into temp3 (e3.sid) 
                      from e1 in temp1, e2 in temp2, e3 in ASSOCS 
                      where e3.associd = e2.associd 
                        and e3.sid != e1.sid

retrieve portal p1 unique (e1.appid,e1.compid,e1.psid) 
           from e1 in SIDES, e3 in temp3 
           where e1.sid = e3.sid 

destroy temp1 destroy temp2 destroy temp3
end
-----------------------------------------

apparently, everything works well when run the 1st time,
but the 2nd it displayed a message like:

WARN:Feb 14 11:53:25:cannot open       temp_27198

so i went to ~postgres/data/base/mydb
and found this and other files like these:

temp_27230 temp_27231 temp_27232 temp_27233 
temp_27234 temp_27235

i deleted all of them, and now the error message seems
to be very serious:

Error: No response from the backend, exiting...

Is there any way to fix this?
Is there anything wrong with my queries?

Thanx in advance,

J Alfredo Sanchez H
-------------------
Hypertext Research Lab
Department of Computer Science
Texas A&M University

---

From: postarch (Postgres Mailing Archive)
Date: Mon, 17 Feb 92 16:17:59 PST

> i'm using postgres 3.0 in a sparcstation.

You might try 3.1

> queries (thru PQlib) is the following:

One thing that might lead to unexpected results is running two separate
queries as though it were one query.  I can't tell for sure from your
above list, but it looks like you are doing something like:

	PQexec("destroy temp1 destroy temp2 destroy temp3");

and if so you should instead do:

	PQexec("destroy temp1");
	PQexec("destroy temp2");
	PQexec("destroy temp3");

> Is there any way to fix this?

This is unclear.  Can you try running the backend standalone on the database?
i.e. try:

	$POSTGRESHOME/bin/postgres mydb

and see what kind of messages you receive.  (The interface to running the
backend directly is similar to the monitor except queries must be on a single
input line [i.e. no returns] and none of the backslash commands are 
recognized).

> Is there anything wrong with my queries?

no.

Jeff Meredith
[email-masked]