Re: Propagate XLogFindNextRecord error to callers

Поиск
Список
Период
Сортировка
От Mircea Cadariu
Тема Re: Propagate XLogFindNextRecord error to callers
Дата
Msg-id a121b735-70f5-49d9-8774-22a465008545@gmail.com
обсуждение исходный текст
Ответ на Re: Propagate XLogFindNextRecord error to callers  (Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>)
Ответы Re: Propagate XLogFindNextRecord error to callers
Список pgsql-hackers

Hi Anthonin, 

Thanks for the updated patch. 

I have noticed this code added in XLogFindNextRecord in the patch, appears also in XLogNextRecord (line 334).

+	if (state->errormsg_deferred)
+	{
+		if (state->errormsg_buf[0] != '\0')
+			*errormsg = state->errormsg_buf;
+		state->errormsg_deferred = false;
+	}
+

In XLogNextRecord, right before the above code, we do *errormsg = NULL. Should this be done also in XLogFindNextRecord in the patch? 

If so, what about even extracting a helper method which will be called from both places? 

A nit for the commit message: Propage -> Propagate

-- 
Thanks,
Mircea Cadariu

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