[COMMITTERS] pgsql: Fix sharing Agg transition state of DISTINCT or ordered aggs.

2016-12-19 Thread Heikki Linnakangas
Fix sharing Agg transition state of DISTINCT or ordered aggs. If a query contained two aggregates that could share the transition value, we would correctly collect the input into a tuplesort only once, but incorrectly run the transition function over the accumulated input twice, in finalize_aggreg

[COMMITTERS] pgsql: Fix sharing Agg transition state of DISTINCT or ordered aggs.

2016-12-19 Thread Heikki Linnakangas
Fix sharing Agg transition state of DISTINCT or ordered aggs. If a query contained two aggregates that could share the transition value, we would correctly collect the input into a tuplesort only once, but incorrectly run the transition function over the accumulated input twice, in finalize_aggreg

[COMMITTERS] pgsql: Invalid parent's relcache after CREATE TABLE .. PARTITION OF.

2016-12-19 Thread Robert Haas
Invalid parent's relcache after CREATE TABLE .. PARTITION OF. Otherwise, subsequent commands in the same transaction see the wrong partition descriptor. Amit Langote. Reported by Tomas Vondra and David Fetter. Reviewed by me. Discussion: http://postgr.es/m/22dd313b-d7fd-22b5-0787-654845c8f849

[COMMITTERS] pgsql: Provide a DSA area for all parallel queries.

2016-12-19 Thread Robert Haas
Provide a DSA area for all parallel queries. This will allow future parallel query code to dynamically allocate storage shared by all participants. Thomas Munro, with assorted changes by me. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/e13029a5ce353574516c64fd1ec

[COMMITTERS] pgsql: Fix handling of phrase operator removal while removing tsquery s

2016-12-19 Thread Tom Lane
Fix handling of phrase operator removal while removing tsquery stopwords. The distance of a removed phrase operator should propagate up to a parent phrase operator if there is one, but this only worked correctly in left-deep trees. Throwing in a few parentheses confused it completely, as indeed w

[COMMITTERS] pgsql: Fix handling of phrase operator removal while removing tsquery s

2016-12-19 Thread Tom Lane
Fix handling of phrase operator removal while removing tsquery stopwords. The distance of a removed phrase operator should propagate up to a parent phrase operator if there is one, but this only worked correctly in left-deep trees. Throwing in a few parentheses confused it completely, as indeed w

[COMMITTERS] pgsql: Fix locking problem in _hash_squeezebucket() / _hash_freeovflpag

2016-12-19 Thread Robert Haas
Fix locking problem in _hash_squeezebucket() / _hash_freeovflpage(). A bucket squeeze operation needs to lock each page of the bucket before releasing the prior page, but the previous coding fumbled the locking when freeing an overflow page during a bucket squeeze operation. Commit 6d46f4783efe45

[COMMITTERS] pgsql: Remove unused file.

2016-12-19 Thread Robert Haas
Remove unused file. This was added in 105409746499657acdffc109db9d343b464bda1f, but has never been used for anything as far as I can tell. There seems to be no reason to keep it. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/668dbbec27da05b35a6972e9d833115dce0b6cc

[COMMITTERS] pgsql: Support quorum-based synchronous replication.

2016-12-19 Thread Fujii Masao
Support quorum-based synchronous replication. This feature is also known as "quorum commit" especially in discussion on pgsql-hackers. This commit adds the following new syntaxes into synchronous_standby_names GUC. By using FIRST and ANY keywords, users can specify the method to choose synchronou

[COMMITTERS] pgsql: Fix base backup rate limiting in presence of slow i/o

2016-12-19 Thread Magnus Hagander
Fix base backup rate limiting in presence of slow i/o When source i/o on disk was too slow compared to the rate limiting specified, the system could end up with a negative value for sleep that it never got out of, which caused rate limiting to effectively be turned off. Discussion: https://postg

[COMMITTERS] pgsql: Fix base backup rate limiting in presence of slow i/o

2016-12-19 Thread Magnus Hagander
Fix base backup rate limiting in presence of slow i/o When source i/o on disk was too slow compared to the rate limiting specified, the system could end up with a negative value for sleep that it never got out of, which caused rate limiting to effectively be turned off. Discussion: https://postg

[COMMITTERS] pgsql: Fix base backup rate limiting in presence of slow i/o

2016-12-19 Thread Magnus Hagander
Fix base backup rate limiting in presence of slow i/o When source i/o on disk was too slow compared to the rate limiting specified, the system could end up with a negative value for sleep that it never got out of, which caused rate limiting to effectively be turned off. Discussion: https://postg

[COMMITTERS] pgsql: Fix base backup rate limiting in presence of slow i/o

2016-12-19 Thread Magnus Hagander
Fix base backup rate limiting in presence of slow i/o When source i/o on disk was too slow compared to the rate limiting specified, the system could end up with a negative value for sleep that it never got out of, which caused rate limiting to effectively be turned off. Discussion: https://postg