Re: Database file copy

From: Srini Raghavan <sixersrini(at)yahoo(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Database file copy
Date: 2010-12-23 21:55:20
Message-ID: 720132.68055.qm@web80806.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you very much for reviewing, appreciate the feedback.  As pointed out by
you, it is always best to test it out with the latest version, so, I tested the
same approach with postgres 9.0.2 on windows just now, and it works!

I forgot to mention earlier that in addition to setting vacuum_freeze_table_age
to 0, vacuum_freeze_min_age must also be set to 0 to reset xmin with the
FrozenXid.

And you were spot on with regards to permission issues with roles. I had been
testing with the postgres account, which is a superuser and it always works. 
After the database files are copied over in the deploy instance, any object that
had ownership set to a custom role gets messed up, and logging in as that user
gives permission denined error. But, there is a easy fix to this. As the
postgres user, I ran the

alter table <objectname> owner to <rolename>

command for every object, followed by

grant all on <objecttype> <objectname> to <rolename>

command for every object, which resolved the permission denied issue. Thanks for
pointing this out.

Please let me know if you or anyone think of any other potential issues. Thanks
again for reviewing.

Srini

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2010-12-23 22:04:43 Re: [PATCH] V3: Idle in transaction cancellation
Previous Message Tomas Vondra 2010-12-23 21:43:11 Re: proposal : cross-column stats