[COMMITTERS] pgsql: Fix crash when logical decoding is invoked from a PL function.

2017-10-06 Thread Tom Lane
Fix crash when logical decoding is invoked from a PL function. The logical decoding functions do BeginInternalSubTransaction and RollbackAndReleaseCurrentSubTransaction to clean up after themselves. It turns out that AtEOSubXact_SPI has an unrecognized assumption that we always need to cancel the

[COMMITTERS] pgsql: Fix crash when logical decoding is invoked from a PL function.

2017-10-06 Thread Tom Lane
Fix crash when logical decoding is invoked from a PL function. The logical decoding functions do BeginInternalSubTransaction and RollbackAndReleaseCurrentSubTransaction to clean up after themselves. It turns out that AtEOSubXact_SPI has an unrecognized assumption that we always need to cancel the

[COMMITTERS] pgsql: Fix crash when logical decoding is invoked from a PL function.

2017-10-06 Thread Tom Lane
Fix crash when logical decoding is invoked from a PL function. The logical decoding functions do BeginInternalSubTransaction and RollbackAndReleaseCurrentSubTransaction to clean up after themselves. It turns out that AtEOSubXact_SPI has an unrecognized assumption that we always need to cancel the

[COMMITTERS] pgsql: Fix crash when logical decoding is invoked from a PL function.

2017-10-06 Thread Tom Lane
Fix crash when logical decoding is invoked from a PL function. The logical decoding functions do BeginInternalSubTransaction and RollbackAndReleaseCurrentSubTransaction to clean up after themselves. It turns out that AtEOSubXact_SPI has an unrecognized assumption that we always need to cancel the

[COMMITTERS] pgsql: Fix crash when logical decoding is invoked from a PL function.

2017-10-06 Thread Tom Lane
Fix crash when logical decoding is invoked from a PL function. The logical decoding functions do BeginInternalSubTransaction and RollbackAndReleaseCurrentSubTransaction to clean up after themselves. It turns out that AtEOSubXact_SPI has an unrecognized assumption that we always need to cancel the

[COMMITTERS] pgsql: Copy information from the relcache instead of pointing to it.

2017-10-06 Thread Robert Haas
Copy information from the relcache instead of pointing to it. We have the relations continuously locked, but not open, so relcache pointers are not guaranteed to be stable. Per buildfarm member prion. Ashutosh Bapat. I fixed a typo. Discussion: http://postgr.es/m/CAFjFpRcRBqoKLZSNmRsjKr81uEP=

[COMMITTERS] pgsql: Fix intra-query memory leakage in nodeProjectSet.c.

2017-10-06 Thread Tom Lane
Fix intra-query memory leakage in nodeProjectSet.c. Both ExecMakeFunctionResultSet() and evaluation of simple expressions need to be done in the per-tuple memory context, not per-query, else we leak data until end of query. This is a consideration that was missed while refactoring code in the Pro

[COMMITTERS] pgsql: Fix intra-query memory leakage in nodeProjectSet.c.

2017-10-06 Thread Tom Lane
Fix intra-query memory leakage in nodeProjectSet.c. Both ExecMakeFunctionResultSet() and evaluation of simple expressions need to be done in the per-tuple memory context, not per-query, else we leak data until end of query. This is a consideration that was missed while refactoring code in the Pro

Re: [COMMITTERS] pgsql: Basic partition-wise join functionality.

2017-10-06 Thread Robert Haas
On Fri, Oct 6, 2017 at 12:47 PM, Tom Lane wrote: > Robert Haas writes: >> Basic partition-wise join functionality. > > Buildfarm member prion seems quite unhappy with this. > > I'm not sure if that's a case of the plan choices being less > platform-independent than you thought, or if it's trigger

Re: [COMMITTERS] pgsql: Basic partition-wise join functionality.

