Re: HOT chain validation in verify_heapam()

Поиск
Список
Период
Сортировка
От Aleksander Alekseev
Тема Re: HOT chain validation in verify_heapam()
Дата
Msg-id CAJ7c6TPZFHrwGvxNomEFM9w+j9oB1tY6HUpxOCDrJej2dK=WnA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: HOT chain validation in verify_heapam()  (Himanshu Upadhyaya <upadhyaya.himanshu@gmail.com>)
Ответы Re: HOT chain validation in verify_heapam()  (Aleksander Alekseev <aleksander@timescale.com>)
Re: HOT chain validation in verify_heapam()  (Aleksander Alekseev <aleksander@timescale.com>)
Список pgsql-hackers
Hi Himanshu,

Many thanks for working on this!

> Please find attached the patch with the above idea of HOT chain's validation

Please correct me if I'm wrong, but don't we have a race condition here:

```
+            if ((TransactionIdDidAbort(pred_xmin) ||
TransactionIdIsInProgress(pred_xmin))
+                && !TransactionIdEquals(pred_xmin, curr_xmin))
             {
```

The scenario that concerns me is the following:

1. TransactionIdDidAbort(pred_xmin) returns false
2. The transaction aborts
3. TransactionIdIsInProgress(pred_xmin) returns false
4. (false || false) gives us false. An error is reported, although
actually the condition should have been true.

-- 
Best regards,
Aleksander Alekseev



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: predefined role(s) for VACUUM and ANALYZE
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Proposal to provide the facility to set binary format output for specific OID's per session