[COMMITTERS] pgsql: Improve handling of pathtargets in planner.c.

2016-03-08 Thread Tom Lane
Improve handling of pathtargets in planner.c. Refactor so that the internal APIs in planner.c deal in PathTargets not targetlists, and establish a more regular structure for deriving the targets needed for successive steps. There is more that could be done here; calculating the eval costs of each

[COMMITTERS] pgsql: Add valgrind suppressions for bootstrap related code.

2016-03-08 Thread Andres Freund
Add valgrind suppressions for bootstrap related code. Author: Andres Freund Backpatch: 9.4, where we started to maintain valgrind suppressions Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/5e43bee8307f1f6f87894c9a4bd9f9045f45c064 Modified Files -- src/

[COMMITTERS] pgsql: Add valgrind suppressions for python code.

2016-03-08 Thread Andres Freund
Add valgrind suppressions for python code. Python's allocator does some low-level tricks for efficiency; unfortunately they trigger valgrind errors. Those tricks can be disabled making instrumentation easier; but few people testing postgres will have such a build of python. So add broad suppressio

[COMMITTERS] pgsql: Add valgrind suppressions for bootstrap related code.

2016-03-08 Thread Andres Freund
Add valgrind suppressions for bootstrap related code. Author: Andres Freund Backpatch: 9.4, where we started to maintain valgrind suppressions Branch -- REL9_4_STABLE Details --- http://git.postgresql.org/pg/commitdiff/6416b1d422e588b0064d09e6a201d184b70638c1 Modified Files

[COMMITTERS] pgsql: Add valgrind suppressions for python code.

2016-03-08 Thread Andres Freund
Add valgrind suppressions for python code. Python's allocator does some low-level tricks for efficiency; unfortunately they trigger valgrind errors. Those tricks can be disabled making instrumentation easier; but few people testing postgres will have such a build of python. So add broad suppressio

[COMMITTERS] pgsql: Add valgrind suppressions for python code.

2016-03-08 Thread Andres Freund
Add valgrind suppressions for python code. Python's allocator does some low-level tricks for efficiency; unfortunately they trigger valgrind errors. Those tricks can be disabled making instrumentation easier; but few people testing postgres will have such a build of python. So add broad suppressio

[COMMITTERS] pgsql: Add valgrind suppressions for bootstrap related code.

2016-03-08 Thread Andres Freund
Add valgrind suppressions for bootstrap related code. Author: Andres Freund Backpatch: 9.4, where we started to maintain valgrind suppressions Branch -- REL9_5_STABLE Details --- http://git.postgresql.org/pg/commitdiff/9a5f1073f52bbcf81793dbbcc22c04c4364f490f Modified Files

[COMMITTERS] pgsql: Improve handling of group-column indexes in GroupingSetsPath.

2016-03-08 Thread Tom Lane
Improve handling of group-column indexes in GroupingSetsPath. Instead of having planner.c compute a groupColIdx array and store it in GroupingSetsPaths, make create_groupingsets_plan() find the grouping columns by searching in the child plan node's tlist. Although that's probably a bit slower for

[COMMITTERS] pgsql: Handle invalid libpq sockets in more places

2016-03-08 Thread Peter Eisentraut
Handle invalid libpq sockets in more places Also, make error messages consistent. From: Michael Paquier Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/a40814d7aacbda9266c703cc011d3506668899de Modified Files -- .../replication/libpqwalreceiver/libpqwal

[COMMITTERS] pgsql: ecpg: Fix typo

2016-03-08 Thread Peter Eisentraut
ecpg: Fix typo GCC 6 points out the redundant conditions, which were apparently typos. Reviewed-by: Thomas Munro Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/0d0644dce82a87ef4b670fb60709ef1fd6a3030c Modified Files -- src/interfaces/ecpg/test/compat_

[COMMITTERS] pgsql: psql: Fix some strange code in SQL help creation

