From: | "Guido Barosio" <gbarosio(at)gmail(dot)com> |
---|---|
To: | "Diego Barreto" <diegob(at)allytech(dot)com> |
Cc: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Re: error en dump |
Date: | 2007-04-12 18:57:23 |
Message-ID: | f7f6b4c70704121157w6fe67a26r5afbab72e9410ee8@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Por defecto template0 no acepta conexiones. Para que acepte conexiones
debes actualizar un valor en pg_database, datallowconn que es un dato
booleano.
Saludos,
g.-
On 4/12/07, Diego Barreto <diegob(at)allytech(dot)com> wrote:
>
>
>
> se me rompio la base template0 y no se por donde empezar!
> no pudo hacer dump, si veo el resto de las bases
>
> Edit Database
> template0
> DBI connect failed : FATAL: database "template0" is not currently accepting connections
>
>
>
> pg_dumpall > backup.total.2007-04-09-0701.sql
> pg_dumpall: query failed: ERROR: more than one row returned by a subquery used as an expression
> pg_dumpall: query was: SELECT usename, usesysid, passwd, usecreatedb, usesuper, valuntil, (usesysid = (SELECT datdba FROM pg_database WHERE datname = 'template0')) AS clusterowner FROM pg_shadow
>
> encontre esto y lo corri tal cual
>
> UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
> Next connect to template0 and perform the above repair procedures. Finally, do
>
> -- re-freeze template0:
> VACUUM FREEZE;
> -- and protect it against future alterations:
> UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
>
> pero nada
> tambien veo esto y no entiendo como puede ser, tengo dos template0 ...
> se trato de recuperar un backup global no se si tendra que ver
>
> template1=# select datname, age(datfrozenxid), datfrozenxid, current_date, current_time FROM pg_database;
> select datname, age(datfrozenxid), datfrozenxid, current_date, current_time FROM pg_database;
> datname | age | datfrozenxid | date | timetz
> --------------+-------------+--------------+------------+--------------------
> template0 | -2087841649 | 553 | 2007-04-12 | 14:02:28.529765-03
> template1 | 1129148525 | 1077977675 | 2007-04-12 | 14:02:28.529765-03
> sapo | 1129286418 | 1077839782 | 2007-04-12 | 14:02:28.529765-03
> dbases | 1129285621 | 1077840579 | 2007-04-12 | 14:02:28.529765-03
> template0 | 46029871 | 2161096329 | 2007-04-12 | 14:02:28.529765-03
> datositios | 1129291048 | 1077835152 | 2007-04-12 | 14:02:28.529765-03
> (6 rows)
>
> SELECT oid,datname from pg_database;
> oid | datname
> ---------+--------------
> 17229 | template0
> 1 | template1
> 56915 | sapo
> 61742 | dbases
> 17229 | template0
> 3291695 | datositios
> (6 rows)
>
>
> si alguien me puede dar alguna pista se lo agradezco, las bases estan funcionando actualmente, se puede acceder bien , consultar, editar, actualizar, eliminar, pero no se puede hacer dump, por el momento se hace un backup en frio , parando el motor y comprimiendo el directorio completo del postgres
>
>
> aca esta la salida de un dump de una sola base
>
> template1=# \q
> [postgres(at)ns2 ~]$ pg_dump --file=dumppg.sql --format=c -v --compress=9 --data-only --no-owner --schema=public --host=localhost -U myuser --password dbases
> Password:
> pg_dump: reading schemas
> pg_dump: SQL command failed
> pg_dump: Error message from server: ERROR: more than one row returned by a subquery used as an expression
> pg_dump: The command was: SELECT tableoid, oid, nspname, (select usename from pg_user where nspowner = usesysid) as usename, nspacl FROM pg_namespace
> pg_dump: *** aborted because of error
>
>
>
> gracias de antemano
>
> saludos
> diego
>
>
> ---------------------------(fin del mensaje)---------------------------
> TIP 10: visita nuestro canal de IRC #postgresql-es en irc.freenode.net
>
--
Guido Barosio
-----------------------
http://www.globant.com
guido(dot)barosio(at)globant(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Juan Martínez | 2007-04-12 19:04:20 | Re: Hola Lista |
Previous Message | Alvaro Herrera | 2007-04-12 18:14:14 | Re: Hola Lista |