grant on sequence and pg_restore/pg_dump problem
Hi,
I did a quick search and didn't see anything on this, if I missed it
sorry in advance.
Anyway, I was doing a restore of a 8.1 database(on a 8.1 server) using
the 8.2 pg_restore and it was throwing errors when it was trying to
restore the permissions on the sequences.
basically the pg_restore was using the grant on sequence against the 8.1
database which of course 8.1 knows nothing about.
Is there a switch or something I missed that would allow this to work
properly on a 8.1 or lower database?
Or do I have to now have 2 versions of dump/restore in order to do this?
Thanks,
--
Tony
Tony Caduto wrote:
Hi,
I did a quick search and didn't see anything on this, if I missed it
sorry in advance.
Anyway, I was doing a restore of a 8.1 database(on a 8.1 server) using
the 8.2 pg_restore and it was throwing errors when it was trying to
restore the permissions on the sequences.
basically the pg_restore was using the grant on sequence against the 8.1
database which of course 8.1 knows nothing about.Is there a switch or something I missed that would allow this to work
properly on a 8.1 or lower database?
Or do I have to now have 2 versions of dump/restore in order to do this?
You can use 8.2 to dump 8.1, but for restore, you should use the same
version as the target database.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Bruce Momjian wrote:
Tony Caduto wrote:
Hi,
I did a quick search and didn't see anything on this, if I missed it
sorry in advance.
Anyway, I was doing a restore of a 8.1 database(on a 8.1 server) using
the 8.2 pg_restore and it was throwing errors when it was trying to
restore the permissions on the sequences.
basically the pg_restore was using the grant on sequence against the 8.1
database which of course 8.1 knows nothing about.Is there a switch or something I missed that would allow this to work
properly on a 8.1 or lower database?
Or do I have to now have 2 versions of dump/restore in order to do this?You can use 8.2 to dump 8.1, but for restore, you should use the same
version as the target database.
So for admin tool vendors, we need to now ship more than one copy of
pg_restore?
Wasn't the restore pretty much backwards compatible until now?
Certainly pg_restore must know what version of the server it's
connecting to, shouldn't it be able to adjust the GRANT ON so on versions
< 8.2 it does not use the SEQUENCE keyword?
Thanks,
--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration
Tony Caduto wrote:
Bruce Momjian wrote:
Tony Caduto wrote:
Hi,
I did a quick search and didn't see anything on this, if I missed it
sorry in advance.
Anyway, I was doing a restore of a 8.1 database(on a 8.1 server) using
the 8.2 pg_restore and it was throwing errors when it was trying to
restore the permissions on the sequences.
basically the pg_restore was using the grant on sequence against the 8.1
database which of course 8.1 knows nothing about.Is there a switch or something I missed that would allow this to work
properly on a 8.1 or lower database?
Or do I have to now have 2 versions of dump/restore in order to do this?You can use 8.2 to dump 8.1, but for restore, you should use the same
version as the target database.So for admin tool vendors, we need to now ship more than one copy of
pg_restore?
Wasn't the restore pretty much backwards compatible until now?
Certainly pg_restore must know what version of the server it's
connecting to, shouldn't it be able to adjust the GRANT ON so on versions
< 8.2 it does not use the SEQUENCE keyword?
We have never spent time making restore work for all versions, partly
because pg_dump typically dumps as text, and you just feed that into
psql.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +