Re: several problems in pg_receivexlog
От | Fujii Masao |
---|---|
Тема | Re: several problems in pg_receivexlog |
Дата | |
Msg-id | CAHGQGwFhgWVVFybHCtO7BoaeLcGQ6Yf=pCUZMA-8P+vfWOQBvg@mail.gmail.com обсуждение исходный текст |
Ответ на | several problems in pg_receivexlog (Fujii Masao <masao.fujii@gmail.com>) |
Ответы |
Re: several problems in pg_receivexlog
|
Список | pgsql-hackers |
On Tue, Jul 10, 2012 at 3:23 AM, Fujii Masao <masao.fujii@gmail.com> wrote: > Hi, > > I found several problems in pg_receivexlog, e.g., memory leaks, > file-descripter leaks, ..etc. The attached patch fixes these problems. > > ISTM there are still some other problems in pg_receivexlog, so I'll > read it deeply later. While pg_basebackup background process is streaming WAL records, if its replication connection is terminated (e.g., walsender in the server is accidentally terminated by SIGTERM signal), pg_basebackup ends up failing to include all required WAL files in the backup. The problem is that, in this case, pg_basebackup doesn't emit any error message at all. So an user might misunderstand that a base backup has been successfully taken even though it doesn't include all required WAL files. To fix this problem, I think that, when the replication connection is terminated, ReceiveXlogStream() should check whether we've already reached the stop point by calling stream_stop() before returning TRUE. If we've not yet (this means that we've not received all required WAL files yet), ReceiveXlogStream() should return FALSE and pg_basebackup should emit an error message. Comments? Regards, -- Fujii Masao
В списке pgsql-hackers по дате отправления: