Re: Permissions on large objects - db backup and restore - Mailing list pgsql-general

From Tom Lane
Subject Re: Permissions on large objects - db backup and restore
Date
Msg-id 29618.1365037025@sss.pgh.pa.us
Whole thread Raw
In response to Re: Permissions on large objects - db backup and restore  (David Wall <d.wall@computer.org>)
Responses Re: Permissions on large objects - db backup and restore
List pgsql-general
David Wall <d.wall@computer.org> writes:
> On 4/3/2013 3:14 PM, Tom Lane wrote:
>> A 9.2->9.2 dump and restore certainly should preserve large object
>> ownership (and permissions, if you've set any). In a quick check I do
>> see "ALTER LARGE OBJECT nnn OWNER TO ..." commands in pg_dump's output
>> for such a case. Are you sure this is really the "same" issue? Are you
>> doing something strange like using pg_dump's --no-owner option?

> We used this to backup on server1 (9.2.2):
> pg_dump --format=c --oids /dbname/
> And we restored on server2 (9.2.3) with:
> pg_restore -v -O -d /dbname/

$ pg_restore -?
 ...
  -O, --no-owner               skip restoration of object ownership
 ...

So there you have it.  pg_restore just restored all the objects (blobs
and otherwise) as owned by the user running it.  I should think you'd
have had issues with other things besides the blobs by now.

            regards, tom lane


pgsql-general by date:

Previous
From: David Wall
Date:
Subject: Re: Permissions on large objects - db backup and restore
Next
From: Adrian Klaver
Date:
Subject: Re: upgrading from V8.3.4 to V9.2.4