Re: pgsql: Fix memory leak in pgbench

2019-04-11 Thread Fabien COELHO
Hello Tom, Thomas Munro writes: . o O ( Is it time to run with -Werror on some BF animals yet? ) I've got -Werror turned on on longfin; I'm surprised that it's not whining about this. Perhaps -Wdeclaration-after-statement doesn't really do anything on clang? Anyway, I'd be in favor of ha

Re: pgsql: Fix memory leak in pgbench

2019-04-11 Thread Michael Paquier
On Thu, Apr 11, 2019 at 09:03:19AM +0200, Fabien COELHO wrote: > I can set up farm animals with bleeding age clang/gcc (compiled weekly from > sources) with -Werror (seawasp & moonjelly are already running with those > but without -Werror). If possible, I would not recommend using compiled version

Re: pgsql: Fix declaration after statement

2019-04-11 Thread Alvaro Herrera
On 2019-Apr-11, Tom Lane wrote: > Alvaro Herrera writes: > > (My compiler does not complain about it, even though > > -Wdeclaration-after-statement is specified. Weird.) > > longfin's compiler doesn't either (clang-1001.0.46.3). > What are you using? Maybe we should be filing bug reports? gcc

Re: pgsql: Fix memory leak in pgbench

2019-04-11 Thread Tom Lane
Michael Paquier writes: > On Thu, Apr 11, 2019 at 09:03:19AM +0200, Fabien COELHO wrote: >> I can set up farm animals with bleeding age clang/gcc (compiled weekly from >> sources) with -Werror (seawasp & moonjelly are already running with those >> but without -Werror). > If possible, I would not

Re: pgsql: Fix memory leak in pgbench

