Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Проблема с Бекапом со Слейв сервера WAL segment could not be streamed #641

Open
getthesoft opened this issue Nov 25, 2024 · 2 comments

Comments

@getthesoft
Copy link

Доброго времени суток! При запуске FULL бекапа удаленно со Слейв сервера выдаёт ошибку

INFO: Wait for LSN 2A6EE/510279A8 in streamed WAL segment /srv/prodump/backups/SRV1/SNG8DH/database/pg_wal/000000040002A6EE00000051
ERROR: WAL segment 000000040002A6EE00000051 could not be streamed in 1200 seconds
WARNING: Backup SNG8DH is running, setting its status to ERROR

в строке запуска стоит параметр --archive-timeout=1200
в логах БД увидел такое:

2024-11-24 17:08:38.275 EET [951910] [psql] [postgres] [postgres] [127.0.0.1]ERROR: recovery is in progress
2024-11-24 17:08:38.275 EET [951910] [psql] [postgres] [postgres] [127.0.0.1]HINT: WAL control functions cannot be executed during recovery.
2024-11-24 17:08:38.275 EET [951910] [psql] [postgres] [postgres] [127.0.0.1]STATEMENT: select greatest(0,pg_wal_lsn_diff(pg_current_wal_lsn(), replay_lsn)) from pg_stat_replication where client_addr = '1.1.1.1'

1.1.1.1 - адрес удаленного сервера на котором запускается бекап
PostgreSQL 13.15 pg_probackup 2.5.15 Размер БД ~ 3TB
Может сможете подсказать в какую сторону копать ?

@fukanchik
Copy link

Здравствуйте,

select greatest(0,pg_wal_lsn_diff(pg_current_wal_lsn(), replay_lsn)) from pg_stat_replication where client_addr = '1.1.1.1'

ничего похожего пробэкап не выполняет.

Выглядит, как будто ваша система мониторнига перепутала мастер и реплику. pg_current_wal_lsn() не имеет смысла на реплике.

@fukanchik
Copy link

 ERROR: WAL segment 000000040002A6EE00000051 could not be streamed in 1200 seconds

попробуйте в это время переключить WAL на мастере, например сделав select pg_switch_wal();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants