Re: Should XLogInsert() be done only inside a critical section?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Should XLogInsert() be done only inside a critical section?
Дата
Msg-id CAB7nPqR_j_9Y4G=XEHe-FrU7Xd-vz468eP4gzk7BU78L0Ow+1A@mail.gmail.com
обсуждение исходный текст
Ответ на Should XLogInsert() be done only inside a critical section?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Should XLogInsert() be done only inside a critical section?
Список pgsql-hackers
On Thu, Apr 21, 2016 at 5:44 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Anyway, I went through our tree and added START/END_CRIT_SECTION calls
> around all XLogInsert calls that could currently be reached without one;
> see attached.  Since this potentially breaks third-party code I would
> not propose back-patching it, but I think it's reasonable to propose
> applying it to HEAD.

+1 for sanitizing those code paths this way. This patch looks sane to
me after having a look with some testing.

--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -610,15 +610,12 @@ brinbuild(Relation heap, Relation index,
IndexInfo *indexInfo)       elog(ERROR, "index \"%s\" already contains data",
RelationGetRelationName(index));

-   /*
-    * Critical section not required, because on error the creation of the
-    * whole relation will be rolled back.
-    */
Perhaps Alvaro has a opinion to offer regarding this bit removed in brin.c?
-- 
Michael



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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: Typos/Questions in bloom documentation
Следующее
От: Amit Langote
Дата:
Сообщение: Re: Fix of doc for synchronous_standby_names.