Обсуждение: postgres: archiver process failed on 000000010000020A00000073

Поиск
Список
Период
Сортировка

postgres: archiver process failed on 000000010000020A00000073

От
Silvio Fabi - NBS srl
Дата:
Hi,

WAL Archive process on my DB Postgresql 10 is not working.
the WAL Archive file 000000010000020A00000073 was accidentally deleted
and there is no backup.
Postgresql tries to run the following command:
rsync -a pg_wal/000000010000020A00000073
barman@database:/var/lib/barman/database/incoming/000000010000020A00000073

but of course it fails

below the message in the postgres log file:
2020-04-01 18:48:19 CEST [18265]: [101016-1] DETAIL:  The failed archive
command was: rsync -a pg_wal/000000010000020A00000073
barman@database:/var/lib/barman/database/incoming/000000010000020A00000073
2020-04-01 18:48:19 CEST [18265]: [101017-1] WARNING:  archiving
write-ahead log file "000000010000020A00000073" failed too many times,
will try again later


Postgresql continues to generate WALs Archive file in local directory
"log" and I have no application problems, but continuous archiving on
the barman repository does not work.

How can I fix this problem?


--
Silvio Fabi
NBS srl
Via Val Tiberina 23/A
San Benedetto del Tronto (AP)
Telefono: 0735/7626242
Cellulare: 345/0142435





Re: postgres: archiver process failed on 000000010000020A00000073

От
Alvaro Herrera
Дата:
On 2020-Apr-01, Silvio Fabi - NBS srl wrote:

> WAL Archive process on my DB Postgresql 10 is not working.
> the WAL Archive file 000000010000020A00000073 was accidentally deleted
> and there is no backup.
> Postgresql tries to run the following command:
> rsync -a pg_wal/000000010000020A00000073
> barman@database:/var/lib/barman/database/incoming/000000010000020A00000073

Ouch.  This is not a barman problem; accidentally a WAL file is
synonymous with corrupting your database.  Any existing backup that
needs that file is now invalid.  I suggest you run CHECKPOINT and then
take a new backup.  I think removing the 000000010000020A00000073.ready
file from pg_wal should prevent future attempts at archiving it, so that
subsequent WAL files are archived.

By all means, *do not* lose any more WAL files.  It is a very dangerous
thing to do.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: postgres: archiver process failed on 000000010000020A00000073

От
Silvio Fabi - NBS srl
Дата:
thanks Alvaro,
following your instructions I solved the problem.

Il 01/04/2020 19:36, Alvaro Herrera ha scritto:
> On 2020-Apr-01, Silvio Fabi - NBS srl wrote:
>
>> WAL Archive process on my DB Postgresql 10 is not working.
>> the WAL Archive file 000000010000020A00000073 was accidentally deleted
>> and there is no backup.
>> Postgresql tries to run the following command:
>> rsync -a pg_wal/000000010000020A00000073
>> barman@database:/var/lib/barman/database/incoming/000000010000020A00000073
> Ouch.  This is not a barman problem; accidentally a WAL file is
> synonymous with corrupting your database.  Any existing backup that
> needs that file is now invalid.  I suggest you run CHECKPOINT and then
> take a new backup.  I think removing the 000000010000020A00000073.ready
> file from pg_wal should prevent future attempts at archiving it, so that
> subsequent WAL files are archived.
>
> By all means, *do not* lose any more WAL files.  It is a very dangerous
> thing to do.
>

-- 
Silvio Fabi
NBS srl
Via Val Tiberina 23/A
San Benedetto del Tronto (AP)
Telefono: 0735/7626242
Cellulare: 345/0142435