[COMMITTERS] pgsql: Remove unnecessary braces, to match the surrounding style.

2017-07-12 Thread Heikki Linnakangas
Remove unnecessary braces, to match the surrounding style. Mostly in the new subscription-related commands. Backport the few that were also present in older versions. Thomas Munro Discussion: https://www.postgresql.org/message-id/CAEepm=3cyw1qmxcxjxmqijxtxzfdc8svsfnxkegd3bkv2sr...@mail.gmail.co

[COMMITTERS] pgsql: Remove unnecessary braces, to match the surrounding style.

2017-07-12 Thread Heikki Linnakangas
Remove unnecessary braces, to match the surrounding style. Mostly in the new subscription-related commands. Backport the few that were also present in older versions. Thomas Munro Discussion: https://www.postgresql.org/message-id/CAEepm=3cyw1qmxcxjxmqijxtxzfdc8svsfnxkegd3bkv2sr...@mail.gmail.co

[COMMITTERS] pgsql: Remove unnecessary braces, to match the surrounding style.

2017-07-12 Thread Heikki Linnakangas
Remove unnecessary braces, to match the surrounding style. Mostly in the new subscription-related commands. Backport the few that were also present in older versions. Thomas Munro Discussion: https://www.postgresql.org/message-id/CAEepm=3cyw1qmxcxjxmqijxtxzfdc8svsfnxkegd3bkv2sr...@mail.gmail.co

[COMMITTERS] pgsql: Remove unnecessary braces, to match the surrounding style.

2017-07-12 Thread Heikki Linnakangas
Remove unnecessary braces, to match the surrounding style. Mostly in the new subscription-related commands. Backport the few that were also present in older versions. Thomas Munro Discussion: https://www.postgresql.org/message-id/CAEepm=3cyw1qmxcxjxmqijxtxzfdc8svsfnxkegd3bkv2sr...@mail.gmail.co

[COMMITTERS] pgsql: Remove unnecessary braces, to match the surrounding style.

2017-07-12 Thread Heikki Linnakangas
Remove unnecessary braces, to match the surrounding style. Mostly in the new subscription-related commands. Backport the few that were also present in older versions. Thomas Munro Discussion: https://www.postgresql.org/message-id/CAEepm=3cyw1qmxcxjxmqijxtxzfdc8svsfnxkegd3bkv2sr...@mail.gmail.co

[COMMITTERS] pgsql: Remove unnecessary braces, to match the surrounding style.

2017-07-12 Thread Heikki Linnakangas
Remove unnecessary braces, to match the surrounding style. Mostly in the new subscription-related commands. Backport the few that were also present in older versions. Thomas Munro Discussion: https://www.postgresql.org/message-id/CAEepm=3cyw1qmxcxjxmqijxtxzfdc8svsfnxkegd3bkv2sr...@mail.gmail.co

[COMMITTERS] pgsql: Fix ordering of operations in SyncRepWakeQueue to avoid assertio

2017-07-12 Thread Heikki Linnakangas
Fix ordering of operations in SyncRepWakeQueue to avoid assertion failure. Commit 14e8803f1 removed the locking in SyncRepWaitForLSN, but that introduced a race condition, where SyncRepWaitForLSN might see syncRepState already set to SYNC_REP_WAIT_COMPLETE, but the process was not yet removed from

[COMMITTERS] pgsql: Fix ordering of operations in SyncRepWakeQueue to avoid assertio

2017-07-12 Thread Heikki Linnakangas
Fix ordering of operations in SyncRepWakeQueue to avoid assertion failure. Commit 14e8803f1 removed the locking in SyncRepWaitForLSN, but that introduced a race condition, where SyncRepWaitForLSN might see syncRepState already set to SYNC_REP_WAIT_COMPLETE, but the process was not yet removed from

[COMMITTERS] pgsql: Fix ordering of operations in SyncRepWakeQueue to avoid assertio

2017-07-12 Thread Heikki Linnakangas
Fix ordering of operations in SyncRepWakeQueue to avoid assertion failure. Commit 14e8803f1 removed the locking in SyncRepWaitForLSN, but that introduced a race condition, where SyncRepWaitForLSN might see syncRepState already set to SYNC_REP_WAIT_COMPLETE, but the process was not yet removed from

[COMMITTERS] pgsql: Fix variable and type name in comment.

2017-07-12 Thread Heikki Linnakangas
Fix variable and type name in comment. Kyotaro Horiguchi Discussion: https://www.postgresql.org/message-id/20170711.163441.241981736.horiguchi.kyot...@lab.ntt.co.jp Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0a2d07cf1ed8bd1d16991fdda5c955903d30d8c8 Mo

[COMMITTERS] pgsql: Fix variable and type name in comment.

2017-07-12 Thread Heikki Linnakangas
Fix variable and type name in comment. Kyotaro Horiguchi Discussion: https://www.postgresql.org/message-id/20170711.163441.241981736.horiguchi.kyot...@lab.ntt.co.jp Branch -- REL9_2_STABLE Details --- https://git.postgresql.org/pg/commitdiff/c65ed13ce71f095ffd32c9bd88faf2773b72b38c Mo

[COMMITTERS] pgsql: Fix variable and type name in comment.

2017-07-12 Thread Heikki Linnakangas
Fix variable and type name in comment. Kyotaro Horiguchi Discussion: https://www.postgresql.org/message-id/20170711.163441.241981736.horiguchi.kyot...@lab.ntt.co.jp Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ca906f68f22bf2076349394a5f28caf1f6e6f2f7 Modified

[COMMITTERS] pgsql: Fix variable and type name in comment.

2017-07-12 Thread Heikki Linnakangas
Fix variable and type name in comment. Kyotaro Horiguchi Discussion: https://www.postgresql.org/message-id/20170711.163441.241981736.horiguchi.kyot...@lab.ntt.co.jp Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/4458d6012e7edfc9696e3a3d3c506d4e5887d1cf Mo

[COMMITTERS] pgsql: Fix variable and type name in comment.

2017-07-12 Thread Heikki Linnakangas
Fix variable and type name in comment. Kyotaro Horiguchi Discussion: https://www.postgresql.org/message-id/20170711.163441.241981736.horiguchi.kyot...@lab.ntt.co.jp Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/a94dd0c25d0132a48c2f95505e0f95bb273f1160 Mo

[COMMITTERS] pgsql: Fix variable and type name in comment.

2017-07-12 Thread Heikki Linnakangas
Fix variable and type name in comment. Kyotaro Horiguchi Discussion: https://www.postgresql.org/message-id/20170711.163441.241981736.horiguchi.kyot...@lab.ntt.co.jp Branch -- REL9_3_STABLE Details --- https://git.postgresql.org/pg/commitdiff/cf3e27685312653bd67a79e600d7f709a4fdcd7e Mo

[COMMITTERS] pgsql: Avoid integer overflow while sifting-up a heap in tuplesort.c.

2017-07-12 Thread Tom Lane
Avoid integer overflow while sifting-up a heap in tuplesort.c. If the number of tuples in the heap exceeds approximately INT_MAX/2, this loop's calculation "2*i+1" could overflow, resulting in a crash. Fix it by using unsigned int rather than int for the relevant local variables; that shouldn't co

[COMMITTERS] pgsql: Avoid integer overflow while sifting-up a heap in tuplesort.c.

2017-07-12 Thread Tom Lane
Avoid integer overflow while sifting-up a heap in tuplesort.c. If the number of tuples in the heap exceeds approximately INT_MAX/2, this loop's calculation "2*i+1" could overflow, resulting in a crash. Fix it by using unsigned int rather than int for the relevant local variables; that shouldn't co

[COMMITTERS] pgsql: Avoid integer overflow while sifting-up a heap in tuplesort.c.

2017-07-12 Thread Tom Lane
Avoid integer overflow while sifting-up a heap in tuplesort.c. If the number of tuples in the heap exceeds approximately INT_MAX/2, this loop's calculation "2*i+1" could overflow, resulting in a crash. Fix it by using unsigned int rather than int for the relevant local variables; that shouldn't co

[COMMITTERS] pgsql: Avoid integer overflow while sifting-up a heap in tuplesort.c.

2017-07-12 Thread Tom Lane
Avoid integer overflow while sifting-up a heap in tuplesort.c. If the number of tuples in the heap exceeds approximately INT_MAX/2, this loop's calculation "2*i+1" could overflow, resulting in a crash. Fix it by using unsigned int rather than int for the relevant local variables; that shouldn't co

[COMMITTERS] pgsql: commit_ts test: Set node name in test

2017-07-12 Thread Alvaro Herrera
commit_ts test: Set node name in test Otherwise, the script output has a lot of pointless warnings. This was forgotten in 9def031bd2821f35b5f506260d922482648a8bb0 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ca793c59a51e94cedf8cbea5c29668bf8fa298f3 Modified Fil

[COMMITTERS] pgsql: commit_ts test: Set node name in test

2017-07-12 Thread Alvaro Herrera
commit_ts test: Set node name in test Otherwise, the script output has a lot of pointless warnings. This was forgotten in 9def031bd2821f35b5f506260d922482648a8bb0 Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/832d3dce5a3a5ca35f6861cb573bff7a6a8835dc Modif

[COMMITTERS] pgsql: Reduce memory usage of tsvector type analyze function.

2017-07-12 Thread Heikki Linnakangas
Reduce memory usage of tsvector type analyze function. compute_tsvector_stats() detoasted and kept in memory every tsvector value in the sample, but that can be a lot of memory. The original bug report described a case using over 10 gigabytes, with statistics target of 1 (the maximum). To fix

[COMMITTERS] pgsql: Reduce memory usage of tsvector type analyze function.

2017-07-12 Thread Heikki Linnakangas
Reduce memory usage of tsvector type analyze function. compute_tsvector_stats() detoasted and kept in memory every tsvector value in the sample, but that can be a lot of memory. The original bug report described a case using over 10 gigabytes, with statistics target of 1 (the maximum). To fix

[COMMITTERS] pgsql: Reduce memory usage of tsvector type analyze function.

2017-07-12 Thread Heikki Linnakangas
Reduce memory usage of tsvector type analyze function. compute_tsvector_stats() detoasted and kept in memory every tsvector value in the sample, but that can be a lot of memory. The original bug report described a case using over 10 gigabytes, with statistics target of 1 (the maximum). To fix

[COMMITTERS] pgsql: Reduce memory usage of tsvector type analyze function.

2017-07-12 Thread Heikki Linnakangas
Reduce memory usage of tsvector type analyze function. compute_tsvector_stats() detoasted and kept in memory every tsvector value in the sample, but that can be a lot of memory. The original bug report described a case using over 10 gigabytes, with statistics target of 1 (the maximum). To fix

[COMMITTERS] pgsql: Reduce memory usage of tsvector type analyze function.

2017-07-12 Thread Heikki Linnakangas
Reduce memory usage of tsvector type analyze function. compute_tsvector_stats() detoasted and kept in memory every tsvector value in the sample, but that can be a lot of memory. The original bug report described a case using over 10 gigabytes, with statistics target of 1 (the maximum). To fix

[COMMITTERS] pgsql: Reduce memory usage of tsvector type analyze function.

2017-07-12 Thread Heikki Linnakangas
Reduce memory usage of tsvector type analyze function. compute_tsvector_stats() detoasted and kept in memory every tsvector value in the sample, but that can be a lot of memory. The original bug report described a case using over 10 gigabytes, with statistics target of 1 (the maximum). To fix

[COMMITTERS] pgsql: Fix ruleutils.c for domain-over-array cases, too.

2017-07-12 Thread Tom Lane
Fix ruleutils.c for domain-over-array cases, too. Further investigation shows that ruleutils isn't quite up to speed either for cases where we have a domain-over-array: it needs to be prepared to look past a CoerceToDomain at the top level of field and element assignments, else it decompiles them

[COMMITTERS] pgsql: Fix ruleutils.c for domain-over-array cases, too.

2017-07-12 Thread Tom Lane
Fix ruleutils.c for domain-over-array cases, too. Further investigation shows that ruleutils isn't quite up to speed either for cases where we have a domain-over-array: it needs to be prepared to look past a CoerceToDomain at the top level of field and element assignments, else it decompiles them

[COMMITTERS] pgsql: Fix ruleutils.c for domain-over-array cases, too.

2017-07-12 Thread Tom Lane
Fix ruleutils.c for domain-over-array cases, too. Further investigation shows that ruleutils isn't quite up to speed either for cases where we have a domain-over-array: it needs to be prepared to look past a CoerceToDomain at the top level of field and element assignments, else it decompiles them

[COMMITTERS] pgsql: Fix ruleutils.c for domain-over-array cases, too.

2017-07-12 Thread Tom Lane
Fix ruleutils.c for domain-over-array cases, too. Further investigation shows that ruleutils isn't quite up to speed either for cases where we have a domain-over-array: it needs to be prepared to look past a CoerceToDomain at the top level of field and element assignments, else it decompiles them

[COMMITTERS] pgsql: Fix ruleutils.c for domain-over-array cases, too.

2017-07-12 Thread Tom Lane
Fix ruleutils.c for domain-over-array cases, too. Further investigation shows that ruleutils isn't quite up to speed either for cases where we have a domain-over-array: it needs to be prepared to look past a CoerceToDomain at the top level of field and element assignments, else it decompiles them

[COMMITTERS] pgsql: Fix ruleutils.c for domain-over-array cases, too.

2017-07-12 Thread Tom Lane
Fix ruleutils.c for domain-over-array cases, too. Further investigation shows that ruleutils isn't quite up to speed either for cases where we have a domain-over-array: it needs to be prepared to look past a CoerceToDomain at the top level of field and element assignments, else it decompiles them