[COMMITTERS] pgsql: Improve handling of dead tuples in hash indexes.

2016-11-08 Thread Robert Haas
Improve handling of dead tuples in hash indexes. When squeezing a bucket during vacuum, it's not necessary to retain any tuples already marked as dead, so ignore them when deciding which tuples must be moved in order to empty a bucket page. Similarly, when splitting a bucket, relocating dead tupl

[COMMITTERS] pgsql: Use heap_modify_tuple not SPI_modifytuple in pl/perl triggers.

2016-11-08 Thread Tom Lane
Use heap_modify_tuple not SPI_modifytuple in pl/perl triggers. The code here would need some change anyway given planned change in SPI_modifytuple semantics, since this executes after we've exited the SPI environment. But really it's better to just use heap_modify_tuple. The code's actually short

[COMMITTERS] pgsql: Use heap_modify_tuple not SPI_modifytuple in pl/python triggers.

2016-11-08 Thread Tom Lane
Use heap_modify_tuple not SPI_modifytuple in pl/python triggers. The code here would need some change anyway given planned change in SPI_modifytuple semantics, since this executes after we've exited the SPI environment. But really it's better to just use heap_modify_tuple. While at it, normalize

[COMMITTERS] pgsql: Fix mistake in XLOG_SEG_SIZE test.

2016-11-08 Thread Robert Haas
Fix mistake in XLOG_SEG_SIZE test. The intent of the test is to check whether XLOG_SEG_SIZE is in a particular range, but actually in one case it compares XLOG_BLCKSZ by mistake. Repair. Commit 88e982302684246e8af785e78a467ac37c76dee9 introduced this faulty test. Kuntal Ghosh, reviewed by Micha

[COMMITTERS] pgsql: Fix typo

2016-11-08 Thread Magnus Hagander
Fix typo Branch -- REL9_4_STABLE Details --- http://git.postgresql.org/pg/commitdiff/5c1ac4c685fe6fbe7781127931686f36e70265cd Modified Files -- doc/src/sgml/ref/pg_basebackup.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-committers mailing lis

[COMMITTERS] pgsql: Fix typo

2016-11-08 Thread Magnus Hagander
Fix typo Branch -- REL9_2_STABLE Details --- http://git.postgresql.org/pg/commitdiff/e714cbe549c275c52b7b4553097f091d329eaec1 Modified Files -- doc/src/sgml/ref/pg_basebackup.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-committers mailing lis

[COMMITTERS] pgsql: Fix typo

2016-11-08 Thread Magnus Hagander
Fix typo Branch -- REL9_3_STABLE Details --- http://git.postgresql.org/pg/commitdiff/2cd311d4992cf57de832728cb9f84dc2efd802b7 Modified Files -- doc/src/sgml/ref/pg_basebackup.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-committers mailing lis

[COMMITTERS] pgsql: Fix typo

2016-11-08 Thread Magnus Hagander
Fix typo Branch -- REL9_5_STABLE Details --- http://git.postgresql.org/pg/commitdiff/af017fc195fbf7e861cef470d5169320c45f5582 Modified Files -- doc/src/sgml/ref/pg_basebackup.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-committers mailing lis

[COMMITTERS] pgsql: Fix typo

2016-11-08 Thread Magnus Hagander
Fix typo Branch -- REL9_6_STABLE Details --- http://git.postgresql.org/pg/commitdiff/c32e05bce74cbb965f8f847d65caa20947b4d2bb Modified Files -- doc/src/sgml/ref/pg_basebackup.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-committers mailing lis

[COMMITTERS] pgsql: Fix typo

2016-11-08 Thread Magnus Hagander
Fix typo Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/36ac6d0e793087153a452df6502d0ef32a780db6 Modified Files -- doc/src/sgml/ref/pg_basebackup.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-committers mailing list (pgsq

[COMMITTERS] pgsql: Make SPI_fnumber() reject dropped columns.

2016-11-08 Thread Tom Lane
Make SPI_fnumber() reject dropped columns. There's basically no scenario where it's sensible for this to match dropped columns, so put a test for dropped-ness into SPI_fnumber() itself, and excise the test from the small number of callers that were paying attention to the case. (Most weren't :-(.

[COMMITTERS] pgsql: psql: Tab completion for renaming enum values.

2016-11-08 Thread Robert Haas
psql: Tab completion for renaming enum values. For ALTER TYPE .. RENAME, add "VALUE" to the list of possible completions. Complete ALTER TYPE .. RENAME VALUE with possible enum values. After that, complete with "TO". Dagfinn Ilmari Mannsåker, reviewed by Artur Zakirov. Branch -- master De

[COMMITTERS] pgsql: Replace uses of SPI_modifytuple that intend to allocate in curre

2016-11-08 Thread Tom Lane
Replace uses of SPI_modifytuple that intend to allocate in current context. Invent a new function heap_modify_tuple_by_cols() that is functionally equivalent to SPI_modifytuple except that it always allocates its result by simple palloc. I chose however to make the API details a bit more like hea

[COMMITTERS] pgsql: Fix typo.

2016-11-08 Thread Robert Haas
Fix typo. Michael Paquier Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/dce429b117be027f059bb9df5c76eb5eadcc456d Modified Files -- src/backend/commands/event_trigger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-committers

[COMMITTERS] pgsql: Simplify code by getting rid of SPI_push, SPI_pop, SPI_restore_c

2016-11-08 Thread Tom Lane
Simplify code by getting rid of SPI_push, SPI_pop, SPI_restore_connection. The idea behind SPI_push was to allow transitioning back into an "unconnected" state when a SPI-using procedure calls unrelated code that might or might not invoke SPI. That sounds good, but in practice the only thing it d