Dave Page | 28 Jul 19:01 2015

Reminder: Call for Papers - PostgreSQL Conference Europe 2015

PostgreSQL Conference Europe 2015 will be held on October 27-30 in the
Vienna Marriott Hotel, in Vienna, Austria. It will cover topics for
PostgreSQL users, developers and contributors, as well as decision and
policy makers. For more information about the conference, please see
the website at http://2015.pgconf.eu/.

We are now accepting proposals for talks, in english or german. If you
are submitting a talk in german, please write a short summary of the
abstract in English in
the "submission notes" field.

Each session will last 45 minutes, and may be on any topic related to
PostgreSQL. Suggested topic areas include:

Developing applications for PostgreSQL
Administering large scale PostgreSQL installations
Case studies and/or success stories of PostgreSQL deployments
PostgreSQL tools and utilities
PostgreSQL hacking
Community & user groups
Tuning the server
Migrating from other systems
Scaling/replication
Benchmarking & hardware
PostgreSQL related products

Of course, we're happy to receive proposals for talks on other
PostgreSQL related topics as well.

We may also have a limited number of longer, 90-minute, slots
(Continue reading)

Howard Rolph | 24 Jul 17:49 2015

Alpha Release of 2ndQuadrant Unified Data Analytics (2UDA)

2ndQuadrant is pleased to announce the alpha release of a new client platform for business intelligence - 2UDA (pronounced 'tudor').

2UDA is a data analytics application suite that unifies databases, spreadsheets, data mining and data visualisation in one seamless desktop installer.

Available to download now, 2UDA is packaged and ready to install with a choice of operating systems: Linux, OSX and Windows at http://2ndquadrant.com/2uda 

Although primarily aimed at Data Analysts and Data Scientists, we encourage trial participation from developers and DBAs at this stage of the product development, to help us improve the function and user experience for all users.

More details on 2UDA at http://2ndquadrant.com/2uda  

--

Howard Rolph        Worldwide Marketing Manager

Tel: +44 870 766 7756  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, RemoteDBA, Training & Services

 

 

Gilles Darold | 25 Jul 13:01 2015

pgCluu release 2.4 is out

pgCluu 2.4 released
-------------------

PostgreSQL Cluster Utilization

pgCluu is a Perl program used to perform a full audit of a PostgreSQL
Cluster performances. It is divided in two parts, a collector used to
grab statistics on the PostgreSQL server using psql and sar, a reports
builder that will generate all HTML and charts output.

This release is a maintenance release that fix some issues. There's also
some
new interesting reports:

  * Transfers per second (read/write/both) on all devices from sar -b
  * Transfers per second for each device from sar -d .
  * Number of tasks created per second
  * Number of context switches per seconds.
  * Improve pg_stat_statement report by adding all shared block stats
    and read/write I/O timing per query when track_io_timing is enabled.
  * Add device with highest tps on overall system information.

and useful features:

  * Add --capture mode to pgcluu_collectd to be be able to build a
snapshot of
    the PostgreSQL instance and exit. pgCluu will automatically adapt
the report
    to this capture mode. It will use a temporary directory
/tmp/pgcluu_capture
    to generate a tarball /tmp/pgcluu_capture.tar.gz containing the capture.
  * Add pgCluu logo and ico to the html output.
  * Add --charset option to be able to change the html charset, default:
utf8.
  * Allow regular expression in database list available in reports, for
example:
    with --db-only "p.*", only database beginning with p will be reported.
  * Allow pgcluu to parse and compute statistics from gzip compressed files.
  * pgcluu will not stop anymore if the sar file is not found, it will only
    show a warning message and continue.

This release also adds -r | --rotate-daily and -R | --rotate-hourly
options to
pgcluu_collectd be able to rotate statistic files on a daily or hourly
basis.
You can use -z or --compress option to compress rotated data files.

There also some code relative to next coming major release that will be used
to allow a full incremental mode and a temporal selection into the collected
statistics through a CGI program. This code enable caching (option -C or
--cache)
by dumping statistics stored in memory into binary files. With those
files, data
files can be removed (automatically with option -c or --clean) and
report can
be build later from them. This is not really useful now but this is the
first
stage to be able to build incremental and cumulative reports.

See ChangeLog for a complete list of changes and bug fixes.

The goal of this project is to provide a complete PostgreSQL auditing
tool that don't need any dependency to be run easily to audit a local
or remote server.

If you just have a sar output file, pgCluu can be use to draw graphs
about the system utilization only.

pgCluu is an original collection of tools built during my work at
Dalibo. Those tools are published under the PostgreSQL License to
be shared, any one is welcome to contribute.

For more information take a look at http://pgcluu.darold.net/

View a sample report at http://pgcluu.darold.net/example/index.html

**IMPORTANT:** Note that new official releases must now be downloaded
from GitHub and no more from SourceForge.

Download at https://github.com/darold/pgcluu/releases

About:
------

pgCluu is created and maintained by Gilles Darold.

  * Web/Demo site: http://pgcluu.darold.net/
  * Download: https://github.com/darold/pgcluu/releases
  * Development: https://github.com/darold/pgcluu
  * Documentation: https://github.com/darold/pgcluu/blob/master/README

-- 
Gilles Darold
Consultant PostgreSQL
http://dalibo.com - http://dalibo.org

--

