Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering

Поиск
Список
Период
Сортировка
От Zhang Mingli
Тема Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering
Дата
Msg-id 541bfe57-89c0-4f35-8059-b25188a99dd3@Spark
обсуждение исходный текст
Ответ на Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Ответы Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi,

On Sep 8, 2022, 19:08 +0800, Matthias van de Meent <boekewurm+postgres@gmail.com>, wrote:

PFA a patch that rectifies this issue, by moving the XLogBeginInsert()
down to where 1.) we have all relevant buffers pinned and locked, and
2.) we're in a critical section, making that part of the code
consistent with the general scheme for XLog insertion.

In the same function, there is disorder of XLogBeginInsert and START_CRIT_SECTION.

```
collectordata = ptr = (char *) palloc(collector->sumsize);

 data.ntuples = collector->ntuples;

 if (needWal)
   XLogBeginInsert();

 START_CRIT_SECTION();
```

Shall we adjust that too?

Regards,
Zhang Mingli

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

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: problems with making relfilenodes 56-bits
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Fix some newly modified tab-complete changes