2016-03-08 Thread Peter Eisentraut
psql: Fix some strange code in SQL help creation Struct QL_HELP used to be defined as static in the sql_help.h header file, which is included in sql_help.c and help.c, thus creating two separate instances of the struct. This causes a warning from GCC 6, because the struct is not used in sql_help.

[COMMITTERS] pgsql: Suppress GCC 6 warning about self-comparison

2016-03-08 Thread Peter Eisentraut
Suppress GCC 6 warning about self-comparison Reviewed-by: Thomas Munro Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/a2fd62dd53fb606dee69e0f4eb12289c87f5c8b1 Modified Files -- src/port/path.c | 4 1 file changed, 4 insertions(+) -- Sent via pgs

Re: [COMMITTERS] pgsql: ltree: Zero padding bytes when allocating memory for externally

2016-03-08 Thread Tom Lane
Andres Freund writes: > On 2016-03-08 23:13:51 +, Andres Freund wrote: >> ltree: Zero padding bytes when allocating memory for externally visible data. > This is marked as the originating commit for a failure on dromedary: > http://pgbuildfarm.org/cgi-bin/show_log.pl?nm=dromedary&dt=2016-03-0

Re: [COMMITTERS] pgsql: ltree: Zero padding bytes when allocating memory for externally

2016-03-08 Thread Andres Freund
On 2016-03-08 23:13:51 +, Andres Freund wrote: > ltree: Zero padding bytes when allocating memory for externally visible data. This is marked as the originating commit for a failure on dromedary: http://pgbuildfarm.org/cgi-bin/show_log.pl?nm=dromedary&dt=2016-03-08%2023%3A27%3A02 the origin of

[COMMITTERS] pgsql: ltree: Zero padding bytes when allocating memory for externally

2016-03-08 Thread Andres Freund
ltree: Zero padding bytes when allocating memory for externally visible data. ltree/ltree_gist/ltxtquery's headers stores data at MAXALIGN alignment, requiring some padding bytes. So far we left these uninitialized. Zero those by using palloc0. Author: Andres Freund Reported-By: Andres Freund / v

[COMMITTERS] pgsql: ltree: Zero padding bytes when allocating memory for externally

2016-03-08 Thread Andres Freund
ltree: Zero padding bytes when allocating memory for externally visible data. ltree/ltree_gist/ltxtquery's headers stores data at MAXALIGN alignment, requiring some padding bytes. So far we left these uninitialized. Zero those by using palloc0. Author: Andres Freund Reported-By: Andres Freund / v

[COMMITTERS] pgsql: ltree: Zero padding bytes when allocating memory for externally

2016-03-08 Thread Andres Freund
ltree: Zero padding bytes when allocating memory for externally visible data. ltree/ltree_gist/ltxtquery's headers stores data at MAXALIGN alignment, requiring some padding bytes. So far we left these uninitialized. Zero those by using palloc0. Author: Andres Freund Reported-By: Andres Freund / v

[COMMITTERS] pgsql: ltree: Zero padding bytes when allocating memory for externally

2016-03-08 Thread Andres Freund
ltree: Zero padding bytes when allocating memory for externally visible data. ltree/ltree_gist/ltxtquery's headers stores data at MAXALIGN alignment, requiring some padding bytes. So far we left these uninitialized. Zero those by using palloc0. Author: Andres Freund Reported-By: Andres Freund / v

[COMMITTERS] pgsql: ltree: Zero padding bytes when allocating memory for externally

2016-03-08 Thread Andres Freund
ltree: Zero padding bytes when allocating memory for externally visible data. ltree/ltree_gist/ltxtquery's headers stores data at MAXALIGN alignment, requiring some padding bytes. So far we left these uninitialized. Zero those by using palloc0. Author: Andres Freund Reported-By: Andres Freund / v

[COMMITTERS] pgsql: ltree: Zero padding bytes when allocating memory for externally