-- 
Sent via pgsql-announce mailing list (pgsql-announce <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-announce

David Fetter | 27 Jul 00:30 2015

== PostgreSQL Weekly News - July 26 2015 ==

== PostgreSQL Weekly News - July 26 2015 ==

== PostgreSQL Product News ==

pgpool-II versions 3.4.3, 3.3.7, 3.2.12, 3.1.15, and 3.0.19 released.
pgpool-II is a connection pooler and replication system for PostgreSQL.
http://pgpool.net/mediawiki/index.php/Downloads

== PostgreSQL Jobs for July ==

http://archives.postgresql.org/pgsql-jobs/2015-07/

== PostgreSQL Local ==

PGDay Campinas 2015 will take place in Campinas on August 7.
http://pgdaycampinas.com.br/english/

PostgresOpen 2015 will being held in Dallas, Texas September 16-18.
http://2015.postgresopen.org/

PostgreSQL Session #7, will be held September 24th, 2015 in Paris,
France,
http://www.postgresql-sessions.org/7/about

PGDay.IT 2015 will take place in Prato on October 23, 2015. The
International Call For Papers is open until August 8.
http://pgday.it

PostgreSQL Conference Europe 2015 will be held on October 27-30 in the
Vienna Marriott Hotel, in Vienna, Austria.  The CfP is open until
August 7.
http://2015.pgconf.eu/

PGConf Silicon Valley 2015 is November 17-18 at the South San
Francisco Convention Center.
http://www.pgconfsv.com

PGBR2015 (The Brazilian PostgreSQL Conference) will take place in Porto
Alegre, Rio Grande do Sul, on November 18, 19 and 20.
http://pgbr.postgresql.org.br/2015/en/#call-for-papers

== PostgreSQL in the News ==

Planet PostgreSQL: http://planet.postgresql.org/

PostgreSQL Weekly News is brought to you this week by David Fetter

Submit news and announcements by Sunday at 3:00pm Pacific time.
Please send English language ones to david <at> fetter.org, German language
to pwn <at> pgug.de, Italian language to pwn <at> itpug.org.  Spanish language
to pwn <at> arpug.com.ar.

== Applied Patches ==

Heikki Linnakangas pushed:

- Handle AT_ReAddComment in test_ddl_deparse, and add a catch-all
  default.  In the passing, also move AT_ReAddComment to more logical
  position in the enum, after all the Constraint-related subcommands.
  This fixes a compiler warning, added by commit e42375fc. Backpatch
  to 9.5, like that patch.
  http://git.postgresql.org/pg/commitdiff/13f2db2ffb2fac24fcb57ecc56e030e1145df127

- Sanity-check that a page zeroed by redo routine is marked with
  WILL_INIT.  There was already a sanity-check in the other direction:
  if a page was marked with WILL_INIT, it had to be initialized by the
  redo routine. It's not strictly necessary for correctness that a
  page is marked with WILL_INIT if it's going to be initialized at
  redo, but it's a missed optimization if nothing else.  Fix a few
  instances of this issue in SP-GiST, where a block in WAL record was
  not marked with WILL_INIT, but was in fact always initialized at
  redo.  We were creating a full-page image of the page unnecessarily
  in those cases.  Backpatch to 9.5, where the new WILL_INIT flag was
  added.
  http://git.postgresql.org/pg/commitdiff/eb11de8ff5eac3592d539ad7ca3059c02e4d3e99

- Add selectivity estimation functions for intarray operators.  Uriy
  Zhuravlev and Alexander Korotkov, reviewed by Jeff Janes, some
  cleanup by me.
  http://git.postgresql.org/pg/commitdiff/c6fbe6d6fb828f50b9d67627588eb5ab8bd25e47

- Fix off-by-one error in calculating subtrans/multixact truncation
  point.  If there were no subtransactions (or multixacts) active, we
  would calculate the oldestxid == next xid. That's correct, but if
  next XID happens to be on the next pg_subtrans (pg_multixact) page,
  the page does not exist yet, and SimpleLruTruncate will produce an
  "apparent wraparound" warning. The warning is harmless in this case,
  but looks very alarming to users.  Backpatch to all supported
  versions. Patch and analysis by Thomas Munro.
  http://git.postgresql.org/pg/commitdiff/766dcfb16ca385274d510eaed01724bb3836efdd

Álvaro Herrera pushed:

- Add some comments to test_ddl_deparse and a README.  Per comments
  from Heikki Linnakangas.  Backpatch to 9.5, where this module was
  introduced.
  http://git.postgresql.org/pg/commitdiff/8f612b7f0042a33f59cd4a18144b4d74e78b6859

- Fix mis-merge in previous commit
  http://git.postgresql.org/pg/commitdiff/b7ca57ac0e80b8b511780ef1f19fa2124c901efb

- Improve BRIN documentation somewhat.  This removes some info about
  support procedures being used, which was obsoleted by commit
  db5f98ab4f, as well as add some more documentation on how to create
  new opclasses using the Minmax infrastructure.  (Hopefully we can
  get something similar for Inclusion as well.) In passing, fix some
  obsolete mentions of "mmtuples" in source code comments.  Backpatch
  to 9.5, where BRIN was introduced.
  http://git.postgresql.org/pg/commitdiff/8d9073692430a222939e7f2e436c80f0c271f116

- Fix (some of) pltcl memory usage.  As reported by Bill Parker,
  PL/Tcl did not validate some malloc() calls against NULL return.
  Fix by using palloc() in a new long-lived memory context instead.
  This allows us to simplify error handling too, by simply deleting
  the memory context instead of doing retail frees.  There's still a
  lot that could be done to improve PL/Tcl's memory handling ...  This
  is pretty ancient, so backpatch all the way back.  Author: Michael
  Paquier and Álvaro Herrera Discussion:
  https://www.postgresql.org/message-id/CAFrbyQwyLDYXfBOhPfoBGqnvuZO_Y90YgqFM11T2jvnxjLFmqw <at> mail.gmail.com
  http://git.postgresql.org/pg/commitdiff/f8d67ca8d4cbbbd6c6b3319d531089880d332534

- Improve tab-completion for DROP POLICY.  Backpatch to 9.5.  Author:
  Pavel Stěhule
  http://git.postgresql.org/pg/commitdiff/1a5118008003b3c42f5cbb37980dabdb6a718e6f

- Don't handle PUBLIC/NONE separately.  Since those role specifiers
  are checked in the grammar, there's no need for the old checks to
  remain in place after 31eae6028ec.  Remove them.  Backpatch to 9.5.
  Noted and patch by Jeevan Chalke
  http://git.postgresql.org/pg/commitdiff/e52b690cf55f303839f12f8f1f136d2366d36298

- Fix omission of OCLASS_TRANSFORM in object_classes[].  This was
  forgotten in cac76582053e (and its fixup ad89a5d115).  Since it
  seems way too easy to miss this, this commit also introduces a
  mechanism to enforce that the array is consistent with the enum.
  Problem reported independently by Robert Haas and Jaimin Pan.
  Patches proposed by Jaimin Pan, Jim Nasby, Michael Paquier and
  myself, though I didn't use any of these and instead went with a
  cleaner approach suggested by Tom Lane.  Backpatch to 9.5.
  Discussion:
  https://www.postgresql.org/message-id/CA+Tgmoa6SgDaxW_n_7SEhwBAc=mniYga+obUj5fmw4rU9_mLvA <at> mail.gmail.com
  https://www.postgresql.org/message-id/29788.1437411581 <at> sss.pgh.pa.us
  http://git.postgresql.org/pg/commitdiff/149b1dd84069a9b57962fdb4621754aed5dfb63e

Teodor Sigaev pushed:

- This supports the triconsistent function for pg_trgm GIN opclass to
  make it faster to implement indexed queries where some keys are
  common and some are rare.  Patch by Jeff Janes
  http://git.postgresql.org/pg/commitdiff/97f3014647a5bd570032abd2b809d3233003f13f

Andrew Dunstan pushed:

- Fix location of output logs of pg_regress.  initdb.log and
  postmaster.log were moved to within the temporary instance path by
  commit dcae5fa. This directory now gets removed at the end of the
  run of pg_regress when there are no failures found, which makes
  analysis of after-run issues difficult in some cases, and reduces
  the output verbosity of the buildfarm after a run.  Fix by Michael
  Paquier Backpatch to 9.5
  http://git.postgresql.org/pg/commitdiff/9faa6ae14f6098e4b55f0131f7ec2694a381fb87

- Redirect install output of make check into a log file.  dbf2ec1a
  changed make check so that the installation logs get directed to
  stdout and stderr. Per discussion on -hackers, this patch restores
  saving it to a file. It is now saved in /tmp_install/log, which is
  created once per invocation of any make target doing regression
  tests.  Along the way, add a missing /log/ entry to
  test_ddl_deparse's .gitignore.  Michael Paquier.
  http://git.postgresql.org/pg/commitdiff/16c33c50e122e3e7d03fc7ddd5cbd105c0118234

- Fix treatment of nulls in jsonb_agg and jsonb_object_agg.  The wrong
  is_null flag was being passed to datum_to_json. Also, null object
  key values are not permitted, and this was not being checked for.
  Add regression tests covering these cases, and also add those tests
  to the json set, even though it was doing the right thing.  Fixes
  bug #13514, initially diagnosed by Tom Lane.
  http://git.postgresql.org/pg/commitdiff/d9a356ff2e6bb7ed5fb1145af49fa3e51e68a98a

- Restore use of zlib default compression in pg_dump directory mode.
  This was broken by commit 0e7e355f27302b62af3e1add93853ccd45678443
  and friends, which ignored the fact that gzopen() will treat "-1" in
  the mode argument as an invalid character, which it ignores, and a
  flag for compression level 1. Now, when this value is encountered no
  compression level flag is passed  to gzopen, leaving it to use the
  zlib default.  Also, enforce the documented allowed range for
  pg_dump's -Z option, namely 0 .. 9, and remove some consequently
  dead code from pg_backup_tar.c.  Problem reported by Marc Mamin.
  Backpatch to 9.1, like the patch that introduced the bug.
  http://git.postgresql.org/pg/commitdiff/caef94d59fcfa1087be36d4a8b5ed4523872bf55

Tom Lane pushed:

- Fix some oversights in BRIN patch.  Remove
  HeapScanDescData.rs_initblock, which wasn't being used for anything
  in the final version of the patch.  Fix IndexBuildHeapScan so that
  it supports syncscan again; the patch broke synchronous scanning for
  index builds by forcing rs_startblk to zero even when the caller did
  not care about that and had asked for syncscan.  Add some commentary
  and usage defenses to heap_setscanlimits().  Fix heapam so that
  asking for rs_numblocks == 0 does what you would reasonably expect.
  As coded it amounted to requesting a whole-table scan, because those
  "--x <= 0" tests on an unsigned variable would behave surprisingly.
  http://git.postgresql.org/pg/commitdiff/434873806a9b1c0edd53c2a9df7c93a8ba021147

- Fix add_rte_to_flat_rtable() for recent feature additions.  The
  TABLESAMPLE and row security patches each overlooked this function,
  though their errors of omission were opposite: RLS failed to zero
  out the securityQuals field, leading to wasteful copying of useless
  expression trees in finished plans, while TABLESAMPLE neglected to
  add a comment saying that it intentionally *isn't* deleting the
  tablesample subtree.  There probably should be a similar comment
  about ctename, too.  Back-patch as appropriate.
  http://git.postgresql.org/pg/commitdiff/46d0a9bfac3d5221702318cc1cf119221d729c84

- Redesign tablesample method API, and do extensive code review.  The
  original implementation of TABLESAMPLE modeled the tablesample
  method API on index access methods, which wasn't a good choice
  because, without specialized DDL commands, there's no way to build
  an extension that can implement a TSM.  (Raw inserts into system
  catalogs are not an acceptable thing to do, because we can't undo
  them during DROP EXTENSION, nor will pg_upgrade behave sanely.)
  Instead adopt an API more like procedural language handlers or
  foreign data wrappers, wherein the only SQL-level support object
  needed is a single handler function identified by having a special
  return type.  This lets us get rid of the supporting catalog
  altogether, so that no custom DDL support is needed for the feature.
  Adjust the API so that it can support non-constant tablesample
  arguments (the original coding assumed we could evaluate the
  argument expressions at ExecInitSampleScan time, which is
  undesirable even if it weren't outright unsafe), and discourage
  sampling methods from looking at invisible tuples.  Make sure that
  the BERNOULLI and SYSTEM methods are genuinely repeatable within and
  across queries, as required by the SQL standard, and deal more
  honestly with methods that can't support that requirement.  Make a
  full code-review pass over the tablesample additions, and fix
  assorted bugs, omissions, infelicities, and cosmetic issues (such as
  failure to put the added code stanzas in a consistent ordering).
  Improve EXPLAIN's output of tablesample plans, too.  Back-patch to
  9.5 so that we don't have to support the original API in production.
  http://git.postgresql.org/pg/commitdiff/dd7a8f66ed278eef2f001a98e2312336c61ee527

- Update oidjoins regression test for 9.5.  New FK relationships for
  pg_transform.  Also findoidjoins now detects a few relationships it
  didn't before for pre-existing catalogs, as a result of new
  regression tests leaving entries in those catalogs that weren't
  there before.
  http://git.postgresql.org/pg/commitdiff/158d61534e98638106d85bdb1de5dbdb56bc8057

- In pg_ctl, report unexpected failure to stat() the postmaster.pid
  file.  Any error other than ENOENT is a bit suspicious here, and
  perhaps should not be grounds for assuming the postmaster has
  failed.  For the moment though, just report it, and don't change the
  behavior otherwise.  The intent is mainly to try to determine why we
  are seeing intermittent failures in this area on some buildfarm
  members.  Back-patch to 9.5 where some of these failures have
  happened.
  http://git.postgresql.org/pg/commitdiff/b7b5a1899aa3caeef30117f8e36c1f0e68e8847a

- Some platforms now need contrib/tsm_system_time to be linked with
  libm.  Buildfarm member hornet, at least, seems to want -lm in the
  link command.  Probably this is due to the just-added use of
  isnan().
  http://git.postgresql.org/pg/commitdiff/c879d51c5918ab5fc8feb9624aa4eae10ee93094

- Dodge portability issue (apparent compiler bug) in new tablesample
  code.  Some of the older OS X critters in the buildfarm are failing
  regression, with symptoms showing that a request for 100% sampling
  in BERNOULLI or SYSTEM methods actually gets only around 50% of the
  table.  gdb revealed that the computation of the "cutoff" number was
  producing 0x7FFFFFFF rather than the expected 0x100000000.
  Inspecting the assembly code, it looks like gcc is trying to use
  lrint() instead of rint() and then fumbling the conversion from long
  double to uint64.  This seems like a clear compiler bug, but
  assigning the intermediate result into a plain double variable works
  around it, so let's just do that.  (Another idea would be to give up
  one bit of hash width so that we don't need to use a uint64 cutoff,
  but let's see if this is enough.)
  http://git.postgresql.org/pg/commitdiff/d9476b83808a39d9985845071bf0a150a3063b37

- Make entirely-dummy appendrels get marked as such in
  set_append_rel_size.  The planner generally expects that the
  estimated rowcount of any relation is at least one row, *unless* it
  has been proven empty by constraint exclusion or similar mechanisms,
  which is marked by installing a dummy path as the rel's cheapest
  path (cf. IS_DUMMY_REL).  When I split up allpaths.c's processing of
  base rels into separate set_base_rel_sizes and
  set_base_rel_pathlists steps, the intention was that dummy rels
  would get marked as such during the "set size" step; this is what
  justifies an Assert in indxpath.c's get_loop_count that other
  relations should either be dummy or have positive rowcount.
  Unfortunately I didn't get that quite right for append relations: if
  all the child rels have been proven empty then set_append_rel_size
  would come up with a rowcount of zero, which is correct, but it
  didn't then do set_dummy_rel_pathlist.  (We would have ended up with
  the right state after set_append_rel_pathlist, but that's too late,
  if we generate indexpaths for some other rel first.) In addition to
  fixing the actual bug, I installed an Assert enforcing this
  convention in set_rel_size; that then allows simplification of a
  couple of now-redundant tests for zero rowcount in
  set_append_rel_size.  Also, to cover the possibility that
  third-party FDWs have been careless about not returning a zero
  rowcount estimate, apply clamp_row_est to whatever an FDW comes up
  with as the rows estimate.  Per report from Andreas Seltenreich.
  Back-patch to 9.2.  Earlier branches did not have the separation
  between set_base_rel_sizes and set_base_rel_pathlists steps, so
  there was no intermediate state where an appendrel would have had
  inconsistent rowcount and pathlist.  It's possible that adding the
  Assert to set_rel_size would be a good idea in older branches too;
  but since they're not under development any more, it's likely not
  worth the trouble.
  http://git.postgresql.org/pg/commitdiff/358eaa01bf95935f9af968faf5b08d9914f6a445

- Fix oversight in flattening of subqueries with empty FROM.  I missed
  a restriction that commit f4abd0241de20d5d6a79b84992b9e88603d44134
  should have enforced: we can't pull up an empty-FROM subquery if
  it's under an outer join, because then we'd need to wrap its output
  columns in PlaceHolderVars.  As the code currently stands, the PHVs
  end up with empty relid sets, which doesn't work (and is correctly
  caught by an Assert).  It's possible that this could be fixed by
  assigning the PHVs the relid sets of the parent FromExpr/JoinExpr,
  but getting that to work is more complication than I care to add
  right now; indeed it's likely that we'll never bother, since pulling
  up empty-FROM subqueries is a rather marginal optimization anyway.
  Per report from Andreas Seltenreich.  Back-patch to 9.5 where the
  faulty code was added.
  http://git.postgresql.org/pg/commitdiff/fca8e59c1c582030dd7a3c870e1c3c70e8a193aa

