Trouble with LargeObjects and ODBC, backend crash?

From: "Mike Miller" <mmiller(at)pooka(dot)otago(dot)ac(dot)nz>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: Trouble with LargeObjects and ODBC, backend crash?
Date: 2001-12-06 22:47:18
Message-ID: NFBBKNHGKLHJAAJCKLPGCEGMCBAA.mmiller@pooka.otago.ac.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

The error message that appeared:

Error while executing the query;
No response from the backend;
Socket has been closed.

The SQL statement I send is "update Practical set Picture = ? where
PracticalID = 136"

I'm using postgresql 7.1.3, psqlodbc 07.01.0009, ADO, MDAC 2.6SP1, VB6 SP5
and the lo contrib utilities.

The backend log is below. Notice the line:
Server process (pid 2678) exited with status 11

Everything else works fine. The large objects used to work ( and work
well ), I've added some triggers since then, but nothing out of the
ordinary.

Any help or explanation would be gratefully received.

Thanks, Mike.

The schema for this table is:

-- ********************
-- Practical
-- ********************

CREATE SEQUENCE SEQPracticalID;
GRANT ALL ON SEQPracticalID TO pracs;

CREATE TABLE Practical
(
PracticalID integer DEFAULT nextval('SEQPracticalID'),
PracticalCategoryID integer NOT NULL,
Code text NOT NULL,
Name text NOT NULL,
Year integer NOT NULL,
Credits integer NOT NULL,
CreditsComment text,
Cost numeric(12,2) NOT NULL,
CostComment text,
Requirements text,
Description text,
Prerequisites text,
Picture lo,
CoordinatorID integer NOT NULL,
PRIMARY KEY( PracticalID ),
FOREIGN KEY( PracticalCategoryID ) REFERENCES PracticalCategory(
PracticalCategoryID ),
FOREIGN KEY( CoordinatorID ) REFERENCES Staff( StaffID ),
UNIQUE( Code, Year )
);

GRANT ALL ON Practical TO pracs;

CREATE TRIGGER TRIGPracticalPicture
BEFORE UPDATE OR DElETE
ON Practical
FOR EACH ROW
EXECUTE PROCEDURE lo_manage(Picture);

Backend log:

DEBUG: query: BEGIN
DEBUG: ProcessUtility: BEGIN
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: update Practical set Description = '', Prerequisites = '',
Requirements = '', Year = '2001', Name = 'Adva
nced Contemporary Dance', Code = '1082', Cost = '0', CostComment = '',
Credits = '3', CreditsComment = '', CoordinatorID
= '1', PracticalCategoryID = '1' where PracticalID = 136
DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: update Practical set Picture = '84256' where PracticalID =
136
DEBUG: ProcessQuery
/usr/local/pgsql/bin/postmaster: reaping dead processes...
/usr/local/pgsql/bin/postmaster: CleanupProc: pid 2678 exited with status 11
Server process (pid 2678) exited with status 11 at Fri Dec 7 11:33:30 2001
Terminating any active server processes...
Server processes were terminated at Fri Dec 7 11:33:30 2001
Reinitializing shared memory and semaphores
invoking IpcMemoryCreate(size=4169728)
DEBUG: database system was interrupted at 2001-12-07 11:32:27 NZDT
DEBUG: CheckPoint record at (0, 22429848)
DEBUG: Redo record at (0, 22429848); Undo record at (0, 0); Shutdown TRUE
DEBUG: NextTransactionId: 116908; NextOid: 84256
DEBUG: database system was not properly shut down; automatic recovery in
progress...
DEBUG: redo starts at (0, 22429912)
DEBUG: ReadRecord: record with zero len at (0, 22462996)
DEBUG: redo done at (0, 22462960)
DEBUG: database system is in production state
DEBUG: proc_exit(0)
DEBUG: shmem_exit(0)
DEBUG: exit(0)
/usr/local/pgsql/bin/postmaster: reaping dead processes...

and the psqlodbc log is:

