pgsql: Fix -Wcast-function-type warnings on Windows/MinGW

2020-10-20 Thread Peter Eisentraut
Fix -Wcast-function-type warnings on Windows/MinGW After de8feb1f3a23465b5737e8a8c160e8ca62f61339, some warnings remained that were only visible when using GCC on Windows. Fix those as well. Note that the ecpg test source files don't use the full pg_config.h, so we can't use pg_funcptr_t there b

pgsql: Review format of code generated by PerfectHash.pm

2020-10-20 Thread Michael Paquier
Review format of code generated by PerfectHash.pm 80f8eb7 has added to the normalization quick check headers some code generated by PerfectHash.pm that is incompatible with the settings of gitattributes for this repository, as whitespaces followed a set of tabs for the first element of a line in t

pgsql: Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion

2020-10-20 Thread Alvaro Herrera
Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion More precisely, correctly handle the ONLY flag indicating not to recurse. This was implemented in 86f575948c77 by recursing in trigger.c, but that's the wrong place; use ATSimpleRecursion instead, which behaves properly. However, because legacy

pgsql: Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion

2020-10-20 Thread Alvaro Herrera
Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion More precisely, correctly handle the ONLY flag indicating not to recurse. This was implemented in 86f575948c77 by recursing in trigger.c, but that's the wrong place; use ATSimpleRecursion instead, which behaves properly. However, because legacy

pgsql: Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion

2020-10-20 Thread Alvaro Herrera
Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion More precisely, correctly handle the ONLY flag indicating not to recurse. This was implemented in 86f575948c77 by recursing in trigger.c, but that's the wrong place; use ATSimpleRecursion instead, which behaves properly. However, because legacy

pgsql: Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion

2020-10-20 Thread Alvaro Herrera
Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion More precisely, correctly handle the ONLY flag indicating not to recurse. This was implemented in 86f575948c77 by recursing in trigger.c, but that's the wrong place; use ATSimpleRecursion instead, which behaves properly. However, because legacy

pgsql: Avoid invalid alloc size error in shm_mq

2020-10-20 Thread Peter Eisentraut
Avoid invalid alloc size error in shm_mq In shm_mq_receive(), a huge payload could trigger an unjustified "invalid memory alloc request size" error due to the way the buffer size is increased. Add error checks (documenting the upper limit) and avoid the error by limiting the allocation size to Ma

pgsql: Avoid invalid alloc size error in shm_mq

2020-10-20 Thread Peter Eisentraut
Avoid invalid alloc size error in shm_mq In shm_mq_receive(), a huge payload could trigger an unjustified "invalid memory alloc request size" error due to the way the buffer size is increased. Add error checks (documenting the upper limit) and avoid the error by limiting the allocation size to Ma

pgsql: Avoid invalid alloc size error in shm_mq

2020-10-20 Thread Peter Eisentraut
Avoid invalid alloc size error in shm_mq In shm_mq_receive(), a huge payload could trigger an unjustified "invalid memory alloc request size" error due to the way the buffer size is increased. Add error checks (documenting the upper limit) and avoid the error by limiting the allocation size to Ma

pgsql: Avoid invalid alloc size error in shm_mq

2020-10-20 Thread Peter Eisentraut
Avoid invalid alloc size error in shm_mq In shm_mq_receive(), a huge payload could trigger an unjustified "invalid memory alloc request size" error due to the way the buffer size is increased. Add error checks (documenting the upper limit) and avoid the error by limiting the allocation size to Ma

pgsql: Avoid invalid alloc size error in shm_mq

2020-10-20 Thread Peter Eisentraut
Avoid invalid alloc size error in shm_mq In shm_mq_receive(), a huge payload could trigger an unjustified "invalid memory alloc request size" error due to the way the buffer size is increased. Add error checks (documenting the upper limit) and avoid the error by limiting the allocation size to Ma

pgsql: Avoid invalid alloc size error in shm_mq

2020-10-20 Thread Peter Eisentraut
Avoid invalid alloc size error in shm_mq In shm_mq_receive(), a huge payload could trigger an unjustified "invalid memory alloc request size" error due to the way the buffer size is increased. Add error checks (documenting the upper limit) and avoid the error by limiting the allocation size to Ma

Re: pgsql: Change the docs for PARALLEL option of Vacuum.

2020-10-20 Thread Amit Kapila
On Tue, Oct 20, 2020 at 7:47 AM Amit Kapila wrote: > > On Mon, Oct 19, 2020 at 8:13 PM Tom Lane wrote: > > > > Amit Kapila writes: > > > Change the docs for PARALLEL option of Vacuum. > > > > The buildfarm says you broke the docs build in v13. > > > > oops, I'll look into it. > Now, it is fixed