2017-10-06 Thread Tom Lane
Robert Haas writes: > Basic partition-wise join functionality. Buildfarm member prion seems quite unhappy with this. I'm not sure if that's a case of the plan choices being less platform-independent than you thought, or if it's triggered by the -DRELCACHE_FORCE_RELEASE option, in which case ther

[COMMITTERS] pgsql: Fix access-off-end-of-array in clog.c.

2017-10-06 Thread Tom Lane
Fix access-off-end-of-array in clog.c. Sloppy loop coding in set_status_by_pages() resulted in fetching one array element more than it should from the subxids[] array. The odds of this resulting in SIGSEGV are pretty small, but we've certainly seen that happen with similar mistakes elsewhere. Wh

[COMMITTERS] pgsql: Fix access-off-end-of-array in clog.c.

2017-10-06 Thread Tom Lane
Fix access-off-end-of-array in clog.c. Sloppy loop coding in set_status_by_pages() resulted in fetching one array element more than it should from the subxids[] array. The odds of this resulting in SIGSEGV are pretty small, but we've certainly seen that happen with similar mistakes elsewhere. Wh

[COMMITTERS] pgsql: Fix access-off-end-of-array in clog.c.

2017-10-06 Thread Tom Lane
Fix access-off-end-of-array in clog.c. Sloppy loop coding in set_status_by_pages() resulted in fetching one array element more than it should from the subxids[] array. The odds of this resulting in SIGSEGV are pretty small, but we've certainly seen that happen with similar mistakes elsewhere. Wh

[COMMITTERS] pgsql: Fix access-off-end-of-array in clog.c.

2017-10-06 Thread Tom Lane
Fix access-off-end-of-array in clog.c. Sloppy loop coding in set_status_by_pages() resulted in fetching one array element more than it should from the subxids[] array. The odds of this resulting in SIGSEGV are pretty small, but we've certainly seen that happen with similar mistakes elsewhere. Wh

[COMMITTERS] pgsql: Fix access-off-end-of-array in clog.c.

2017-10-06 Thread Tom Lane
Fix access-off-end-of-array in clog.c. Sloppy loop coding in set_status_by_pages() resulted in fetching one array element more than it should from the subxids[] array. The odds of this resulting in SIGSEGV are pretty small, but we've certainly seen that happen with similar mistakes elsewhere. Wh

[COMMITTERS] pgsql: Fix access-off-end-of-array in clog.c.

2017-10-06 Thread Tom Lane
Fix access-off-end-of-array in clog.c. Sloppy loop coding in set_status_by_pages() resulted in fetching one array element more than it should from the subxids[] array. The odds of this resulting in SIGSEGV are pretty small, but we've certainly seen that happen with similar mistakes elsewhere. Wh

[COMMITTERS] pgsql: Fix access-off-end-of-array in clog.c.

2017-10-06 Thread Tom Lane
Fix access-off-end-of-array in clog.c. Sloppy loop coding in set_status_by_pages() resulted in fetching one array element more than it should from the subxids[] array. The odds of this resulting in SIGSEGV are pretty small, but we've certainly seen that happen with similar mistakes elsewhere. Wh

[COMMITTERS] pgsql: Support coverage on vpath builds

2017-10-06 Thread Peter Eisentraut
Support coverage on vpath builds A few paths needed to be tweaked so everything looks into the appropriate directories. Reviewed-by: Michael Paquier Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c3d9a66024a93e6d0380bdd1b18cb03a67216b72 Modified Files --

[COMMITTERS] pgsql: Remove coverage details view

2017-10-06 Thread Peter Eisentraut
Remove coverage details view This is only useful if we name the different tests, which we don't do at the moment. Reviewed-by: Michael Paquier Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c01123630db18561039d4eb17f9502bed0e9d109 Modified Files -- s

[COMMITTERS] pgsql: Run coverage commands quietly

2017-10-06 Thread Peter Eisentraut
Run coverage commands quietly They are very chatty by default, but the output doesn't seem all that useful for normal operation. Reviewed-by: Michael Paquier Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/52e1b1b0425553250db35101f44090898322fb6f Modified Files -

