From: | Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Misleading comment in prologue of ReorderBufferQueueMessage |
Date: | 2020-12-14 09:14:39 |
Message-ID: | CAGEoWWTTzNzHOi8bj0wfAo1siGi-YEh6wqH1oaz4DrkTJ6HbTQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
The name of the function suggests that the given message will be queued in
ReorderBuffer. The prologue of the function says so too
776 /*
777 * Queue message into a transaction so it can be processed upon commit.
778 */
It led me to think that a non-transactional message is processed along with
the surrounding transaction, esp. when it has an associated xid.
But in reality, the function queues only a transactional message and
decoders a non-transactional message immediately without waiting for a
commit.
We should modify the prologue to say
"Queue a transactional message into a transaction so that it can be
processed upon commit. A non-transactional message is processed
immediately." and also change the name of the function
to ReorderBufferProcessMessage(), but the later may break API compatibility.
--
Best Wishes,
Ashutosh
From | Date | Subject | |
---|---|---|---|
Next Message | Seino Yuki | 2020-12-14 09:17:58 | Re: Feature improvement for pg_stat_statements |
Previous Message | Andrey V. Lepikhov | 2020-12-14 09:06:12 | Re: [POC] Fast COPY FROM command for the table with foreign partitions |