2016-03-08 Thread Andres Freund
ltree: Zero padding bytes when allocating memory for externally visible data. ltree/ltree_gist/ltxtquery's headers stores data at MAXALIGN alignment, requiring some padding bytes. So far we left these uninitialized. Zero those by using palloc0. Author: Andres Freund Reported-By: Andres Freund / v

[COMMITTERS] pgsql: plperl: Correctly handle empty arrays in plperl_ref_from_pg_arra

2016-03-08 Thread Andres Freund
plperl: Correctly handle empty arrays in plperl_ref_from_pg_array. plperl_ref_from_pg_array() didn't consider the case that postgrs arrays can have 0 dimensions (when they're empty) and accessed the first dimension without a check. Fix that by special casing the empty array case. Author: Alex Hun

[COMMITTERS] pgsql: Fix minor thinko in pathification code.

2016-03-08 Thread Tom Lane
Fix minor thinko in pathification code. I passed the wrong "root" struct to create_pathtarget in build_minmax_path. Since the subroot is a clone of the outer root, this would not cause any serious problems, but it would waste some cycles because set_pathtarget_cost_width would not have access to V

[COMMITTERS] pgsql: plperl: Correctly handle empty arrays in plperl_ref_from_pg_arra

2016-03-08 Thread Andres Freund
plperl: Correctly handle empty arrays in plperl_ref_from_pg_array. plperl_ref_from_pg_array() didn't consider the case that postgrs arrays can have 0 dimensions (when they're empty) and accessed the first dimension without a check. Fix that by special casing the empty array case. Author: Alex Hun

[COMMITTERS] pgsql: plperl: Correctly handle empty arrays in plperl_ref_from_pg_arra

2016-03-08 Thread Andres Freund
plperl: Correctly handle empty arrays in plperl_ref_from_pg_array. plperl_ref_from_pg_array() didn't consider the case that postgrs arrays can have 0 dimensions (when they're empty) and accessed the first dimension without a check. Fix that by special casing the empty array case. Author: Alex Hun

[COMMITTERS] pgsql: plperl: Correctly handle empty arrays in plperl_ref_from_pg_arra

2016-03-08 Thread Andres Freund
plperl: Correctly handle empty arrays in plperl_ref_from_pg_array. plperl_ref_from_pg_array() didn't consider the case that postgrs arrays can have 0 dimensions (when they're empty) and accessed the first dimension without a check. Fix that by special casing the empty array case. Author: Alex Hun

[COMMITTERS] pgsql: plperl: Correctly handle empty arrays in plperl_ref_from_pg_arra

2016-03-08 Thread Andres Freund
plperl: Correctly handle empty arrays in plperl_ref_from_pg_array. plperl_ref_from_pg_array() didn't consider the case that postgrs arrays can have 0 dimensions (when they're empty) and accessed the first dimension without a check. Fix that by special casing the empty array case. Author: Alex Hun

[COMMITTERS] pgsql: plperl: Correctly handle empty arrays in plperl_ref_from_pg_arra

2016-03-08 Thread Andres Freund
plperl: Correctly handle empty arrays in plperl_ref_from_pg_array. plperl_ref_from_pg_array() didn't consider the case that postgrs arrays can have 0 dimensions (when they're empty) and accessed the first dimension without a check. Fix that by special casing the empty array case. Author: Alex Hun

[COMMITTERS] pgsql: Finish refactoring make_foo() functions in createplan.c.

2016-03-08 Thread Tom Lane
Finish refactoring make_foo() functions in createplan.c. This patch removes some redundant cost calculations that I left for later cleanup in commit 3fc6e2d7f5b652b4. There's now a uniform policy that the make_foo() convenience functions don't do any cost calculations. Most of their callers copy

[COMMITTERS] pgsql: Comment update for fdw_recheck_quals.

2016-03-08 Thread Robert Haas
Comment update for fdw_recheck_quals. Commit 5fc4c26db5120bd90348b6ee3101fcddfdf54800 could've done a better job updating these comments. Etsuro Fujita Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/7400559a3fe959bdc6822114ef6aa966c42899f9 Modified Files -

[COMMITTERS] pgsql: Update GetForeignPlan documentation.

2016-03-08 Thread Robert Haas
Update GetForeignPlan documentation. Commit 385f337c9f39b21dca96ca4770552a10a6d5af24 added a new argument to the FDW GetForeignPlan method, but failed to update the documentation to match. Etsuro Fujita Branch -- REL9_5_STABLE Details --- http://git.postgresql.org/pg/commitdiff/bfb6686e

[COMMITTERS] pgsql: Update GetForeignPlan documentation.

2016-03-08 Thread Robert Haas
Update GetForeignPlan documentation. Commit 385f337c9f39b21dca96ca4770552a10a6d5af24 added a new argument to the FDW GetForeignPlan method, but failed to update the documentation to match. Etsuro Fujita Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/dff7ad3c61473a6

[COMMITTERS] pgsql: Fix reversed argument to bms_is_subset.

2016-03-08 Thread Robert Haas
Fix reversed argument to bms_is_subset. Ashutosh Bapat Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/d29b153f180ba374e5e0e1f3e49762aba4a548d7 Modified Files -- contrib/postgres_fdw/postgres_fdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[COMMITTERS] pgsql: Add new flags argument for xl_heap_visible to heap2_desc.

2016-03-08 Thread Robert Haas
Add new flags argument for xl_heap_visible to heap2_desc. Masahiko Sawada Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/734f86d50dccc91fb68a99339a22a1bcb87f9cea Modified Files -- src/backend/access/rmgrdesc/heapdesc.c | 3 ++- 1 file changed, 2 insertio

[COMMITTERS] pgsql: Fix typo.

2016-03-08 Thread Robert Haas
Fix typo. Masahiko Sawada Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/272baaa538f7a3186ac0c03764a8af9c0f5c00ac Modified Files -- doc/src/sgml/pgvisibility.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-committers maili

[COMMITTERS] pgsql: Fix parallel query on standby servers.

2016-03-08 Thread Robert Haas
Fix parallel query on standby servers. Without this fix, it inevitably bombs out with "ERROR: failed to initialize transaction_read_only to 0". Repair. Ashutosh Sharma; comments adjusted by me. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/dcfecaae9e35afe4fb1130

[COMMITTERS] pgsql: Add some functions to fd.c for the convenience of extensions.

2016-03-08 Thread Robert Haas
Add some functions to fd.c for the convenience of extensions. For example, if you want to perform an ioctl() on a file descriptor opened through the fd.c routines, there's no way to do that without being able to get at the underlying fd. KaiGai Kohei Branch -- master Details --- http://

[COMMITTERS] pgsql: Department of second thoughts: remove PD_ALL_FROZEN.

2016-03-08 Thread Robert Haas
Department of second thoughts: remove PD_ALL_FROZEN. Commit a892234f830e832110f63fc0a2afce2fb21d1584 added a second bit per page to the visibility map, which still seems like a good idea, but it also added a second page-level bit alongside PD_ALL_VISIBLE to track whether the visibility map bit was

[COMMITTERS] pgsql: Add pg_visibility contrib module.

2016-03-08 Thread Robert Haas
Add pg_visibility contrib module. This lets you examine the visibility map as well as page-level visibility information. I initially wrote it as a debugging aid, but was encouraged to polish it for commit. Patch by me, reviewed by Masahiko Sawada. Discussion: [email protected] Br

[COMMITTERS] pgsql: pg_upgrade: Remove converter plugin facility.

2016-03-08 Thread Robert Haas
pg_upgrade: Remove converter plugin facility. We've not found a use for this so far, and the current need, which is to convert the visibility map to a new format, does not suit the existing design anyway. So just rip it out. Author: Masahiko Sawada, slightly revised by me. Discussion: 2016021521