Andres Freund pushed:

- Fix bug around assignment expressions containing indirections.
  Handling of assigned-to expressions with indirection (e.g. set f1[1]
  = 3) was broken for ON CONFLICT DO UPDATE.  The problem was that
  ParseState was consulted to determine if an INSERT-appropriate or
  UPDATE-appropriate behavior should be used when transforming
  expressions with indirections. When the wrong path was taken the old
  row was substituted with NULL, leading to wrong results..  To fix
  remove p_is_update and only use p_is_insert to decide how to
  transform the assignment expression, and uset p_is_insert while
  parsing the on conflict statement. This isn't particularly pretty,
  but it's not any worse than before.  Author: Peter Geoghegan,
  slightly edited by me Discussion:
  CAM3SWZS8RPvA=KFxADZWw3wAHnnbxMxDzkEC6fNaFc7zSm411w <at> mail.gmail.com
  Backpatch: 9.5, where the feature was introduced
  http://git.postgresql.org/pg/commitdiff/c1ca3a19df376bcbb6d651d15b9a4ffcaa377ff1

- Fix flattening of nested grouping sets.  Previously nested grouping
  set specifications accidentally weren't flattened, but instead
  contained the nested specification as a element in the outer list.
  Fix this by, as actually documented in comments, concatenating the
  nested set specification into the outer one. Also add tests to
  prevent this from breaking again.  Author: Andrew Gierth, with tests
  from Jeevan Chalke Reported-By: Jeevan Chalke Discussion:
  CAM2+6=V5YvuxB+EyN4iH=GbD-XTA435TCNvnDFSD--YvXs+pww <at> mail.gmail.com
  Backpatch: 9.5, where grouping sets were introduced
  http://git.postgresql.org/pg/commitdiff/faab14ecb8c1b4ea2bee3723d4fa04f47275abd3

- Allow to push down clauses from HAVING to WHERE when grouping sets
  are used.  Previously we disallowed pushing down quals to WHERE in
  the presence of grouping sets. That's overly restrictive.  We now
  instead copy quals to WHERE if applicable, leaving the one in HAVING
  in place. That's because, at that stage of the planning process,
  it's nontrivial to determine if it's safe to remove the one in
  HAVING.  Author: Andrew Gierth Discussion:
  874mkt3l59.fsf <at> news-spur.riddles.org.uk Backpatch: 9.5, where
  grouping sets were introduced. This isn't exactly a bugfix, but it
  seems better to keep the branches in sync at this point.
  http://git.postgresql.org/pg/commitdiff/61444bfb809d3a088a270a59f383af3d4cd157b0

- Build column mapping for grouping sets in all required cases.  The
  previous coding frequently failed to fail because for one it's
  unusual to have rollup clauses with one column, and for another
  sometimes the wrong mapping didn't cause obvious problems.  Author:
  Jeevan Chalke Reviewed-By: Andrew Gierth Discussion:
  CAM2+6=W=9=hQOipH0HAPbkun3Z3TFWij_EiHue0_6UX=oR=1kw <at> mail.gmail.com
  Backpatch: 9.5, where grouping sets were introduced
  http://git.postgresql.org/pg/commitdiff/144666f65b500fef864bca318f6245b03c0f457c

- Recognize GROUPING() as a aggregate expression.  Previously
  GROUPING() was not recognized as a aggregate expression, erroneously
  allowing the planner to move it from HAVING to WHERE.  Author:
  Jeevan Chalke Reviewed-By: Andrew Gierth Discussion:
  CAM2+6=WG9omG5rFOMAYBweJxmpTaapvVp5pCeMrE6BfpCwr4Og <at> mail.gmail.com
  Backpatch: 9.5, where grouping sets were introduced
  http://git.postgresql.org/pg/commitdiff/e6d8cb77c029b8122607e3d2eb1f3fca36d7b1db

- Check the relevant index element in ON CONFLICT unique index
  inference.  ON CONFLICT unique index inference had a thinko that
  could affect cases where the user-supplied inference clause required
  that an attribute match a particular (user specified) collation
  and/or opclass.  infer_collation_opclass_match() has to check for
  opclass and/or collation matches and that the attribute is in the
  list of attributes or expressions known to be in the definition of
  the index under consideration. The bug was that these two conditions
  weren't necessarily evaluated for the same index attribute.  Author:
  Peter Geoghegan Discussion:
  CAM3SWZR4uug=WvmGk7UgsqHn2MkEzy9YU-+8jKGO4JPhesyeWg <at> mail.gmail.com
  Backpatch: 9.5, where ON CONFLICT was introduced
  http://git.postgresql.org/pg/commitdiff/159cff58cf3b565be3c17901698a74238e9e23f8

Joe Conway pushed:

- Make RLS work with UPDATE ... WHERE CURRENT OF.  UPDATE ... WHERE
  CURRENT OF would not work in conjunction with RLS. Arrange to allow
  the CURRENT OF expression to be pushed down.  Issue noted by Peter
  Geoghegan. Patch by Dean Rasheed. Back patch to 9.5 where RLS was
  introduced.
  http://git.postgresql.org/pg/commitdiff/b26e3d660df51a088d14c3c2cfce5990c13c1195

- Improve markup for row_security.  Wrap the literals on, off, force,
  and BYPASSRLS with appropriate markup. Per Kevin Grittner.
  http://git.postgresql.org/pg/commitdiff/cf80ddee57103bb3b454c1607d100a4551d7a48c

== Rejected Patches (for now) ==

No one was disappointed this week :-)

== Pending Patches ==

Peter Geoghegan sent in a patch to prefetch from memtuples array in
tuplesort on compilers that support same.

Adam Brightwell sent in a patch to remove an unneeded #include in
objectaddress.h.

Alexander Korotkov sent in two more revisions of a patch to allow
pg_rewind to work when target timeline was switched.

Heikki Linnakangas sent in another revision of a patch to ensure that
an all-zero GIN page doesn't cause an assertion failure.

Michael Paquier sent in two more revisions of a patch to fix the
location of output logs of pg_regress.

Sameer Thakur sent in two more revisions of a patch to implement a
VACUUM progress checker.

Petr Jelinek sent in three more revisions of a patch to allow CREATE
EXTENSION to pull in any dependent extensions.

Haribabu Kommi sent in a patch to add a new function called
pg_hba_lookup() to get all matching entries from the pg_hba.conf for
the providing input data.

Peter Eisentraut sent in another revision of a patch to add --slot
option to pg_basebackup.

Michael Paquier sent in a patch to fix a dump-restore hazard created
by ALTER TABLE .. ADD PRIMARY KEY .. USING INDEX.

Jaimin Pan sent in a patch to make object_classes break loudly.

Peter Geoghegan sent in a patch to add a new tie-breaker which is used
only when the tuples being sorted still fit in memory.

Paul Ramsey sent in three more revisions of a patch to allow
specifying remote extensions in the PostgreSQL FDW.

Fabien COELHO sent in three more revisions of a patch to add pgbench
stats per script.

Ildus Kurbangaliev sent in two more revisions of a patch to add a
wait_event column to pg_stat_activity.

Dinesh Kumar sent in another revision of a patch to add an
SQL-callable pg_report_log() function.

Fabrízio de Royes Mello and Michael Paquier traded patches to add CINE
for ALTER TABLE ... ADD COLUMN.

Simon Riggs and Heikki Linnakangas traded patches to fix a WAL logging
problem.

Etsuro Fujita sent in two revisions of a patch to support
ForeignRecheck for late row locking.

Michael Paquier sent in a patch to fix some memory leaks in pg_rewind
caused by missing PQclear calls.

Florent Guiliani added a replication command named
LOGICAL_DECODING_SNAPSHOT that does everything CREATE_REPLICATION_SLOT
does for logical slots except that the slot is automatically dropped.

Fabrízio de Royes Mello sent in a patch to add more test cases to
cover ALTER TABLE on views.

Kyotaro HORIGUCHI sent in two more revisions of a patch to allow
backslash-continuations in custom scripts for pgbench.

Álvaro Herrera sent in another revision of a patch to add valgrind
tests to bufmgr.c.

Heikki Linnakangas and Michael Paquier traded patches to support TAP
tests with MSVC and Windows.

Pavel Stěhule sent in another revision of a patch to add a
--strict-names option to pg_dump.

Noah Misch sent in a patch to correctly raise an error in cases where
IBM xlc is wrong.

Pavel Stěhule sent in two more revisions of a patch to add a libpq
context filter.

Fabien COELHO sent in two more revisions of a patch to allow extending
pgbench expressions with functions.

Fabien COELHO sent in another revision of a patch to add a
checkpoint_sort GUC.

Heikki Linnakangas sent in another revision of a patch to allow
sharing aggregate state.

Peter Geoghegan sent in a patch to remove a reference to an executor
README section about speculative insertion.

--

