Thread: Re: Welcome to the pgsql-bugs list!

Re: Welcome to the pgsql-bugs list!

From
Christine Penner
Date:
After looking closer at the log file I found something interesting:

2009-04-27 17:38:38 PDT ERROR:  column "f_township" of relation
"fire_report" does not exist at character 3584. Almost every insert
got an error about a duplicate primary key. That shouldn't happen
because all these records were in a Postgres database without any duplicates.

This backup included the table creating aswell. How can it not have a
column in the table. Am I wrong to assume that when I restore over an
existing database it will delete things first? It looks like it doesn't.

I'm going to guess that's the problem. I know we have had at least
one crash loading an empty database but I will have to look at that
when it happens again.

How are backups and restore's usually done? I'm guessing not through
pgAdmin. Also is there away to tell it to drop a table before it
tries to create it?

Christine

At 09:08 AM 22/04/2009, you wrote:
>Content-Type: text/plain; charset="us-ascii"
>Content-Disposition: inline
>Content-Transfer-Encoding: binary
>Content-Description: Welcome to the pgsql-bugs list!
>Content-Language: en
>
>Welcome to the pgsql-bugs mailing list!
>Your password at postgresql.org is
>
>Y83ezg
>
>To leave this mailing list, send the following command in the body
>of a message to majordomo@postgresql.org:
>
>approve Y83ezg unsubscribe pgsql-bugs christine@ingenioussoftware.com
>
>This command will work even if your address changes.  For that reason,
>among others, it is important that you keep a copy of this message.
>
>To post a message to the mailing list, send it to
>   pgsql-bugs@postgresql.org
>
>If you need help or have questions about the mailing list, please
>contact the people who manage the list by sending a message to
>   pgsql-bugs-owner@postgresql.org
>
>You can manage your subscription by visiting the following WWW location:
>
><http://mail.postgresql.org/mj/mj_wwwusr/domain=postgresql.org/christine%40ingenioussoftware.com>
>
>
>Content-Type: text/plain; charset="ISO-8859-1"
>Content-Disposition: inline
>Content-Transfer-Encoding: binary
>Content-Description: List Information
>Content-Language: en
>
>   Put the text of the welcome message here.


Re: Welcome to the pgsql-bugs list!

From
"Joshua D. Drake"
Date:
On Tue, 2009-04-28 at 12:59 -0700, Christine Penner wrote:
> After looking closer at the log file I found something interesting:

> This backup included the table creating aswell. How can it not have a
> column in the table. Am I wrong to assume that when I restore over an
> existing database it will delete things first? It looks like it doesn't.

No it will not delete things first. I think that would be a serious
design flaw if it did so.


> I'm going to guess that's the problem. I know we have had at least
> one crash loading an empty database but I will have to look at that
> when it happens again.
>
> How are backups and restore's usually done? I'm guessing not through
> pgAdmin. Also is there away to tell it to drop a table before it
> tries to create it?

You can pass flags that will do various things such as that.. See:

http://www.postgresql.org/docs/8.3/static/app-pgdump.html
http://www.postgresql.org/docs/8.3/static/app-pgrestore.html

Sincerely,

Joshua D. Drake


>
> Christine
>
> At 09:08 AM 22/04/2009, you wrote:
> >Content-Type: text/plain; charset="us-ascii"
> >Content-Disposition: inline
> >Content-Transfer-Encoding: binary
> >Content-Description: Welcome to the pgsql-bugs list!
> >Content-Language: en
> >
> >Welcome to the pgsql-bugs mailing list!
> >Your password at postgresql.org is
> >
> >Y83ezg
> >
> >To leave this mailing list, send the following command in the body
> >of a message to majordomo@postgresql.org:
> >
> >approve Y83ezg unsubscribe pgsql-bugs christine@ingenioussoftware.com
> >
> >This command will work even if your address changes.  For that reason,
> >among others, it is important that you keep a copy of this message.
> >
> >To post a message to the mailing list, send it to
> >   pgsql-bugs@postgresql.org
> >
> >If you need help or have questions about the mailing list, please
> >contact the people who manage the list by sending a message to
> >   pgsql-bugs-owner@postgresql.org
> >
> >You can manage your subscription by visiting the following WWW location:
> >
> ><http://mail.postgresql.org/mj/mj_wwwusr/domain=postgresql.org/christine%40ingenioussoftware.com>
> >
> >
> >Content-Type: text/plain; charset="ISO-8859-1"
> >Content-Disposition: inline
> >Content-Transfer-Encoding: binary
> >Content-Description: List Information
> >Content-Language: en
> >
> >   Put the text of the welcome message here.
>
>
--
PostgreSQL - XMPP: jdrake@jabber.postgresql.org
   Consulting, Development, Support, Training
   503-667-4564 - http://www.commandprompt.com/
   The PostgreSQL Company, serving since 1997


Re: Welcome to the pgsql-bugs list!

From
Raymond O'Donnell
Date:
On 28/04/2009 21:09, Joshua D. Drake wrote:
> On Tue, 2009-04-28 at 12:59 -0700, Christine Penner wrote:
>> After looking closer at the log file I found something interesting:
>
>> This backup included the table creating aswell. How can it not have a
>> column in the table. Am I wrong to assume that when I restore over an
>> existing database it will delete things first? It looks like it doesn't.
>
> No it will not delete things first. I think that would be a serious
> design flaw if it did so.

If you want to see how the backup and restore works, do a backup with
the PLAIN option and read through the resulting SQL file. The
compress/tar options produce the same output only, well,
compressed/tarred. :-)

Ray.


------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------