[COMMITTERS] pgsql: postgres_fdw: Avoid sharing list substructure.

2016-02-21 Thread Robert Haas
postgres_fdw: Avoid sharing list substructure. list_concat(list_concat(a, b), c) destructively changes both a and b; to avoid such perils, copy lists of remote_conds before incorporating them into larger lists via list_concat(). Ashutosh Bapat, per a report from Etsuro Fujita Branch -- maste

[COMMITTERS] pgsql: Cosmetic improvements to group locking.

2016-02-21 Thread Robert Haas
Cosmetic improvements to group locking. Reflow text in lock manager README so that it fits within 80 columns. Correct some mistakes. Expand the README to explain not only why group locking exists but also the data structures that support it. Improve comments related to group locking several file

[COMMITTERS] pgsql: Fix incorrect decision about which lock to take.

2016-02-21 Thread Robert Haas
Fix incorrect decision about which lock to take. Spotted by Tom Lane. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/88aca5662d6a6362ce8c5aba08f469e92f44a1e7 Modified Files -- src/backend/storage/lmgr/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[COMMITTERS] pgsql: Fix two-argument jsonb_object when called with empty arrays

2016-02-21 Thread Andrew Dunstan
Fix two-argument jsonb_object when called with empty arrays Some over-eager copy-and-pasting on my part resulted in a nonsense result being returned in this case. I have adopted the same pattern for handling this case as is used in the one argument form of the function, i.e. we just skip over the

[COMMITTERS] pgsql: Fix two-argument jsonb_object when called with empty arrays

2016-02-21 Thread Andrew Dunstan
Fix two-argument jsonb_object when called with empty arrays Some over-eager copy-and-pasting on my part resulted in a nonsense result being returned in this case. I have adopted the same pattern for handling this case as is used in the one argument form of the function, i.e. we just skip over the

[COMMITTERS] pgsql: Cosmetic improvements in new config_info code.

2016-02-21 Thread Tom Lane
Cosmetic improvements in new config_info code. Coverity griped about use of unchecked strcpy() into a local variable. There's unlikely to be any actual bug there, since no caller would be passing a path longer than MAXPGPATH, but nonetheless use of strlcpy() seems preferable. While at it, get rid

Re: [COMMITTERS] pgsql: Cosmetic improvements in new config_info code.

2016-02-21 Thread Joe Conway
On 02/21/2016 08:38 AM, Tom Lane wrote: > Coverity griped about use of unchecked strcpy() into a local variable. > There's unlikely to be any actual bug there, since no caller would be > passing a path longer than MAXPGPATH, but nonetheless use of strlcpy() > seems preferable. FWIW, strcpy() was b

[COMMITTERS] pgsql: Docs: make prose discussion match the ordering of Table 9-58.

2016-02-21 Thread Tom Lane
Docs: make prose discussion match the ordering of Table 9-58. The "Session Information Functions" table seems to be sorted mostly alphabetically (although it's not perfect), which would be all right if it didn't lead to some related functions being described in a pretty nonintuitive order. Also,

[COMMITTERS] pgsql: Fix wrong keysize in PrivateRefCountHash creation.

2016-02-21 Thread Andres Freund
Fix wrong keysize in PrivateRefCountHash creation. In 4b4b680c3 I accidentally used sizeof(PrivateRefCountArray) instead of sizeof(PrivateRefCountEntry) when creating the refcount overflow hashtable. As the former is bigger than the latter, this luckily only resulted in a slightly increased memory

[COMMITTERS] pgsql: Fix wrong keysize in PrivateRefCountHash creation.

2016-02-21 Thread Andres Freund
Fix wrong keysize in PrivateRefCountHash creation. In 4b4b680c3 I accidentally used sizeof(PrivateRefCountArray) instead of sizeof(PrivateRefCountEntry) when creating the refcount overflow hashtable. As the former is bigger than the latter, this luckily only resulted in a slightly increased memory