Re: BUG #17847: Unaligned memory access in ltree_gist
Pavel Borisov <pashkin.elfe@gmail.com>
From: Pavel Borisov <pashkin.elfe@gmail.com>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-bugs@lists.postgresql.org
Date: 2023-04-18T11:11:15Z
Lists: pgsql-bugs
Attachments
- v3-0001-Validate-ltree-siglen-GiST-option.patch (application/octet-stream) patch v3-0001
Hi, Alexander! On Tue, 18 Apr 2023 at 14:57, Alexander Korotkov <aekorotkov@gmail.com> wrote: > > Hi, Pavel! > > On Tue, Apr 18, 2023 at 1:34 PM Pavel Borisov <pashkin.elfe@gmail.com> wrote: > > I've looked into the patch v2 and there is a difference in DETAIL text > > for the cases: > > > > (1) > > create index tstidx on ltreetest using gist (t gist_ltree_ops(siglen=2025)); > > +ERROR: siglen value must be integer-aligned > > +DETAIL: Valid values are int-aligned positive integers up to 2024. > > > > (2) > > +create index tstidx on ltreetest using gist (t gist_ltree_ops(siglen=2028)); > > +ERROR: value 2028 out of bounds for option "siglen" > > +DETAIL: Valid values are between "4" and "2024" > > > > Could we stick to the DETAIL like in (2) for both cases? > > Within ltree we don't have control over error messages, which GUC code > emits about min/max boundaries violation (for sure, we're not going to > patch GUC code in this fix). So the only thing I can do to match > these two DETAIL is to make both of them 'Valid values are between "4" > and "2024"'. However, this message would be kind of irrelevant for > "siglen value must be integer-aligned" error. It's strange for me > when an error mentions alignment, but DETAIL does not. > > Do you think we can just remove the DETAIL for "siglen value must be > integer-aligned" error? I'd just propose something like making DETAIL output in ltree look similar to GUC validation (patch v3). But it's minor and could be done by removing DETAIL at all or otherwise. Regards, Pavel.
Commits
-
Validate ltree siglen GiST option to be int-aligned
- f4a4a18ecbdb 14.8 landed
- 214495dc5b71 15.3 landed
- 8bbd0cce92be 16.0 landed
- 48c6825d0ec8 13.11 landed
-
Fix custom validators call in build_local_reloptions()
- 02191136cb25 13.11 landed
- 9ef5a3583784 14.8 landed
- 6e7361c85e95 15.3 landed
- cd115c3530bd 16.0 landed