Help using pgfsck - Mailing list pgsql-general

From Vilson farias
Subject Help using pgfsck
Date
Msg-id 006701c302cd$a5081f30$98a0a8c0@dgtac
Whole thread Raw
Responses Re: Help using pgfsck  (Martijn van Oosterhout <kleptog@svana.org>)
Re: Help using pgfsck  ("alex b." <mailinglists1@gmx.de>)
List pgsql-general
Greetings,

  I've been trying to use pgfsck since my PostgreSQL database was raising a
"Memory exhausted in
AllocSetAlloc" but it seems pgfsck is reading my datetimes in a wrong way,
so I can't export data to recover my database.

  I'd executed initdb with pt_BR (Brazilian's Portuguese language). Is it
possible to pgfsck problem be related with localization settings?

  Here is my "log" :

bxs=#CREATE TABLE teste(a datetime);
bxs=#
bxs=# insert into teste values ( now());
INSERT 22184 1
...
bxs=# insert into teste values ( now());
INSERT 22188 1
bxs=# select * from teste;
           a
------------------------
 2003-04-14 12:56:35-03
 2003-04-14 12:56:36-03
 2003-04-14 12:56:38-03
 2003-04-14 12:56:39-03
 2003-04-14 12:56:40-03
 2003-04-14 12:56:50-03
 2003-04-14 12:56:51-03
 2003-04-14 12:56:53-03
 2003-04-14 12:56:56-03
 2003-04-14 12:56:58-03
(10 rows)

bxs=# \q
[postgres@dgtao ddd]$ ./pgfsck -a -d -D /home/postgres/data bxs teste
-- Detected database format 7.1
-- Scanning table teste
-- Table pg_class(1259):Page 0:Tuple 64: Unknown type _aclitem (1034)
-- Table pg_class(1259):Page 1:Tuple 0: Unknown type _aclitem (1034)
-- Table pg_class(1259):Page 1:Tuple 1: Unknown type _aclitem (1034)
...
-- Table pg_class(1259):Page 3:Tuple 20: Unknown type _aclitem (1034)
-- Table pg_class(1259):Page 3:Tuple 21: Unknown type _aclitem (1034)
-- Table pg_class(1259):Page 3:Tuple 22: Unknown type _aclitem (1034)
-- Table teste(22169):Page 0:Tuple 0: Unknown type timestamp (1184)
-- Table teste(22169):Page 0:Tuple 1: Unknown type timestamp (1184)
-- Table teste(22169):Page 0:Tuple 2: Unknown type timestamp (1184)
-- Table teste(22169):Page 0:Tuple 3: Unknown type timestamp (1184)
-- Table teste(22169):Page 0:Tuple 4: Unknown type timestamp (1184)
-- Table teste(22169):Page 0:Tuple 5: Unknown type timestamp (1184)
-- Table teste(22169):Page 0:Tuple 6: Unknown type timestamp (1184)
-- Table teste(22169):Page 0:Tuple 7: Unknown type timestamp (1184)
-- Table teste(22169):Page 0:Tuple 8: Unknown type timestamp (1184)
-- Table teste(22169):Page 0:Tuple 9: Unknown type timestamp (1184)
insert into teste (a) values ('ÌZ¶~A'); --
page=0,tuple=0,oid=22179,xmin=1658,xmax=0,cmin=0,cmax=0
insert into teste (a) values ('ÐZ¶~A'); --
page=0,tuple=1,oid=22180,xmin=1659,xmax=0,cmin=0,cmax=0
insert into teste (a) values ('ØZ¶~A'); --
page=0,tuple=2,oid=22181,xmin=1660,xmax=0,cmin=0,cmax=0
insert into teste (a) values ('ÜZ¶~A'); --
page=0,tuple=3,oid=22182,xmin=1661,xmax=0,cmin=0,cmax=0
insert into teste (a) values ('àZ¶~A'); --
page=0,tuple=4,oid=22183,xmin=1662,xmax=0,cmin=0,cmax=0
insert into teste (a) values ([¶~A'); --
page=0,tuple=5,oid=22184,xmin=1664,xmax=0,cmin=0,cmax=0
insert into teste (a) values ('[¶~A'); --
page=0,tuple=6,oid=22185,xmin=1665,xmax=0,cmin=0,cmax=0
insert into teste (a) values ('[¶~A'); --
page=0,tuple=7,oid=22186,xmin=1666,xmax=0,cmin=0,cmax=0
insert into teste (a) values (' [¶~A'); --
page=0,tuple=8,oid=22187,xmin=1667,xmax=0,cmin=0,cmax=0
insert into teste (a) values ('([¶~A'); --
page=0,tuple=9,oid=22188,xmin=1668,xmax=0,cmin=0,cmax=0

After I got this output, I'd reconfigured env with new values and ran pgfsck
again :
[postgres@dgtao ddd]$ LANG=pt_BR
[postgres@dgtao ddd]$ LC_ALL=pt_BR
[postgres@dgtao ddd]$ LC_CTYPE=pt_BR
[postgres@dgtao ddd]$ LESSCHARSET=latin1
[postgres@dgtao ddd]$ export LANG LC_ALL LC_CTYPE

The new test brought the same kind of values. Am I doing somethig wrong?


Best regards,

----------------------------------------------------------------------------
----
José Vilson de Mello de Farias
Software Engineer

Dígitro Tecnologia Ltda - www.digitro.com.br
APC - Customer Oriented Applications
E-mail: vilson.farias@digitro.com.br
Tel.: +55 48 281 7158
ICQ 11866179


pgsql-general by date:

Previous
From: "Cristina Surroca"
Date:
Subject: Re: [sorry] trying to connect gives :sun.io.CharToByteUTF-8 Exception
Next
From: Alec Mitchell
Date:
Subject: Re: Strange query optimization in 7.3.2