Re: clean up docs for v12
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Andres Freund <andres@anarazel.de>, Michael Paquier <michael@paquier.xyz>,
Justin Pryzby <pryzby@telsasoft.com>, pgsql-hackers@postgresql.org
Date: 2019-04-22T16:33:24Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes: > On 2019-Apr-22, Andres Freund wrote: >> On 2019-04-22 14:48:26 +0900, Michael Paquier wrote: >>> /* >>> - * Check if's guaranteed the all the desired attributes are available in >>> - * tuple. If so, we can start deforming. If not, need to make sure to >>> - * fetch the missing columns. >>> + * Check if all the desired attributes are available in the tuple. If so, >>> + * we can start deforming. If not, we need to make sure to fetch the >>> + * missing columns. >>> */ >> That's imo not an improvement. The guaranteed bit is actually >> relevant. What this block is doing is eliding the check against the >> tuple header for the number of attributes, if NOT NULL attributes for >> later columns guarantee that the desired columns are present in the NULL >> bitmap. But the rephrasing makes it sound like we're actually checking >> against the tuple. >> >> I think it'd be better just to fix s/the all/that all/. > (and s/if's/if it's/) ISTM that Michael's proposed wording change shows that the existing comment is easily misinterpreted. I don't think these minor grammatical fixes will avoid the misinterpretation problem, and so some more-extensive rewording is called for. But TBH, now that I look at the code, I think the entire optimization is a bad idea and should be removed. Am I right in thinking that the presence of a wrong attnotnull marker could cause the generated code to actually crash, thanks to not checking the tuple's natts field? I don't have enough faith in our enforcement of those constraints to want to see JIT taking that risk to save a nanosecond or two. (Possibly I'd not think this if I weren't fresh off a couple of days with my nose in the ALTER TABLE SET NOT NULL code. But right now, I think that believing that that code does not and never will have any bugs is just damfool.) regards, tom lane
Commits
-
Improve code inferring length of bitmap for JITed tuple deforming.
- 3a48005b0049 12.0 landed
-
Fix more typos and inconsistencies in documentation
- ac8623760377 12.0 landed
-
Fix collection of typos and grammar mistakes in docs and comments
- 148266fa354a 12.0 landed
-
Clean up some documentation for log_statement_sample_rate
- bc540f98599b 12.0 landed