[COMMITTERS] pgsql: Fix copy & pasto in 510b8cbff15f.

2017-09-29 Thread Andres Freund
Fix copy & pasto in 510b8cbff15f. Reported-By: Peter Geoghegan Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/248e33756b425335d94a32ffc8e9aace04f82c31 Modified Files -- src/include/port/pg_bswap.h | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [COMMITTERS] pgsql: Extend & revamp pg_bswap.h infrastructure.

2017-09-29 Thread Andres Freund
On 2017-09-29 17:33:51 -0700, Peter Geoghegan wrote: > On Fri, Sep 29, 2017 at 5:29 PM, Andres Freund wrote: > > Extend & revamp pg_bswap.h infrastructure. > > This looks wrong: > > +static inline uint16 > +pg_bswap64(uint16 x) > +{ Yea, just noticed that :(. Running test,

Re: [COMMITTERS] pgsql: Extend & revamp pg_bswap.h infrastructure.

2017-09-29 Thread Peter Geoghegan
On Fri, Sep 29, 2017 at 5:29 PM, Andres Freund wrote: > Extend & revamp pg_bswap.h infrastructure. This looks wrong: +static inline uint16 +pg_bswap64(uint16 x) +{ + return + ((x << 56) & UINT64CONST(0xff00)) | + ((x << 40) &

[COMMITTERS] pgsql: Fix typo.

2017-09-29 Thread Andres Freund
Fix typo. Reported-By: Thomas Munro and Jesper Pedersen Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f14241236ea2e306dc665635665c7f88669b6ca4 Modified Files -- src/include/utils/hashutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --

[COMMITTERS] pgsql: Extend & revamp pg_bswap.h infrastructure.

2017-09-29 Thread Andres Freund
Extend & revamp pg_bswap.h infrastructure. Upcoming patches are going to address performance issues that involve slow system provided ntohs/htons etc. To address that expand pg_bswap.h to provide pg_ntoh{16,32,64}, pg_hton{16,32,64} and optimize their respective implementations by using compiler

[COMMITTERS] pgsql: Use Py_RETURN_NONE where suitable

2017-09-29 Thread Peter Eisentraut
Use Py_RETURN_NONE where suitable This is more idiomatic style and available as of Python 2.4, which is our minimum. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0008a106d4f84206a96fc1fb09a1e6b09f1627ec Modified Files --

[COMMITTERS] pgsql: Fix inadequate locking during get_rel_oids().

2017-09-29 Thread Tom Lane
Fix inadequate locking during get_rel_oids(). get_rel_oids used to not take any relation locks at all, but that stopped being a good idea with commit 3c3bb9933, which inserted a syscache lookup into the function. A concurrent DROP TABLE could now produce "cache lookup failed", which we don't

[COMMITTERS] pgsql: Fix inadequate locking during get_rel_oids().

2017-09-29 Thread Tom Lane
Fix inadequate locking during get_rel_oids(). get_rel_oids used to not take any relation locks at all, but that stopped being a good idea with commit 3c3bb9933, which inserted a syscache lookup into the function. A concurrent DROP TABLE could now produce "cache lookup failed", which we don't

[COMMITTERS] pgsql: psql: Don't try to print a partition constraint we didn't fetch.

2017-09-29 Thread Robert Haas
psql: Don't try to print a partition constraint we didn't fetch. If \d rather than \d+ is used, then verbose is false and we don't ask the server for the partition constraint; so we shouldn't print it in that case either. Maksim Milyutin, per a report from Jesper Pedersen. Reviewed by Jesper

[COMMITTERS] pgsql: pgbench: If we fail to send a command to the server, fail.

2017-09-29 Thread Robert Haas
pgbench: If we fail to send a command to the server, fail. This beats the old behavior of busy-waiting hands down. Oversight in commit 12788ae49e1933f463bc59a6efe46c4a01701b76. Report by Pavan Deolasee. Patch by Fabien Coelho. Reviewed by Pavan Deolasee. Discussion:

[COMMITTERS] pgsql: pgbench: If we fail to send a command to the server, fail.

2017-09-29 Thread Robert Haas
pgbench: If we fail to send a command to the server, fail. This beats the old behavior of busy-waiting hands down. Oversight in commit 12788ae49e1933f463bc59a6efe46c4a01701b76. Report by Pavan Deolasee. Patch by Fabien Coelho. Reviewed by Pavan Deolasee. Discussion:

[COMMITTERS] pgsql: psql: Update \d sequence display

2017-09-29 Thread Peter Eisentraut
psql: Update \d sequence display For \d sequencename, the psql code just did SELECT * FROM sequencename to get the information to display, but this does not contain much interesting information anymore in PostgreSQL 10, because the metadata has been moved to a separate system catalog. This patch

[COMMITTERS] pgsql: psql: Update \d sequence display

2017-09-29 Thread Peter Eisentraut
psql: Update \d sequence display For \d sequencename, the psql code just did SELECT * FROM sequencename to get the information to display, but this does not contain much interesting information anymore in PostgreSQL 10, because the metadata has been moved to a separate system catalog. This patch

[COMMITTERS] pgsql: Marginal improvement for generated code in execExprInterp.c.

2017-09-29 Thread Tom Lane
Marginal improvement for generated code in execExprInterp.c. Avoid the coding pattern "*op->resvalue = f();", as some compilers think that requires them to evaluate "op->resvalue" before the function call. Unless there are lots of free registers, this can lead to a useless register spill and

[COMMITTERS] pgsql: Add background worker type

2017-09-29 Thread Peter Eisentraut
Add background worker type Add bgw_type field to background worker structure. It is intended to be set to the same value for all workers of the same type, so they can be grouped in pg_stat_activity, for example. The backend_type column in pg_stat_activity now shows bgw_type for a background

[COMMITTERS] pgsql: Remove replacement selection sort.

2017-09-29 Thread Robert Haas
Remove replacement selection sort. At the time replacement_sort_tuples was introduced, there were still cases where replacement selection sort noticeably outperformed using quicksort even for the first run. However, those cases seem to have evaporated as a result of further improvements made

[COMMITTERS] pgsql: Add lcov --initial

2017-09-29 Thread Peter Eisentraut
Add lcov --initial By just running lcov on the produced .gcda data files, we don't account for source files that are not touched by tests at all. To fix that, run lcov --initial to create a base line info file with all zero counters, and merge that with the actual counters when creating the

[COMMITTERS] pgsql: Add PostgreSQL version to coverage output

2017-09-29 Thread Peter Eisentraut
Add PostgreSQL version to coverage output Also make overriding the title easier. That helps telling where the report came from and labeling different variants of a report. Reviewed-by: Michael Paquier Branch -- master Details ---