Re: migrating to 9.2 created blank dbs - Mailing list pgsql-admin

From Jeff Frost
Subject Re: migrating to 9.2 created blank dbs
Date
Msg-id C047F894-F87E-4D39-A2AB-8276C52DE2E5@pgexperts.com
Whole thread Raw
In response to migrating to 9.2 created blank dbs  (Marc Fromm <Marc.Fromm@wwu.edu>)
List pgsql-admin
My guess is the script is just using:

psql -l | awk ‘{print $1}’

To get the list of DBs to backup instead of:

psql -c “SELECT datname from pg_database”


Can you share the script?


> On May 4, 2015, at 9:43 AM, Marc Fromm <Marc.Fromm@wwu.edu> wrote:
>
> That could be correct that I am misinterpreting the output. Why would the backup script try to backup these blank
entriesas a database backup file called "|"? 
>
> Thanks
>
> -----Original Message-----
> From: Jeff Frost [mailto:jeff@pgexperts.com]
> Sent: Monday, May 04, 2015 9:41 AM
> To: Marc Fromm
> Cc: Tom Lane; Keith; Raghavendra; Keith Fiske; pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] migrating to 9.2 created blank dbs
>
> Any chance you’re just misinterpreting the new more verbose output of psql’s \l command?
>
> Nowadays, it looks like this:
>
> postgres=# \l
>                                List of databases
>     Name      |   Owner    | Encoding | Collate | Ctype |   Access privileges
> ---------------+------------+----------+---------+-------+--------------
> ---------------+------------+----------+---------+-------+---------
> postgres      | postgres   | UTF8     | C       | C     |
> template0     | postgres   | UTF8     | C       | C     | =c/postgres          +
>               |            |          |         |       | postgres=CTc/postgres
> template1     | postgres   | UTF8     | C       | C     | =c/postgres          +
>               |            |          |         |       | postgres=CTc/postgres
> (4 rows)
>
> But there are still only 3 databases being listed above.
>
>> On May 4, 2015, at 9:24 AM, Marc Fromm <Marc.Fromm@wwu.edu> wrote:
>>
>> Running the select statement gives me a list of all my databases. The only thing that looks suspicious are a few
databaseshave stuff like this in the datacl column " {postgres=CT/postgres,=T/postgres}". The number of databases with
thatis suspiciously equal to the number of blanks created. 
>>
>> Marc
>>
>> -----Original Message-----
>> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
>> Sent: Monday, May 04, 2015 9:07 AM
>> To: Keith
>> Cc: Marc Fromm; Raghavendra; Keith Fiske; pgsql-admin@postgresql.org
>> Subject: Re: [ADMIN] migrating to 9.2 created blank dbs
>>
>>> On Fri, May 1, 2015 at 6:39 PM, Marc Fromm <Marc.Fromm@wwu.edu> wrote:
>>>> I setup a server running postgresql-server-9.2.10-2.el7_1.x86_64.
>>>> After restoring my databases form a system running
>>>> postgresql-server-8.1.23-10.el5_10 (created with pg_dumpall),
>>>> several blank databases/entries were created.
>>
>> FWIW, this seems to match a symptom we've heard of occasionally in which the source server's catalogs are corrupted.
If the 8.1 server is still online it would be interesting to connect to it manually and see what you get from "select *
frompg_database”. 
>
>

---
Jeff Frost <jeff@pgexperts.com>
CTO, PostgreSQL Experts, Inc.
Phone: 1-888-PG-EXPRT x506
FAX: 415-762-5122
http://www.pgexperts.com/





pgsql-admin by date:

Previous
From: Jan Lentfer
Date:
Subject: Re: pg_dump and pg_restore with multiple streams does Not seem to improve overall times
Next
From: Marc Fromm
Date:
Subject: Re: migrating to 9.2 created blank dbs