pgsql: doc: Mention NO DEPENDS ON EXTENSION in its supported ALTER comm

2021-02-12 Thread Michael Paquier
doc: Mention NO DEPENDS ON EXTENSION in its supported ALTER commands This grammar flavor has been added by 5fc7039. Author: Ian Lawrence Barwick Discussion: https://postgr.es/m/CAB8KJ=ii6jscodxka6-do8bjatsmyu3ocewnl0mdn9ger+t...@mail.gmail.com Backpatch-through: 13 Branch -- REL_13_STABLE

pgsql: doc: Mention NO DEPENDS ON EXTENSION in its supported ALTER comm

2021-02-12 Thread Michael Paquier
doc: Mention NO DEPENDS ON EXTENSION in its supported ALTER commands This grammar flavor has been added by 5fc7039. Author: Ian Lawrence Barwick Discussion: https://postgr.es/m/CAB8KJ=ii6jscodxka6-do8bjatsmyu3ocewnl0mdn9ger+t...@mail.gmail.com Backpatch-through: 13 Branch -- master Details

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-12 Thread Amit Kapila
On Sat, Feb 13, 2021 at 9:49 AM Tom Lane wrote: > > Amit Kapila writes: > > Attached should fix the reported warnings but as I am not getting > > those warnings on my system so can't confirm but otherwise, the patch > > works as expected. I am planning to push this unless you or Peter have > > an

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-12 Thread Tom Lane
Amit Kapila writes: > Attached should fix the reported warnings but as I am not getting > those warnings on my system so can't confirm but otherwise, the patch > works as expected. I am planning to push this unless you or Peter have > any comments. Personally I'd get rid of the option for Replica

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-12 Thread Amit Kapila
On Sat, Feb 13, 2021 at 6:47 AM Amit Kapila wrote: > > On Sat, Feb 13, 2021 at 4:20 AM Tom Lane wrote: > > > > Don't do that. Quite aside from the inconsistency, this is pretty > > darn unsafe coding technique, because there is exactly nothing > > guaranteeing that the caller passes a buffer of

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-12 Thread Tom Lane
Amit Kapila writes: > Thanks for pointing it out. I'll look into this. BTW, how one can > check such reports, do one need to check all make logs for buildfarm > members? Yeah, I have a script that scans the most recent buildfarm runs for compiler warnings. I run it every few weeks typically (it'

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-12 Thread Amit Kapila
On Sat, Feb 13, 2021 at 4:20 AM Tom Lane wrote: > > Don't do that. Quite aside from the inconsistency, this is pretty > darn unsafe coding technique, because there is exactly nothing > guaranteeing that the caller passes a buffer of the length the > function expects. > > I'm not real sure that yo

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-12 Thread Tom Lane
Various buildfarm members are complaining about this patch, eg caiman| 2021-02-12 15:00:19 | tablesync.c:885:70: warning: argument 3 of type 'char[64]' with mismatched bound [-Warray-parameter=] caiman| 2021-02-12 15:00:19 | tablesync.c:904:72: warning: argument 3 of type 'char

pgsql: Tweak compiler version cutoff for no_sanitize("alignment") suppo

2021-02-12 Thread Tom Lane
Tweak compiler version cutoff for no_sanitize("alignment") support. Buildfarm results show that gcc up through 7.x produces annoying warnings for this construct (and, presumably, wouldn't do the right thing anyway). clang seems okay with the cutoff we have, though. Discussion: https://postgr.es

pgsql: Avoid divide-by-zero in regex_selectivity() with long fixed pref

2021-02-12 Thread Tom Lane
Avoid divide-by-zero in regex_selectivity() with long fixed prefix. Given a regex pattern with a very long fixed prefix (approaching 500 characters), the result of pow(FIXED_CHAR_SEL, fixed_prefix_len) can underflow to zero. Typically the preceding selectivity calculation would have underflowed a

pgsql: Avoid divide-by-zero in regex_selectivity() with long fixed pref

2021-02-12 Thread Tom Lane
Avoid divide-by-zero in regex_selectivity() with long fixed prefix. Given a regex pattern with a very long fixed prefix (approaching 500 characters), the result of pow(FIXED_CHAR_SEL, fixed_prefix_len) can underflow to zero. Typically the preceding selectivity calculation would have underflowed a

pgsql: Avoid divide-by-zero in regex_selectivity() with long fixed pref

2021-02-12 Thread Tom Lane
Avoid divide-by-zero in regex_selectivity() with long fixed prefix. Given a regex pattern with a very long fixed prefix (approaching 500 characters), the result of pow(FIXED_CHAR_SEL, fixed_prefix_len) can underflow to zero. Typically the preceding selectivity calculation would have underflowed a

pgsql: Avoid divide-by-zero in regex_selectivity() with long fixed pref

2021-02-12 Thread Tom Lane
Avoid divide-by-zero in regex_selectivity() with long fixed prefix. Given a regex pattern with a very long fixed prefix (approaching 500 characters), the result of pow(FIXED_CHAR_SEL, fixed_prefix_len) can underflow to zero. Typically the preceding selectivity calculation would have underflowed a

pgsql: Avoid divide-by-zero in regex_selectivity() with long fixed pref

2021-02-12 Thread Tom Lane
Avoid divide-by-zero in regex_selectivity() with long fixed prefix. Given a regex pattern with a very long fixed prefix (approaching 500 characters), the result of pow(FIXED_CHAR_SEL, fixed_prefix_len) can underflow to zero. Typically the preceding selectivity calculation would have underflowed a

pgsql: Avoid divide-by-zero in regex_selectivity() with long fixed pref

2021-02-12 Thread Tom Lane
Avoid divide-by-zero in regex_selectivity() with long fixed prefix. Given a regex pattern with a very long fixed prefix (approaching 500 characters), the result of pow(FIXED_CHAR_SEL, fixed_prefix_len) can underflow to zero. Typically the preceding selectivity calculation would have underflowed a

pgsql: pg_attribute_no_sanitize_alignment() macro

2021-02-12 Thread Alexander Korotkov
pg_attribute_no_sanitize_alignment() macro Modern gcc and clang compilers offer alignment sanitizers, which help to detect pointer misalignment. However, our codebase already contains x86-specific crc32 computation code, which uses unalignment access. Thankfully, those compilers also support the