gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] gnumed restore backup on windows 7


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] gnumed restore backup on windows 7
Date: Sun, 23 Sep 2012 16:07:45 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Sep 23, 2012 at 03:24:20AM +0000, Vaibhav Banait wrote:

> What is that that make you think so ?
> 
> I created backup using by clicking on gnumed v 17 database and then by using 
> backup option provided by pgadmin 3. It returned the value 0 suggesting that 
> the backup has occurred properly.
> 
> Then I clicked restore button on gnumed v17. I expected it to be smooth as 
> the database structure, version is the same.  
> 
> But it returned errors. I  am attaching error log. As suggested by you, I 
> tried to set read only option to off by inserting set_default_transaction to 
> off , but no avail.
> 
> I tried this on windows vista on another machine. It returned same errors.
> 
> I think I made it clear now.

We now know better what you tried. Let's see what we can
infer from that.

1) you created a backup by pgadmin3

Pgadmin3 created a backup. It then failed to restore that
backup. GNUmed does not support fixing bugs in Pgadmin3. I'm
sure the Pgadmin3 authors would be interested in the fact
that a valid PostgreSQL database - which can even be backed
up with Pgadmin3 - cannot be restored with Pgadmin3.

OTOH, since I seemed to remember that Pgadmin3 simply uses
standard PostgreSQL tools (just like GNUmed does) I took a
look at the log you provided. Sure enough, the log showed
signs of standard PostgreSQL tools (like pg_restore) being
run.

        C:/Program Files/PostgresPlus/8.4SS/bin\pg_restore.exe --host localhost 
--port 5432 --username postgres --dbname gnumed_v17 --verbose 
"C:\backupgnumed\gnumed_v17_a.backup"

Hence I undertook the endeavour to guess at what Pgadmin3
might be confused about. Sure enough, there were telltale
signs:

        pg_restore: [archiver (db)] could not execute query: ERROR:  
transaction is read-only

This reminded me of the fact that in a GNUmed database all
transacations are read-only (just like the error says) - and
apparently Pgadmin3 cannot deal with that.

Hence I suggested you insert the statement

        set default_transaction_read_only to off;

at the very top of the SQL file used to restore. This would
require the backup to actually be an SQL style backup. You
attested to the fact that you so did but that, apparently,
it still failed. Unfortunately, you did not provide either
the top part of the backup so we can see whether there might
be problems with the placement of the statement or a restore
log showing what's happening when the statement has been
added.

Karsten
-- 
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

[Prev in Thread] Current Thread [Next in Thread]