Crash after a call to pg_backup_start()

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Crash after a call to pg_backup_start()
Дата
Msg-id 20221021.161038.1277961198945653224.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответы Re: Crash after a call to pg_backup_start()
Список pgsql-hackers
While playing with a proposed patch, I noticed that a session crashes
after a failed call to pg_backup_start().

postgres=# select pg_backup_start(repeat('x', 1026));
ERROR:  backup label too long (max 1024 bytes)
postgres=# \q
> TRAP: failed Assert("during_backup_start ^ (sessionBackupState == SESSION_BACKUP_RUNNING)"), File: "xlog.c", Line:
8846,PID: 165835
 

Surprisingly this happens by a series of succussful calls to
pg_backup_start and stop.

postgres=# select pg_backup_start('x');
postgres=# select pg_backup_top();
postgres=# \q
> TRAP: failed Assert("durin..


>> do_pg_abort_backup(int code, Datum arg)
>     /* Only one of these conditions can be true */
>    Assert(during_backup_start ^
>           (sessionBackupState == SESSION_BACKUP_RUNNING));

It seems to me that the comment is true and the condition is a thinko.
This is introduced by df3737a651 so it is master only.

Please find the attached fix.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Avoid memory leaks during base backups
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Standby recovers records from wrong timeline