[COMMITTERS] pgsql: Be more aggressive in avoiding tuple conversion.

2017-01-24 Thread Robert Haas
Be more aggressive in avoiding tuple conversion. According to the comments in tupconvert.c, it's necessary to perform tuple conversion when either table has OIDs, and this was previously checked by ensuring that the tdtypeid value matched between the tables in question. However, that's overly str

[COMMITTERS] pgsql: Use non-conflicting table names in new regression test case.

2017-01-24 Thread Tom Lane
Use non-conflicting table names in new regression test case. Commit 587cda35c added a test to updatable_views.sql that created tables named the same as tables used by the concurrent inherit.sql script. Unsurprisingly, this results in random failures. Pick different names. Per buildfarm. Branch

[COMMITTERS] pgsql: pg_dump: Fix some schema issues when dumping sequences

2017-01-24 Thread Peter Eisentraut
pg_dump: Fix some schema issues when dumping sequences In the new code for selecting sequence data from pg_sequence, set the schema to pg_catalog instead of the sequences own schema, and refer to the sequence by OID instead of name, which was missing a schema qualification. Reported-by: Stephen F

[COMMITTERS] pgsql: Allow password file name to be specified as a libpq connection p

2017-01-24 Thread Tom Lane
Allow password file name to be specified as a libpq connection parameter. Formerly an alternate password file could only be selected via the environment variable PGPASSFILE; now it can also be selected via a new connection parameter "passfile", corresponding to the conventions for most other conne

[COMMITTERS] pgsql: Add a SHOW command to the replication command language.

2017-01-24 Thread Robert Haas
Add a SHOW command to the replication command language. This is useful infrastructure for an upcoming proposed patch to allow the WAL segment size to be changed at initdb time; tools like pg_basebackup need the ability to interrogate the server setting. But it also doesn't seem like a bad thing to

[COMMITTERS] pgsql: Fix bug in verifying TLI (timeline ID) in WAL page header during

2017-01-24 Thread Fujii Masao
Fix bug in verifying TLI (timeline ID) in WAL page header during recovery.. Previously ValidXLOGHeader() could not handle properly the case where we re-read the WAL segment after reading its subsequent segment having larger TLI. This case can happen, for example, when the WAL record is split acros

[COMMITTERS] pgsql: Add a new DestReceiver for printing tuples without catalog acces

2017-01-24 Thread Robert Haas
Add a new DestReceiver for printing tuples without catalog access. If you create a DestReciver of type DestRemote and try to use it from a replication connection that is not bound to a specific daabase, or any other hypothetical type of backend that is not bound to a specific database, it will fai

[COMMITTERS] pgsql: Extend index AM API for parallel index scans.

2017-01-24 Thread Robert Haas
Extend index AM API for parallel index scans. This patch doesn't actually make any index AM parallel-aware, but it provides the necessary functions at the AM layer to do so. Rahila Syed, Amit Kapila, Robert Haas Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/7b4ac1

[COMMITTERS] pgsql: Fix things so that updatable views work with partitioned tables.

2017-01-24 Thread Robert Haas
Fix things so that updatable views work with partitioned tables. Previously, ExecInitModifyTable was missing handling for WITH CHECK OPTION, and view_query_is_auto_updatable was missing handling for RELKIND_PARTITIONED_TABLE. Amit Langote, reviewed by me. Branch -- master Details --- ht

[COMMITTERS] pgsql: Set ecxt_scantuple correctly for tuple routing.

2017-01-24 Thread Robert Haas
Set ecxt_scantuple correctly for tuple routing. In 2ac3ef7a01df859c62d0a02333b646d65eaec5ff, we changed things so that it's possible for a different TupleTableSlot to be used for partitioned tables at successively lower levels. If we do end up changing the slot from the original, we must update e

Re: [COMMITTERS] pgsql: Reindent table partitioning code.

2017-01-24 Thread Tom Lane
Robert Haas writes: > Reindent table partitioning code. Oh, thank you, I was starting to get annoyed with that too. regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql

[COMMITTERS] pgsql: Reindent table partitioning code.

2017-01-24 Thread Robert Haas
Reindent table partitioning code. We've accumulated quite a bit of stuff with which pgindent is not quite happy in this code; clean it up to provide a less-annoying base for future pgindent runs. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/27cdb3414b3fb4c8fcc0695

[COMMITTERS] pgsql: Fix incorrect comment: pgtime's tm_mon is 1-based, not 0-based.

2017-01-24 Thread Robert Haas
Fix incorrect comment: pgtime's tm_mon is 1-based, not 0-based. The comments in formatting.c already said that tm_mon was 1-based not 0-based, but the comments here disagreed. Dmitry Fedin Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/96e0ccc2b589eda26585ed2a8dabf

[COMMITTERS] pgsql: Remove unused variable.

2017-01-24 Thread Robert Haas
Remove unused variable. This was intended to be included in the previous commit, but I goofed. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/52df3420cd241b1411da3e4b24318db12bf22cba Modified Files -- src/backend/catalog/partition.c | 2 -- 1 file change

[COMMITTERS] pgsql: Don't invoke arbitrary code inside a possibly-aborted transactio

2017-01-24 Thread Robert Haas
Don't invoke arbitrary code inside a possibly-aborted transaction. The code here previously tried to call the partitioning operator, but really the right thing to do (and the safe thing to do) is use datumIsEqual(). Amit Langote, but I expanded the comment and fixed a compiler warning. Branch --

[COMMITTERS] pgsql: Fix interaction of partitioned tables with BulkInsertState.

2017-01-24 Thread Robert Haas
Fix interaction of partitioned tables with BulkInsertState. When copying into a partitioned table, the target heap may change from one tuple to next. We must ask ReadBufferBI() to get a new buffer every time such change occurs. To do that, use new function ReleaseBulkInsertStatePin(). This fixe