[COMMITTERS] pgsql: Remove extraneous comma to satisfy picky compiler

2017-04-06 Thread Andrew Dunstan
Remove extraneous comma to satisfy picky compiler per buildfarm Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/88dd4e48315878263bcf27e0337daf2b3c1991b8 Modified Files -- src/backend/utils/adt/jsonfuncs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [COMMITTERS] pgsql: Identity columns

2017-04-06 Thread David Rowley
On 7 April 2017 at 00:44, Peter Eisentraut wrote: > Identity columns > > This is the SQL standard-conforming variant of PostgreSQL's serial > columns. It fixes a few usability issues that serial columns have: > > - CREATE TABLE / LIKE copies default but refers to same sequence > - cannot add/drop

[COMMITTERS] pgsql: Make json_populate_record and friends operate recursively

2017-04-06 Thread Andrew Dunstan
Make json_populate_record and friends operate recursively With this change array fields are populated from json(b) arrays, and composite fields are populated from json(b) objects. Along the way, some significant code refactoring is done to remove redundancy in the way to populate_record[_set] and

[COMMITTERS] pgsql: Remove use of Jade and DSSSL

2017-04-06 Thread Peter Eisentraut
Remove use of Jade and DSSSL All documentation is now built using XSLT. Remove all references to Jade, DSSSL, also JadeTex and some other outdated tooling. For chunked HTML builds, this changes nothing, but removes the transitional "oldhtml" target. The single-page HTML build is ported over to

[COMMITTERS] pgsql: Clean up after insufficiently-researched optimization of tuple c

2017-04-06 Thread Tom Lane
Clean up after insufficiently-researched optimization of tuple conversions. tupconvert.c's functions formerly considered that an explicit tuple conversion was necessary if the input and output tupdescs contained different type OIDs. The point of that was to make sure that a composite datum result

[COMMITTERS] pgsql: Reset API of clause_selectivity()

2017-04-06 Thread Simon Riggs
Reset API of clause_selectivity() Discussion: https://postgr.es/m/cakjs1f9yurjqw9pdnzl+rmotsp2voytkpxkgnmfjeo-qz5o...@mail.gmail.com Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/ac2b09508834c9d6b7ec9467e876213b0304c792 Modified Files -- contrib/file_

Re: [COMMITTERS] pgsql: Add infrastructure to support EphemeralNamedRelation references.

2017-04-06 Thread Kevin Grittner
On Thu, Apr 6, 2017 at 5:20 PM, Kevin Grittner wrote: > I'll commit this fix first so I don't hold up Andres or break any > picky buildfarm critters Done. > and then see whether I can't manage to get > the tests to cover this code. The function in question is only called from rewrite, and here

[COMMITTERS] pgsql: Fix the RTE_NAMEDTUPLESTORE case in get_rte_attribute_is_dropped

2017-04-06 Thread Kevin Grittner
Fix the RTE_NAMEDTUPLESTORE case in get_rte_attribute_is_dropped(). Problems pointed out by Andres Freund and Thomas Munro. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/255efa241f460ee4f4c4c98c8cdd7457807f3af9 Modified Files -- src/backend/parser/pars

Re: [COMMITTERS] pgsql: Add infrastructure to support EphemeralNamedRelation references.

