Skip site navigation (1) Skip section navigation (2)

pg_dump and large objects

From: "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su>
To: hackers(at)postgresql(dot)org
Subject: pg_dump and large objects
Date: 1998-02-25 04:01:04
Message-ID: 34F39780.40822842@sable.krasnoyarsk.su (view raw or flat)
Thread:
Lists: pgsql-hackers
This is from AA van Raalte (alvin(at)camberlo(dot)demon(dot)co(dot)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

Next:From: The Hermit HackerDate: 1998-02-25 04:29:07
Subject: Re: [HACKERS] Re: [QUESTIONS] Snapshot has not compiled in a couple of days
Previous:From: Thomas G. LockhartDate: 1998-02-25 03:27:42
Subject: Re: [HACKERS] Re: [QUESTIONS] Snapshot has not compiled in a couple of days

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group