... - Mailing list pgsql-general

From mascarim@yahoo.com
Subject ...
Date
Msg-id 199906090632.CAA06716@emptoris.ohnet
Whole thread Raw
List pgsql-general
Hello,

I've recently installed the snapshot from this
past Sunday to test our applications against
6.5 in anticipation of migrating to it.  As a result,
I have noticed a few peculiarities which the
June 6th snapshot exhibited.  Our CGI code is
throwing the following exception as the result of
a query:

Exception Report
========================================
 Object:  Application
 Method:  queryMatrix
 Message: ERROR:  Index k_vendors1 is not a btree
 [SELECT vendors.vendor,vendors.vendorgroup,
  vendors.vendorname,vendors.phoneno
  FROM vendors WHERE vendors.vendor = '100602']

This happened on multiple tables, not just our
vendors table.  I dropped and recreated the indexes
which fixed the symptom.

I believe that the cause of the problem is that we
changed code so that all top-down applications and CGI
programs run in a single transaction.  One of these
programs will DROP indexes on a table, use COPY to
import the data, and then recreate the index.  In
development, this program threw an exception and thus
did not complete the transacation. I suspect that this
is the cause of the problem. Perhaps I should change
the code so that DROP INDEX and CREATE INDEX should
reside in their own transactions?

One more thing that I noticed.  I loaded the old data
into the 6.5 snapshot. I then had to, by hand,
COPY foo to '/tmp/table.txt' in one session and
COPY bar from '/tmp/table.txt' in another as some
schema had changed.  After performing about 40 or
50 of these copies, the backend closed the connection
to both sessions due to running out of file
descriptors.  Is COPY releasing its file descriptors
after a to/from?

Thanks for any info,

Marcus Mascari (mascarim@yahoo.com)


pgsql-general by date:

Previous
From: "K.T."
Date:
Subject: Re: [GENERAL] Newbie questions
Next
From: Oleg Broytmann
Date:
Subject: Re: [GENERAL] Compiling libpq