[COMMITTERS] pgsql: Fix a couple of places in doc that implied there was only one sy

2016-04-07 Thread Fujii Masao
Fix a couple of places in doc that implied there was only one sync standby.

Thomas Munro

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/8643b91ecf8f47a1307df4a00d66b2fceada0d6f

Modified Files
--
doc/src/sgml/high-availability.sgml | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Phrase full text search.

2016-04-07 Thread Tom Lane
I wrote:
> ... I'm looking at the patch delta in ts_type.h.

BTW, while I'm looking at that: comparePos() was a perfectly OK
name for a static function within tsvector.c, but it seems like a
pretty horrid name for a globally exposed linker symbol.  Please
rename it to something less generic.

regards, tom lane


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Phrase full text search.

2016-04-07 Thread Tom Lane
Teodor Sigaev  writes:
> Phrase full text search.

Hasn't this patch broken on-disk compatibility of type tsquery by
renumbering the values of QueryOperator.operator?  I'm looking at
the patch delta in ts_type.h.

regards, tom lane


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Use Foreign Key relationships to infer multi-column join selecti

2016-04-07 Thread Simon Riggs
Use Foreign Key relationships to infer multi-column join selectivity

In cases where joins use multiple columns we currently assess each join
separately causing gross mis-estimates for join cardinality.

This patch adds use of FK information for the first time into the
planner. When FKs are present and we have multi-column join information,
plan estimates will be drastically improved. Cases with multiple FKs
are handled, though partial matches are ignored currently.

Net effect is substantial performance improvements for joins in many
common cases. Additional planning time is isolated to cases that are
currently performing poorly, measured at 0.08 - 0.15 ms.

Please watch for planner performance regressions; circumstances seem
unlikely but the law of unintended consequences may apply somewhen.
Additional complex tests welcome to prove this before release.

Tests can be performed using SET enable_fkey_estimates = on | off
using scripts provided during Hackers discussions, message id:
552335d9.3090...@2ndquadrant.com

Authors: Tomas Vondra and David Rowley
Reviewed and tested by Simon Riggs, adding comments only

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/137805f89acb361144ec98d9847e26d2848aa57e

Modified Files
--
src/backend/optimizer/path/costsize.c| 375 ++-
src/backend/utils/misc/guc.c |   9 +
src/include/optimizer/cost.h |   1 +
src/include/optimizer/paths.h|   2 +
src/test/regress/expected/rangefuncs.out |  29 +--
5 files changed, 392 insertions(+), 24 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Load FK defs into relcache for use by planner

2016-04-07 Thread Peter Geoghegan
On Thu, Apr 7, 2016 at 4:09 AM, Simon Riggs  wrote:
> Load FK defs into relcache for use by planner

I gather this is infrastructure for the "use foreign keys to improve
join estimates" patch. A more worked out commit message would be nice,
though.


-- 
Peter Geoghegan


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: GRANT rights to CURRENT_USER instead of adding roles

2016-04-07 Thread Stephen Frost
GRANT rights to CURRENT_USER instead of adding roles

We shouldn't be adding roles during the regression tests as that can
cause back-to-back installcheck runs to fail and users running the
regression tests likley don't want those extra roles.

Pointed out by Tom

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/6928484bda454f9ab2456d385b2d317f18b6bf1a

Modified Files
--
src/test/regress/expected/init_privs.out | 7 +++
src/test/regress/sql/init_privs.sql  | 9 -
2 files changed, 7 insertions(+), 9 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Zeroing unused parts ducring tsquery construction.

2016-04-07 Thread Teodor Sigaev
Zeroing unused parts ducring tsquery construction.

Per investigation failure skink buildfarm member and
RANDOMIZE_ALLOCATED_MEMORY help

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/3308467905aa157139d24375850cfe49ee90a0cf

Modified Files
--
src/backend/utils/adt/tsquery_cleanup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Refactor join_is_removable() to separate out distinctness-provin

2016-04-07 Thread Tom Lane
Refactor join_is_removable() to separate out distinctness-proving logic.

Extracted from pending unique-join patch, since this is a rather large
delta but it's simply moving code out into separately-accessible
subroutines.

I (tgl) did choose to add a bit more logic to rel_supports_distinctness,
so that it verifies that there's at least one potentially usable unique
index rather than just checking indexlist != NIL.  Otherwise there's
no functional change here.

David Rowley

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/f338dd7585cab45da9053e883ad65a440a99d3be

Modified Files
--
src/backend/optimizer/plan/analyzejoins.c | 244 +++---
1 file changed, 157 insertions(+), 87 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Make testing of phraseto_tsquery independ from value of

2016-04-07 Thread Teodor Sigaev
Make testing of phraseto_tsquery independ from value of
default_text_search_config variable.

Per skink buldfarm member

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/a7ace3b6d96c7a1539ed0700865d320258a12f73

Modified Files
--
src/test/regress/expected/tsearch.out | 10 +-
src/test/regress/sql/tsearch.sql  | 10 +-
2 files changed, 10 insertions(+), 10 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Detect SSI conflicts before reporting constraint violations

2016-04-07 Thread Kevin Grittner
Detect SSI conflicts before reporting constraint violations

While prior to this patch the user-visible effect on the database
of any set of successfully committed serializable transactions was
always consistent with some one-at-a-time order of execution of
those transactions, the presence of declarative constraints could
allow errors to occur which were not possible in any such ordering,
and developers had no good workarounds to prevent user-facing
errors where they were not necessary or desired.  This patch adds
a check for serialization failure ahead of duplicate key checking
so that if a developer explicitly (redundantly) checks for the
pre-existing value they will get the desired serialization failure
where the problem is caused by a concurrent serializable
transaction; otherwise they will get a duplicate key error.