conn=81330296, query='BEGIN'
conn=81330296, query='declare SQL_CUR04EA9910 cursor for select * from
Practical'
conn=81330296, query='fetch 100 in SQL_CUR04EA9910'
[ fetched 100 rows ]
conn=81330296, query='declare SQL_CUR04EA8E50 cursor for SELECT * FROM
Practical'
conn=81330296, query='fetch 100 in SQL_CUR04EA8E50'
[ fetched 100 rows ]
conn=81330296, query='declare SQL_CUR04EB37B0 cursor for select ta.attname,
ia.attnum from pg_attribute ta, pg_attribute ia, pg_class c, pg_index i
where c.relname = 'Practical' AND c.oid = i.indrelid AND i.indisprimary =
't' AND ia.attrelid = i.indexrelid AND ta.attrelid = i.indrelid AND
ta.attnum = i.indkey[ia.attnum-1] order by ia.attnum'
conn=81330296, query='fetch 100 in SQL_CUR04EB37B0'
[ fetched 0 rows ]
conn=81330296, query='close SQL_CUR04EB37B0'
conn=81330296, query='declare SQL_CUR04EB37B0 cursor for select ta.attname,
ia.attnum from pg_attribute ta, pg_attribute ia, pg_class c, pg_index i
where c.relname = 'Practical_pkey' AND c.oid = i.indexrelid AND ia.attrelid
= i.indexrelid AND ta.attrelid = i.indrelid AND ta.attnum =
i.indkey[ia.attnum-1] order by ia.attnum'
conn=81330296, query='fetch 100 in SQL_CUR04EB37B0'
[ fetched 0 rows ]
conn=81330296, query='close SQL_CUR04EB37B0'
conn=81330296, query='declare SQL_CUR04EB3A90 cursor for select u.usename,
c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen,
a.atttypmod, a.attnotnull, c.relhasrules from pg_user u, pg_class c,
pg_attribute a, pg_type t where u.usesysid = c.relowner and c.oid=
a.attrelid and a.atttypid = t.oid and (a.attnum > 0) and c.relname like
'Practical' order by attnum'
conn=81330296, query='fetch 100 in SQL_CUR04EB3A90'
[ fetched 0 rows ]
conn=81330296, query='close SQL_CUR04EB3A90'
STATEMENT ERROR: func=PGAPI_Statistics, desc='', errnum=0, errmsg=''
-----------------------------------------------------------
-
hdbc=81330296, stmt=82523264, result=82523536
manual_result=1, prepare=0, internal=0
bindings=82523648, bindings_allocated=13
parameters=0, parameters_allocated=0
statement_type=-2, statement='(NULL)'
stmt_with_params='(NULL)'
data_at_exec=-1, current_exec_param=-1, put_data=0
currTuple=-1, current_col=-1, lobj_fd=-1
maxRows=0, rowset_size=1, keyset_size=0, cursor_type=0,
scroll_concurrency=1
cursor_name=''
----------------QResult
Info -------------------------------
fields=82523616, manual_tuples=82524272, backend_tuples=0,
tupleField=0, conn=0
fetch_count=0, fcount=0, num_fields=0, cursor='(NULL)'
message='(NULL)', command='(NULL)', notice='(NULL)'
status=0, inTuples=0
CONN ERROR: func=PGAPI_Statistics, desc='', errnum=0, errmsg=''
------------------------------------------------------------
henv=82445424, conn=81330296, status=1, num_stmts=16
sock=82445440, stmts=82445488, lobj_type=69711
---------------- Socket Info -------------------------------
socket=464, reverse=0, errornumber=0, errormsg='(NULL)'
buffer_in=81341212, buffer_out=81345312
buffer_filled_in=8, buffer_filled_out=0, buffer_read_in=8
conn=81330296, query='close SQL_CUR04EA8E50'
conn=81330296, query='fetch 100 in SQL_CUR04EA9910'
[ fetched 100 rows ]
conn=81330296, query='fetch 100 in SQL_CUR04EA9910'
[ fetched 100 rows ]
conn=81330296, query='fetch 100 in SQL_CUR04EA9910'
[ fetched 86 rows ]
conn=81330296, query='close SQL_CUR04EA9910'
conn=81330296, query='END'
conn=81330296, query='BEGIN'
conn=81330296, query='declare SQL_CUR04EBE4E0 cursor for select Name,
PracticalCategoryID from PracticalCategory where Year = 2001 order by Name'
conn=81330296, query='fetch 100 in SQL_CUR04EBE4E0'
[ fetched 6 rows ]
conn=81330296, query='close SQL_CUR04EBE4E0'
conn=81330296, query='END'
conn=81330296, query='BEGIN'
conn=81330296, query='declare SQL_CUR04EBEAC0 cursor for select Link,
Description, LinkID from PracticalLink where PracticalID = 136'
conn=81330296, query='fetch 100 in SQL_CUR04EBEAC0'
[ fetched 0 rows ]
conn=81330296, query='close SQL_CUR04EBEAC0'
conn=81330296, query='END'
conn=81330296, query='BEGIN'
conn=81330296, query='update Practical set Description = '', Prerequisites =
'', Requirements = '', Year = '2001', Name = 'Advanced Contemporary Dance',
Code = '1082', Cost = '0', CostComment = '', Credits = '3', CreditsComment =
'', CoordinatorID = '1', PracticalCategoryID = '1' where PracticalID = 136'
conn=81330296, query='update Practical set Picture = '84256' where
PracticalID = 136'
STATEMENT ERROR: func=SC_execute, desc='', errnum=1, errmsg='Error while
executing the query'
-----------------------------------------------------------
-
hdbc=81330296, stmt=82568240, result=0
manual_result=0, prepare=0, internal=0
bindings=0, bindings_allocated=0
parameters=82480560, parameters_allocated=1
statement_type=2, statement='update Practical set Picture =
? where PracticalID = 136'
stmt_with_params='update Practical set Picture = '84256'
where PracticalID = 136'
data_at_exec=-1, current_exec_param=-1, put_data=0
currTuple=-1, current_col=-1, lobj_fd=-1
maxRows=0, rowset_size=1, keyset_size=0, cursor_type=0,
scroll_concurrency=1
cursor_name='SQL_CUR04EBE430'
----------------QResult
Info -------------------------------
CONN ERROR: func=SC_execute, desc='', errnum=107, errmsg='No response from
the backend'
------------------------------------------------------------
henv=82445424, conn=81330296, status=1, num_stmts=16
sock=82445440, stmts=82445488, lobj_type=69711
---------------- Socket Info -------------------------------
socket=464, reverse=0, errornumber=10, errormsg='Socket has been
closed.'
buffer_in=81341212, buffer_out=81345312
buffer_filled_in=0, buffer_filled_out=0, buffer_read_in=0
conn=81330296, PGAPI_Disconnect

--
Mike Miller
Application Software Developer
School of Physical Education
University Of Otago
+64 3 479 9123
http://physed.otago.ac.nz

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Johann Zuschlag 2001-12-06 23:56:33 Errors with nulls thru ODBC
Previous Message Keith Gray 2001-12-06 22:10:01 Re: PostgreSQL and Word 2000