From: | "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Questions about CommandIsReadOnly |
Date: | 2021-03-09 11:54:04 |
Message-ID: | OS0PR01MB5716E9700E2BA06B05EFE60494929@OS0PR01MB5716.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi hackers,
When reading the code, I found that in function CommandIsReadOnly[1], "select for update/share" is defined as "not read only".
[1]-----------------
if (pstmt->rowMarks != NIL)
return false; /* SELECT FOR [KEY] UPDATE/SHARE */
-----------------
And from the comment [2], I think it means we need to CCI for "select for update/share ",
I am not very familiar this, is there some reason that we have to do CCI for "select for update/share " ?
Or Did I misunderstand ?
[2]-----------------
* the query must be *in truth* read-only, because the caller wishes
* not to do CommandCounterIncrement for it.
-----------------
Best regards,
houzj
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2021-03-09 12:11:59 | Outdated comments about proc->sem in lwlock.c |
Previous Message | John Naylor | 2021-03-09 11:43:52 | Re: [POC] verifying UTF-8 using SIMD instructions |