Thread: pgAdmin III: Error on clicking "Display Objects" while doing a restore

pgAdmin III: Error on clicking "Display Objects" while doing a restore

From
Nikhil S
Date:
Hi,

The following set of operations induce an error:

1. Create a backup file /tmp/pg.backup of an existing database
2. Create a new database
3. Right click and select restore database by specifying this file
4. Clicking on "Display Objects" causes the following error: "An error has occurred: Schema node not found for object DATABASE postgres [ owner postgres ]

The frmRestore::OnEndProcess() function, when it reads the toc information, should ignore the line which contains the entry for the dumped database itself. So the current code erroneously tries to find the schema to which the DATABASE object belongs and gives out the above error. The fix is to ignore the input line which contains the db information. The pg_restore binary also seems to do the same.

PFA, patch to fix this.

Regards,
Nikhils
Attachment

Re: pgAdmin III: Error on clicking "Display Objects" while doing a restore

From
Guillaume Lelarge
Date:
Hi,

Le 29/01/2011 09:56, Nikhil S a écrit :
> [...]
> The following set of operations induce an error:
>
> 1. Create a backup file /tmp/pg.backup of an existing database
> 2. Create a new database
> 3. Right click and select restore database by specifying this file
> 4. Clicking on "Display Objects" causes the following error: "An error has
> occurred: Schema node not found for object DATABASE postgres [ owner
> postgres ]
>
> The frmRestore::OnEndProcess() function, when it reads the toc information,
> should ignore the line which contains the entry for the dumped database
> itself. So the current code erroneously tries to find the schema to which
> the DATABASE object belongs and gives out the above error. The fix is to
> ignore the input line which contains the db information. The pg_restore
> binary also seems to do the same.
>
> PFA, patch to fix this.
>

Just applied.

This issue was bugging me too, but I couldn't find a proper fix. So,
thanks a lot for this :)


--
Guillaume
 http://www.postgresql.fr
 http://dalibo.com


Just applied.

This issue was bugging me too, but I couldn't find a proper fix. So,
thanks a lot for this :)


Glad to be of some help :). Thanks Guillaume.

Regards,
Nikhils
Hi Nikhil,

I am new to PostgreSQL.
I do need to restore the database on Postgres but the same above issue with
restoring.

Can you please help me how to apply the patch in windows.

Thanks in Advance.

Prajwal
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/pgAdmin-III-Error-on-clicking-Display-Objects-while-doing-a-restore-tp3362508p3383319.html
Sent from the PostgreSQL - pgadmin hackers mailing list archive at Nabble.com.

Hi Prajwal,

The issue just pops up a benign error message. If you continue further you should be able to proceed with the restore process.

Regards,
Nkhils

On Sun, Feb 13, 2011 at 2:25 PM, Prajwal <prajwaldba@gmail.com> wrote:

Hi Nikhil,

I am new to PostgreSQL.
I do need to restore the database on Postgres but the same above issue with
restoring.

Can you please help me how to apply the patch in windows.

Thanks in Advance.

Prajwal
--
View this message in context: http://postgresql.1045698.n5.nabble.com/pgAdmin-III-Error-on-clicking-Display-Objects-while-doing-a-restore-tp3362508p3383319.html
Sent from the PostgreSQL - pgadmin hackers mailing list archive at Nabble.com.

--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers