pg_dump and large objects - Mailing list pgsql-hackers

From Vadim B. Mikheev
Subject pg_dump and large objects
Date
Msg-id 34F39780.40822842@sable.krasnoyarsk.su
Whole thread Raw
List pgsql-hackers
This is from AA van Raalte (alvin@camberlo.demon.co.uk) and shows that
we have some problems when dumping tables with LO:
>
> 3/ The following script causes pg_dump to fail with a Segmentation fault. On my
> system pg_dump tries to generate an index on a large object. The SELECT statement
> in pg_dump that obtains the list of objects to be dumped explicitly rejects large
> objects. This SELECT statement is returning an incorrect value!.
>
> --------cut-------------
> db=testdump
> a=1
>
> destroydb $db
> createdb $db
> psql -c "create table hobs_log1 (id text, obj oid);" $db
>
> while [ $a -lt 100 ]; do
>         psql -c "insert into hobs_log1 (id, obj) values ('$a', lo_import('/home/alvin/pg2'));" $db
>         pg_dump $db || exit $?
>         a=`expr $a + 1`
>         done
>
> echo success
> -------cut---------------
>
> The following is the output of the above script on my system.
> Note the rather garbled line containing xinv18337, this is a CREATE INDEX
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> command and should never have been generated.
>
> --------cut--------------
> CREATE
> INSERT 18351 1
> \connect - alvin
> CREATE TABLE hobs_log1 (id text, obj oid);
> COPY hobs_log1 FROM stdin;
> 1       18337
> \.
> @" int4_ops );xinx18337 on xinv18337 using btree ( "qdR
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> INSERT 18383 1
> \connect - alvin
> CREATE TABLE hobs_log1 (id text, obj oid);
> COPY hobs_log1 FROM stdin;
> 1       18337
> 2       18369
> \.
> ------------cut-------------

Vadim

pgsql-hackers by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] Re: [QUESTIONS] Snapshot has not compiled in a couple of days
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] Re: [QUESTIONS] Snapshot has not compiled in a couple of days