[COMMITTERS] pgsql: #ifdef out some dead code in psql/mainloop.c.

2017-10-06 Thread Tom Lane
#ifdef out some dead code in psql/mainloop.c. This pg_send_history() call is unreachable, since the block it's in is currently only entered in !cur_cmd_interactive mode. But rather than just delete it, make it #ifdef NOT_USED, in hopes that we'll remember to enable it if we ever change that decis

[COMMITTERS] pgsql: Fix traversal of half-frozen update chains

2017-10-06 Thread Alvaro Herrera
Fix traversal of half-frozen update chains When some tuple versions in an update chain are frozen due to them being older than freeze_min_age, the xmax/xmin trail can become broken. This breaks HOT (and probably other things). A subsequent VACUUM can break things in more serious ways, such as le

[COMMITTERS] pgsql: Fix traversal of half-frozen update chains

2017-10-06 Thread Alvaro Herrera
Fix traversal of half-frozen update chains When some tuple versions in an update chain are frozen due to them being older than freeze_min_age, the xmax/xmin trail can become broken. This breaks HOT (and probably other things). A subsequent VACUUM can break things in more serious ways, such as le

[COMMITTERS] pgsql: Fix traversal of half-frozen update chains

2017-10-06 Thread Alvaro Herrera
Fix traversal of half-frozen update chains When some tuple versions in an update chain are frozen due to them being older than freeze_min_age, the xmax/xmin trail can become broken. This breaks HOT (and probably other things). A subsequent VACUUM can break things in more serious ways, such as le

[COMMITTERS] pgsql: Fix traversal of half-frozen update chains

2017-10-06 Thread Alvaro Herrera
Fix traversal of half-frozen update chains When some tuple versions in an update chain are frozen due to them being older than freeze_min_age, the xmax/xmin trail can become broken. This breaks HOT (and probably other things). A subsequent VACUUM can break things in more serious ways, such as le

[COMMITTERS] pgsql: Fix traversal of half-frozen update chains

2017-10-06 Thread Alvaro Herrera
Fix traversal of half-frozen update chains When some tuple versions in an update chain are frozen due to them being older than freeze_min_age, the xmax/xmin trail can become broken. This breaks HOT (and probably other things). A subsequent VACUUM can break things in more serious ways, such as le

[COMMITTERS] pgsql: Fix traversal of half-frozen update chains

2017-10-06 Thread Alvaro Herrera
Fix traversal of half-frozen update chains When some tuple versions in an update chain are frozen due to them being older than freeze_min_age, the xmax/xmin trail can become broken. This breaks HOT (and probably other things). A subsequent VACUUM can break things in more serious ways, such as le

[COMMITTERS] pgsql: Basic partition-wise join functionality.

2017-10-06 Thread Robert Haas
Basic partition-wise join functionality. Instead of joining two partitioned tables in their entirety we can, if it is an equi-join on the partition keys, join the matching partitions individually. This involves teaching the planner about "other join" rels, which are related to regular join rels i

Re: [COMMITTERS] pgsql: Use OpenSSL EVP API for symmetric encryption in pgcrypto.

2017-10-06 Thread Dave Page
On Fri, Oct 6, 2017 at 5:07 AM, Tom Lane wrote: > Dave Page writes: > > On Mon, Oct 24, 2016 at 4:21 PM, Andrew Dunstan > wrote: > >> On 10/24/2016 08:56 AM, Tom Lane wrote: > >>> I'd prefer the solution of disabling --with-openssl. If you just nuke > >>> those members, we never will find out

Re: [COMMITTERS] pgsql: Remove ICU tests from default run

2017-10-06 Thread Noah Misch
On Sat, Mar 25, 2017 at 04:30:45AM +, Peter Eisentraut wrote: > Remove ICU tests from default run > > These tests require the test database to be in UTF8 encoding. Until > there is a better solution, take them out of the default test set and > treat them like the existing collate.linux.utf8 t