[COMMITTERS] pgsql: Fix interaction between CREATE INDEX and "snapshot too old".

2016-06-10 Thread Kevin Grittner
Fix interaction between CREATE INDEX and "snapshot too old". Since indexes are created without valid LSNs, an index created while a snapshot older than old_snapshot_threshold existed could cause queries to return incorrect results when those old snapshots were used, if any relevant rows had been s

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-06-10 Thread Kevin Grittner
On Thu, Jun 9, 2016 at 6:16 PM, Robert Haas wrote: > So I like the idea of centralizing checks in > RelationAllowsEarlyVacuum, but shouldn't it really be called > RelationAllowsEarlyPruning? Since vacuum calls the pruning function, and not the other way around, the name you suggest would be tech

[COMMITTERS] pgsql: Schema-qualify some references to regprocedure.

2016-06-10 Thread Robert Haas
Schema-qualify some references to regprocedure. Andreas Karlsson, per a gripe from Tom Lane. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/3d8fc8c68c063d52ca678e569f0ecd9385f846e6 Modified Files -- contrib/citext/citext--1.1--1.2.sql | 8 contr

[COMMITTERS] pgsql: Update pgstattuple extension for parallel query.

2016-06-10 Thread Robert Haas
Update pgstattuple extension for parallel query. All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/a8501ba11931f84c07e014070902d8198fa7dfd9 Modified Files -- contrib/pgstattuple/

[COMMITTERS] pgsql: Update pg_stat_statements extension for parallel query.

2016-06-10 Thread Robert Haas
Update pg_stat_statements extension for parallel query. All functions provided by this extension are PARALLEL SAFE. Given the general prohibition against write operations in parallel queries, it is perhaps a bit surprising that pg_stat_statements_reset() is parallel safe. But since it only modifi

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-06-10 Thread Robert Haas
On Fri, Jun 10, 2016 at 10:45 AM, Kevin Grittner wrote: > On Thu, Jun 9, 2016 at 6:16 PM, Robert Haas wrote: > >> So I like the idea of centralizing checks in >> RelationAllowsEarlyVacuum, but shouldn't it really be called >> RelationAllowsEarlyPruning? > > Since vacuum calls the pruning function

[COMMITTERS] pgsql: Rename local variable for consistency.

2016-06-10 Thread Kevin Grittner
Rename local variable for consistency. Pointed out by Robert Haas. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/13761bccb177022c8c0dabc08f3e9acb491b1c96 Modified Files -- src/backend/catalog/index.c | 8 1 file changed, 4 insertions(+), 4 dele

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-06-10 Thread Kevin Grittner
On Fri, Jun 10, 2016 at 10:26 AM, Robert Haas wrote: > On Fri, Jun 10, 2016 at 10:45 AM, Kevin Grittner wrote: >> Since vacuum calls the pruning function, and not the other way >> around, the name you suggest would be technically more correct. >> Committed using "Pruning" instead of "Vacuum" in

[COMMITTERS] pgsql: Refactor to reduce code duplication for function property checki

2016-06-10 Thread Tom Lane
Refactor to reduce code duplication for function property checking. As noted by Andres Freund, we'd accumulated quite a few similar functions in clauses.c that examine all functions in an expression tree to see if they satisfy some boolean test. Reduce the duplication by inventing a function chec

[COMMITTERS] pgsql: Remove reltarget_has_non_vars flag.

2016-06-10 Thread Tom Lane
Remove reltarget_has_non_vars flag. Commit b12fd41c6 added a "reltarget_has_non_vars" field to RelOptInfo, but failed to maintain it accurately. Since its only purpose was to skip calls to has_parallel_hazard() in the simple case where a rel's targetlist is all Vars, and that call is really prett

[COMMITTERS] pgsql: Change default of backend_flush_after GUC to 0 (disabled).

2016-06-10 Thread Andres Freund
Change default of backend_flush_after GUC to 0 (disabled). While beneficial, both for throughput and average/worst case latency, in a significant number of workloads, there are other workloads in which backend_flush_after can cause significant performance regressions in comparison to < 9.6 release