Обсуждение: Large Object Problem with Python interface

Поиск
Список
Период
Сортировка

Large Object Problem with Python interface

От
Lauri Posti
Дата:
Hi.

Im trying to access prostrgeres (on redhat linux 6.0) via pg's LO python
interface.
With pg 6.4.2 & 6.5b1 everything works fine, but since  6.5b2 (6.5 final
incl) following errors occour:


[lauri@liha lauri]$ python
Python 1.5.2 (#2, Jun 12 1999, 02:51:28)  [GCC egcs-2.91.66
19990314/Linux (egcs- on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> from pg import *
>>> con=connect("kaladb","",5432,"","","koll","koll")
>>> a=con.locreate(INV_WRITE)
>>> a.open(INV_WRITE)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
IOError: can't open large object.
>>>

and postmaster produces following output:

[postgres@liha pgsql]$ postmaster -i -d 3
FindExec: found "/usr/local/pgsql/bin/postgres" using argv[0]
binding ShmemCreate(key=52e2c1, size=1063936)

/usr/local/pgsql/bin/postmaster: ServerLoop:            handling reading
5
/usr/local/pgsql/bin/postmaster: ServerLoop:            handling reading
5
/usr/local/pgsql/bin/postmaster: ServerLoop:            handling writing
5
/usr/local/pgsql/bin/postmaster: BackendStartup: environ dump:
-----------------------------------------
        USERNAME=
        HISTSIZE=1000
        HOSTNAME=liha.linnet.lan
        LOGNAME=postgres
        HISTFILESIZE=1000
        MAIL=/var/spool/mail/postgres
        TERM=vt100
        HOSTTYPE=i386

PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/pgsql/bin:/usr/local/pgsql/bin

        HOME=/usr/local/pgsql
        INPUTRC=/etc/inputrc
        SHELL=/bin/bash
        PS1=[\u@\h \W]\$
        USER=postgres
        PGDATA=/local/var/pgsql/
        BASH_ENV=/usr/local/pgsql/.bashrc
        OSTYPE=Linux
        SHLVL=1
        _=/usr/local/pgsql/bin/postmaster
        POSTPORT=5432
        POSTID=2147483647
        PG_USER=allah
        IPC_KEY=5432000
-----------------------------------------
/usr/local/pgsql/bin/postmaster child[11382]: starting with
(/usr/local/pgsql/bin/postmaster: BackendStartup: pid 11382 user allah
db kaladb socket 5
/usr/local/pgsql/bin/postgres -d3 -v131072 -p kaladb )
FindExec: found "/usr/local/pgsql/bin/postgres" using argv[0]
debug info:
        User         = allah
        RemoteHost   = localhost
        RemotePort   = 0
        DatabaseName = kaladb
        Verbose      = 3
        Noversion    = f
        timings      = f
        dates        = Normal
        bufsize      = 64
        sortmem      = 512
        query echo   = f
InitPostgres
StartTransactionCommand
query: select proname, oid from pg_proc where proname = 'lo_open' or
proname = 'lo_close' or proname = 'lo_creat' or proname = 'lo_unlink' or
proname = 'lo_lseek' or proname = 'lo_tell' or proname = 'loread' or
proname = 'lowrite'
ProcessQuery
CommitTransactionCommand
StartTransactionCommand
CommitTransactionCommand
StartTransactionCommand
CommitTransactionCommand
StartTransactionCommand
ERROR:  lo_lseek: invalid large obj descriptor (0)
AbortCurrentTransaction
pmdie 2
proc_exit(0) [#0]
shmem_exit(0) [#0]
exit(0)