Thread: pqReadData() error

pqReadData() error

From
Dipankar Chakrabarti
Date:
Hi,

I am creating functions from saved in text files on
PostgreSQL 6.5 on linux by
$ psql mydb2 <myfunc.txt

If the function is large ( more than say 50 lines) or
I am creating small functions in series ( like
myfunc1, myfunc2, myfunc3),
suddenly I am getting the following error:
----------------------------------------------
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. Terminating.
---------------------------------------------------

After exiting from telnet session and re-entering, I
may create the function again.

I am baffled by this odd behaviour.
Could any body help me with some suggestions?

Regards,

Dipankar Chakrabarti
Senior Manager (Projects)
Mindteck (I) Ltd.


__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one place.
Yahoo! Shopping: http://shopping.yahoo.com


Re: [SQL] pqReadData() error

From
wieck@debis.com (Jan Wieck)
Date:
>
> Hi,
>
> I am creating functions from saved in text files on
> PostgreSQL 6.5 on linux by
> $ psql mydb2 <myfunc.txt
>
> If the function is large ( more than say 50 lines) or

    Maybe the functions text portion exceeds 2K?

    There  is  an  index on functions source text in version 6.5.
    It's totally useless, left over from the history.  Now  there
    is  some problem with btree indices when the items exceed 2K,
    that can crash the backend.

    I've removed this index in the actual 7.0 tree.  It's  not  a
    trivial   task   and   requires   an  initdb  run  after  the
    modification. If you want to give it a try, I might help  you
    to do it.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #