Re: Commit Timestamp and LSN Inversion issue
От | Jan Wieck |
---|---|
Тема | Re: Commit Timestamp and LSN Inversion issue |
Дата | |
Msg-id | 4410956c-dcb9-4bbc-a47b-8abb2fddd6d8@wi3ck.info обсуждение исходный текст |
Ответ на | Re: Commit Timestamp and LSN Inversion issue (Amit Kapila <amit.kapila16@gmail.com>) |
Список | pgsql-hackers |
On 11/6/24 06:23, Amit Kapila wrote: > I think we avoid calling hook/callback functions after holding a lock > (spinlock or LWLock) as the user may do an expensive operation or > acquire some other locks in those functions which could lead to > deadlocks or impact the concurrency. So, it would be better to > directly call an inline function to perform the required operation. This is a valid concern. The reason why I kept it as a hook is because ReserveXLogInsertLocation() has no knowledge that this is allocating WAL space for a commit record. Only the caller does. We certainly need to be extremely careful what any such hook function is doing. Acquiring additional locks is definitely not acceptable. But I am not sure we should burden this function with specialized knowledge about what it is reserving WAL space for. Regards, Jan
В списке pgsql-hackers по дате отправления: