Re: [COMMITTERS] pgsql: Add pg_audit, an auditing extension

2015-05-15 Thread Stephen Frost
* Thom Brown (t...@linux.com) wrote:
 If it were empty, it would then be indistinguishable from a statement
 executed with a single parameter passed as an empty string.

NULL, but yes.

 Speaking of which, I notice that nulls show up as nothing too.  How
 does one distinguish between an empty string and a null in the logs?

It should be , to match how the COPY protocol handles it.  Will take a
look.

Thanks!

Stephen


signature.asc
Description: Digital signature


[COMMITTERS] pgsql: Support VERBOSE option in REINDEX command.

2015-05-15 Thread Fujii Masao
Support VERBOSE option in REINDEX command.

When this option is specified, a progress report is printed as each index
is reindexed.

Per discussion, we agreed on the following syntax for the extensibility of
the options.

REINDEX (flexible options) { INDEX | ... } name

Sawada Masahiko.
Reviewed by Robert Haas, Fabrízio Mello, Alvaro Herrera, Kyotaro Horiguchi,
Jim Nasby and me.

Discussion: cad21aoa0pk3ycozafzmae+2fcc3ogp5zorggdymng5zoawd...@mail.gmail.com

Branch
--
master

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

Modified Files
--
doc/src/sgml/ref/reindex.sgml  |   11 +-
src/backend/catalog/index.c|   21 --
src/backend/commands/cluster.c |2 +-
src/backend/commands/indexcmds.c   |   25 +++-
src/backend/commands/tablecmds.c   |2 +-
src/backend/nodes/copyfuncs.c  |1 +
src/backend/nodes/equalfuncs.c |1 +
src/backend/parser/gram.y  |   57 ++--
src/backend/tcop/utility.c |6 +--
src/include/catalog/index.h|4 +-
src/include/commands/defrem.h  |7 ++--
src/include/nodes/parsenodes.h |5 +++
src/test/regress/expected/create_index.out |8 
src/test/regress/sql/create_index.sql  |8 
14 files changed, 112 insertions(+), 46 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: Allow GiST distance function to return merely a lower-bound.

2015-05-15 Thread Heikki Linnakangas

On 05/15/2015 03:05 PM, Fujii Masao wrote:

Seems this patch causes the regression test of pg_trgm fail.
The regression diff that I got is:

*** /home/postgres/pgsql/head/contrib/pg_trgm/expected/pg_trgm.out
2013-07-23 16:46:22.212488785 +0900
--- /home/postgres/pgsql/head/contrib/pg_trgm/results/pg_trgm.out
2015-05-15 20:59:16.574926732 +0900
***
*** 2332,2343 
   (3 rows)

   select t - 'q0987wertyu0988', t from test_trgm order by t -
'q0987wertyu0988' limit 2;
!  ?column? |  t
! --+-
!  0.411765 | qwertyu0988
!   0.5 | qwertyu0987
! (2 rows)
!
   drop index trgm_idx;
   create index trgm_idx on test_trgm using gin (t gin_trgm_ops);
   set enable_seqscan=off;
--- 2332,2338 
   (3 rows)

   select t - 'q0987wertyu0988', t from test_trgm order by t -
'q0987wertyu0988' limit 2;
! ERROR:  index returned tuples in wrong order
   drop index trgm_idx;
   create index trgm_idx on test_trgm using gin (t gin_trgm_ops);
   set enable_seqscan=off;


Hmm, OK. pg_trgm works for me, but I'll take a look. (rover_firefly also 
went red, due to rounding differences in the regression test)


- Heikki



--
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: Add pg_audit, an auditing extension

2015-05-15 Thread Pavel Stehule
2015-05-15 12:14 GMT+02:00 Thom Brown t...@linux.com:

 On 15 May 2015 at 10:56, Pavel Stehule pavel.steh...@gmail.com wrote:
  Hi
 
  I am testing it, and output is strange
 
  2015-05-15 11:49:25.046 CEST pavel postgres: LOG:  AUDIT:
  SESSION,1,1,DDL,DROP TABLE,,,drop table foo;,not logged
  2015-05-15 11:49:25.046 CEST pavel postgres: STATEMENT:  drop table foo;
  2015-05-15 11:49:28.291 CEST pavel postgres: LOG:  AUDIT:
  SESSION,2,1,DDL,CREATE TABLE,,,CREATE TABLE foo(a int, b int);,not
  logged
  2015-05-15 11:49:28.291 CEST pavel postgres: STATEMENT:  CREATE TABLE
 foo(a
  int, b int);
  2015-05-15 11:49:31.486 CEST pavel postgres: LOG:  AUDIT:
  SESSION,3,1,WRITE,INSERT,,,INSERT INTO foo VALUES(10,20);,not logged
  2015-05-15 11:49:31.486 CEST pavel postgres: STATEMENT:  INSERT INTO foo
  VALUES(10,20);
  2015-05-15 11:49:33.446 CEST pavel postgres: LOG:  AUDIT:
  SESSION,4,1,READ,SELECT,,,SELECT * FROM foo WHERE a = 10;,not logged
  2015-05-15 11:49:33.446 CEST pavel postgres: STATEMENT:  SELECT * FROM
 foo
  WHERE a = 10;
 
  I am missing object name, unexpected string not logged
 
  configuration:
  pg_audit.log = 'read, write, ddl'

 From what I can tell, that last value should be for parameters.  You'd
 need to set pg_audit.log_parameter to on, and then prepare and execute
 a statement with a parameter.


yes

2015-05-15 12:18:39.545 CEST pavel postgres: LOG:  AUDIT:
SESSION,1,1,READ,PREPARE,,,prepare x(int) as select * from foo where a =
$1;,none
2015-05-15 12:18:39.545 CEST pavel postgres: STATEMENT:  prepare x(int) as
select * from foo where a = $1;
2015-05-15 12:18:48.065 CEST pavel postgres: LOG:  AUDIT:
SESSION,2,1,READ,SELECT,,,prepare x(int) as select * from foo where a =
$1;,10
2015-05-15 12:18:48.065 CEST pavel postgres: STATEMENT:  execute x(10);

but when pg_audit.log_parameter is off, then this value should be empty

Regards

Pavel



 --
 Thom



Re: [COMMITTERS] pgsql: Add pg_audit, an auditing extension

2015-05-15 Thread Thom Brown
On 15 May 2015 at 10:56, Pavel Stehule pavel.steh...@gmail.com wrote:
 Hi

 I am testing it, and output is strange

 2015-05-15 11:49:25.046 CEST pavel postgres: LOG:  AUDIT:
 SESSION,1,1,DDL,DROP TABLE,,,drop table foo;,not logged
 2015-05-15 11:49:25.046 CEST pavel postgres: STATEMENT:  drop table foo;
 2015-05-15 11:49:28.291 CEST pavel postgres: LOG:  AUDIT:
 SESSION,2,1,DDL,CREATE TABLE,,,CREATE TABLE foo(a int, b int);,not
 logged
 2015-05-15 11:49:28.291 CEST pavel postgres: STATEMENT:  CREATE TABLE foo(a
 int, b int);
 2015-05-15 11:49:31.486 CEST pavel postgres: LOG:  AUDIT:
 SESSION,3,1,WRITE,INSERT,,,INSERT INTO foo VALUES(10,20);,not logged
 2015-05-15 11:49:31.486 CEST pavel postgres: STATEMENT:  INSERT INTO foo
 VALUES(10,20);
 2015-05-15 11:49:33.446 CEST pavel postgres: LOG:  AUDIT:
 SESSION,4,1,READ,SELECT,,,SELECT * FROM foo WHERE a = 10;,not logged
 2015-05-15 11:49:33.446 CEST pavel postgres: STATEMENT:  SELECT * FROM foo
 WHERE a = 10;

 I am missing object name, unexpected string not logged

 configuration:
 pg_audit.log = 'read, write, ddl'

From what I can tell, that last value should be for parameters.  You'd
need to set pg_audit.log_parameter to on, and then prepare and execute
a statement with a parameter.

-- 
Thom


-- 
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: Separate block sampling functions

2015-05-15 Thread Michael Paquier
On Fri, May 15, 2015 at 8:44 PM, Andrew Dunstan and...@dunslane.net wrote:

 On 05/15/2015 06:04 AM, Simon Riggs wrote:

 On 15 May 2015 at 04:59, Tom Lane t...@sss.pgh.pa.us
 mailto:t...@sss.pgh.pa.us wrote:

 The difference there was that that was specifically adding a new
 feature
 of value to FDWs.  This is just drive-by breakage.


 I think that comment is reasonable. I will continue with my commits of
 tablesample, then return to see if we can improve/revert the API breakage.




 OK, good, but I'm not going to accept Michael's pull request until the API
 is stable.

Well, I guess that this is going to be incorrect in any case now.
Still any API change can be done cleanly in a matter of minutes for
this FDW.
-- 
Michael


-- 
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: Separate block sampling functions

2015-05-15 Thread Simon Riggs
On 15 May 2015 at 04:59, Tom Lane t...@sss.pgh.pa.us wrote:


 The difference there was that that was specifically adding a new feature
 of value to FDWs.  This is just drive-by breakage.


I think that comment is reasonable. I will continue with my commits of
tablesample, then return to see if we can improve/revert the API breakage.

-- 
Simon Riggshttp://www.2ndQuadrant.com/
http://www.2ndquadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training  Services


[COMMITTERS] pgsql: Allow GiST distance function to return merely a lower-bound.

2015-05-15 Thread Heikki Linnakangas
Allow GiST distance function to return merely a lower-bound.

The distance function can now set *recheck = false, like index quals. The
executor will then re-check the ORDER BY expressions, and use a queue to
reorder the results on the fly.

This makes it possible to do kNN-searches on polygons and circles, which
don't store the exact value in the index, but just a bounding box.

Alexander Korotkov and me

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/35fcb1b3d038a501f3f4c87c05630095abaaadab

