Re: very concerning, tables hopped from one database to - Mailing list pgsql-general

From Tom Lane
Subject Re: very concerning, tables hopped from one database to
Date
Msg-id 18192.1019499858@sss.pgh.pa.us
Whole thread Raw
In response to Re: very concerning, tables hopped from one database to  (David Ford <david+cert@blue-labs.org>)
Responses Re: very concerning, tables hopped from one database to  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
David Ford <david+cert@blue-labs.org> writes:
> ... I can't for the life of me understand how 1/4 of the tables went
> into the right db and the others into template1.

I don't have an explanation for that, but it does seem odd.

> Perhaps the socket blew up and psql reconnected to template1?

I think psql will attempt automatic reconnection after a connection
failure in some cases, but AFAIK it should always reconnect to the last
database in use.  (Hmm, but if it had originally connected to template1,
and the \connect to hmzbook was inside a script, maybe the reconnect
would go to template1?  Peter, can you give us any insight on the
possible behaviors there?)

That still leaves us wondering why the connection failure, but at least
it seems like a possible avenue to an explanation how some of the tables
created by the script wound up in a different database than the others.

            regards, tom lane

pgsql-general by date:

Previous
From: David Ford
Date:
Subject: Re: (very anxious, tables hopping databases ....)
Next
From: J Norfleet
Date:
Subject: Errors