2017-04-06 Thread Tom Lane
Kevin Grittner writes: > On Thu, Apr 6, 2017 at 4:19 PM, Andres Freund wrote: >> My compiler, quite justifiedly, complains: >> /home/andres/src/postgresql/src/backend/parser/parse_relation.c:2899:43: >> warning: comparison between pointer and zero character constant >> [-Wpointer-compare] >> (l

Re: [COMMITTERS] pgsql: Add infrastructure to support EphemeralNamedRelation references.

2017-04-06 Thread Kevin Grittner
On Thu, Apr 6, 2017 at 5:07 PM, Thomas Munro wrote: > Doesn't it also have the logic backwards? According to the comment, > the attribute is dropped if the type *is* InvalidOid, so we want > result == true in that case. But I don't actually know how to reach > this code to test it. You're righ

Re: [COMMITTERS] pgsql: Add infrastructure to support EphemeralNamedRelation references.

2017-04-06 Thread Andres Freund
On 2017-04-06 17:03:20 -0500, Kevin Grittner wrote: > On Thu, Apr 6, 2017 at 4:19 PM, Andres Freund wrote: > > > My compiler, quite justifiedly, complains: > > > > /home/andres/src/postgresql/src/backend/parser/parse_relation.c: In > > function ‘get_rte_attribute_is_dropped’: > > /home/andres/sr

Re: [COMMITTERS] pgsql: Add infrastructure to support EphemeralNamedRelation references.

2017-04-06 Thread Thomas Munro
On Fri, Apr 7, 2017 at 10:03 AM, Kevin Grittner wrote: > On Thu, Apr 6, 2017 at 4:19 PM, Andres Freund wrote: > >> My compiler, quite justifiedly, complains: >> >> /home/andres/src/postgresql/src/backend/parser/parse_relation.c: In function >> ‘get_rte_attribute_is_dropped’: >> /home/andres/src/

Re: [COMMITTERS] pgsql: Add infrastructure to support EphemeralNamedRelation references.

2017-04-06 Thread Kevin Grittner
On Thu, Apr 6, 2017 at 4:19 PM, Andres Freund wrote: > My compiler, quite justifiedly, complains: > > /home/andres/src/postgresql/src/backend/parser/parse_relation.c: In function > ‘get_rte_attribute_is_dropped’: > /home/andres/src/postgresql/src/backend/parser/parse_relation.c:2899:43: > warni

[COMMITTERS] pgsql: Allow avoiding tuple copy within tuplesort_gettupleslot().

2017-04-06 Thread Andres Freund
Allow avoiding tuple copy within tuplesort_gettupleslot(). Add a "copy" argument to make it optional to receive a copy of caller tuple that is safe to use following a subsequent manipulating of tuplesort's state. This is a performance optimization. Most existing tuplesort_gettupleslot() callers

[COMMITTERS] pgsql: Silence uninitialized variable compiler warning in sepgsql

2017-04-06 Thread Joe Conway
Silence uninitialized variable compiler warning in sepgsql At -Og optimization gcc warns that variable tclass may be used uninitialized when relkind == RELKIND_INDEX. Actually that can't happen due to an early return, but quiet the compiler by initializing tclass to 0. In passing, use uint16_t co

[COMMITTERS] pgsql: Silence compiler warning in sepgsql

2017-04-06 Thread Joe Conway
Silence compiler warning in sepgsql includes , which creates an incompatible We don't care if redefines "true"/"false"; those are close enough. Complaint and initial patch by Mike Palmiotto. Final approach per Tom Lane's suggestion, as discussed on hackers. Backpatching to all supported branche

[COMMITTERS] pgsql: Silence compiler warning in sepgsql

2017-04-06 Thread Joe Conway
Silence compiler warning in sepgsql includes , which creates an incompatible We don't care if redefines "true"/"false"; those are close enough. Complaint and initial patch by Mike Palmiotto. Final approach per Tom Lane's suggestion, as discussed on hackers. Backpatching to all supported branche

[COMMITTERS] pgsql: Silence compiler warning in sepgsql

2017-04-06 Thread Joe Conway
Silence compiler warning in sepgsql includes , which creates an incompatible We don't care if redefines "true"/"false"; those are close enough. Complaint and initial patch by Mike Palmiotto. Final approach per Tom Lane's suggestion, as discussed on hackers. Backpatching to all supported branche

[COMMITTERS] pgsql: Silence compiler warning in sepgsql

2017-04-06 Thread Joe Conway
Silence compiler warning in sepgsql includes , which creates an incompatible We don't care if redefines "true"/"false"; those are close enough. Complaint and initial patch by Mike Palmiotto. Final approach per Tom Lane's suggestion, as discussed on hackers. Backpatching to all supported branche

[COMMITTERS] pgsql: Silence compiler warning in sepgsql

2017-04-06 Thread Joe Conway
Silence compiler warning in sepgsql includes , which creates an incompatible We don't care if redefines "true"/"false"; those are close enough. Complaint and initial patch by Mike Palmiotto. Final approach per Tom Lane's suggestion, as discussed on hackers. Backpatching to all supported branche

[COMMITTERS] pgsql: Silence compiler warning in sepgsql

2017-04-06 Thread Joe Conway
Silence compiler warning in sepgsql includes , which creates an incompatible We don't care if redefines "true"/"false"; those are close enough. Complaint and initial patch by Mike Palmiotto. Final approach per Tom Lane's suggestion, as discussed on hackers. Backpatching to all supported branche

[COMMITTERS] pgsql: Fix parallel bitmapscan tests on builds without USE_PREFETCH.

2017-04-06 Thread Andres Freund
Fix parallel bitmapscan tests on builds without USE_PREFETCH. This was broken in 5a5931533edd2. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/d611517fc44ebbf7e0d563de6d4cd98fd342a762 Modified Files -- src/test/regress/expected/select_parallel.out | 7 +

Re: [COMMITTERS] pgsql: Add infrastructure to support EphemeralNamedRelation references.

2017-04-06 Thread Andres Freund
Hi, On 2017-04-01 04:24:25 +, Kevin Grittner wrote: > Add infrastructure to support EphemeralNamedRelation references. My compiler, quite justifiedly, complains: /home/andres/src/postgresql/src/backend/parser/parse_relation.c: In function ‘get_rte_attribute_is_dropped’: /home/andres/src/pos

[COMMITTERS] pgsql: Fix BRIN cost estimation

2017-04-06 Thread Alvaro Herrera
Fix BRIN cost estimation The original code was overly optimistic about the cost of scanning a BRIN index, leading to BRIN indexes being selected when they'd be a worse choice than some other index. This complete rewrite should be more accurate. Author: David Rowley, based on an earlier patch by

[COMMITTERS] pgsql: Add minimal test for EXPLAIN ANALYZE of parallel query.

2017-04-06 Thread Andres Freund
Add minimal test for EXPLAIN ANALYZE of parallel query. This displays the number of workers launched, thus the test is dependant on configuration to some degree. We'll see whether that turns out ot be a problem. Author: Rafia Sabih Discussion: https://postgr.es/m/20170331185540.zmsue4ndvqtna...

[COMMITTERS] pgsql: Increase parallel bitmap scan test coverage.

2017-04-06 Thread Andres Freund
Increase parallel bitmap scan test coverage. Author: Dilip Kumar Discussion: https://postgr.es/m/20170331184603.qcp7t4md5bzxb...@alap3.anarazel.de Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/5a5931533edd2b70bde1f069609f58998dd26fef Modified Files --

[COMMITTERS] pgsql: Fix logical replication between different encodings

2017-04-06 Thread Peter Eisentraut
Fix logical replication between different encodings When sending a tuple attribute, the previous coding erroneously sent the length byte before encoding conversion, which would lead to protocol failures on the receiving side if the length did not match the following string. To fix that, use pq_se

[COMMITTERS] pgsql: Mark immutable functions in information schema as parallel safe

2017-04-06 Thread Peter Eisentraut
Mark immutable functions in information schema as parallel safe Also add opr_sanity check that all preloaded immutable functions are parallel safe. (Per discussion, this does not necessarily have to be true for all possible such functions, but deviations would be unlikely enough that maintaining

[COMMITTERS] pgsql: pg_dump: Rename some typedefs to avoid name conflicts

2017-04-06 Thread Peter Eisentraut
pg_dump: Rename some typedefs to avoid name conflicts In struct _archiveHandle, some of the fields have the same name as a typedef. This is kind of confusing, so rename the types so they have names distinct from the struct fields. In C++, the previous coding changes the meaning of the typedef in

[COMMITTERS] pgsql: Clean up psql/describe.c's messy query for extended stats.

2017-04-06 Thread Tom Lane
Clean up psql/describe.c's messy query for extended stats. Remove unnecessary casts, safely schema-qualify the ones that remain, lose an unnecessary level of sub-SELECT, reformat for tidiness. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/20c95f27e736837b4af6bef998

[COMMITTERS] pgsql: Fix mixup of bool and ternary value

2017-04-06 Thread Peter Eisentraut
Fix mixup of bool and ternary value Not currently a problem, but could be with stricter bool behavior under stdbool or C++. Reviewed-by: Andres Freund Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/e6c9a5a9bcc9774e6a29cf9cea489b42f492e019 Modified Files -

[COMMITTERS] pgsql: doc: Formatting fix for XSL-FO PDF build

2017-04-06 Thread Peter Eisentraut
doc: Formatting fix for XSL-FO PDF build Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/a071fe87a21920e5c2e79d521d31b2ddaf83875b Modified Files -- doc/src/sgml/stylesheet-fo.xsl | 8 1 file changed, 8 insertions(+) -- Sent via pgsql-committers

[COMMITTERS] pgsql: Fix AclResult vs bool type mix-up

2017-04-06 Thread Peter Eisentraut
Fix AclResult vs bool type mix-up Using AclResult as a bool or vice versa works by accident, but it's unusual and possibly confusing style, so write it out more explicitly. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/301ca0d9a2f82ade11b2e5039d348badd28334cf Modi

[COMMITTERS] pgsql: Comment fixes for extended statistics

2017-04-06 Thread Alvaro Herrera
Comment fixes for extended statistics Clean up some code comments in new extended statistics code, from 7b504eb282. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/b1fc51a36ecdf854be9e41ffb99953c40ef96ccf Modified Files -- src/backend/optimizer/util/plan

Re: [COMMITTERS] pgsql: Identity columns

2017-04-06 Thread Peter Eisentraut
On 4/6/17 10:24, Tom Lane wrote: > This commit is causing a compiler warning for me: > > tablecmds.c: In function 'ATExecSetIdentity': > tablecmds.c:5936: warning: 'address.objectSubId' may be used uninitialized in > this function > tablecmds.c:5936: warning: 'address.objectId' may be used uninit

[COMMITTERS] pgsql: Fix compiler warning and add some more comments

2017-04-06 Thread Peter Eisentraut
Fix compiler warning and add some more comments Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/dc0400cc501ebe839c15a387911945d1585e4787 Modified Files -- src/backend/commands/tablecmds.c | 12 1 file changed, 12 insertions(+) -- Sent via p

[COMMITTERS] pgsql: Remove bogus SCRAM_ITERATION_LEN constant.

2017-04-06 Thread Heikki Linnakangas
Remove bogus SCRAM_ITERATION_LEN constant. It was not used for what the comment claimed, at all. It was actually used as the 'base' argument to strtol(), when reading the iteration count. We don't need a constant for base-10, so remove it. Branch -- master Details --- http://git.postgres

[COMMITTERS] pgsql: Always SnapshotResetXmin() during ClearTransaction()

2017-04-06 Thread Simon Riggs
Always SnapshotResetXmin() during ClearTransaction() Avoid corner cases during 2PC with 6bad580d9e678a0b604883e14d8401d469b06566 Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/cd0cebaf7d1ab04427d4045edf7121a8f3753d8b Modified Files -- src/backend/access

Re: [COMMITTERS] pgsql: Identity columns

2017-04-06 Thread Tom Lane
Peter Eisentraut writes: > Identity columns This commit is causing a compiler warning for me: tablecmds.c: In function 'ATExecSetIdentity': tablecmds.c:5936: warning: 'address.objectSubId' may be used uninitialized in this function tablecmds.c:5936: warning: 'address.objectId' may be used unini

Re: [COMMITTERS] pgsql: Avoid SnapshotResetXmin() during AtEOXact_Snapshot()

2017-04-06 Thread Tom Lane
Simon Riggs writes: > Avoid SnapshotResetXmin() during AtEOXact_Snapshot() The buildfarm doesn't like this a bit. regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.o

Re: [COMMITTERS] pgsql: Avoid SnapshotResetXmin() during AtEOXact_Snapshot()

2017-04-06 Thread Simon Riggs
On 6 April 2017 at 09:11, Robert Haas wrote: > Just like the last time you committed this, it seems to have broken > the entire buildfarm. For different reasons, AFAIU. Investigating already. -- Simon Riggshttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote

Re: [COMMITTERS] pgsql: Avoid SnapshotResetXmin() during AtEOXact_Snapshot()

2017-04-06 Thread Robert Haas
On Thu, Apr 6, 2017 at 8:35 AM, Simon Riggs wrote: > Avoid SnapshotResetXmin() during AtEOXact_Snapshot() > > For normal commits and aborts we already reset PgXact->xmin, > so we can simply avoid running SnapshotResetXmin() twice. > > During performance tests by Alexander Korotkov, diagnosis > by

[COMMITTERS] pgsql: Identity columns

2017-04-06 Thread Peter Eisentraut
Identity columns This is the SQL standard-conforming variant of PostgreSQL's serial columns. It fixes a few usability issues that serial columns have: - CREATE TABLE / LIKE copies default but refers to same sequence - cannot add/drop serialness with ALTER TABLE - dropping default does not drop s

[COMMITTERS] pgsql: Avoid SnapshotResetXmin() during AtEOXact_Snapshot()

2017-04-06 Thread Simon Riggs
Avoid SnapshotResetXmin() during AtEOXact_Snapshot() For normal commits and aborts we already reset PgXact->xmin, so we can simply avoid running SnapshotResetXmin() twice. During performance tests by Alexander Korotkov, diagnosis by Andres Freund showed PgXact array as a bottleneck. After manual