-- 
Sent via pgsql-announce mailing list (pgsql-announce <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-announce

Yugo Nagata | 24 Jul 10:14 2015
Picon

pgpool-II 3.4.3, 3.3.7, 3.2.12, 3.1.15, and 3.0.19 released

Hi,

Pgpool Global Development Group is pleased to announce the availability
of pgpool-II 3.4.3, 3.3.7, 3.2.12, 3.1.15, and 3.0,19. These are the
latest  stable minor versions of each major versions of pgpool-II.

Pgpool-II is a tool to add usefull features to PostgreSQL, including
connection pooling, load balancing, automatic fail over and more

You can download them from:
http://pgpool.net/mediawiki/index.php/Downloads

===============================================================================

                        3.4.3 (tataraboshi) 2015/07/24

* Version 3.4.3

    This is a bugfix release against pgpool-II 3.4.2.

    __________________________________________________________________

* Bug fixes

    - Fix "cannot find xlog functions" error in pgpool-recovery
      (Muhammad Usama)

      The argument data type of PostgreSQL's pg_xlogfile_name() function
      has been changed from text to pg_lsn since PostgreSQL 9.4. And
      pgpool-recovery was still trying to locate the function by old
      signature.

    - Fix problem with memory cache invalidation (Muhammad Usama)

      The internal buffer for storing the table oids needs to be homed in
      long living memory context as it has to survive throughout the child
      life.

      See [pgpool-general: 3643] for details.

    - Pass empty string parameters in failover command when pgpool-II
      does not have a value for any particular parameter (Muhammad Usama)

      Instead of omitting the values for the parameters when pgpool-II does
      not have any value for a particular parameter, it now passes an empty
      string to the failover command. This makes sure that failover script
      will always receive the exact number of expected parameters.

    - pgpool-II should use the local definition of snprintf functions only
      if they are not provided by OS (Muhammad Usama)

    - Add debug info to show how much shared memory is allocated
      (Tatsuo Ishii)

    - Downgrading the error level for EOF on backend connection for main
      process (Muhammad Usama)

      Throwing the FATAL error when EOF is encountered with backend is very
      harsh in pgpool main process and can cause undesirable behavior.
      Downgrading it to simple ERROR.

    - doc: Clarify load balancing condition (Tatsuo Ishii)

    - doc: Clarify description of pcp_promote_node (Tatsuo Ishii)

      It does not actually promote PostgreSQL standby.

    - doc: Fix outdated limitation description about load balancing using
      JDBC driver (Tatsuo Ishii)

      Even if autocommit is false, load balancing is possible in certain
      conditions.

    - Fix a misplaced code which makes a log code unreachable and rephrase
      the log message (Muhammad Usama)

    - Fix a problem in elog.c when forwarding a message to frontend clients
      (Muhammad Usama)

      Error while forwarding the message to the frontend client can
      potentially cause the infinite recursion and terminate the child with
      ERRORDATA_STACK_SIZE exceeded error.

      Fix is to check the recursion depth of send_message_to_frontend()
      function and pulling the plug if it is more than two levels deep.

    - Fix "select() system call interrupted" error (Tatsuo Ishii)

      The health check process complains above and then:

      ERROR:  failed to make persistent db connection
      DETAIL:  connection to host:"x.x.x.x:5432 failed

      However, the healthchek triggers neither fail over nor retrying. So,
      except the annoying messages above, everything goes well. This could
      occur more easily if 1) num_init_children is big and 2) pgpool
      children go into idle state (no query arrived from client for
      child_life_time seconds).

      Original bug report is [pgpool-general: 3756] Connection Interrupted.
      Patch created by Tatsuo Ishii. Enhancement from Usama.

    - Fix the case when user table includes spaces (Tatsuo Ishii)

      For example if table names including spaces are used, pgpool-II cannot
      be handled correctly by the internal functions which access system
      catalogs and it results in SQL errors. Solution is, to always use
      delimited identifier.

      Per bug #136.
      http://www.pgpool.net/mantisbt/view.php?id=136

      Also see [pgpool-general: 3818].

    - Allow to use in-memory query cache size more than 4GB (Tatsuo Ishii)

      This should have been allowed since in memory query cache was born.

    - Do not send a query for checking insert lock in non replication mode
      with extended query (Tatsuo Ishii)

    - Save pgpool_status to disk each time when it is changed
      (Tatsuo Ishii)

      Previously, pgpool-II saves pgpool_status file when pgpool-II
      explicitly is going shutdown. This is fine in most cases and it saves
      slight CPU cycles. But if pgpool-II killed abnormally or the system
      forces pgpool-II to go down by OOM killer, next pgpool-II restarting
      could load obsolete status file.

===============================================================================

                        3.3.7 (tokakiboshi) 2015/07/24

* Version 3.3.7

    This is a bugfix release against pgpool-II 3.3.6.

    __________________________________________________________________

* Bug fixes

    - Fix "cannot find xlog functions" error in pgpool-recovery
      (Muhammad Usama)

      The argument data type of PostgreSQL's pg_xlogfile_name() function
      has been changed from text to pg_lsn since PostgreSQL 9.4. And
      pgpool-recovery was still trying to locate the function by old
      signature.

    - Pass empty string parameters in failover command when pgpool-II
      does not have a value for any particular parameter (Muhammad Usama)

      Instead of omitting the values for the parameters when pgpool-II does
      not have any value for a particular parameter, it now passes an empty
      string to the failover command. This makes sure that failover script
      will always receive the exact number of expected parameters.

    - doc: Clarify load balancing condition (Tatsuo Ishii)

    - doc: Clarify description of pcp_promote_node (Tatsuo Ishii)

      It does not actually promote PostgreSQL standby.

    - doc: Fix outdated limitation description about load balancing using
      JDBC driver (Tatsuo Ishii)

      Even if autocommit is false, load balancing is possible in certain
      conditions.

    - Fix "select() system call interrupted" error (Tatsuo Ishii)

      The health check process complains above and then:

      ERROR:  failed to make persistent db connection
      DETAIL:  connection to host:"x.x.x.x:5432 failed

      However, the healthchek triggers neither fail over nor retrying. So,
      except the annoying messages above, everything goes well. This could
      occur more easily if 1) num_init_children is big and 2) pgpool
      children go into idle state (no query arrived from client for
      child_life_time seconds).

      Original bug report is [pgpool-general: 3756] Connection Interrupted.
      Patch created by Tatsuo Ishii. Enhancement from Usama.

    - Fix the case when user table includes spaces (Tatsuo Ishii)

      For example if table names including spaces are used, pgpool-II cannot
      be handled correctly by the internal functions which access system
      catalogs and it results in SQL errors. Solution is, to always use
      delimited identifier.

      Per bug #136.
      http://www.pgpool.net/mantisbt/view.php?id=136

      Also see [pgpool-general: 3818].

    - Allow to use in-memory query cache size more than 4GB (Tatsuo Ishii)

      This should have been allowed since in memory query cache was born.

    - Do not send a query for checking insert lock in non replication mode
      with extended query (Tatsuo Ishii)

===============================================================================

                        3.2.12 (namameboshi) 2015/07/24

* Version 3.2.12

    This is a bugfix release against pgpool-II 3.2.11.

    __________________________________________________________________

* Bug fixes

    - Fix "cannot find xlog functions" error in pgpool-recovery
      (Muhammad Usama)

      The argument data type of PostgreSQL's pg_xlogfile_name() function
      has been changed from text to pg_lsn since PostgreSQL 9.4. And
      pgpool-recovery was still trying to locate the function by old
      signature.

    - Pass empty string parameters in failover command when pgpool-II
      does not have a value for any particular parameter (Muhammad Usama)

      Instead of omitting the values for the parameters when pgpool-II does
      not have any value for a particular parameter, it now passes an empty
      string to the failover command. This makes sure that failover script
      will always receive the exact number of expected parameters.

    - doc: Fix outdated limitation description about load balancing using
      JDBC driver (Tatsuo Ishii)

      Even if autocommit is false, load balancing is possible in certain
      conditions.

    - Allow to use in-memory query cache size more than 4GB (Tatsuo Ishii)

      This should have been allowed since in memory query cache was born.

    - Do not send a query for checking insert lock in non replication mode
      with extended query (Tatsuo Ishii)

===============================================================================

                        3.1.15 (hatsuiboshi) 2015/07/24

* Version 3.1.15

    This is a bugfix release against pgpool-II 3.1.14.

    __________________________________________________________________

* Bug fixes

    - Fix "cannot find xlog functions" error in pgpool-recovery
      (Muhammad Usama)

      The argument data type of PostgreSQL's pg_xlogfile_name() function
      has been changed from text to pg_lsn since PostgreSQL 9.4. And
      pgpool-recovery was still trying to locate the function by old
      signature.

    - Do not send a query for checking insert lock in non replication mode
      with extended query (Tatsuo Ishii)

===============================================================================

                        3.0.19 (umiyameboshi) 2015/07/24

* Version 3.0.19

    This is a bugfix release against pgpool-II 3.0.18.

    __________________________________________________________________

* Bug fixes

    - Fix "cannot find xlog functions" error in pgpool-recovery
      (Muhammad Usama)

      The argument data type of PostgreSQL's pg_xlogfile_name() function
      has been changed from text to pg_lsn since PostgreSQL 9.4. And
      pgpool-recovery was still trying to locate the function by old
      signature.

    - Do not send a query for checking insert lock in non replication mode
      with extended query (Tatsuo Ishii)

===============================================================================

-- 
Yugo Nagata <nagata <at> sraoss.co.jp>

--