Modified Files
--
doc/src/sgml/gist.sgml |   35 ++-
src/backend/access/gist/gistget.c  |   30 ++-
src/backend/access/gist/gistproc.c |   37 +++
src/backend/access/gist/gistscan.c |5 +
src/backend/executor/nodeIndexscan.c   |  379 +++-
src/backend/optimizer/plan/createplan.c|   73 --
src/backend/utils/adt/geo_ops.c|   27 ++
src/include/access/genam.h |3 +
src/include/access/relscan.h   |9 +
src/include/catalog/catversion.h   |2 +-
src/include/catalog/pg_amop.h  |2 +
src/include/catalog/pg_amproc.h|2 +
src/include/catalog/pg_operator.h  |8 +-
src/include/catalog/pg_proc.h  |4 +
src/include/nodes/execnodes.h  |   20 ++
src/include/nodes/plannodes.h  |   10 +-
src/include/utils/geo_decls.h  |3 +
src/test/regress/expected/create_index.out |   78 ++
src/test/regress/sql/create_index.sql  |   12 +
19 files changed, 699 insertions(+), 40 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: Add pg_audit, an auditing extension

2015-05-15 Thread Pavel Stehule
Hi

I am testing it, and output is strange

2015-05-15 11:49:25.046 CEST pavel postgres: LOG:  AUDIT:
SESSION,1,1,DDL,DROP TABLE,,,drop table foo;,not logged
2015-05-15 11:49:25.046 CEST pavel postgres: STATEMENT:  drop table foo;
2015-05-15 11:49:28.291 CEST pavel postgres: LOG:  AUDIT:
SESSION,2,1,DDL,CREATE TABLE,,,CREATE TABLE foo(a int, b int);,not
logged
2015-05-15 11:49:28.291 CEST pavel postgres: STATEMENT:  CREATE TABLE foo(a
int, b int);
2015-05-15 11:49:31.486 CEST pavel postgres: LOG:  AUDIT:
SESSION,3,1,WRITE,INSERT,,,INSERT INTO foo VALUES(10,20);,not logged
2015-05-15 11:49:31.486 CEST pavel postgres: STATEMENT:  INSERT INTO foo
VALUES(10,20);
2015-05-15 11:49:33.446 CEST pavel postgres: LOG:  AUDIT:
SESSION,4,1,READ,SELECT,,,SELECT * FROM foo WHERE a = 10;,not logged
2015-05-15 11:49:33.446 CEST pavel postgres: STATEMENT:  SELECT * FROM foo
WHERE a = 10;

I am missing object name, unexpected string not logged

configuration:
pg_audit.log = 'read, write, ddl'



2015-05-14 21:30 GMT+02:00 Stephen Frost sfr...@snowman.net:

 * Stephen Frost (sfr...@snowman.net) wrote:
  I'll continue to think about it though, perhaps there's a way I can
  disable logging as the superuser without it logging the role involved.

 Of course, it occured to me how to address this immediately after, even
 though it hadn't in the hour or so prior.  I can just bump
 client_min_messages up to warning and then reset the role attributes...

 That appears to be working.  Will push an update to fix this shortly.

 Thanks!

 Stephen



Re: [COMMITTERS] pgsql: Separate block sampling functions

2015-05-15 Thread Andrew Dunstan


On 05/15/2015 06:04 AM, Simon Riggs wrote:
On 15 May 2015 at 04:59, Tom Lane t...@sss.pgh.pa.us 
mailto:t...@sss.pgh.pa.us wrote:


The difference there was that that was specifically adding a new
feature
of value to FDWs.  This is just drive-by breakage.


I think that comment is reasonable. I will continue with my commits of 
tablesample, then return to see if we can improve/revert the API 
breakage.






OK, good, but I'm not going to accept Michael's pull request until the 
API is stable.


cheers

andrew


--
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: Allow GiST distance function to return merely a lower-bound.

2015-05-15 Thread Fujii Masao
On Fri, May 15, 2015 at 8:27 PM, Heikki Linnakangas
heikki.linnakan...@iki.fi wrote:
 Allow GiST distance function to return merely a lower-bound.

 The distance function can now set *recheck = false, like index quals. The
 executor will then re-check the ORDER BY expressions, and use a queue to
 reorder the results on the fly.

 This makes it possible to do kNN-searches on polygons and circles, which
 don't store the exact value in the index, but just a bounding box.

 Alexander Korotkov and me

 Branch
 --
 master

 Details
 ---
 http://git.postgresql.org/pg/commitdiff/35fcb1b3d038a501f3f4c87c05630095abaaadab

 Modified Files
 --
 doc/src/sgml/gist.sgml |   35 ++-
 src/backend/access/gist/gistget.c  |   30 ++-
 src/backend/access/gist/gistproc.c |   37 +++
 src/backend/access/gist/gistscan.c |5 +
 src/backend/executor/nodeIndexscan.c   |  379 +++-
 src/backend/optimizer/plan/createplan.c|   73 --
 src/backend/utils/adt/geo_ops.c|   27 ++
 src/include/access/genam.h |3 +
 src/include/access/relscan.h   |9 +
 src/include/catalog/catversion.h   |2 +-
 src/include/catalog/pg_amop.h  |2 +
 src/include/catalog/pg_amproc.h|2 +
 src/include/catalog/pg_operator.h  |8 +-
 src/include/catalog/pg_proc.h  |4 +
 src/include/nodes/execnodes.h  |   20 ++
 src/include/nodes/plannodes.h  |   10 +-
 src/include/utils/geo_decls.h  |3 +
 src/test/regress/expected/create_index.out |   78 ++
 src/test/regress/sql/create_index.sql  |   12 +
 19 files changed, 699 insertions(+), 40 deletions(-)

Seems this patch causes the regression test of pg_trgm fail.
The regression diff that I got is:

*** /home/postgres/pgsql/head/contrib/pg_trgm/expected/pg_trgm.out
2013-07-23 16:46:22.212488785 +0900
--- /home/postgres/pgsql/head/contrib/pg_trgm/results/pg_trgm.out
2015-05-15 20:59:16.574926732 +0900
***
*** 2332,2343 
  (3 rows)

  select t - 'q0987wertyu0988', t from test_trgm order by t -
'q0987wertyu0988' limit 2;
!  ?column? |  t
! --+-
!  0.411765 | qwertyu0988
!   0.5 | qwertyu0987
! (2 rows)
!
  drop index trgm_idx;
  create index trgm_idx on test_trgm using gin (t gin_trgm_ops);
  set enable_seqscan=off;
--- 2332,2338 
  (3 rows)

  select t - 'q0987wertyu0988', t from test_trgm order by t -
'q0987wertyu0988' limit 2;
! ERROR:  index returned tuples in wrong order
  drop index trgm_idx;
  create index trgm_idx on test_trgm using gin (t gin_trgm_ops);
  set enable_seqscan=off;

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


Re: [COMMITTERS] pgsql: Add pg_audit, an auditing extension

2015-05-15 Thread Pavel Stehule
2015-05-15 12:37 GMT+02:00 Thom Brown t...@linux.com:

 On 15 May 2015 at 11:20, Pavel Stehule pavel.steh...@gmail.com wrote:
 
 
  2015-05-15 12:14 GMT+02:00 Thom Brown t...@linux.com:
 
  On 15 May 2015 at 10:56, Pavel Stehule pavel.steh...@gmail.com wrote:
   Hi
  
   I am testing it, and output is strange
  
   2015-05-15 11:49:25.046 CEST pavel postgres: LOG:  AUDIT:
   SESSION,1,1,DDL,DROP TABLE,,,drop table foo;,not logged
   2015-05-15 11:49:25.046 CEST pavel postgres: STATEMENT:  drop table
 foo;
   2015-05-15 11:49:28.291 CEST pavel postgres: LOG:  AUDIT:
   SESSION,2,1,DDL,CREATE TABLE,,,CREATE TABLE foo(a int, b int);,not
   logged
   2015-05-15 11:49:28.291 CEST pavel postgres: STATEMENT:  CREATE TABLE
   foo(a
   int, b int);
   2015-05-15 11:49:31.486 CEST pavel postgres: LOG:  AUDIT:
   SESSION,3,1,WRITE,INSERT,,,INSERT INTO foo VALUES(10,20);,not
 logged
   2015-05-15 11:49:31.486 CEST pavel postgres: STATEMENT:  INSERT INTO
 foo
   VALUES(10,20);
   2015-05-15 11:49:33.446 CEST pavel postgres: LOG:  AUDIT:
   SESSION,4,1,READ,SELECT,,,SELECT * FROM foo WHERE a = 10;,not logged
   2015-05-15 11:49:33.446 CEST pavel postgres: STATEMENT:  SELECT * FROM
   foo
   WHERE a = 10;
  
   I am missing object name, unexpected string not logged
  
   configuration:
   pg_audit.log = 'read, write, ddl'
 
  From what I can tell, that last value should be for parameters.  You'd
  need to set pg_audit.log_parameter to on, and then prepare and execute
  a statement with a parameter.
 
 
  yes
 
  2015-05-15 12:18:39.545 CEST pavel postgres: LOG:  AUDIT:
  SESSION,1,1,READ,PREPARE,,,prepare x(int) as select * from foo where a =
  $1;,none
  2015-05-15 12:18:39.545 CEST pavel postgres: STATEMENT:  prepare x(int)
 as
  select * from foo where a = $1;
  2015-05-15 12:18:48.065 CEST pavel postgres: LOG:  AUDIT:
  SESSION,2,1,READ,SELECT,,,prepare x(int) as select * from foo where a =
  $1;,10
  2015-05-15 12:18:48.065 CEST pavel postgres: STATEMENT:  execute x(10);
 
  but when pg_audit.log_parameter is off, then this value should be empty

 If it were empty, it would then be indistinguishable from a statement
 executed with a single parameter passed as an empty string.


I am thinking about situation when pg_audit.log_parameter is disabled



 Speaking of which, I notice that nulls show up as nothing too.  How
 does one distinguish between an empty string and a null in the logs?


it can use a COPY notation



 --
 Thom



Re: [COMMITTERS] pgsql: Add pg_audit, an auditing extension

2015-05-15 Thread Thom Brown
On 15 May 2015 at 11:20, Pavel Stehule pavel.steh...@gmail.com wrote:


 2015-05-15 12:14 GMT+02:00 Thom Brown t...@linux.com:

 On 15 May 2015 at 10:56, Pavel Stehule pavel.steh...@gmail.com wrote:
  Hi
 
  I am testing it, and output is strange
 
  2015-05-15 11:49:25.046 CEST pavel postgres: LOG:  AUDIT:
  SESSION,1,1,DDL,DROP TABLE,,,drop table foo;,not logged
  2015-05-15 11:49:25.046 CEST pavel postgres: STATEMENT:  drop table foo;
  2015-05-15 11:49:28.291 CEST pavel postgres: LOG:  AUDIT:
  SESSION,2,1,DDL,CREATE TABLE,,,CREATE TABLE foo(a int, b int);,not
  logged
  2015-05-15 11:49:28.291 CEST pavel postgres: STATEMENT:  CREATE TABLE
  foo(a
  int, b int);
  2015-05-15 11:49:31.486 CEST pavel postgres: LOG:  AUDIT:
  SESSION,3,1,WRITE,INSERT,,,INSERT INTO foo VALUES(10,20);,not logged
  2015-05-15 11:49:31.486 CEST pavel postgres: STATEMENT:  INSERT INTO foo
  VALUES(10,20);
  2015-05-15 11:49:33.446 CEST pavel postgres: LOG:  AUDIT:
  SESSION,4,1,READ,SELECT,,,SELECT * FROM foo WHERE a = 10;,not logged
  2015-05-15 11:49:33.446 CEST pavel postgres: STATEMENT:  SELECT * FROM
  foo
  WHERE a = 10;
 
  I am missing object name, unexpected string not logged
 
  configuration:
  pg_audit.log = 'read, write, ddl'

 From what I can tell, that last value should be for parameters.  You'd
 need to set pg_audit.log_parameter to on, and then prepare and execute
 a statement with a parameter.


 yes

 2015-05-15 12:18:39.545 CEST pavel postgres: LOG:  AUDIT:
 SESSION,1,1,READ,PREPARE,,,prepare x(int) as select * from foo where a =
 $1;,none
 2015-05-15 12:18:39.545 CEST pavel postgres: STATEMENT:  prepare x(int) as
 select * from foo where a = $1;
 2015-05-15 12:18:48.065 CEST pavel postgres: LOG:  AUDIT:
 SESSION,2,1,READ,SELECT,,,prepare x(int) as select * from foo where a =
 $1;,10
 2015-05-15 12:18:48.065 CEST pavel postgres: STATEMENT:  execute x(10);

 but when pg_audit.log_parameter is off, then this value should be empty

If it were empty, it would then be indistinguishable from a statement
executed with a single parameter passed as an empty string.

Speaking of which, I notice that nulls show up as nothing too.  How
does one distinguish between an empty string and a null in the logs?

-- 
Thom


-- 
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: docs: consistently uppercase index method and add spacing

2015-05-15 Thread Bruce Momjian
docs:  consistently uppercase index method and add spacing

Consistently uppercase index method names, e.g. GIN, and add space after
the index method name and the parentheses enclosing the column names.

Branch
--
master

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

Modified Files
--
doc/src/sgml/btree-gin.sgml|2 +-
doc/src/sgml/btree-gist.sgml   |4 ++--
doc/src/sgml/gist.sgml |2 +-
doc/src/sgml/indices.sgml  |2 +-
doc/src/sgml/json.sgml |6 +++---
doc/src/sgml/ltree.sgml|4 ++--
doc/src/sgml/pgtrgm.sgml   |6 +++---
doc/src/sgml/rangetypes.sgml   |6 +++---
doc/src/sgml/ref/create_index.sgml |2 +-
doc/src/sgml/textsearch.sgml   |   12 ++--
10 files changed, 23 insertions(+), 23 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: Silence create_index regression test failure.

2015-05-15 Thread Heikki Linnakangas
Silence create_index regression test failure.

The expected output contained some floating point values which might get
rounded slightly differently on different platforms. The exact output isn't
very interesting in this test, so just round it.

Per buildfarm member rover_firefly.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/9feaba28e27820f91d13c3de6581bb3b8c3234c6

Modified Files
--
src/test/regress/expected/create_index.out |   26 +-
src/test/regress/sql/create_index.sql  |2 +-
2 files changed, 14 insertions(+), 14 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: Add archive_mode='always' option.

2015-05-15 Thread Heikki Linnakangas
Add archive_mode='always' option.

In 'always' mode, the standby independently archives all files it receives
from the primary.

Original patch by Fujii Masao, docs and review by me.

Branch
--
master

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

Modified Files
--
doc/src/sgml/config.sgml  |   13 +++--
doc/src/sgml/high-availability.sgml   |   39 +
src/backend/access/transam/xlog.c |   22 --
src/backend/access/transam/xlogarchive.c  |5 +++-
src/backend/postmaster/postmaster.c   |   37 +--
src/backend/replication/walreceiver.c |   10 +--
src/backend/utils/misc/guc.c  |   21 ++---
src/backend/utils/misc/postgresql.conf.sample |2 +-
src/include/access/xlog.h |   13 +++--
9 files changed, 133 insertions(+), 29 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: Fix datatype confusion with the new lossy GiST distance function

2015-05-15 Thread Heikki Linnakangas
Fix datatype confusion with the new lossy GiST distance functions.

We can only support a lossy distance function when the distance function's
datatype is comparable with the original ordering operator's datatype.
The distance function always returns a float8, so we are limited to float8,
and float4 (by a hard-coded cast of the float8 to float4).

In light of this limitation, it seems like a good idea to have a separate
'recheck' flag for the ORDER BY expressions, so that if you have a non-lossy
distance function, it still works with lossy quals. There are cases like
that with the build-in or contrib opclasses, but it's plausible.

There was a hidden assumption that the ORDER BY values returned by GiST
match the original ordering operator's return type, but there are plenty
of examples where that's not true, e.g. in btree_gist and pg_trgm. As long
as the distance function is not lossy, we can tolerate that and just not
return the distance to the executor (or rather, always return NULL). The
executor doesn't need the distances if there are no lossy results.

There was another little bug: the recheck variable was not initialized
before calling the distance function. That revealed the bigger issue,
as the executor tried to reorder tuples that didn't need reordering, and
that failed because of the datatype mismatch.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/98edd617f3b62a02cb2df9b418fcc4ece45c7ec0

Modified Files
--
doc/src/sgml/gist.sgml   |   13 +---
src/backend/access/gist/gistget.c|   56 ++
src/backend/access/gist/gistscan.c   |   16 ++
src/backend/executor/nodeIndexscan.c |5 +++
src/include/access/gist_private.h|3 ++
src/include/access/relscan.h |1 +
6 files changed, 78 insertions(+), 16 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: contrib/tsm_system_time

2015-05-15 Thread Michael Paquier
On Sat, May 16, 2015 at 5:28 AM, Robert Haas robertmh...@gmail.com wrote:
 On Fri, May 15, 2015 at 3:32 PM, Simon Riggs si...@2ndquadrant.com wrote:
 contrib/tsm_system_time

 I don't want to be overly critical here, but I find that a pretty
 worthless commit message.

And there is no documentation.
-- 
Michael


-- 
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: Update time zone data files to tzdata release 2015d.

2015-05-15 Thread Tom Lane
Update time zone data files to tzdata release 2015d.

DST law changes in Egypt, Mongolia, Palestine.
Historical corrections for Canada and Chile.
Revised zone abbreviation for America/Adak (HST/HDT not HAST/HADT).

Branch
--
REL9_1_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/436f3560925620b623d4ea6cdd8f7b38a117b643

Modified Files
--
src/timezone/data/africa |   67 +
src/timezone/data/antarctica |   51 +-
src/timezone/data/asia   |   35 +--
src/timezone/data/australasia|   27 +-
src/timezone/data/backward   |1 +
src/timezone/data/backzone   |   76 +++
src/timezone/data/europe |4 +-
src/timezone/data/northamerica   |  198 ++
src/timezone/data/southamerica   |  170 ++--
src/timezone/known_abbrevs.txt   |8 +-
src/timezone/tznames/America.txt |6 +-
src/timezone/tznames/Asia.txt|9 +-
src/timezone/tznames/Default |5 +-
src/timezone/tznames/Pacific.txt |2 +-
14 files changed, 389 insertions(+), 270 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: Update time zone data files to tzdata release 2015d.

2015-05-15 Thread Tom Lane
Update time zone data files to tzdata release 2015d.

DST law changes in Egypt, Mongolia, Palestine.
Historical corrections for Canada and Chile.
Revised zone abbreviation for America/Adak (HST/HDT not HAST/HADT).

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/9d366c1f3d758c3b80cd482a6d4528960c4fc325

Modified Files
--
src/timezone/data/africa |   67 +
src/timezone/data/antarctica |   51 +-
src/timezone/data/asia   |   35 +--
src/timezone/data/australasia|   27 +-
src/timezone/data/backward   |1 +
src/timezone/data/backzone   |   76 +++
src/timezone/data/europe |4 +-
src/timezone/data/northamerica   |  198 ++
src/timezone/data/southamerica   |  170 ++--
src/timezone/known_abbrevs.txt   |8 +-
src/timezone/tznames/America.txt |6 +-
src/timezone/tznames/Asia.txt|9 +-
src/timezone/tznames/Default |5 +-
src/timezone/tznames/Pacific.txt |2 +-
14 files changed, 389 insertions(+), 270 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: Update time zone data files to tzdata release 2015d.

2015-05-15 Thread Tom Lane
Update time zone data files to tzdata release 2015d.

DST law changes in Egypt, Mongolia, Palestine.
Historical corrections for Canada and Chile.
Revised zone abbreviation for America/Adak (HST/HDT not HAST/HADT).

Branch
--
REL9_0_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/3c3749a3bf79dce21384a04981c34a6c8ec1780a