While it would be better if the reads performed by the constraints
could count as part of the work of the transaction for
serialization failure checking, and we will hopefully get there
some day, this patch allows a clean and reliable way for developers
to work around the issue.  In many cases existing code will already
be doing the right thing for this to "just work".

Author: Thomas Munro, with minor editing of docs by me
Reviewed-by: Marko Tiikkaja, Kevin Grittner

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/fcff8a575198478023ada8a48e13b50f70054766

Modified Files
--
doc/src/sgml/mvcc.sgml | 35 
src/backend/access/nbtree/nbtinsert.c  |  8 
.../isolation/expected/read-write-unique-2.out | 29 +
.../isolation/expected/read-write-unique-3.out | 12 ++
.../isolation/expected/read-write-unique-4.out | 41 ++
src/test/isolation/expected/read-write-unique.out  | 29 +
src/test/isolation/isolation_schedule  |  4 ++
src/test/isolation/specs/read-write-unique-2.spec  | 36 
src/test/isolation/specs/read-write-unique-3.spec  | 33 +++
src/test/isolation/specs/read-write-unique-4.spec  | 48 ++
src/test/isolation/specs/read-write-unique.spec| 39 ++
11 files changed, 307 insertions(+), 7 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Phrase full text search.

2016-04-07 Thread Teodor Sigaev
Phrase full text search.

Patch introduces new text search operator (<-> or ) into tsquery.
On-disk and binary in/out format of tsquery are backward compatible.
It has two side effect:
- change order for tsquery, so, users, who has a btree index over tsquery,
  should reindex it
- less number of parenthesis in tsquery output, and tsquery becomes more
  readable

Authors: Teodor Sigaev, Oleg Bartunov, Dmitry Ivanov
Reviewers: Alexander Korotkov, Artur Zakirov

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/bb140506df605fab58f48926ee1db1f80bdafb59

Modified Files
--
contrib/tsearch2/expected/tsearch2.out  |  56 ++---
doc/src/sgml/datatype.sgml  |   9 +-
doc/src/sgml/func.sgml  |  39 
doc/src/sgml/textsearch.sgml| 182 ++-
src/backend/tsearch/to_tsany.c  | 187 +++
src/backend/tsearch/ts_parse.c  |  15 +-
src/backend/tsearch/ts_selfuncs.c   |   3 +-
src/backend/tsearch/wparser_def.c   |  31 ++-
src/backend/utils/adt/tsginidx.c|  57 +++--
src/backend/utils/adt/tsgistidx.c   |   4 +-
src/backend/utils/adt/tsquery.c | 311 +++--
src/backend/utils/adt/tsquery_cleanup.c | 362 +++--
src/backend/utils/adt/tsquery_op.c  |  54 -
src/backend/utils/adt/tsquery_util.c|  11 +-
src/backend/utils/adt/tsrank.c  | 263 ++---
src/backend/utils/adt/tsvector.c|   2 +-
src/backend/utils/adt/tsvector_op.c | 326 +++---
src/backend/utils/adt/tsvector_parser.c |  10 +-
src/include/catalog/catversion.h|   2 +-
src/include/catalog/pg_operator.h   |   3 +
src/include/catalog/pg_proc.h   |   7 +
src/include/tsearch/ts_public.h |  22 +-
src/include/tsearch/ts_type.h   |  30 ++-
src/include/tsearch/ts_utils.h  |  15 +-
src/test/regress/expected/tsdicts.out   |  36 ++-
src/test/regress/expected/tsearch.out   | 395 +---
src/test/regress/expected/tstypes.out   | 369 -
src/test/regress/sql/tsdicts.sql|   3 +
src/test/regress/sql/tsearch.sql| 101 
src/test/regress/sql/tstypes.sql|  75 +-
30 files changed, 2536 insertions(+), 444 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Generic Messages for Logical Decoding

2016-04-07 Thread Fujii Masao
On Thu, Apr 7, 2016 at 1:47 PM, Andres Freund  wrote:
> On 2016-04-07 12:26:28 +0900, Fujii Masao wrote:
>> In my example, the WAL record of INSERT that I executed last should be in
>> 00010005. But pg_xlogdump could not display that.
>> The output of pg_xlogdump was:
>>
>> $ pg_xlogdump data/pg_xlog/00010005
>> pg_xlogdump: FATAL:  could not find a valid record after 0/500
>>
>> ISTM that if a WAL file starts with the latter half of LOGICAL MESSAGE
>> WAL data, pg_xlogdump treats it as invalid and gives up dumping the
>> remaining WAL data in the file.
>
> That'd obviously be something to investigate. IIRC there's a thread
> nearby about something like this.

Okay, will check. Thanks for the info!

> But just to confirm, if you use -s
> over multiple records it works?

Yeah, it worked expected.

Regards,

-- 
Fujii Masao


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Load FK defs into relcache for use by planner

2016-04-07 Thread Simon Riggs
Load FK defs into relcache for use by planner

Fastpath ignores this if no triggers defined.

Author: Tomas Vondra, with fastpath and comments added by me
Reviewers: David Rowley, Simon Riggs

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/015e88942aa50f0d419ddac00e63bb06d6e62e86

Modified Files
--
src/backend/nodes/outfuncs.c | 13 ++
src/backend/optimizer/util/plancat.c | 85 +++-
src/backend/utils/cache/relcache.c   | 75 +++
src/include/nodes/nodes.h|  1 +
src/include/nodes/relation.h | 22 ++
src/include/utils/rel.h  |  3 ++
src/include/utils/relcache.h |  1 +
7 files changed, 199 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers