Thread: problems after pg_resetxlog

problems after pg_resetxlog

From
Miguel
Date:
Hi, i had a server crash and after that , postgres refused to start, i
read on the list that pg_resetxlog could help me, indeed, after i run
pg_resetxlog dir_data, postgres started again, but i look a lot of these
errors:

CONTEXT:  writing block 1 of relation 1663/17231/69118230
WARNING:  could not write block 1 of 1663/17231/69118230
DETAIL:  Multiple failures --- write error may be permanent.
ERROR:  xlog flush request 98/E3E83848 is not satisfied --- flushed only
to 98/C364344
CONTEXT:  writing block 1 of relation 1663/17231/69118230
WARNING:  could not write block 1 of 1663/17231/69118230
DETAIL:  Multiple failures --- write error may be permanent.
ERROR:  xlog flush request 98/E3E83848 is not satisfied --- flushed only
to 98/C368658
CONTEXT:  writing block 1 of relation 1663/17231/69118230
WARNING:  could not write block 1 of 1663/17231/69118230
DETAIL:  Multiple failures --- write error may be permanent.
ERROR:  xlog flush request 98/E3E83848 is not satisfied --- flushed only
to 98/C3717F4
CONTEXT:  writing block 1 of relation 1663/17231/69118230
WARNING:  could not write block 1 of 1663/17231/69118230
DETAIL:  Multiple failures --- write error may be permanent.
ERROR:  xlog flush request 98/E3E83848 is not satisfied --- flushed only
to 98/C38554C
CONTEXT:  writing block 1 of relation 1663/17231/69118230
WARNING:  could not write block 1 of 1663/17231/69118230
DETAIL:  Multiple failures --- write error may be permanent.


and pg_dump fails with:


pg_dump radius > radius.out
pg_dump: ERROR:  xlog flush request 98/D7CFEE64 is not satisfied ---
flushed only to 98/CA37000
CONTEXT:  writing block 3683 of relation 1663/17231/69127319
pg_dump: SQL command to dump the contents of table "starttelephony"
failed: PQendcopy() failed.
pg_dump: Error message from server: ERROR:  xlog flush request
98/D7CFEE64 is not satisfied --- flushed only to 98/CA37000
CONTEXT:  writing block 3683 of relation 1663/17231/69127319
pg_dump: The command was: COPY public.starttelephony (radacctid,
username, realm, nasipaddress, acctstarttime, calledstationid,
callingstationid, acctdelaytime, h323gwid, h323callorigin, h323calltype,
h323setuptime, h323confid) TO stdout;



what can i do?
thanks

Re: problems after pg_resetxlog

From
Tom Lane
Date:
Miguel <mmiranda@123.com.sv> writes:
> ERROR:  xlog flush request 98/E3E83848 is not satisfied --- flushed only
> to 98/C364344

> what can i do?

Increasing the WAL start address might help (see the pg_resetxlog man
page).  Realize that you're probably going to be dealing with corrupted
data, however :-(

            regards, tom lane

Re: problems after pg_resetxlog

From
Miguel
Date:
Tom Lane wrote:

>Increasing the WAL start address might help (see the pg_resetxlog man
>page).  Realize that you're probably going to be dealing with corrupted
>data, however :-(
>
>            regards, tom lane
>
>
>
Yeah, i know, but i only want to be able to finish the dump, i must
execute the

pg_resetxlog again with the -l flag?


Re: problems after pg_resetxlog

From
Miguel
Date:
Miguel wrote:

> Tom Lane wrote:
>
>> Increasing the WAL start address might help (see the pg_resetxlog man
>> page).  Realize that you're probably going to be dealing with corrupted
>> data, however :-(
>>
>>             regards, tom lane
>>
>>
>>
Ops, foget the last email, i reread the man, this is what i have to do:

shiva2 pg_xlog # ls -l
total 180448
-rw-------  1 postgres postgres 16777216 Oct 28 18:05
00000001000000980000001A
-rw-------  1 postgres postgres 16777216 Oct 28 18:07
00000001000000980000001B
-rw-------  1 postgres postgres 16777216 Oct 28 18:10
00000001000000980000001C
-rw-------  1 postgres postgres 16777216 Oct 28 18:10
00000001000000980000001D
-rw-------  1 postgres postgres 16777216 Oct 28 17:25
00000001000000980000001E
-rw-------  1 postgres postgres 16777216 Oct 28 17:28
00000001000000980000001F
-rw-------  1 postgres postgres 16777216 Oct 28 17:37
000000010000009800000020
-rw-------  1 postgres postgres 16777216 Oct 28 17:51
000000010000009800000021
-rw-------  1 postgres postgres 16777216 Oct 28 17:53
000000010000009800000022
-rw-------  1 postgres postgres 16777216 Oct 28 17:46
000000010000009800000023
-rw-------  1 postgres postgres 16777216 Oct 28 17:49
000000010000009800000024
drwx------  2 postgres postgres     4096 Apr 22  2005 archive_status


So :

pg_resetxlog -l 0x01, 0x98, 0x25 dir_data

Is this ok?