Modified Files
--
src/timezone/data/africa |   67 +
src/timezone/data/antarctica |   51 +-
src/timezone/data/asia   |   35 +--
src/timezone/data/australasia|   27 +-
src/timezone/data/backward   |1 +
src/timezone/data/backzone   |   76 +++
src/timezone/data/europe |4 +-
src/timezone/data/northamerica   |  198 ++
src/timezone/data/southamerica   |  170 ++--
src/timezone/known_abbrevs.txt   |8 +-
src/timezone/tznames/America.txt |6 +-
src/timezone/tznames/Asia.txt|9 +-
src/timezone/tznames/Default |5 +-
src/timezone/tznames/Pacific.txt |2 +-
14 files changed, 389 insertions(+), 270 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: Update time zone data files to tzdata release 2015d.

2015-05-15 Thread Tom Lane
Update time zone data files to tzdata release 2015d.

DST law changes in Egypt, Mongolia, Palestine.
Historical corrections for Canada and Chile.
Revised zone abbreviation for America/Adak (HST/HDT not HAST/HADT).

Branch
--
REL9_3_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/4fd69e41247a6052f1ebb44a2c6fafacbb4a8898

Modified Files
--
src/timezone/data/africa |   67 +
src/timezone/data/antarctica |   51 +-
src/timezone/data/asia   |   35 +--
src/timezone/data/australasia|   27 +-
src/timezone/data/backward   |1 +
src/timezone/data/backzone   |   76 +++
src/timezone/data/europe |4 +-
src/timezone/data/northamerica   |  198 ++
src/timezone/data/southamerica   |  170 ++--
src/timezone/known_abbrevs.txt   |8 +-
src/timezone/tznames/America.txt |6 +-
src/timezone/tznames/Asia.txt|9 +-
src/timezone/tznames/Default |5 +-
src/timezone/tznames/Pacific.txt |2 +-
14 files changed, 389 insertions(+), 270 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: Update time zone data files to tzdata release 2015d.

2015-05-15 Thread Tom Lane
Update time zone data files to tzdata release 2015d.

DST law changes in Egypt, Mongolia, Palestine.
Historical corrections for Canada and Chile.
Revised zone abbreviation for America/Adak (HST/HDT not HAST/HADT).

Branch
--
REL9_4_STABLE

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

Modified Files
--
src/timezone/data/africa |   67 +
src/timezone/data/antarctica |   51 +-
src/timezone/data/asia   |   35 +--
src/timezone/data/australasia|   27 +-
src/timezone/data/backward   |1 +
src/timezone/data/backzone   |   76 +++
src/timezone/data/europe |4 +-
src/timezone/data/northamerica   |  198 ++
src/timezone/data/southamerica   |  170 ++--
src/timezone/known_abbrevs.txt   |8 +-
src/timezone/tznames/America.txt |6 +-
src/timezone/tznames/Asia.txt|9 +-
src/timezone/tznames/Default |5 +-
src/timezone/tznames/Pacific.txt |2 +-
14 files changed, 389 insertions(+), 270 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: Update time zone data files to tzdata release 2015d.

2015-05-15 Thread Tom Lane
Update time zone data files to tzdata release 2015d.

DST law changes in Egypt, Mongolia, Palestine.
Historical corrections for Canada and Chile.
Revised zone abbreviation for America/Adak (HST/HDT not HAST/HADT).

Branch
--
REL9_2_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/2a63434f07804fd7ba07799e1edecddc34807e71

Modified Files
--
src/timezone/data/africa |   67 +
src/timezone/data/antarctica |   51 +-
src/timezone/data/asia   |   35 +--
src/timezone/data/australasia|   27 +-
src/timezone/data/backward   |1 +
src/timezone/data/backzone   |   76 +++
src/timezone/data/europe |4 +-
src/timezone/data/northamerica   |  198 ++
src/timezone/data/southamerica   |  170 ++--
src/timezone/known_abbrevs.txt   |8 +-
src/timezone/tznames/America.txt |6 +-
src/timezone/tznames/Asia.txt|9 +-
src/timezone/tznames/Default |5 +-
src/timezone/tznames/Pacific.txt |2 +-
14 files changed, 389 insertions(+), 270 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: Fix insufficiently-paranoid GB18030 encoding verifier.

2015-05-15 Thread Tom Lane
Fix insufficiently-paranoid GB18030 encoding verifier.

The previous coding effectively only verified that the second byte of a
multibyte character was in the expected range; moreover, it wasn't careful
to make sure that the second byte even exists in the buffer before touching
it.  The latter seems unlikely to cause any real problems in the field
(in particular, it could never be a problem with null-terminated input),
but it's still a bug.

Since GB18030 is not a supported backend encoding, the only thing we'd
really be doing with GB18030 text is converting it to UTF8 in LocalToUtf,
which would fail anyway on any invalid character for lack of a match in
its lookup table.  So the only user-visible consequence of this change
should be that you'll get invalid byte sequence for encoding rather than
character has no equivalent for malformed GB18030 input.  However,
impending changes to the GB18030 conversion code will require these tighter
up-front checks to avoid producing bogus results.

Branch
--
master

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

Modified Files
--
src/backend/utils/mb/wchar.c |   52 +++---
1 file changed, 29 insertions(+), 23 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: Make repeated 'make installcheck' runs work

2015-05-15 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote:
 Stephen Frost sfr...@snowman.net writes:
  Make repeated 'make installcheck' runs work
 
 Much better, thanks.
 
 BTW, isn't the pg_audit.conf file useless now?

Removed.

Thanks!

Stephen


signature.asc
Description: Digital signature


[COMMITTERS] pgsql: Remove useless pg_audit.conf

2015-05-15 Thread Stephen Frost
Remove useless pg_audit.conf

No need to have pg_audit.conf any longer since the regression tests are
just loading the module at the start of each session (to simulate being
in shared_preload_libraries, which isn't something we can actually make
happen on the buildfarm itself, it seems).

Pointed out by Tom

Branch
--
master

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

Modified Files
--
contrib/pg_audit/pg_audit.conf |1 -
1 file changed, 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: pg_upgrade: force timeline 1 in the new cluster

2015-05-15 Thread Bruce Momjian
pg_upgrade:  force timeline 1 in the new cluster

Previously, this prevented promoted standby servers from being upgraded
because of a missing WAL history file.  (Timeline 1 doesn't need a
history file, and we don't copy WAL files anyway.)

Report by Christian Echerer(?), Alexey Klyukin

Backpatch through 9.0

Branch
--
REL9_1_STABLE

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

Modified Files
--
contrib/pg_upgrade/pg_upgrade.c |4 ++--
1 file changed, 2 insertions(+), 2 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: pg_upgrade: force timeline 1 in the new cluster

2015-05-15 Thread Bruce Momjian
pg_upgrade:  force timeline 1 in the new cluster

Previously, this prevented promoted standby servers from being upgraded
because of a missing WAL history file.  (Timeline 1 doesn't need a
history file, and we don't copy WAL files anyway.)

Report by Christian Echerer(?), Alexey Klyukin

Backpatch through 9.0

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/4c5e060049a3714dd27b7f4732fe922090edea69

Modified Files
--
src/bin/pg_upgrade/pg_upgrade.c |5 +++--
1 file changed, 3 insertions(+), 2 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: pg_upgrade: force timeline 1 in the new cluster

2015-05-15 Thread Bruce Momjian
pg_upgrade:  force timeline 1 in the new cluster

Previously, this prevented promoted standby servers from being upgraded
because of a missing WAL history file.  (Timeline 1 doesn't need a
history file, and we don't copy WAL files anyway.)

Report by Christian Echerer(?), Alexey Klyukin

Backpatch through 9.0

Branch
--
REL9_0_STABLE

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

Modified Files
--
contrib/pg_upgrade/pg_upgrade.c |4 ++--
1 file changed, 2 insertions(+), 2 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: pg_upgrade: force timeline 1 in the new cluster

2015-05-15 Thread Bruce Momjian
pg_upgrade:  force timeline 1 in the new cluster

Previously, this prevented promoted standby servers from being upgraded
because of a missing WAL history file.  (Timeline 1 doesn't need a
history file, and we don't copy WAL files anyway.)

Report by Christian Echerer(?), Alexey Klyukin

Backpatch through 9.0

Branch
--
REL9_3_STABLE

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

Modified Files
--
contrib/pg_upgrade/pg_upgrade.c |5 +++--
1 file changed, 3 insertions(+), 2 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: contrib/tsm_system_time

2015-05-15 Thread Andres Freund
On 2015-05-16 09:01:18 +0900, Michael Paquier wrote:
 And there is no documentation.

Which seems to be caused by files accidentally not committed. Thus
breaking doc builds. I'll comment out the reference to allow the
buildfarm to turn a littlebit greener for a while and test for breakage
in other commits. But that obviously needs to be fixed properly.


-- 
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: Add docs for tablesample system_rows()

2015-05-15 Thread Simon Riggs
Add docs for tablesample system_rows()

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/6e4415c6aa428132dd41c8bf23a0885fca0f2271

Modified Files
--
doc/src/sgml/tsm-system-rows.sgml |   50 +
1 file changed, 50 insertions(+)


-- 
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: contrib/tsm_system_time

2015-05-15 Thread Simon Riggs
On 16 May 2015 at 02:45, Andres Freund and...@anarazel.de wrote:

 On 2015-05-16 09:01:18 +0900, Michael Paquier wrote:
  And there is no documentation.

 Which seems to be caused by files accidentally not committed. Thus
 breaking doc builds. I'll comment out the reference to allow the
 buildfarm to turn a littlebit greener for a while and test for breakage
 in other commits. But that obviously needs to be fixed properly.


After some much needed sleep, fixed.

-- 
Simon Riggshttp://www.2ndQuadrant.com/
http://www.2ndquadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training  Services


[COMMITTERS] pgsql: pg_upgrade: only allow template0 to be non-connectable

2015-05-15 Thread Bruce Momjian
pg_upgrade:  only allow template0 to be non-connectable

This patch causes pg_upgrade to error out during its check phase if:

(1) template0 is marked connectable
or
(2) any other database is marked non-connectable

This is done because, in the first case, pg_upgrade would fail because
the pg_dumpall --globals restore would fail, and in the second case, the
database would not be restored, leading to data loss.

Report by Matt Landry (1), Stephen Frost (2)

Backpatch through 9.0

Branch
--
master

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

Modified Files
--
src/bin/pg_upgrade/check.c |   54 
1 file changed, 54 insertions(+)


-- 
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: pg_upgrade: only allow template0 to be non-connectable

2015-05-15 Thread Bruce Momjian
pg_upgrade:  only allow template0 to be non-connectable

This patch causes pg_upgrade to error out during its check phase if:

(1) template0 is marked connectable
or
(2) any other database is marked non-connectable

This is done because, in the first case, pg_upgrade would fail because
the pg_dumpall --globals restore would fail, and in the second case, the
database would not be restored, leading to data loss.

Report by Matt Landry (1), Stephen Frost (2)

Backpatch through 9.0

Branch
--
REL9_1_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/321db71239cb45ed2f2d3113ff5745757a64581a

Modified Files
--
contrib/pg_upgrade/check.c |   54 
1 file changed, 54 insertions(+)


-- 
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: pg_upgrade: only allow template0 to be non-connectable

2015-05-15 Thread Bruce Momjian
pg_upgrade:  only allow template0 to be non-connectable

This patch causes pg_upgrade to error out during its check phase if:

(1) template0 is marked connectable
or
(2) any other database is marked non-connectable

This is done because, in the first case, pg_upgrade would fail because
the pg_dumpall --globals restore would fail, and in the second case, the
database would not be restored, leading to data loss.

Report by Matt Landry (1), Stephen Frost (2)

Backpatch through 9.0

Branch
--
REL9_3_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/4cfba536981e7584bd051de3e1bcbe7e36a9605b

Modified Files
--
contrib/pg_upgrade/check.c |   54 
1 file changed, 54 insertions(+)


-- 
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: pg_upgrade: only allow template0 to be non-connectable

2015-05-15 Thread Bruce Momjian
pg_upgrade:  only allow template0 to be non-connectable

This patch causes pg_upgrade to error out during its check phase if:

(1) template0 is marked connectable
or
(2) any other database is marked non-connectable

This is done because, in the first case, pg_upgrade would fail because
the pg_dumpall --globals restore would fail, and in the second case, the
database would not be restored, leading to data loss.

Report by Matt Landry (1), Stephen Frost (2)

Backpatch through 9.0

Branch
--
REL9_0_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/2194aa92b7a65561c109875d8b904198c3cd0743

Modified Files
--
contrib/pg_upgrade/check.c |   54 
1 file changed, 54 insertions(+)


-- 
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: Add docs for tablesample system_time()

2015-05-15 Thread Simon Riggs
Add docs for tablesample system_time()

Branch
--
master

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

Modified Files
--
doc/src/sgml/tsm-system-time.sgml |   51 +
1 file changed, 51 insertions(+)


-- 
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: pg_upgrade: only allow template0 to be non-connectable

2015-05-15 Thread Bruce Momjian
pg_upgrade:  only allow template0 to be non-connectable

This patch causes pg_upgrade to error out during its check phase if:

(1) template0 is marked connectable
or
(2) any other database is marked non-connectable

This is done because, in the first case, pg_upgrade would fail because
the pg_dumpall --globals restore would fail, and in the second case, the
database would not be restored, leading to data loss.

Report by Matt Landry (1), Stephen Frost (2)

Backpatch through 9.0

Branch
--
REL9_2_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/2a55e713431abf688e656144a4babc6ee5563ffb

Modified Files
--
contrib/pg_upgrade/check.c |   54 
1 file changed, 54 insertions(+)


-- 
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: pg_upgrade: only allow template0 to be non-connectable

2015-05-15 Thread Bruce Momjian
pg_upgrade:  only allow template0 to be non-connectable

This patch causes pg_upgrade to error out during its check phase if:

(1) template0 is marked connectable
or
(2) any other database is marked non-connectable

This is done because, in the first case, pg_upgrade would fail because
the pg_dumpall --globals restore would fail, and in the second case, the
database would not be restored, leading to data loss.

Report by Matt Landry (1), Stephen Frost (2)

Backpatch through 9.0

Branch
--
REL9_4_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/31f5d3f3544f76892febccb4c2840ada9e765597

Modified Files
--
contrib/pg_upgrade/check.c |   54 
1 file changed, 54 insertions(+)


-- 
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: pg_upgrade: force timeline 1 in the new cluster

2015-05-15 Thread Bruce Momjian
pg_upgrade:  force timeline 1 in the new cluster

Previously, this prevented promoted standby servers from being upgraded
because of a missing WAL history file.  (Timeline 1 doesn't need a
history file, and we don't copy WAL files anyway.)

Report by Christian Echerer(?), Alexey Klyukin

Backpatch through 9.0

Branch
--
REL9_2_STABLE

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

Modified Files
--
contrib/pg_upgrade/pg_upgrade.c |3 +--
1 file changed, 1 insertion(+), 2 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: pg_upgrade: force timeline 1 in the new cluster

2015-05-15 Thread Bruce Momjian
pg_upgrade:  force timeline 1 in the new cluster

Previously, this prevented promoted standby servers from being upgraded
because of a missing WAL history file.  (Timeline 1 doesn't need a
history file, and we don't copy WAL files anyway.)

Report by Christian Echerer(?), Alexey Klyukin

Backpatch through 9.0

Branch
--
REL9_4_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/387a3e46cfdddad2e07f0d1a47d8fcdba89351cd

Modified Files
--
contrib/pg_upgrade/pg_upgrade.c |5 +++--
1 file changed, 3 insertions(+), 2 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: Support GROUPING SETS, CUBE and ROLLUP.

2015-05-15 Thread Andres Freund
Support GROUPING SETS, CUBE and ROLLUP.

This SQL standard functionality allows to aggregate data by different
GROUP BY clauses at once. Each grouping set returns rows with columns
grouped by in other sets set to NULL.

This could previously be achieved by doing each grouping as a separate
query, conjoined by UNION ALLs. Besides being considerably more concise,
grouping sets will in many cases be faster, requiring only one scan over
the underlying data.

The current implementation of grouping sets only supports using sorting
for input. Individual sets that share a sort order are computed in one
pass. If there are sets that don't share a sort order, additional sort 
aggregation steps are performed. These additional passes are sourced by
the previous sort step; thus avoiding repeated scans of the source data.

The code is structured in a way that adding support for purely using
hash aggregation or a mix of hashing and sorting is possible. Sorting
was chosen to be supported first, as it is the most generic method of
implementation.

Instead of, as in an earlier versions of the patch, representing the
chain of sort and aggregation steps as full blown planner and executor
nodes, all but the first sort are performed inside the aggregation node
itself. This avoids the need to do some unusual gymnastics to handle
having to return aggregated and non-aggregated tuples from underlying
nodes, as well as having to shut down underlying nodes early to limit
memory usage.  The optimizer still builds Sort/Agg node to describe each
phase, but they're not part of the plan tree, but instead additional
data for the aggregation node. They're a convenient and preexisting way
to describe aggregation and sorting.  The first (and possibly only) sort
step is still performed as a separate execution step. That retains
similarity with existing group by plans, makes rescans fairly simple,
avoids very deep plans (leading to slow explains) and easily allows to
avoid the sorting step if the underlying data is sorted by other means.

A somewhat ugly side of this patch is having to deal with a grammar
ambiguity between the new CUBE keyword and the cube extension/functions
named cube (and rollup). To avoid breaking existing deployments of the
cube extension it has not been renamed, neither has cube been made a
reserved keyword. Instead precedence hacking is used to make GROUP BY
cube(..) refer to the CUBE grouping sets feature, and not the function
cube(). To actually group by a function cube(), unlikely as that might
be, the function name has to be quoted.

Needs a catversion bump because stored rules may change.

Author: Andrew Gierth and Atri Sharma, with contributions from Andres Freund
Reviewed-By: Andres Freund, Noah Misch, Tom Lane, Svenne Krap, Tomas
Vondra, Erik Rijkers, Marti Raudsepp, Pavel Stehule
Discussion: caoezvidmvre2ju6amk_5qkxnb7dfmprozm7ur8jpw5j8y5x...@mail.gmail.com

Branch
--
master

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

Modified Files
--
contrib/pg_stat_statements/pg_stat_statements.c |   21 +
doc/src/sgml/func.sgml  |   70 +-
doc/src/sgml/queries.sgml   |  175 +++
doc/src/sgml/ref/select.sgml|   33 +-
src/backend/catalog/sql_features.txt|6 +-
src/backend/commands/explain.c  |  160 ++-
src/backend/executor/execQual.c |   63 ++
src/backend/executor/execUtils.c|5 +-
src/backend/executor/nodeAgg.c  | 1315 +--
src/backend/lib/Makefile|3 +-
src/backend/lib/bipartite_match.c   |  161 +++
src/backend/nodes/copyfuncs.c   |   38 +
src/backend/nodes/equalfuncs.c  |   32 +
src/backend/nodes/list.c|   26 +
src/backend/nodes/makefuncs.c   |   15 +
src/backend/nodes/nodeFuncs.c   |   51 +
src/backend/nodes/outfuncs.c|   32 +
src/backend/nodes/readfuncs.c   |   37 +
src/backend/optimizer/path/allpaths.c   |3 +-
src/backend/optimizer/path/indxpath.c   |3 +-
src/backend/optimizer/plan/analyzejoins.c   |   28 +-
src/backend/optimizer/plan/createplan.c |7 +-
src/backend/optimizer/plan/planagg.c|2 +-
src/backend/optimizer/plan/planner.c|  829 --
src/backend/optimizer/plan/setrefs.c|   30 +-
src/backend/optimizer/plan/subselect.c  |   57 +-
src/backend/optimizer/prep/prepjointree.c   |1 +
src/backend/optimizer/prep/prepunion.c  |7 +-
src/backend/optimizer/util/clauses.c|1 +
src/backend/optimizer/util/pathnode.c   |3 +-
src/backend/optimizer/util/tlist.c  |   22 +
src/backend/optimizer/util/var.c|   24 +
src/backend/parser/analyze.c|5 +-

[COMMITTERS] pgsql: Avoid direct use of INFINITY.

2015-05-15 Thread Tom Lane
Avoid direct use of INFINITY.

It's not very portable.  Per buildfarm.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/12cc299c65ba6124c7d459f2605404ad43909db3

Modified Files
--
src/backend/lib/bipartite_match.c |9 +
1 file changed, 5 insertions(+), 4 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: Add pg_audit, an auditing extension

2015-05-15 Thread Michael Paquier
On Sat, May 16, 2015 at 4:44 AM, Stephen Frost sfr...@snowman.net wrote:
 Fujii,

 * Fujii Masao (masao.fu...@gmail.com) wrote:
 pg_audit uses 1.0.0 as its version number. But, is the third digit really
 required? Why? We usually uses the version number with two digits in
 contrib modules.

 I have to admit, I didn't look closely at how we handled versions in
 contrib modules and that has been the same since the patch was first
 posted, as I recall.  No problem changing it to 1.0 and I'll take care
 of that soon.

 CREATE EXTENSION pg_audit failed with the following error message
 when shared_preload_libraries and pg_audit.log are set to pg_audit and
 ddl, respectively.

 =# create extension pg_audit ;
 ERROR:  pg_event_trigger_ddl_commands() can only be called in an event
 trigger function
 CONTEXT:  SQL statement SELECT UPPER(object_type), object_identity
   FROM pg_event_trigger_ddl_commands()

 Interesting.  I'm very curious about this error and if it impacts other
 extensions which use event triggers.  I'll look into it.

 In Makefile, PGFILEDESC should be added.

 +# pg_audit/Makefile

 should be # contrib/pg_audit/Makefile for the consistency.

 Good points, will address.

And on top of that the following things should be changed:
- Removal of REGRESS_OPTS which is empty
- Removal of MODULE, which overlaps with MODULE_big
- $(WIN32RES) needs to be added to OBJS for Windows versioning
Please find in the patch attached the fixes needed.
-- 
Michael
diff --git a/contrib/pg_audit/Makefile b/contrib/pg_audit/Makefile
index bd6897e..76c2cd1 100644
--- a/contrib/pg_audit/Makefile
+++ b/contrib/pg_audit/Makefile
@@ -1,13 +1,13 @@
-# pg_audit/Makefile
+# contrib/pg_audit/Makefile
 
-MODULE = pg_audit
 MODULE_big = pg_audit
-OBJS = pg_audit.o
+OBJS = pg_audit.o $(WIN32RES)
 
 EXTENSION = pg_audit
-REGRESS = pg_audit
-REGRESS_OPTS =
 DATA = pg_audit--1.0.0.sql
+PGFILEDESC = pg_audit - facility for object audit logging
+
+REGRESS = pg_audit
 
 ifdef USE_PGXS
 PG_CONFIG = pg_config

-- 
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: contrib/tsm_system_rows

2015-05-15 Thread Simon Riggs
contrib/tsm_system_rows

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/4d40494b11883f154e40f3996ad414fb0933bc12

Modified Files
--
contrib/tsm_system_rows/.gitignore |4 +
contrib/tsm_system_rows/Makefile   |   21 ++
.../tsm_system_rows/expected/tsm_system_rows.out   |   31 +++
contrib/tsm_system_rows/sql/tsm_system_rows.sql|   14 +
contrib/tsm_system_rows/tsm_system_rows--1.0.sql   |   45 
contrib/tsm_system_rows/tsm_system_rows.c  |  270 
contrib/tsm_system_rows/tsm_system_rows.control|5 +
7 files changed, 390 insertions(+)


-- 
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: TABLESAMPLE system_time(limit)

2015-05-15 Thread Thom Brown
On 15 May 2015 at 20:20, Simon Riggs si...@2ndquadrant.com wrote:
 TABLESAMPLE system_time(limit)

 Contrib module implementing a tablesample method
 that allows you to limit the sample by a hard time
 limit.

tsm-system-time.sgml (and tsm-system-rows.sgml in the previous commit)
appear to be missing.

-- 
Thom


-- 
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: contrib/tsm_system_time

2015-05-15 Thread Simon Riggs
contrib/tsm_system_time

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/56e121a508a1745c6b0c66ad2f237e9b5f03b19d

Modified Files
--
contrib/tsm_system_time/.gitignore |4 +
contrib/tsm_system_time/Makefile   |   21 ++
.../tsm_system_time/expected/tsm_system_time.out   |   54 
contrib/tsm_system_time/sql/tsm_system_time.sql|   14 +
contrib/tsm_system_time/tsm_system_time--1.0.sql   |   40 +++
contrib/tsm_system_time/tsm_system_time.c  |  315 
contrib/tsm_system_time/tsm_system_time.control|5 +
7 files changed, 453 insertions(+)


-- 
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: Add to contrib/Makefile

2015-05-15 Thread Simon Riggs
Add to contrib/Makefile

Branch
--
master

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

Modified Files
--
contrib/Makefile |2 ++
1 file changed, 2 insertions(+)


-- 
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: Tablesample method API docs

2015-05-15 Thread Simon Riggs
Tablesample method API docs

Petr Jelinek

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/910baf0a96a43a629c3d469b97f31e1f5103ff9e

Modified Files
--
doc/src/sgml/filelist.sgml   |1 +
doc/src/sgml/postgres.sgml   |1 +
doc/src/sgml/tablesample-method.sgml |  139 ++
3 files changed, 141 insertions(+)


-- 
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: Add pg_audit, an auditing extension

2015-05-15 Thread Stephen Frost
Fujii,

* Fujii Masao (masao.fu...@gmail.com) wrote:
 pg_audit uses 1.0.0 as its version number. But, is the third digit really
 required? Why? We usually uses the version number with two digits in
 contrib modules.

I have to admit, I didn't look closely at how we handled versions in
contrib modules and that has been the same since the patch was first
posted, as I recall.  No problem changing it to 1.0 and I'll take care
of that soon.

 CREATE EXTENSION pg_audit failed with the following error message
 when shared_preload_libraries and pg_audit.log are set to pg_audit and
 ddl, respectively.
 
 =# create extension pg_audit ;
 ERROR:  pg_event_trigger_ddl_commands() can only be called in an event
 trigger function
 CONTEXT:  SQL statement SELECT UPPER(object_type), object_identity
   FROM pg_event_trigger_ddl_commands()

Interesting.  I'm very curious about this error and if it impacts other
extensions which use event triggers.  I'll look into it.

 In Makefile, PGFILEDESC should be added.
 
 +# pg_audit/Makefile
 
 should be # contrib/pg_audit/Makefile for the consistency.

Good points, will address.

 The categories of some SQL commands are different between log_statement and
 pg_audit. For example, REINDEX is treated as DDL in pg_audit, but not in
 log_statement. That's confusing. We should use the same category-mapping
 rule as much as possible.

David, Simon and I have all considered this at different times and my
recollection is that we all felt that it made sense as DDL because
CLUSTER is DDL (which is actually noted in the comments).  However, you
bring up a good point that classifying it as DDL makes it different from
what the core system does and it'd probably be good to be consistent.

The question here really is- is that the right classification for
REINDEX to have in core?  If so, shouldn't CLUSTER have the same?
Probably a discussion to have on -hackers rather than here.  I'll go
ahead and change it to match what core does.  Then, if core changes to
make it DDL, pg_audit will automatically pick that up and also treat it
as DDL.

Thanks!

Stephen


signature.asc
Description: Digital signature


[COMMITTERS] pgsql: Fix uninitialized variable.

2015-05-15 Thread Tom Lane
Fix uninitialized variable.

Per compiler warnings.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/66493dd7aa02e19e93f7d5687acaab70075db34f

Modified Files
--
src/backend/commands/explain.c |1 +
1 file changed, 1 insertion(+)


-- 
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: SQLStandard feature T613 Sampling now Supported

2015-05-15 Thread Simon Riggs
SQLStandard feature T613 Sampling now Supported

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/1e98fa0bf8de9d25d97fb346755a9c9c17bba549

Modified Files
--
src/backend/catalog/sql_features.txt |2 +-
1 file changed, 1 insertion(+), 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: Fix docs build. Oops.

2015-05-15 Thread Heikki Linnakangas
Fix docs build. Oops.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/8b0f105d2d179dc1085b16f0594c8fa78d13267d

Modified Files
--
doc/src/sgml/high-availability.sgml |2 +-
1 file changed, 1 insertion(+), 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: Silence another create_index regression test failure.

2015-05-15 Thread Heikki Linnakangas
Silence another create_index regression test failure.

More platform differences in the less-significant digits in output.

Per buildfarm member rover_firefly, still.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/11a83bbedd73800db70f6f2af5a8eb10d15d39d7

Modified Files
--
src/test/regress/expected/create_index.out |   28 ++--
src/test/regress/sql/create_index.sql  |4 ++--
2 files changed, 16 insertions(+), 16 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: Silence create_index regression test failure.

2015-05-15 Thread Heikki Linnakangas

On 05/15/2015 08:07 PM, Tom Lane wrote:

Heikki Linnakangas heikki.linnakan...@iki.fi writes:

Silence create_index regression test failure.
The expected output contained some floating point values which might get
rounded slightly differently on different platforms. The exact output isn't
very interesting in this test, so just round it.


rover_firefly was unhappy about two test cases, you only got one of them.


D'oh. Fixed, thanks.

- Heikki



--
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: Add archive_mode='always' option.

2015-05-15 Thread Stefan Kaltenbrunner
On 05/15/2015 05:55 PM, Heikki Linnakangas wrote:
 Add archive_mode='always' option.
 
 In 'always' mode, the standby independently archives all files it receives
 from the primary.
 
 Original patch by Fujii Masao, docs and review by me.
 
 Branch
 --
 master
 
 Details
 ---
 http://git.postgresql.org/pg/commitdiff/ffd37740ee6fcd434416ec0c5461f7040e0a11de
 
 Modified Files
 --
 doc/src/sgml/config.sgml  |   13 +++--
 doc/src/sgml/high-availability.sgml   |   39 +
 src/backend/access/transam/xlog.c |   22 --
 src/backend/access/transam/xlogarchive.c  |5 +++-
 src/backend/postmaster/postmaster.c   |   37 +--
 src/backend/replication/walreceiver.c |   10 +--
 src/backend/utils/misc/guc.c  |   21 ++---
 src/backend/utils/misc/postgresql.conf.sample |2 +-
 src/include/access/xlog.h |   13 +++--
 9 files changed, 133 insertions(+), 29 deletions(-)



this broke the docs build:


http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=guaibasaurusdt=2015-05-15%2016%3A17%3A01



Stefan


-- 
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: Silence create_index regression test failure.

2015-05-15 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@iki.fi writes:
 Silence create_index regression test failure.
 The expected output contained some floating point values which might get
 rounded slightly differently on different platforms. The exact output isn't
 very interesting in this test, so just round it.

rover_firefly was unhappy about two test cases, you only got one of them.

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: contrib/tsm_system_time

2015-05-15 Thread Robert Haas
On Fri, May 15, 2015 at 3:32 PM, Simon Riggs si...@2ndquadrant.com wrote:
 contrib/tsm_system_time

I don't want to be overly critical here, but I find that a pretty
worthless commit message.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
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: Add pg_audit, an auditing extension

2015-05-15 Thread Alvaro Herrera
Stephen Frost wrote:

 * Fujii Masao (masao.fu...@gmail.com) wrote:

  CREATE EXTENSION pg_audit failed with the following error message
  when shared_preload_libraries and pg_audit.log are set to pg_audit and
  ddl, respectively.
  
  =# create extension pg_audit ;
  ERROR:  pg_event_trigger_ddl_commands() can only be called in an event
  trigger function
  CONTEXT:  SQL statement SELECT UPPER(object_type), object_identity
FROM pg_event_trigger_ddl_commands()
 
 Interesting.  I'm very curious about this error and if it impacts other
 extensions which use event triggers.  I'll look into it.

Can you explain what's going on here?  It seems a bit odd to me.

  The categories of some SQL commands are different between log_statement and
  pg_audit. For example, REINDEX is treated as DDL in pg_audit, but not in
  log_statement. That's confusing. We should use the same category-mapping
  rule as much as possible.
 
 David, Simon and I have all considered this at different times and my
 recollection is that we all felt that it made sense as DDL because
 CLUSTER is DDL (which is actually noted in the comments).  However, you
 bring up a good point that classifying it as DDL makes it different from
 what the core system does and it'd probably be good to be consistent.
 
 The question here really is- is that the right classification for
 REINDEX to have in core?  If so, shouldn't CLUSTER have the same?

Thiking a bit about this, it seems that REINDEX and CLUSTER are not
really DDL.  They are more maintenance commands; they don't define
anything that wasn't defined before.

-- 
Álvaro Herrerahttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training  Services


-- 
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: Move strategy numbers to include/access/stratnum.h

2015-05-15 Thread Alvaro Herrera
Move strategy numbers to include/access/stratnum.h

For upcoming BRIN opclasses, it's convenient to have strategy numbers
defined in a single place.  Since there's nothing appropriate, create
it.  The StrategyNumber typedef now lives there, as well as existing
strategy numbers for B-trees (from skey.h) and R-tree-and-friends (from
gist.h).  skey.h is forced to include stratnum.h because of the
StrategyNumber typedef, but gist.h is not; extensions that currently
rely on gist.h for rtree strategy numbers might need to add a new

A few .c files can stop including skey.h and/or gist.h, which is a nice
side benefit.

Per discussion:
https://www.postgresql.org/message-id/20150514232132.gz2...@alvh.no-ip.org

Authored by Emre Hasegeli and Álvaro.

(It's not clear to me why bootscanner.l has any #include lines at all.)

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/26df7066cc229887d4defdf1d105c0a22b8a88fb

Modified Files
--
contrib/btree_gin/btree_gin.c   |2 +-
contrib/cube/cube.c |2 +-
contrib/hstore/hstore_gin.c |2 +-
contrib/hstore/hstore_gist.c|2 +-
contrib/intarray/_int_gin.c |3 +-
contrib/intarray/_int_gist.c|2 +-
contrib/intarray/_intbig_gist.c |2 +-
contrib/ltree/_ltree_gist.c |2 +-
contrib/ltree/ltree_gist.c  |2 +-
contrib/pg_trgm/trgm_gin.c  |3 +-
contrib/pg_trgm/trgm_gist.c |3 +-
contrib/seg/seg.c   |3 +-
src/backend/access/brin/brin_minmax.c   |2 +-
src/backend/access/gin/ginarrayproc.c   |2 +-
src/backend/access/gist/gistproc.c  |2 +-
src/backend/access/spgist/spgkdtreeproc.c   |2 +-
src/backend/access/spgist/spgquadtreeproc.c |2 +-
src/backend/bootstrap/bootparse.y   |1 -
src/backend/bootstrap/bootscanner.l |1 -
src/backend/optimizer/path/equivclass.c |2 +-
src/backend/optimizer/path/indxpath.c   |2 +-
src/backend/optimizer/path/pathkeys.c   |2 +-
src/backend/optimizer/plan/createplan.c |2 +-
src/backend/optimizer/util/predtest.c   |2 +-
src/backend/utils/adt/jsonb_gin.c   |2 +-
src/backend/utils/adt/network_gist.c|   24 -
src/backend/utils/adt/rangetypes_gist.c |2 +-
src/backend/utils/adt/rangetypes_spgist.c   |2 +-
src/backend/utils/adt/tsginidx.c|2 +-
src/backend/utils/adt/tsquery_gist.c|2 +-
src/include/access/gist.h   |   20 ---
src/include/access/nbtree.h |2 +-
src/include/access/skey.h   |   23 +---
src/include/access/stratnum.h   |   75 +++
src/include/utils/rangetypes.h  |   20 +++
35 files changed, 129 insertions(+), 95 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: contrib/tsm*

2015-05-15 Thread Erik Rijkers
It seems two .sgml files are missing (and this  prevents the docs from 
building):

tsm-system-rows.sgml, and
tsm-system-time.sgml

openjade:contrib.sgml:145:1:E: cannot find tsm-system-rows.sgml; tried 
tsm-system-rows.sgml, ./tsm-system-rows.sgml,
./tsm-system-rows.sgml, /usr/share/sgml/tsm-system-rows.sgml, 
/usr/share/xml/tsm-system-rows.sgml
openjade:contrib.sgml:146:1:E: cannot find tsm-system-time.sgml; tried 
tsm-system-time.sgml, ./tsm-system-time.sgml,
./tsm-system-time.sgml, /usr/share/sgml/tsm-system-time.sgml, 
/usr/share/xml/tsm-system-time.sgml


thanks,

Erik Rijkers



-- 
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: doc: CREATE FOREIGN TABLE now allows CHECK ( ... ) NO INHERIT

2015-05-15 Thread Robert Haas
doc: CREATE FOREIGN TABLE now allows CHECK ( ... ) NO INHERIT

Etsuro Fujita

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/92edba2665ae7bf43ed03538311e63652f9e2373

Modified Files
--
doc/src/sgml/ref/create_foreign_table.sgml |4 ++--
1 file changed, 2 insertions(+), 2 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: Extend GB18030 encoding conversion to cover full Unicode range.

2015-05-15 Thread Tom Lane
Extend GB18030 encoding conversion to cover full Unicode range.

Our previous code for GB18030 - UTF8 conversion only covered Unicode code
points up to U+, but the actual spec defines conversions for all code
points up to U+10.  That would be rather impractical as a lookup table,
but fortunately there is a simple algorithmic conversion between the
additional code points and the equivalent GB18030 byte patterns.  Make use
of the just-added callback facility in LocalToUtf/UtfToLocal to perform the
additional conversions.

Having created the infrastructure to do that, we can use the same code to
map certain linearly-related subranges of the Unicode space below U+,
allowing removal of the corresponding lookup table entries.  This more
than halves the lookup table size, which is a substantial savings;
utf8_and_gb18030.so drops from nearly a megabyte to about half that.

In support of doing that, replace ISO10646-GB18030.TXT with the data file
gb-18030-2000.xml (retrieved from
http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/ )
in which these subranges have been deleted from the simple lookup entries.

Per bug #12845 from Arjen Nienhuis.  The conversion code added here is
based on his proposed patch, though I whacked it around rather heavily.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/8d3e0906df5496b853cc763f87b9ffd2ae27adbe

Modified Files
--
src/backend/utils/mb/Unicode/ISO10646-GB18030.TXT  |63488 
src/backend/utils/mb/Unicode/Makefile  |8 +-
src/backend/utils/mb/Unicode/UCS_to_GB18030.pl |   81 +-
src/backend/utils/mb/Unicode/gb-18030-2000.xml |30916 ++
src/backend/utils/mb/Unicode/gb18030_to_utf8.map   |32633 +-
src/backend/utils/mb/Unicode/utf8_to_gb18030.map   |32631 +-
.../utf8_and_gb18030/utf8_and_gb18030.c|  159 +-
7 files changed, 3 insertions(+), 128805 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: TABLESAMPLE, SQL Standard and extensible

2015-05-15 Thread Simon Riggs
TABLESAMPLE, SQL Standard and extensible

Add a TABLESAMPLE clause to SELECT statements that allows
user to specify random BERNOULLI sampling or block level
SYSTEM sampling. Implementation allows for extensible
sampling functions to be written, using a standard API.
Basic version follows SQLStandard exactly. Usable
concrete use cases for the sampling API follow in later
commits.

Petr Jelinek

Reviewed by Michael Paquier and Simon Riggs

Branch
--
master

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

Modified Files
--
contrib/file_fdw/file_fdw.c  |2 +-
contrib/postgres_fdw/postgres_fdw.c  |2 +-
doc/src/sgml/catalogs.sgml   |  120 +
doc/src/sgml/ref/select.sgml |   61 -
src/backend/access/Makefile  |3 +-
src/backend/access/heap/heapam.c |   41 ++-
src/backend/access/tablesample/Makefile  |   17 ++
src/backend/access/tablesample/bernoulli.c   |  235 
src/backend/access/tablesample/system.c  |  186 +
src/backend/access/tablesample/tablesample.c |  368 ++
src/backend/catalog/Makefile |5 +-
src/backend/commands/analyze.c   |2 +-
src/backend/commands/explain.c   |   21 ++
src/backend/executor/Makefile|2 +-
src/backend/executor/execAmi.c   |8 +
src/backend/executor/execCurrent.c   |1 +
src/backend/executor/execProcnode.c  |   14 +
src/backend/executor/nodeSamplescan.c|  256 ++
src/backend/nodes/copyfuncs.c|   60 +
src/backend/nodes/equalfuncs.c   |   37 +++
src/backend/nodes/nodeFuncs.c|   28 ++
src/backend/nodes/outfuncs.c |   48 
src/backend/nodes/readfuncs.c|   45 
src/backend/optimizer/path/allpaths.c|   49 
src/backend/optimizer/path/costsize.c|   67 +
src/backend/optimizer/plan/createplan.c  |   69 +
src/backend/optimizer/plan/planner.c |   15 +-
src/backend/optimizer/plan/setrefs.c |   11 +
src/backend/optimizer/plan/subselect.c   |1 +
src/backend/optimizer/util/pathnode.c|   22 ++
src/backend/parser/gram.y|   36 ++-
src/backend/parser/parse_clause.c|   56 
src/backend/parser/parse_func.c  |  143 ++
src/backend/rewrite/rewriteHandler.c |3 +
src/backend/utils/adt/ruleutils.c|   50 
src/backend/utils/cache/lsyscache.c  |   27 ++
src/backend/utils/cache/syscache.c   |   23 ++
src/backend/utils/misc/sampling.c|   33 ++-
src/include/access/heapam.h  |4 +
src/include/access/relscan.h |1 +
src/include/access/tablesample.h |   60 +
src/include/catalog/indexing.h   |5 +
src/include/catalog/pg_proc.h|   27 ++
src/include/catalog/pg_tablesample_method.h  |   78 ++
src/include/executor/nodeSamplescan.h|   24 ++
src/include/nodes/execnodes.h|9 +
src/include/nodes/nodes.h|4 +
src/include/nodes/parsenodes.h   |   37 +++
src/include/nodes/plannodes.h|6 +
src/include/optimizer/cost.h |1 +
src/include/optimizer/pathnode.h |2 +
src/include/parser/kwlist.h  |1 +
src/include/parser/parse_func.h  |5 +
src/include/port.h   |4 +
src/include/utils/lsyscache.h|1 +
src/include/utils/rel.h  |1 -
src/include/utils/sampling.h |   15 +-
src/include/utils/syscache.h |2 +
src/port/erand48.c   |3 -
src/test/regress/expected/rowsecurity.out|   26 ++
src/test/regress/expected/sanity_check.out   |1 +
src/test/regress/expected/tablesample.out|  231 
src/test/regress/parallel_schedule   |2 +-
src/test/regress/serial_schedule |1 +
src/test/regress/sql/rowsecurity.sql |4 +
src/test/regress/sql/tablesample.sql |   74 ++
66 files changed, 2756 insertions(+), 40 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: TABLESAMPLE system_rows(limit)

2015-05-15 Thread Simon Riggs
TABLESAMPLE system_rows(limit)

Contrib module implementing a tablesample method
that allows you to limit the sample by a hard row
limit.

Petr Jelinek

Reviewed by Michael Paquier, Amit Kapila and
Simon Riggs

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/9689290ff0c065f9bdc4e3a76e7931e84554224b

Modified Files
--
doc/src/sgml/contrib.sgml  |1 +
doc/src/sgml/filelist.sgml |1 +
2 files changed, 2 insertions(+)


-- 
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: TABLESAMPLE system_time(limit)

2015-05-15 Thread Simon Riggs
TABLESAMPLE system_time(limit)

Contrib module implementing a tablesample method
that allows you to limit the sample by a hard time
limit.

Petr Jelinek

Reviewed by Michael Paquier, Amit Kapila and
Simon Riggs

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/149f6f15768e731c760392679ef8ddaf00dae6c8

Modified Files
--
doc/src/sgml/contrib.sgml  |1 +
doc/src/sgml/filelist.sgml |1 +
2 files changed, 2 insertions(+)


-- 
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: Add archive_mode='always' option.

2015-05-15 Thread Heikki Linnakangas

On 05/15/2015 07:39 PM, Stefan Kaltenbrunner wrote:

this broke the docs build:

http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=guaibasaurusdt=2015-05-15%2016%3A17%3A01


Fixed, thanks.

- Heikki



--
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: Fix outdated src/test/mb/ tests, and add a GB18030 test.

2015-05-15 Thread Tom Lane
Fix outdated src/test/mb/ tests, and add a GB18030 test.

The expected-output files for these tests were broken by the recent
addition of a warning for hash indexes.  Update them.

Also add a test case for GB18030 encoding, similar to the other ones.
This is a pretty weak test, but it's better than nothing.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/07af523870bcfe930134054febd3a6a114942e5b

Modified Files
--
src/test/mb/expected/big5.out  |1 +
src/test/mb/expected/euc_jp.out|1 +
src/test/mb/expected/euc_kr.out|1 +
src/test/mb/expected/euc_tw.out|1 +
src/test/mb/expected/gb18030.out   |   87 
src/test/mb/expected/mule_internal.out |2 +
src/test/mb/expected/sjis.out  |1 +
src/test/mb/expected/utf8.out  |1 +
src/test/mb/mbregress.sh   |   11 +++-
src/test/mb/sql/gb18030.sql|   19 +++
10 files changed, 124 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: Improve test for CONVERT() with GB18030 - UTF8.

2015-05-15 Thread Tom Lane
Improve test for CONVERT() with GB18030 - UTF8.

Add a bit of coverage of high code points.

Arjen Nienhuis

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/199f5973c50fe94e128508ff2218c42126fd0ee1

Modified Files
--
src/test/regress/expected/conversion.out |   16 
src/test/regress/sql/conversion.sql  |4 ++--
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: Add BRIN infrastructure for inclusion opclasses

2015-05-15 Thread Alvaro Herrera
Add BRIN infrastructure for inclusion opclasses

This lets BRIN be used with R-Tree-like indexing strategies.

Also provided are operator classes for range types, box and inet/cidr.
The infrastructure provided here should be sufficient to create operator
classes for similar datatypes; for instance, opclasses for PostGIS
geometries should be doable, though we didn't try to implement one.

(A box/point opclass was also submitted, but we ripped it out before
commit because the handling of floating point comparisons in existing
code is inconsistent and would generate corrupt indexes.)

Author: Emre Hasegeli.  Cosmetic changes by me
Review: Andreas Karlsson

Branch
--
master

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

Modified Files
--
doc/src/sgml/brin.sgml   |   53 ++-
src/backend/access/brin/Makefile |2 +-
src/backend/access/brin/brin.c   |   90 +---
src/backend/access/brin/brin_inclusion.c |  696 ++
src/backend/access/brin/brin_minmax.c|7 +
src/backend/utils/adt/network_gist.c |4 +-
src/include/access/brin_internal.h   |6 -
src/include/access/stratnum.h|4 +-
src/include/catalog/catversion.h |2 +-
src/include/catalog/pg_am.h  |3 +-
src/include/catalog/pg_amop.h|   37 ++
src/include/catalog/pg_amproc.h  |   23 +
src/include/catalog/pg_opclass.h |6 +-
src/include/catalog/pg_opfamily.h|3 +
src/include/catalog/pg_proc.h|   10 +
src/test/regress/expected/brin.out   |   31 +-
src/test/regress/expected/opr_sanity.out |   25 +-
src/test/regress/sql/brin.sql|   31 +-
18 files changed, 928 insertions(+), 105 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: Add pg_audit, an auditing extension

2015-05-15 Thread David Steele
On 5/15/15 3:44 PM, Stephen Frost wrote:
 * Fujii Masao (masao.fu...@gmail.com) wrote:
 CREATE EXTENSION pg_audit failed with the following error message
 when shared_preload_libraries and pg_audit.log are set to pg_audit and
 ddl, respectively.

 =# create extension pg_audit ;
 ERROR:  pg_event_trigger_ddl_commands() can only be called in an event
 trigger function
 CONTEXT:  SQL statement SELECT UPPER(object_type), object_identity
   FROM pg_event_trigger_ddl_commands()
 Interesting.  I'm very curious about this error and if it impacts other
 extensions which use event triggers.  I'll look into it.

I'm looking into this. There's definitely something strange going on
here, but not sure it's in pg_audit.

 The categories of some SQL commands are different between log_statement and
 pg_audit. For example, REINDEX is treated as DDL in pg_audit, but not in
 log_statement. That's confusing. We should use the same category-mapping
 rule as much as possible.
 David, Simon and I have all considered this at different times and my
 recollection is that we all felt that it made sense as DDL because
 CLUSTER is DDL (which is actually noted in the comments).  However, you
 bring up a good point that classifying it as DDL makes it different from
 what the core system does and it'd probably be good to be consistent.

 The question here really is- is that the right classification for
 REINDEX to have in core?  If so, shouldn't CLUSTER have the same?
 Probably a discussion to have on -hackers rather than here.  I'll go
 ahead and change it to match what core does.  Then, if core changes to
 make it DDL, pg_audit will automatically pick that up and also treat it
 as DDL.
I admit I was influenced by this comment in core:

case T_ReindexStmt:
lev = LOGSTMT_ALL;/* should this be DDL? */
break;

and the fact that CLUSTER is DDL.  I'm not married to REINDEX as DDL,
though.  I'm happy to make it consistent with core.  If it changes in
core, it would also change in pg_audit.

-- 
- David Steele
da...@pgmasters.net




signature.asc
Description: OpenPGP digital signature


Re: [COMMITTERS] pgsql: Add BRIN infrastructure for inclusion opclasses

2015-05-15 Thread Tom Lane
Alvaro Herrera alvhe...@alvh.no-ip.org writes:
 Add BRIN infrastructure for inclusion opclasses

sittela thinks there's something wrong with this.
Not clear why it'd be getting different results from other critters;
Andrew, is there anything unusual about that machine's hardware or config?

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