Monday, July 19, 2010

Improvements to Bulk Transfer

We expected that the principle use of our bulk transfer page would be to backup databases and to restore a database from a prior backup.

It is also useful for initial loading of databases, and an improvement this weekend makes that easier.

When PostgreSQL dumps a database, it generally includes in the dump statements to assign each relation  to a specific role as owner.  This assumes that the same roles will be available on restore, an assumption justified by the use of dumps as backups.

When a dump made elsewhere is uploaded to an Rdbhost database, the roles embedded in ALTER.. OWNER statements are generally not available, so the tables end up inaccessible to any of the defined roles.

Now, at the end of a restore, any tables or views not owned by valid roles are given to the s-role for the account.

So you can export tables owned by any role into a dump file, upload it to Rdbhost, and end up with them all owned by the default role in your Rdbhost account.