-- 
Sent via pgsql-announce mailing list (pgsql-announce <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-announce

David Fetter | 20 Jul 00:58 2015

== PostgreSQL Weekly News - July 19 2015 ==

== PostgreSQL Weekly News - July 19 2015 ==

== PostgreSQL Product News ==

BDR 0.9.2, a replication system based on logical WALs, released.
http://bdr-project.org/docs/stable/release-0.9.2.html

== PostgreSQL Jobs for July ==

http://archives.postgresql.org/pgsql-jobs/2015-07/

== PostgreSQL Local ==

Rubens Souza from 2ndQuadrant Italia will lead a meetup on "How to
install PostgreSQL on a Raspberry PI" on Thursday, July 23 in Prato.
http://goo.gl/YYpsy7

PGDay Campinas 2015 will take place in Campinas on August 7.
http://pgdaycampinas.com.br/english/

PostgresOpen 2015 will being held in Dallas, Texas September 16-18.
http://2015.postgresopen.org/

PostgreSQL Session #7, will be held September 24th, 2015 in Paris,
France,
http://www.postgresql-sessions.org/7/about

PGDay.IT 2015 will take place in Prato on October 23, 2015. The
International Call For Papers is open until August 8.
http://pgday.it

PostgreSQL Conference Europe 2015 will be held on October 27-30 in the
Vienna Marriott Hotel, in Vienna, Austria.  The CfP is open until
August 7.
http://2015.pgconf.eu/

PGConf Silicon Valley 2015 is November 17-18 at the South San
Francisco Convention Center.
http://www.pgconfsv.com

PGBR2015 (The Brazilian PostgreSQL Conference) will take place in Porto
Alegre, Rio Grande do Sul, on November 18, 19 and 20.
http://pgbr.postgresql.org.br/2015/en/#call-for-papers

PostgreSQL Conference Europe 2015 will be held on October 27-30 in the
Vienna Marriott Hotel, in Vienna, Austria.  The CfP is open until
August 7.
http://2015.pgconf.eu/

== PostgreSQL in the News ==

Planet PostgreSQL: http://planet.postgresql.org/

PostgreSQL Weekly News is brought to you this week by David Fetter

Submit news and announcements by Sunday at 3:00pm Pacific time.
Please send English language ones to david <at> fetter.org, German language
to pwn <at> pgug.de, Italian language to pwn <at> itpug.org.  Spanish language
to pwn <at> arpug.com.ar.

== Applied Patches ==

Bruce Momjian pushed:

- release notes:  markup:  vacuumdb is an application, not command
  http://git.postgresql.org/pg/commitdiff/716f97f96663bdb8b64db9ed26121e2d399e06e0

Heikki Linnakangas pushed:

- Reformat code in ATPostAlterTypeParse.  The code in
  ATPostAlterTypeParse was very deeply indented, mostly because there
  were two nested switch-case statements, which add a lot of
  indentation. Use if-else blocks instead, to make the code less
  indented and more readable.  This is in preparation for next patch
  that makes some actualy changes to the function. These cosmetic
  parts have been separated to make it easier to see the real changes
  in the other patch.
  http://git.postgresql.org/pg/commitdiff/1ab9faaecb03e685aeeb16143c19c0a24d6b0048

- Make regression test output stable.  In the test query I added for
  ALTER TABLE retaining comments, the order of the result rows was not
  stable, and varied across systems. Add an ORDER BY to make the order
  predictable. This should fix the buildfarm failures.
  http://git.postgresql.org/pg/commitdiff/1a56498e5f6db949a066fb125199a7389a798421

- Add ALTER OPERATOR command, for changing selectivity estimator
  functions.  Other options cannot be changed, as it's not totally
  clear if cached plans would need to be invalidated if one of the
  other options change. Selectivity estimator functions only change
  plan costs, not correctness of plans, so those should be safe.
  Original patch by Uriy Zhuravlev, heavily edited by me.
  http://git.postgresql.org/pg/commitdiff/321eed5f0f7563a0cabb3d7a98132856287c1ad1

- Fix event trigger support for the new ALTER OPERATOR command.  Also,
  the lock on pg_operator should not be released until end of
  transaction.
  http://git.postgresql.org/pg/commitdiff/d5c0495cd4b9c78fdfc00961f4ae14c39f877f59

- Retain comments on indexes and constraints at ALTER TABLE ... TYPE
  ...  When a column's datatype is changed, ATExecAlterColumnType()
  rebuilds all the affected indexes and constraints, and the comments
  from the old indexes/constraints were not carried over.  To fix,
  create a synthetic COMMENT ON command in the work queue, to re-add
  any comments on constraints. For indexes, there's a comment field in
  IndexStmt that is used.  This fixes bug #13126, reported by Kirill
  Simonov. Original patch by Michael Paquier, reviewed by Petr Jelinek
  and me. This bug is present in all versions, but only backpatch to
  9.5. Given how minor the issue is, it doesn't seem worth the work
  and risk to backpatch further than that.
  http://git.postgresql.org/pg/commitdiff/e42375fc8124e99c33fa330c53c2b4b502fa0baf

Fujii Masao pushed:

- Prevent pgstattuple() from reporting BRIN as unknown index.  Also
  this patch removes obsolete comment.  Back-patch to 9.5 where BRIN
  index was added.
  http://git.postgresql.org/pg/commitdiff/705d397cd9cede1fd6fb1260d1689570bf6142d4

Álvaro Herrera pushed:

- Mention table_rewrite as valid event trigger tag.  This was
  forgotten in 618c9430a8.
  http://git.postgresql.org/pg/commitdiff/b1b667172242aaffa33f91360d9448fe98b65697

Robert Haas pushed:

- Remove regression test added on auto-pilot.  Test does not match the
  comment which precedes it.  Peter Geoghegan
  http://git.postgresql.org/pg/commitdiff/aa6b2e629cb5debc432e0dcca8ffdcb8d8e6da39

- Add new function pg_notification_queue_usage.  This tells you what
  fraction of NOTIFY's queue is currently filled.  Brendan Jurd,
  reviewed by Merlin Moncure and Gurjeet Singh.  A few further tweaks
  by me.
  http://git.postgresql.org/pg/commitdiff/a04bb65f70dafdf462e0478ad19e6de56df89bfc

Noah Misch pushed:

- AIX: Link the postgres executable with -Wl,-brtllib.  This allows
  PostgreSQL modules and their dependencies to have undefined symbols,
  resolved at runtime.  Perl module shared objects rely on that in
  Perl 5.8.0 and later.  This fixes the crash when PL/PerlU loads such
  modules, as the hstore_plperl test suite does.  Module authors can
  link using -Wl,-G to permit undefined symbols; by default, linking
  will fail as it has.  Back-patch to 9.0 (all supported versions).
  http://git.postgresql.org/pg/commitdiff/bcd7c41206faf6d9654aa6e3766f87770d4fb305

- MinGW: Link ltree_plpython with plpython.  The MSVC build system
  already did this, and building against Python 3 requires it.
  Back-patch to 9.5, where the module was introduced.
  http://git.postgresql.org/pg/commitdiff/736c1f238b3eeaf0f1cecf1753eb5194367fbad9

- AIX: Link TRANSFORM modules with their dependencies.  The result
  closely resembles linking of these modules for the "win32" port.
  Augment the $(exports_file) header so the file is also usable as an
  import file.  Unfortunately, relocating an AIX installation will now
  require adding $(pkglibdir) to LD_LIBRARY_PATH.  Back-patch to 9.5,
  where the modules were introduced.
  http://git.postgresql.org/pg/commitdiff/7193436744819270eeb772f6ada4ec7a388c0b5f

- AIX: Test the -qlonglong option before use.  xlc provides "long
  long" unconditionally at C99-compatible language levels, and this
  option provokes a warning.  The warning interferes with "configure"
  tests that fail in response to any warning.  Notably, before commit
  85a2a8903f7e9151793308d0638621003aded5ae, it interfered with the
  test for -qnoansialias.  Back-patch to 9.0 (all supported versions).
  http://git.postgresql.org/pg/commitdiff/43d89a23d59c487bc9258fad7a6187864cb8c0c0

Magnus Hagander pushed:

- Fix copy/past error in comment.  David Christensen
  http://git.postgresql.org/pg/commitdiff/64c9d8a6c8810796ab9f09d435c248ea516c5f3c

- Fix spelling error.  David Rowley
  http://git.postgresql.org/pg/commitdiff/828df727a673d718265766611e59aa5189d102ba

Tom Lane pushed:

- Fix a low-probability crash in our qsort implementation.  It's
  standard for quicksort implementations, after having partitioned the
  input into two subgroups, to recurse to process the smaller
  partition and then handle the larger partition by iterating.  This
  method guarantees that no more than log2(N) levels of recursion can
  be needed.  However, Bentley and McIlroy argued that checking to see
  which partition is smaller isn't worth the cycles, and so their code
  doesn't do that but just always recurses on the left partition.  In
  most cases that's fine; but with worst-case input we might need O(N)
  levels of recursion, and that means that qsort could be driven to
  stack overflow.  Such an overflow seems to be the only explanation
  for today's report from Yiqing Jin of a SIGSEGV in med3_tuple while
  creating an index of a couple billion entries with a very large
  maintenance_work_mem setting.  Therefore, let's spend the few
  additional cycles and lines of code needed to choose the smaller
  partition for recursion.  Also, fix up the qsort code so that it
  properly uses size_t not int for some intermediate values
  representing numbers of items.  This would only be a live risk when
  sorting more than INT_MAX bytes (in qsort/qsort_arg) or tuples (in
  qsort_tuple), which I believe would never happen with any caller in
  the current core code --- but perhaps it could happen with call
  sites in third-party modules?  In any case, this is trouble waiting
  to happen, and the corrected code is probably if anything shorter
  and faster than before, since it removes sign-extension steps that
  had to happen when converting between int and size_t.  In passing,
  move a couple of CHECK_FOR_INTERRUPTS() calls so that it's not
  necessary to preserve the value of "r" across them, and prettify the
  output of gen_qsort_tuple.pl a little.  Back-patch to all supported
  branches.  The odds of hitting this issue are probably higher in 9.4
  and up than before, due to the new ability to allocate sort
  workspaces exceeding 1GB, but there's no good reason to believe that
  it's impossible to crash older branches this way.
  http://git.postgresql.org/pg/commitdiff/9d6077abf9d6efd992a59f05ef5aba981ea32096

- Fix entirely broken permissions test in new alter_operator
  regression test.  Not only did this test fail to test what it was
  supposed to test, but it left a user definition lying around, which
  caused subsequent runs of the regression tests to fail.
  http://git.postgresql.org/pg/commitdiff/266e771435bfed648138f6b684c895c8225dc8fc

- Repair mishandling of cached cast-expression trees in plpgsql.  In
  commit 1345cc67bbb014209714af32b5681b1e11eaf964, I introduced
  caching of expressions representing type-cast operations into
  plpgsql.  However, I supposed that I could cache both the expression
  trees and the evaluation state trees derived from them for the life
  of the session.  This doesn't work, because we execute the
  expressions in plpgsql's simple_eval_estate, which has an
  ecxt_per_query_memory that is only transaction-lifespan.  Therefore
  we can end up putting pointers into the evaluation state tree that
  point to transaction-lifespan memory; in particular this happens if
  the cast expression calls a SQL-language function, as reported by
  Geoff Winkless.  The minimum-risk fix seems to be to treat the state
  trees the same way we do for "simple expression" trees in plpgsql,
  ie create them in the simple_eval_estate's ecxt_per_query_memory,
  which means recreating them once per transaction.  Since I had to
  introduce bookkeeping overhead for that anyway, I bought back some
  of the added cost by sharing the read-only expression trees across
  all functions in the session, instead of using a per-function table
  as originally.  The simple-expression bookkeeping takes care of the
  recursive-usage risk that I was concerned about avoiding before.  At
  some point we should take a harder look at how all this works, and
  see if we can't reduce the amount of tree reinitialization needed.
  But that won't happen for 9.5.
  http://git.postgresql.org/pg/commitdiff/0fc94a5bab4d0155db5d15197ed3bd8cb435eb21

- Make WaitLatchOrSocket's timeout detection more robust.  In the
  previous coding, timeout would be noticed and reported only when
  poll() or socket() returned zero (or the equivalent behavior on
  Windows).  Ordinarily that should work well enough, but it seems
  conceivable that we could get into a state where poll() always
  returns a nonzero value --- for example, if it is noticing a
  condition on one of the file descriptors that we do not think is
  reason to exit the loop.  If that happened, we'd be in a busy-wait
  loop that would fail to terminate even when the timeout expires.  We
  can make this more robust at essentially no cost, by deciding to
  exit of our own accord if we compute a zero or negative
  time-remaining-to-wait.  Previously the code noted this but just
  clamped the time-remaining to zero, expecting that we'd detect
  timeout on the next loop iteration.  Back-patch to 9.2.  While 9.1
  had a version of WaitLatchOrSocket, it was primitive compared to
  later versions, and did not guarantee reliable detection of timeouts
  anyway.  (Essentially, this is a refinement of commit
  3e7fdcffd6f77187, which was back-patched only as far as 9.2.)
  http://git.postgresql.org/pg/commitdiff/576a95b3a1ce465066c38d6859ccf64fca656e49

Andrew Dunstan pushed:

- Support JSON negative array subscripts everywhere Previously, there
  was an inconsistency across json/jsonb operators that operate on
  datums containing JSON arrays -- only some operators supported
  negative array count-from-the-end subscripting.  Specifically, only
  a new-to-9.5 jsonb deletion operator had support (the new "jsonb -
  integer" operator).  This inconsistency seemed likely to be
  counter-intuitive to users.  To fix, allow all places where the user
  can supply an integer subscript to accept a negative subscript
  value, including path-orientated operators and functions, as well as
  other extraction operators.  This will need to be called out as an
  incompatibility in the 9.5 release notes, since it's possible that
  users are relying on certain established extraction operators
  changed here yielding NULL in the event of a negative subscript.
  For the json type, this requires adding a way of cheaply getting the
  total JSON array element count ahead of time when parsing arrays
  with a negative subscript involved, necessitating an ad-hoc lex and
  parse.  This is followed by a "conversion" from a negative subscript
  to its equivalent positive-wise value using the count.  From there
  on, it's as if a positive-wise value was originally provided.  Note
  that there is still a minor inconsistency here across jsonb deletion
  operators.  Unlike the aforementioned new "-" deletion operator that
  accepts an integer on its right hand side, the new "#-" path
  orientated deletion variant does not throw an error when it appears
  like an array subscript (input that could be recognized by as an
  integer literal) is being used on an object, which is wrong-headed.
  The reason for not being stricter is that it could be the case that
  an object pair happens to have a key value that looks like an
  integer; in general, these two possibilities are impossible to
  differentiate with rhs path text[] argument elements.  However, we
  still don't allow the "#-" path-orientated deletion operator to
  perform array-style subscripting.  Rather, we just return the
  original left operand value in the event of a negative subscript
  (which seems analogous to how the established "jsonb/json #> text[]"
  path-orientated operator may yield NULL in the event of an invalid
  subscript).  In passing, make SetArrayPath() stricter about not
  accepting cases where there is trailing non-numeric garbage bytes
  rather than a clean NUL byte.  This means, for example, that strings
  like "10e10" are now not accepted as an array subscript of 10 by
  some new-to-9.5 path-orientated jsonb operators (e.g. the new #-
  operator).  Finally, remove dead code for jsonb subscript deletion;
  arguably, this should have been done in commit b81c7b409.  Peter
  Geoghegan and Andrew Dunstan
  http://git.postgresql.org/pg/commitdiff/e02d44b8a74810341c90add4cd49e428b9d406b9

- Release note compatibility item.  Note that json and jsonb
  extraction operators no longer consider a negative subscript to be
  invalid.
  http://git.postgresql.org/pg/commitdiff/473865048517c7808ddcf2299d054d8fe30fc6d5

- Enable transforms modules to build and test on Cygwin.  This still
  doesn't work correctly with Python 3, but I am committing this so we
  can get Cygwin buildfarm members building with Python 2.
  http://git.postgresql.org/pg/commitdiff/00eff86cb8c2c9de9197197b4176362d1433f8f6

- Remove dead code.  Defect noticed by Coverity.
  http://git.postgresql.org/pg/commitdiff/9aa663463bbf123e9d38dab88eeaef981fbc6caf

== Rejected Patches (for now) ==

No one was disappointed this week :-)

== Pending Patches ==

Haribabu Kommi sent in two more revisions of a patch to help improve
the performance of vacuum truncation scans.

Dinesh Kumar sent in a patch to add an SQL function to report a log
message.

Jeevan Chalke sent in a patch to fix some infelicities in GROUPING
SETS.

Jeff Janes sent in another revision of a patch to make pg_trgm work
better with GIN.

Amit Kapila sent in another revision of a patch to add machinery for
assessing parallel safety.

Paul Ramsey sent in two revisions of a patch to allow specifying
extensions understood to be installed in PostgreSQL foreign servers.

Jeevan Chalke, Kyotaro HORIGUCHI, and Andrew Gierth traded patches to
fix an issue with GROUPING SETS that resulted in the not especially
helpful, "unrecognized node type" error.

Sameer Thakur and Rahila Syed traded patches to provide a VACUUM
progress checker.

Heikki Linnakangas sent in a patch to fix LWLock "variable" support
broken by the lwlock scalability patch.

SAWADA Masahiko sent in another revision of a patch to avoid freezing
very large tables without need.

Kyotaro HORIGUCHI sent in another revision of a patch to implement
multivariate statistics.

Michael Paquier sent in a patch to ensure that pg_rewind ignores xlog.

Peter Geoghegan sent in two revisions of a patch to use software-based
memory prefetching while sequentially fetching from SortTuple array
and tuplestore.

Jeevan Chalke sent in a patch to fix a collation bug in GROUPING SETS.

Brendan Jurd sent in another revision of a patch to add
pg_notification_queue_usage().

Pavel Stehule sent in a patch to add tab completion to DROP POLICY in
psql.

Fabien COELHO sent in two revisions of a patch to add per-script
statistics and other improvements to pgbench.

Michael Paquier sent in another revision of a patch to retain comments
on indexes and constraints after issuing ALTER TABLE.

Petr Jelinek sent in another revision of a patch to allow adding an
extension including its dependencies.

Julien Rouhaud sent in a patch to allow setting
effective_io_concurrency per tablespace.

Álvaro Herrera sent in a patch to ensure that breakage of object_class
be obvious.

Andres Freund sent in two revisions of a patch to make heap extension
saner.

Pavel Stehule sent in another revision of a patch to add a --strict
option to pg_dump.

--

-- 
Sent via pgsql-announce mailing list (pgsql-announce <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-announce

David Fetter | 13 Jul 01:22 2015

== PostgreSQL Weekly News - July 12 2015 ==

== PostgreSQL Weekly News - July 12 2015 ==

PGDay.IT 2015 will take place in Prato on October 23, 2015. The
International Call For Papers is open until August 8.
http://pgday.it

The second official Russian PostgreSQL conference will be held on July
15-17, 2015 in St. Petersburg, Russia.  A PostgreSQLRussia meetup for
new users will be held July 17, same venue.
http://PgDay.ru
http://PostgreSQLRussia.org

Rubens Souza from 2ndQuadrant Italia will lead a meetup on "How to
install PostgreSQL on a Raspberry PI" on Thursday, July 23 in Prato.
http://goo.gl/YYpsy7

== PostgreSQL Product News ==

Pervasync 6.0.2, a synchronization framework that supports PosrgreSQL,
released.
http://www.pervasync.com

pgBadger 7.1, a parallel PostgreSQL log analyzer written in Perl, released:
http://dalibo.github.io/pgbadger/
Development:
https://github.com/dalibo/pgbadger/

PipelineDB 0.7.7, an open-source, relational streaming-SQL database
based on PostgreSQL, released.
http://www.pipelinedb.com/

== PostgreSQL Jobs for July ==

http://archives.postgresql.org/pgsql-jobs/2015-07/

== PostgreSQL Local ==

PGDay Campinas 2015 will take place in Campinas on August 7.
http://pgdaycampinas.com.br/english/

PostgresOpen 2015 will being held in Dallas, Texas September 16-18.
http://2015.postgresopen.org/

PostgreSQL Session #7, will be held September 24th, 2015 in Paris,
France,
http://www.postgresql-sessions.org/7/about

PostgreSQL Conference Europe 2015 will be held on October 27-30 in the
Vienna Marriott Hotel, in Vienna, Austria.  The CfP is open until
August 7.
http://2015.pgconf.eu/

PGConf Silicon Valley 2015 is November 17-18 at the South San
Francisco Convention Center.
http://www.pgconfsv.com

PGBR2015 (The Brazilian PostgreSQL Conference) will take place in Porto
Alegre, Rio Grande do Sul, on November 18, 19 and 20.
The CfP is open through July 15.
http://pgbr.postgresql.org.br/2015/en/#call-for-papers

PostgreSQL Conference Europe 2015 will be held on October 27-30 in the
Vienna Marriott Hotel, in Vienna, Austria.  The CfP is open until
August 7.
http://2015.pgconf.eu/

== PostgreSQL in the News ==

Planet PostgreSQL: http://planet.postgresql.org/

PostgreSQL Weekly News is brought to you this week by David Fetter

Submit news and announcements by Sunday at 3:00pm Pacific time.
Please send English language ones to david <at> fetter.org, German language
to pwn <at> pgug.de, Italian language to pwn <at> itpug.org.  Spanish language
to pwn <at> arpug.com.ar.

== Applied Patches ==

Andres Freund pushed:

- Fix logical decoding bug leading to inefficient reopening of files.
  When spilling transaction data to disk a simple typo caused the
  output file to be closed and reopened for every serialized change.
  That happens to not have a huge impact on linux, which is why it
  probably wasn't noticed so far, but on windows that appears to
  trigger actual disk writes after every change. Not fun.  The bug
  fortunately does not have any impact besides speed. A change could
  end up being in the wrong segment (last instead of next), but since
  we read all files to the end, that's just ugly, not really
  problematic. It's not a problem to upgrade, since transaction spill
  files do not persist across restarts.  Bug: #13484 Reported-By:
  Olivier Gosseaume Discussion:
  20150703090217.1190.63940 <at> wrigleys.postgresql.org Backpatch to 9.4,
  where logical decoding was added.
  http://git.postgresql.org/pg/commitdiff/b2f6f749c7a5936adbb555e248e8e4df35c00a4a

- Fix pg_recvlogical not to fsync output when it's a tty or pipe.  The
  previous coding tried to handle possible failures when fsyncing a
  tty or pipe fd by accepting EINVAL - but apparently some platforms
  (windows, OSX) don't reliably return that. So instead check whether
  the output fd refers to a pipe or a tty when opening it.
  Reported-By: Olivier Gosseaume, Marko Tiikkaja Discussion:
  559AF98B.3050901 <at> joh.to Backpatch to 9.4, where pg_recvlogical was
  added.
  http://git.postgresql.org/pg/commitdiff/5c0de384d2ceceb07e77e1368e07868244be6762

- Add psql PROMPT variable showing the pid of the connected to
  backend.  The substitution for the pid is %p.  Author: Julien
  Rouhaud Discussion:
  116262CF971C844FB6E793F8809B51C6E99D48 <at> BPXM02GP.gisp.nec.co.jp
  http://git.postgresql.org/pg/commitdiff/275f05c990c46f8dfe3cb46a3279521bda9e9e27

- Refer to %p in the psql docs as 'process ID' not 'pid'.  Per Tom
  Lane.
  http://git.postgresql.org/pg/commitdiff/4af04f96bc9f604a57bf829469b26d8513fd6401

- Optionally don't error out due to preexisting slots in commandline
  utilities.  pg_receivexlog and pg_recvlogical error out when
  --create-slot is specified and a slot with the same name already
  exists. In some cases, especially with pg_receivexlog, that's rather
  annoying and requires additional scripting.  Backpatch to 9.5 as
  slot control functions have newly been added to pg_receivexlog, and
  there doesn't seem much point leaving it in a less useful state.
  Discussion: 20150619144755.GG29350 <at> alap3.anarazel.de
  http://git.postgresql.org/pg/commitdiff/ff27db5dd2fc096d89d3f995d3f650ec6d3bc147

- For consistency add a pfree to ON CONFLICT set_plan_refs code.
  Backpatch to 9.5 where ON CONFLICT was introduced.  Author: Peter
  Geoghegan
  http://git.postgresql.org/pg/commitdiff/3ed26e5f87a90bedaa3d7feb9e197e0d9f3fb252

Fujii Masao pushed:

- Add tab-completion for psql meta-commands.  Based on the original
  code from David Christensen, modified by me.
  http://git.postgresql.org/pg/commitdiff/c81c956477c270c4dd816c2f659743ebcae02b77

- Fix incorrect path in pg_regress log messages.  Back-patch to 9.5
  where the bug was introduced.  David Christensen
  http://git.postgresql.org/pg/commitdiff/61fc420b5710036f3124a44c26a3664a9cc7cdcf

- Make wal_compression PGC_SUSET rather than PGC_USERSET.  When
  enabling wal_compression, there is a risk to leak data similarly to
  the BREACH and CRIME attacks on SSL where the compression ratio of a
  full page image gives a hint of what is the existing data of this
  page.  This vulnerability is quite cumbersome to exploit in
  practice, but doable.  So this patch makes wal_compression PGC_SUSET
  in order to prevent non-superusers from enabling it and exploiting
  the vulnerability while DBA thinks the risk very seriously and
  disables it in postgresql.conf.  Back-patch to 9.5 where
  wal_compression was introduced.
  http://git.postgresql.org/pg/commitdiff/c2e5f4d1c16faa84a19906706481cf149769f320

- Fix obsolete comment regarding NOTICE message level.  By default
  NOTICE message is not sent to server log because the default value
  of log_min_messages is WARNING since 8.4.  Pavel Stehule
  http://git.postgresql.org/pg/commitdiff/6ba365aa4621b0e4c4c0920cbdf56348875a46a2

Heikki Linnakangas pushed:

- Improve handling of out-of-memory in libpq.  If an allocation fails
  in the main message handling loop, pqParseInput3 or pqParseInput2,
  it should not be treated as "not enough data available yet".
  Otherwise libpq will wait indefinitely for more data to arrive from
  the server, and gets stuck forever.  This isn't a complete fix -
  getParamDescriptions and getCopyStart still have the same issue, but
  it's a step in the right direction.  Michael Paquier and me.
  Backpatch to all supported versions.
  http://git.postgresql.org/pg/commitdiff/414bef30bfab20451e15fe799642b52166db8c34

- Move pthread-tests earlier in the autoconf script.  On some Linux
  systems, "-lrt" exposed pthread-functions, so that linking with -lrt
  was seemingly enough to make a program that uses pthreads to work.
  However, when linking libpq, the dependency to libpthread was not
  marked correctly, so that when an executable was linked with -lpq
  but without -pthread, you got errors about undefined pthread_*
  functions from libpq.  To fix, test for the flags required to use
  pthreads earlier in the autoconf script, before checking any other
  libraries.  This should fix the failure on buildfarm member
  shearwater. gharial is also failing; hopefully this fixes that too
  although the failure looks somewhat different.
  http://git.postgresql.org/pg/commitdiff/3b14a17c8e60e8ae9227b9533667743508056c35

- Use AS_IF rather than plain shell "if" in pthread-check.  Autoconf
  generates additional code for the first AC_CHECK_HEADERS call in the
  script. If the first call is within an if-block, the additional code
  is put inside the if-block too, even though it is needed by
  subsequent AC_CHECK_HEADERS checks and should always be executed.
  When I moved the pthread-related checks earlier in the script, the
  pthread.h test inside the block became the very first
  AC_CHECK_HEADERS call in the script, triggering that problem.  To
  fix, use AS_IF instead of plain shell if. AS_IF knows about that
  issue, and makes sure the additional code is always executed. To be
  completely safe from this issue (and others), we should always be
  using AS_IF instead of plain if, but that seems like excessive
  caution given that this is the first time we have trouble like this.
  Plain if-then is more readable than AS_IF.  This should fix
  compilation with --disable-thread-safety, and hopefully the
  buildfarm failure on forgmouth, related to mingw standard headers,
  too.  I backpatched the previous fixes to 9.5, but it's starting to
  look like these changes are too fiddly to backpatch, so commit this
  to master only, and revert all the pthread-related configure changes
  in 9.5.
  http://git.postgresql.org/pg/commitdiff/01051a9879fcd353eaf0d3788a911e774b52798c

- Improve logging of TAP tests.  Create a log file for each test run.
  Stdout and stderr of the test script, as well as any subprocesses
  run as part of the test, are redirected to the log file. This makes
  it a lot easier to debug test failures. Also print the test output
  (ok 12 - ... messages) to the log file, and the command line of any
  external programs executed with the system_or_bail and run_log
  functions. This makes it a lot easier to debug failing tests.
  Modify some of the pg_ctl and other command invocations to not use
  'silent' or 'quiet' options, and don't redirect output to /dev/null,
  so that you get all the information in the log instead.  In the
  passing, construct some command lines in a way that works if
  $tempdir contains quote-characters. I haven't systematically gone
  through all of them or tested that, so I don't know if this is
  enough to make that work.  pg_rewind tests had a custom mechanism
  for creating a similar log file. Use the new generic facility
  instead.  Michael Paquier and me.
  http://git.postgresql.org/pg/commitdiff/1ea06203b82b98b5098808667f6ba652181ef5b2

- Fix another broken link in documentation.  Tom fixed another one of
  these in commit 7f32dbcd, but there was another almost identical one
  in libpq docs. Per his comment: HP's web server has apparently
  become case-sensitive sometime recently.  Per bug #13479 from Daniel
  Abraham.  Corrected link identified by Alvaro.
  http://git.postgresql.org/pg/commitdiff/aaec6a6d37b664199fd7744b976a7dc912ae000a

- Use --debug flag in "remote" pg_rewind regression tests.  Gives more
  information in the log, to debug possible failures.
  http://git.postgresql.org/pg/commitdiff/23b8928829038ef3fba5a04e4f2707c6034464c4

- Replace our hacked version of ax_pthread.m4 with latest upstream
  version.  Our version was different from the upstream version in
  that we tried to use all possible pthread-related flags that the
  compiler accepts, rather than just the first one that works. That
  change was made in commit e48322a6d6cfce1ec52ab303441df329ddbc04d1,
  to work-around a bug affecting GCC versions 3.2 and below
  (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8888), although we
  didn't realize that it was a GCC bug at the time. We hardly care
  about that old GCC versions anymore, so we no longer need that
  workaround.  This fixes the macro for compilers that print warnings
  with the chosen flags. That's pretty annoying on its own right, but
  it also inconspicuously disabled thread-safety, because we refused
  to use any pthread-related flags if the compiler produced warnings.
  Max Filippov reported that problem when linking with uClibc and
  OpenSSL. The warnings-check was added because the workaround for the
  GCC bug caused warnings otherwise, so it's no longer needed either.
  We can just use the upstream version as is.  If you really want to
  compile with GCC version 3.2 or older, you can still work-around it
  manually by setting PTHREAD_CFLAGS="-pthread -lpthread" manually on
  the configure command line.  Backpatch to 9.5. I don't want to
  unnecessarily rock the boat on stable branches, but 9.5 seems like
  fair game.
  http://git.postgresql.org/pg/commitdiff/e97af6c8bfc80d084bca5bf41f036de944b63efe

- Copy-edit the docs changes of OWNER TO CURRENT/SESSION_USER
  additions.  Commit 31eae602 added new syntax to many DDL commands to
  use CURRENT_USER or SESSION_USER instead of role name in ALTER ...
  OWNER TO, but because of a misplaced '{', the syntax in the docs
  implied that the syntax was "ALTER ... CURRENT_USER", instead of
  "ALTER ... OWNER TO CURRENT_USER".  Fix that, and also the funny
  indentation in some of the modified syntax blurps.
  http://git.postgresql.org/pg/commitdiff/cba045b0bd25285242936fd678bc443bfd0d5b83

Tom Lane pushed:

- Fix portability issue in pg_upgrade test script: avoid $PWD.
  SUSv2-era shells don't set the PWD variable, though anything more
  modern does.  In the buildfarm environment this could lead to
  test.sh executing with PWD pointing to $HOME or another high-level
  directory, so that there were conflicts between concurrent
  executions of the test in different branch subdirectories.  This
  appears to be the explanation for recent intermittent failures on
  buildfarm members binturong and dingo (and might well have something
  to do with the buildfarm script's failure to capture log files from
  pg_upgrade tests, too).  To fix, just use `pwd` in place of $PWD.
  AFAICS test.sh is the only place in our source tree that depended on
  $PWD.  Back-patch to all versions containing this script.  Per
  buildfarm.  Thanks to Oskari Saarenmaa for diagnosing the problem.
  http://git.postgresql.org/pg/commitdiff/9a8f58331067e18a5dc10670e687f21ae6a2172e

- Fix postmaster's handling of a startup-process crash.  Ordinarily, a
  failure (unexpected exit status) of the startup subprocess should be
  considered fatal, so the postmaster should just close up shop and
  quit.  However, if we sent the startup process a SIGQUIT or SIGKILL
  signal, the failure is hardly "unexpected", and we should attempt
  restart; this is necessary for recovery from ordinary backend
  crashes in hot-standby scenarios.  I attempted to implement the
  latter rule with a two-line patch in commit
  442231d7f71764b8c628044e7ce2225f9aa43b67, but it now emerges that
  that patch was a few bricks shy of a load: it failed to distinguish
  the case of a signaled startup process from the case where the new
  startup process crashes before reaching database consistency.  That
  resulted in infinitely respawning a new startup process only to have
  it crash again.  To handle this properly, we really must track
  whether we have sent the *current* startup process a kill signal.
  Rather than add yet another ad-hoc boolean to the postmaster's
  state, I chose to unify this with the existing RecoveryError flag
  into an enum tracking the startup process's state.  That seems more
  consistent with the postmaster's general state machine design.
  Back-patch to 9.0, like the previous patch.
  http://git.postgresql.org/pg/commitdiff/45811be94e8539190b5e1a4f2cbdfef97fa391b5

- Improve documentation about array concat operator vs. underlying
  functions.  The documentation implied that there was seldom any
  reason to use the array_append, array_prepend, and array_cat
  functions directly.  But that's not really true, because they can
  help make it clear which case is meant, which the || operator can't
  do since it's overloaded to represent all three cases.  Add some
  discussion and examples illustrating the potentially confusing
  behavior that can ensue if the parser misinterprets what was meant.
  Per a complaint from Michael Herold.  Back-patch to 9.2, which is
  where || started to behave this way.
  http://git.postgresql.org/pg/commitdiff/e4f29ce32391525629c75aade86f2f939956c69c

- Add now-required #include.  Fixes compiler warning induced by
  808ea8fc7bb259ddd810353719cac66e85a608c8.
  http://git.postgresql.org/pg/commitdiff/0a0fe2ff6ef65e3a1cf4d83d96eab144477a0220

- Fix assorted memory leaks.  Per Coverity (not that any of these are
  so non-obvious that they should not have been caught before commit).
  The extent of leakage is probably minor to unnoticeable, but a leak
  is a leak.  Back-patch as necessary.  Michael Paquier
  http://git.postgresql.org/pg/commitdiff/bcc87b6b00de5b36984e0b43a78a8377a3577548

Joe Conway pushed:

- Improve regression test coverage of table lock modes vs permissions.
  Test the interactions with permissions and LOCK TABLE. Specifically
  ROW EXCLUSIVE, ACCESS SHARE, and ACCESS EXCLUSIVE modes against
  SELECT, INSERT, UPDATE, DELETE, and TRUNCATE permissions. Discussed
  by Stephen Frost and Michael Paquier, patch by the latter. Backpatch
  to 9.5 where matching behavior was first committed.
  http://git.postgresql.org/pg/commitdiff/e66a45344ff33d64aa6ff50673ff9fe8577ea6db

- Add assign_expr_collations() to CreatePolicy() and AlterPolicy().
  As noted by Noah Misch, CreatePolicy() and AlterPolicy() omit to
  call assign_expr_collations() on the node trees. Fix the omission
  and add his test case to the rowsecurity regression test.
  http://git.postgresql.org/pg/commitdiff/808ea8fc7bb259ddd810353719cac66e85a608c8

Noah Misch pushed:

- Given a gcc-compatible xlc compiler, prefer xlc-style atomics.  This
  evades a ppc64le "IBM XL C/C++ for Linux" compiler bug.  Back-patch
  to 9.5, where the atomics facility was introduced.
  http://git.postgresql.org/pg/commitdiff/1e700e0fa02b3fd8990d4eaa8bd51b9352cc9736

- Replace use of "diff -q".  POSIX does not specify the -q option, and
  many implementations do not offer it.  Don't bother changing the
  MSVC build system, because having non-GNU diff on Windows is
  vanishingly unlikely.  Back-patch to 9.2, where this invocation was
  introduced.
  http://git.postgresql.org/pg/commitdiff/b28244abe58382be980d9b9577276c0700dd2cbc

- Fix null pointer dereference in "\c" psql command.  The psql crash
  happened when no current connection existed.  (The second new check
  is optional given today's undocumented NULL argument handling in
  PQhost() etc.)  Back-patch to 9.0 (all supported versions).
  http://git.postgresql.org/pg/commitdiff/e135c3d99f4fcb03efa7b0b64445853ee2a74857

- Link pg_stat_statements with libm.  The AIX 7.1 libm is static, and
  AIX postgres executables do not export symbols acquired from
  libraries.  Back-patch to 9.5, where commit
  cfe12763c32437bc708a64ce88a90c7544f16185 added a sqrt() call.
  http://git.postgresql.org/pg/commitdiff/0689cfc34b09136b9daee9c60c85fbed21b62370

- Add .gitignore entries for AIX-specific intermediate build
  artifacts.
  http://git.postgresql.org/pg/commitdiff/bfb4cf12abc14a99b29c9c3f768b0c7f568c262d

- Finish generic-xlc.h draft atomics implementation.  Back-patch to
  9.5, where commit b64d92f1a5602c55ee8b27a7ac474f03b7aee340
  introduced this file.
  http://git.postgresql.org/pg/commitdiff/0d32d2e693ed69b3080be91f734c547f703b49ad

- Revoke support for strxfrm() that write past the specified array
  length.  This formalizes a decision implicit in commit
  4ea51cdfe85ceef8afabceb03c446574daa0ac23 and adds clean detection of
  affected systems.  Vendor updates are available for each such known
  bug.  Back-patch to 9.5, where the aforementioned commit first
  appeared.
  http://git.postgresql.org/pg/commitdiff/be8b06c364db315258fb074e9bfbf5db04ab2c5f

Bruce Momjian pushed:

- doc:  fix typo in CREATE POLICY manual page.  Backpatch through 9.5
  http://git.postgresql.org/pg/commitdiff/57057e2124730b4663a02391369f0ac979791e32

== Rejected Patches (for now) ==

No one was disappointed this week :-)

== Pending Patches ==

Pavel Stehule sent in another revision of a patch to allow raw output
from COPY in libpq.

Ashutosh Bapat sent in a patch to set up a notification channels for
background workers, which can among other things spawn other
background workers.

Julien Rouhaud sent in another revision of a patch to add an
auto_explain sample ratio parameter.

Gurjeet Singh sent in a patch to add SlotIsPhyscial/SlotIsLogical
macros and add a boolean for whether immediately to reserve an LSN for
CREATE_REPLICATION_SLOT ... PHYSICAL.

David Rowley sent in another revision of a patch to improve
performance for joins where outer side is unique.

Michael Paquier sent in another revision of a patch to add a TAP test
for pg_dump checking data dump of extension tables.

Pavel Stehule and Merlin Moncure traded patches to add a
client_min_messages_context GUC.

SAWADA Masahiko sent in four more revisions of a patch to a "frozen"
bit to the visibility map.

Marko Tiikkaja sent in two revisions of a patch to expose
confirmed_flush in pg_stat_replication_slots.

Pavel Stehule sent in a patch to allow tab completing boolean and enum
variables if no specific tab completion already exists.

Amit Langote sent in a patch to correct some comments in predtest.c.

Satoshi Nagayasu sent in a patch to expose the log_disconnections GUC
variable outside postgres.c.

Ildus Kurbangaliev sent in a patch to help monitor waits.

David Rowley sent in another revision of a patch to allow an
aggregate's state to be shared among other aggregate functions when
both aggregate's transition functions (and a few other things) match.

Ashutosh Bapat sent in a patch to create a transaction manager for
FDWs.

Michael Paquier sent in another revision of a patch to support TAP
tests with MSVC and Windows.

Stephen Frost sent in a patch to help secure copy.c handling for RLS.

Alexander Korotkov and Michael Paquier traded patches to add a
fillfactor for GIN indexes.

Kyotaro HORIGUCHI sent in a flock of patches implementing asynchronous
execution on FDWs.

Etsuro Fujita sent in a patch to modify create_foreignscan_plan so
that it detects whether any system columns are requested if scanning a
base relation.

Heikki Linnakangas sent in another revision of a patch to add some
functionality to ALTER OPERATOR.

Peter Geoghegan sent in a patch to reuse abbreviated keys during
second pass of ordered [set] aggregates.

Jeff Davis sent in another revision of a patch to implement memory
accounting for hash aggregates.

Tomas Vondra sent in a patch to enable index-only scans with partial
indexes.

Joe Conway sent in a patch to fix some infelicities in the interaction
between RLS and collations.

Pavel Stehule and Alexander Shulgin traded patches to add generalized
JSON output functions.

Michael Paquier sent in two more revisions of a patch to remove SSL
renegotiation.

Michael Paquier sent in a patch to fix some memory leaks.

--

-- 
Sent via pgsql-announce mailing list (pgsql-announce <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-announce

Gilles Darold | 11 Jul 12:09 2015

pgBadger 7.1 is out

Paris, France - July 11th, 2015

DALIBO is proud to announce the release of pgBadger 7.1.

pgBadger is a PostgreSQL performance analyzer, built for speed with
fully detailed reports based on your PostgreSQL log files.

This new release fixes some issues and adds a new report:

  * Distribution of sessions per application

It also adds Json operators to SQL Beautifier.

For the complete list of changes, please checkout the release note
on https://github.com/dalibo/pgbadger/blob/master/ChangeLog

**IMPORTANT:** Note that new official releases must now be downloaded
from GitHub and no more from SourceForge. Download at
https://github.com/dalibo/pgbadger/releases

===== Links & Credits =====

DALIBO would like to thank the developers who submitted patches and
the users who reported bugs and feature requests, especially Olivier
Schiavo,
Keith Fiske, Hubert Depesz Lubaczewski, Tom Burnett, Steve Crawford, Cyril
Bouthors and Nicolas Thauvin.

pgBadger is an open project. Any contribution to build a better tool
is welcome. You just have to send your ideas, features requests or
patches using the GitHub tools or directly on our mailing list.

Links :

  * Download : http://dalibo.github.io/pgbadger/
  * Mailing List :
https://listes.dalibo.com/cgi-bin/mailman/listinfo/pgbagder

--------------

**About pgBadger** :

pgBagder is a new generation log analyzer for PostgreSQL, created by
Gilles Darold (also author of ora2pg, the powerful migration tool).
pgBadger is a fast and easy tool to analyze your SQL traffic and
create HTML5 reports with dynamics graphs. pgBadger is the perfect
tool to understand the behavior of your PostgreSQL servers and
identify which SQL queries need to be optimized.

Docs, Download & Demo at http://dalibo.github.io/pgbadger/

--------------

**About DALIBO** :

DALIBO is the leading PostgreSQL company in France, providing
support, trainings and consulting to its customers since 2005. The
company contributes to the PostgreSQL community in various ways,
including : code, articles, translations, free conferences and
workshops

Check out DALIBO's open source projects at http://dalibo.github.io

-- 
Gilles Darold
http://dalibo.com - http://dalibo.org

--

-- 
Sent via pgsql-announce mailing list (pgsql-announce <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-announce

desmodemone | 9 Jul 14:38 2015
Picon

PGDay.IT 2015 - Call for Papers

The 9th edition of the Italian PostgreSQL Day ( PGDay.it 2015 ) will be held on Friday , 23th October 2015 in Prato, Italy.
The International Call for Papers has opened and will close on 8th August 2015.

For more information about the conference and the International Call for Paper, please visit  :
Information in English for papers submission is available at : http://2015.pgday.it/?page_id=43

For any kind of information, do not hesitate to contact the committee via email at pgday <at> itpug.org  .



Kind Regards

--
Matteo Durighetto

- - - - - - - - - - - - - - - - - - - - - - -

Italian PostgreSQL User Group
Italian Community for Geographic Free/Open-Source Software
Info Pervasync | 9 Jul 09:59 2015

Pervasync Database Synchronization Framework for PostgreSQL and SQLite


Pervasync just released a new version (6.0.2) of its sync framework that supports synchronization of local PosrgreSQL databases as well as Android/iOS SQLite databases with central PosrgreSQL databases. That's in addition to the already supported Oracle, MySQL and SQL Server databases. 

Synchronization could be two-way, meaning writes can be done on both local and  central databases.  Change capture, conflict detection and resolution are built in to the core of the sync framework.

The signature feature of the framework is that it allows you to sub-set the central server data using  free form SQL queries with parameters. Each user-device could sync shared as well as private data with central databases.

For more info go to http://www.pervasync.com.
 
Best Regards,
Pervasync LLC

Jeff Ferguson | 7 Jul 20:10 2015

Open-Source Streaming-SQL Database PipelineDB Now Available!

Hi All,


PipelineDB, an open-source, relational streaming-SQL database, publicly released version (0.7.7) today and made the product available as open-source via their website.  PipelineDB is based on, and is wire compatible with, PostgreSQL 9.4 and has added functionality including continuous SQL queries, probabilistic data structures, sliding windowing, and stream-table joins.  For a full description of PipelineDB and its capabilities see their technical documentation.


PipelineDB’s fundamental abstraction is what is called a continuous view. These are much like regular SQL views, except that their defining `SELECT` queries can include streams as a source to read from. The most important property of continuous views is that they only store their output in the database. That output is then continuously updated incrementally as new data flows through streams, and raw stream data is discarded once all continuous views have read it. Let's look at a canonical example:


`CREATE CONTINUOUS VIEW v AS SELECT COUNT(*) FROM stream`


Only one row would ever physically exist in PipelineDB for this continuous view, and its value would simply be incremented for each new event ingested.  


For more information on PipelineDB as a company, product and for examples and benefits, please see their blog and download the software here.


             We're looking forward to hearing from you once you have a chance to download the software and give it a try!

Please also check out our tech crunch article here, if you're interested.

Thanks,
Jeff


--
Jeff Ferguson
President and Co-Founder



Gmane