pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
help me problems with pg_clog file
3+ messages / 3 participants
[nested] [flat]

* help me problems with pg_clog file
@ 2006-06-01 17:17 Joao <joao.junior@conab.gov.br>
  2006-06-02 07:41 ` Re: [PERFORM] help me problems with pg_clog file Gourish Singbal <gourish@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Joao @ 2006-06-01 17:17 UTC (permalink / raw)
  To: pgsql-performance

when i try do \d in psql on a table i get this message!
this happens too when i try to run pg_dump...

ERROR:  could not access status of transaction 4294967295
DETAIL:  could not open file "pg_clog/0FFF": File or directory not found


someone could help me?? PleasE!

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [PERFORM] help me problems with pg_clog file
  2006-06-01 17:17 help me problems with pg_clog file Joao <joao.junior@conab.gov.br>
@ 2006-06-02 07:41 ` Gourish Singbal <gourish@gmail.com>
  2006-06-05 14:48   ` Re: [PERFORM] help me problems with pg_clog file Jim C. Nasby <jnasby@pervasive.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Gourish Singbal @ 2006-06-02 07:41 UTC (permalink / raw)
  To: Joao <joao.junior@conab.gov.br>; +Cc: pgsql-performance@postgresql.org, "pgsql-admin@postgresql.org" <pgsql-admin@postgresql.org>

Joao,

If you had send the Email to pgsql-admin mailing list you would have got a
faster answer to ur query..

here is what i managed to do:-
1. I deleted the
$ls -lart the pg_clog folder
total 756
-rw-------   1 postgres users 262144 2006-04-10 17:16 0001
-rw-------   1 postgres users 262144 2006-04-10 17:16 0000
drwx------   2 postgres users   4096 2006-04-10 17:16 .
-rw-------   1 postgres users 229376 2006-05-31 18:17 0002
drwx------  10 postgres users   4096 2006-06-02 12:22 ..
$ mv 0002 ../
$ ls
0000  0001
$psql regression
regression=# select count(1) from accounts;
ERROR:  could not access status of transaction 2225656
DETAIL:  could not open file "pg_clog/0002": No such file or directory
regression=# \q

This Error came since the 0002 file from the pg_clog folder was missing.
Since the logs are missing from pg_clog folder can perfom pg_resetxlogs to
reset the logs and bring up the database.

$ /usr/local/pgsql/bin/pg_ctl -D /newdisk/postgres/data -l
/newdisk/postgres/data_log stop
waiting for postmaster to shut down... done
postmaster stopped

$ /usr/local/pgsql/bin/pg_resetxlog -x 2999800 /newdisk/postgres/data
Transaction log reset

The Value 2999800 u can get if u see the postgresql output file during
startup or using
grep "next transaction ID" /newdisk/postgres/data_log

than did the following:-
/usr/local/pgsql/bin/psql regression

regression=# select count(1) from accounts;
  count
---------
 1000001
(1 row)

regression=# \q
You can get more info from
http://unix.business.utah.edu/doc/applications/postgres/postgres-html/app-pgresetxlog.html

Hope this gives u some usefull information in solving ur recovery condition.

~gourish

On 6/1/06, Joao <joao.junior@conab.gov.br> wrote:
>
>   when i try do \d in psql on a table i get this message!
> this happens too when i try to run pg_dump...
>
> ERROR:  could not access status of transaction 4294967295
> DETAIL:  could not open file "pg_clog/0FFF": File or directory not found
>
>
> someone could help me?? PleasE!
>
>
>
>
>



-- 
Best,
Gourish Singbal

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [PERFORM] help me problems with pg_clog file
  2006-06-01 17:17 help me problems with pg_clog file Joao <joao.junior@conab.gov.br>
  2006-06-02 07:41 ` Re: [PERFORM] help me problems with pg_clog file Gourish Singbal <gourish@gmail.com>
@ 2006-06-05 14:48   ` Jim C. Nasby <jnasby@pervasive.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Jim C. Nasby @ 2006-06-05 14:48 UTC (permalink / raw)
  To: Gourish Singbal <gourish@gmail.com>; +Cc: Joao <joao.junior@conab.gov.br>; pgsql-performance@postgresql.org, "pgsql-admin@postgresql.org" <pgsql-admin@postgresql.org>

On Fri, Jun 02, 2006 at 01:11:27PM +0530, Gourish Singbal wrote:
> This Error came since the 0002 file from the pg_clog folder was missing.
> Since the logs are missing from pg_clog folder can perfom pg_resetxlogs to
> reset the logs and bring up the database.

Understand that this will almost certainly lose some of your data.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2006-06-05 14:48 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-06-01 17:17 help me problems with pg_clog file Joao <joao.junior@conab.gov.br>
2006-06-02 07:41 ` Gourish Singbal <gourish@gmail.com>
2006-06-05 14:48   ` Jim C. Nasby <jnasby@pervasive.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox