Help using pgfsck

From: "Vilson farias" <vilson(dot)farias(at)digitro(dot)com(dot)br>
To: <pgsql-general(at)postgresql(dot)org>
Cc: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, <ricardo(dot)klava(at)digitro(dot)com(dot)br>
Subject: Help using pgfsck
Date: 2003-04-14 21:34:33
Message-ID: 006701c302cd$a5081f30$98a0a8c0@dgtac
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)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(at)dgtao ddd]$ LANG=pt_BR
[postgres(at)dgtao ddd]$ LC_ALL=pt_BR
[postgres(at)dgtao ddd]$ LC_CTYPE=pt_BR
[postgres(at)dgtao ddd]$ LESSCHARSET=latin1
[postgres(at)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(dot)farias(at)digitro(dot)com(dot)br
Tel.: +55 48 281 7158
ICQ 11866179

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alec Mitchell 2003-04-14 22:20:29 Re: Strange query optimization in 7.3.2
Previous Message Cristina Surroca 2003-04-14 20:53:55 Re: [sorry] trying to connect gives :sun.io.CharToByteUTF-8 Exception