Re: Permissions on large objects - db backup and restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Wall <d(dot)wall(at)computer(dot)org>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Permissions on large objects - db backup and restore
Date: 2013-04-04 00:57:05
Message-ID: 29618.1365037025@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Wall <d(dot)wall(at)computer(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2013-04-04 03:02:19 Re: upgrading from V8.3.4 to V9.2.4
Previous Message David Wall 2013-04-04 00:39:48 Re: Permissions on large objects - db backup and restore