2019-04-11 Thread Andres Freund
Hi, On 2019-04-11 09:35:23 -0400, Tom Lane wrote: > Michael Paquier writes: > > On Thu, Apr 11, 2019 at 09:03:19AM +0200, Fabien COELHO wrote: > >> I can set up farm animals with bleeding age clang/gcc (compiled weekly from > >> sources) with -Werror (seawasp & moonjelly are already running with

Re: pgsql: Fix memory leak in pgbench

2019-04-11 Thread Fabien COELHO
I kinda wish the buildfarm wouldn't require manually updating compiler versions... It does not. My cron script uses the update script to keep them up to date: ./update_personality.pl --config=$PG/moonjelly.conf --compiler-version="$(gcc --version | head -1 | sed 's/gcc (GCC) //')" ./upd

Re: pgsql: Fix memory leak in pgbench

2019-04-11 Thread Fabien COELHO
I can set up farm animals with bleeding age clang/gcc (compiled weekly from sources) with -Werror (seawasp & moonjelly are already running with those but without -Werror). If possible, I would not recommend using compiled versions from source, but just the latest stable versions released for

pgsql: Remove redundant and ineffective test for btree insertion fast p

2019-04-11 Thread Tom Lane
Remove redundant and ineffective test for btree insertion fast path. indexing.sql's test for this feature was added along with the feature in commit 2b2727343. However, shortly later that test was rendered ineffective by commit 074251db6, which limited when the optimization would be applied, so t

Re: pgsql: Fix memory leak in pgbench

2019-04-11 Thread Tom Lane
Fabien COELHO writes: > Maybe some "experimental" warning could be shown somewhere as a reminder? > I can add it in the compiler version, something like: >"Ubuntu 18.04.2 LTS **EXPERIMENTAL** gcc ..." +1. Also you might consider marking that in a "note" for the animal.

pgsql: doc: adjust libpq wording to be neither/nor

2019-04-11 Thread Bruce Momjian
doc: adjust libpq wording to be neither/nor Reported-by: postgre...@cohi.at Discussion: https://postgr.es/m/155419437926.737.10876947446993402...@wrigleys.postgresql.org Backpatch-through: 9.4 Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/d3cf886e314aa6

pgsql: doc: adjust libpq wording to be neither/nor

2019-04-11 Thread Bruce Momjian
doc: adjust libpq wording to be neither/nor Reported-by: postgre...@cohi.at Discussion: https://postgr.es/m/155419437926.737.10876947446993402...@wrigleys.postgresql.org Backpatch-through: 9.4 Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f4daf895821965

pgsql: doc: adjust libpq wording to be neither/nor

2019-04-11 Thread Bruce Momjian
doc: adjust libpq wording to be neither/nor Reported-by: postgre...@cohi.at Discussion: https://postgr.es/m/155419437926.737.10876947446993402...@wrigleys.postgresql.org Backpatch-through: 9.4 Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5db85688a58ca4

pgsql: doc: adjust libpq wording to be neither/nor

2019-04-11 Thread Bruce Momjian
doc: adjust libpq wording to be neither/nor Reported-by: postgre...@cohi.at Discussion: https://postgr.es/m/155419437926.737.10876947446993402...@wrigleys.postgresql.org Backpatch-through: 9.4 Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/2c31332267ea3d

pgsql: doc: adjust libpq wording to be neither/nor

2019-04-11 Thread Bruce Momjian
doc: adjust libpq wording to be neither/nor Reported-by: postgre...@cohi.at Discussion: https://postgr.es/m/155419437926.737.10876947446993402...@wrigleys.postgresql.org Backpatch-through: 9.4 Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/c4dfe5718f661b

pgsql: doc: adjust libpq wording to be neither/nor

2019-04-11 Thread Bruce Momjian
doc: adjust libpq wording to be neither/nor Reported-by: postgre...@cohi.at Discussion: https://postgr.es/m/155419437926.737.10876947446993402...@wrigleys.postgresql.org Backpatch-through: 9.4 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d4888a3f766a7c02a9330

pgsql: Remove duplicative polygon SP-GiST sequencing test.

2019-04-11 Thread Tom Lane
Remove duplicative polygon SP-GiST sequencing test. Code coverage comparisons confirm that the tests using quad_poly_tbl_ord_seq1/quad_poly_tbl_ord_idx1 hit no code paths not also covered by the similar tests using quad_poly_tbl_ord_seq2/quad_poly_tbl_ord_idx2. Since these test cases are pretty e

pgsql: Fix off-by-one check that can lead to a memory overflow in ecpg.

2019-04-11 Thread Michael Meskes
Fix off-by-one check that can lead to a memory overflow in ecpg. Patch by Liu Huailing Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/77300684867f93aebd29de106f8adcf0797bcb21 Modified Files -- src/interfaces/ecpg/preproc/pgc.l | 2 +- 1 file cha

pgsql: Fix off-by-one check that can lead to a memory overflow in ecpg.

2019-04-11 Thread Michael Meskes
Fix off-by-one check that can lead to a memory overflow in ecpg. Patch by Liu Huailing Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0ba09cc026985536586b7fd58ceddee16ea739d7 Modified Files -- src/interfaces/ecpg/preproc/pgc.l | 2 +- 1 file cha

pgsql: Fix off-by-one check that can lead to a memory overflow in ecpg.

2019-04-11 Thread Michael Meskes
Fix off-by-one check that can lead to a memory overflow in ecpg. Patch by Liu Huailing Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/67f6e645e7acf356abb1b914a1d8536708ec0f67 Modified Files -- src/interfaces/ecpg/preproc/pgc.l | 2 +- 1 file cha

pgsql: Fix off-by-one check that can lead to a memory overflow in ecpg.

2019-04-11 Thread Michael Meskes
Fix off-by-one check that can lead to a memory overflow in ecpg. Patch by Liu Huailing Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ed16ba3248d486ec8b2fdfc75e442620d675b617 Modified Files -- src/interfaces/ecpg/preproc/pgc.l | 2 +- 1 file changed, 1

pgsql: Fix off-by-one check that can lead to a memory overflow in ecpg.

2019-04-11 Thread Michael Meskes
Fix off-by-one check that can lead to a memory overflow in ecpg. Patch by Liu Huailing Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e7e71b9e1ecb8cb6eb490b0c82bdc5aa9604368b Modified Files -- src/interfaces/ecpg/preproc/pgc.l | 2 +- 1 file cha

pgsql: Fix off-by-one check that can lead to a memory overflow in ecpg.

2019-04-11 Thread Michael Meskes
Fix off-by-one check that can lead to a memory overflow in ecpg. Patch by Liu Huailing Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/12c42a543ac80f44e02173c2d6d51ffe18de2703 Modified Files -- src/interfaces/ecpg/preproc/pgc.l | 2 +- 1 file cha

pgsql: Move plpgsql error-trapping tests to a new module-specific test

2019-04-11 Thread Tom Lane
Move plpgsql error-trapping tests to a new module-specific test file. The test for statement timeout has a 2-second timeout, which was only moderately annoying when it was written, but nowadays it contributes a pretty significant chunk of the elapsed time needed to run the core regression tests on

pgsql: Split up a couple of long-running regression test scripts.

2019-04-11 Thread Tom Lane
Split up a couple of long-running regression test scripts. The point of this change is to increase the potential for parallelism while running the core regression tests. Most people these days are using parallel testing modes on multi-core machines, so we might as well try a bit harder to keep mu

pgsql: Speed up sort-order-comparison tests in create_index_spgist.

2019-04-11 Thread Tom Lane
Speed up sort-order-comparison tests in create_index_spgist. This test script verifies that KNN searches of an SP-GiST index produce the same sort order as a seqscan-and-sort. The FULL JOINs used for that are exceedingly slow, however. Investigation shows that the problem is that the initial joi

pgsql: Re-order some regression test scripts for more parallelism.

2019-04-11 Thread Tom Lane
Re-order some regression test scripts for more parallelism. Move the strings, numerology, insert, insert_conflict, select and errors tests to be parts of nearby parallel groups, instead of executing by themselves. (Moving "select" required adjusting the constraints test, which uses a table named

pgsql: Fix more strcmp() calls using boolean-like comparisons for resul

2019-04-11 Thread Michael Paquier
Fix more strcmp() calls using boolean-like comparisons for result checks Such calls can confuse the reader as strcmp() uses an integer as result. The places patched here have been spotted by Thomas Munro, David Rowley and myself. Author: Michael Paquier Reviewed-by: David Rowley Discussion: https

pgsql: Switch TAP tests of pg_rewind to use a role with minimal permiss

2019-04-11 Thread Michael Paquier
Switch TAP tests of pg_rewind to use a role with minimal permissions Up to now the tests of pg_rewind have been using a superuser for all the tests (which is the default of many tests actually, and something that ought to be reviewed) when involving an online source server, still it is possible to

pgsql: Fix typos in reloptions.c

2019-04-11 Thread Michael Paquier
Fix typos in reloptions.c Author: Kirk Jamison Discussion: https://postgr.es/m/D09B13F772D2274BB348A310EE3027C6493463@g01jpexmbkw24 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d87ab88686fb60ad5a34373de05bb20e632cf003 Modified Files -- src/backend/a

pgsql: Fix GetNewTransactionId()'s interaction with xidVacLimit.

2019-04-11 Thread Thomas Munro
Fix GetNewTransactionId()'s interaction with xidVacLimit. Commit ad308058 switched to returning a FullTransactionId, but failed to load the potentially updated value in the case where xidVacLimit is reached and we release and reacquire the lock. Repair, closing bug #15727. While reviewing that co

pgsql: Fix REINDEX CONCURRENTLY of partitions

2019-04-11 Thread Peter Eisentraut
Fix REINDEX CONCURRENTLY of partitions In case of a partition index, when swapping the old and new index, we also need to attach the new index as a partition and detach the old one. Also, to handle partition indexes, we not only need to change dependencies referencing the index, but also dependen

Re: pgsql: Fix memory leak in pgbench

2019-04-11 Thread Fabien COELHO
Hello Tom, I can add it in the compiler version, something like: "Ubuntu 18.04.2 LTS **EXPERIMENTAL** gcc ..." +1. Done, should be seen on next run. The list of compilers is accumulating on the "Members" page for caiman, handfish, moonjelly and seawasp. Not sure how useful it is to ke