Skip site navigation (1) Skip section navigation (2)

== PostgreSQL Weekly News - September 25 2016 ==

From: David Fetter <david(at)fetter(dot)org>
To: PostgreSQL Announce <pgsql-announce(at)postgresql(dot)org>
Subject: == PostgreSQL Weekly News - September 25 2016 ==
Date: 2016-09-25 20:31:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-announce
== PostgreSQL Weekly News - September 25 2016 ==

== PostgreSQL Product News ==

postgresql-unit 1.0, an extension which implements a PostgreSQL datatype for SI
units and bytes, released.

== PostgreSQL Jobs for September ==

== PostgreSQL Local ==

Postgres Vision 2016 will be held October 11-13, 2016, in San Francisco.

The Korean Users Group will hold its first PGDay event on October 15, 2016 in Seoul.

PostgreSQL Conference Europe will take place in Tallin, Estonia, on
November 1-4, 2016.  The schedule has been published.

PGDay Austin 2016, will take place on November 12, 2016.  Submission deadline
is September 21, 2016 by midnight CST.  Details and submission form at:

PgConf Silicon Valley 2016 will be held on November 14-16, 2016.

CHAR(16) will take place in New York, December 6, 2016.

PGDay.IT 2016 will take place in Prato on December the 13th 2016.

== PostgreSQL in the News ==

Planet PostgreSQL:

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(dot)org, German language
to pwn(at)pgug(dot)de, Italian language to pwn(at)itpug(dot)org(dot)

== Applied Patches ==

Robert Haas pushed:

- Update recovery_min_apply_delay docs for remote_apply mode.  Bernd Helmle,
  reviewed by Thomas Munro, tweaked by me.

- MSVC: Include pg_recvlogical in client-only install.  MauMau, reviewed by
  Michael Paquier

- Retry DSM control segment creation if Windows indicates access denied.
  Otherwise, attempts to run multiple postmasters running on the same machine
  may fail, because Windows sometimes returns ERROR_ACCESS_DENIED rather than
  ERROR_ALREADY_EXISTS when there is an existing segment.  Hitting this bug is
  much more likely because of another defect not fixed by this patch, namely
  that dsm_postmaster_startup() uses random() which returns the same value every
  time.  But that's not a reason not to fix this.  Kyotaro Horiguchi and Amit
  Kapila, reviewed by Michael Paquier Discussion:

- Use PostmasterRandom(), not random(), for DSM control segment ID.  Otherwise,
  every startup gets the same "random" value, which is definitely not what was

- Add more parallel query documentation.  Previously, the individual settings
  were documented, but there was no overall discussion of the capabilities and
  limitations of the feature.  Add that.  Patch by me, reviewed by Peter
  Eisentraut and Álvaro Herrera.

Heikki Linnakangas pushed:

- Remove obsolete warning from docs.  Python 2.4 and Fedora 4 are both obsolete
  at this point, especially unpatched debug builds.  Discussion:

- Fix latency calculation when there are \sleep commands in the script.  We
  can't use txn_scheduled to hold the sleep-until time for \sleep, because that
  interferes with calculation of the latency of the transaction as whole.
  Backpatch to 9.4, where this bug was introduced.  Fabien COELHO Discussion:

- Fix outdated comments, GIST search queue is not an RBTree anymore.  The GiST
  search queue is implemented as a pairing heap rather than as Red-Black Tree,
  since 9.5 (commit e7032610). I neglected these comments in that commit.

- Fix pgbench's calculation of average latency, when -T is not used.  If the
  test duration was given in # of transactions (-t or no option), rather as a
  duration (-T), the latency average was always printed as 0.  It has been
  broken ever since the display of latency average was added, in 9.4.  Fabien
  Coelho Discussion: <alpine(dot)DEB(dot)2(dot)20(dot)1607131015370(dot)7486(at)sto>

- Print test parameters like "foo: 123", and results like "foo = 123".  The way
  "latency average" was printed was differently if it was calculated from the
  overall run time or was measured on a per-transaction basis.  Also, the
  per-script weight is a test parameter, rather than a result, so use the
  "weight: %f" style for that.  Backpatch to 9.6, since the inconsistency on
  "latency average" was introduced there.  Fabien Coelho Discussion:

- Fix typo in comment.  Daniel Gustafsson

- Improve error message on MSVC if perl*.lib is not found.  John Harvey,
  reviewed by Michael Paquier Discussion:

Peter Eisentraut pushed:

- doc: Correct ALTER USER MAPPING example.  The existing example threw an error.
  From: gabrielle <gorthx(at)gmail(dot)com>

- doc: Fix documentation to match actual make output.  based on patch from
  Takeshi Ideriha <iderihatakeshi(at)gmail(dot)com>

- pg_restore: Add -N option to exclude schemas.  This is similar to the -N
  option in pg_dump, except that it doesn't take a pattern, just like the
  existing -n option in pg_restore.  From: Michael Banck

- Re-add translation markers that were lost.  When win32security.c was moved
  from src/backend/port/win32/security.c, the message writing function was
  changed from write_stderr to log_error, but was not updated.  We could
  add log_error to GETTEXT_TRIGGERS, but it's also used in src/common/exec.c in
  a different way and that would create some confusion or a larger patch.  For
  now, just put an explicit translation marker onto the strings that were
  previously translated.

- Fix typo.  From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>

- pg_ctl: Add tests for promote action.  Reviewed-by: Michael Paquier

- Delay updating control file to "in production".  Move the updating of the
  control file to "in production" status until the point where WAL writes are
  allowed.  Before, there could be a significant gap between the control file
  update and write transactions actually being allowed.  This makes it more
  reliable to use the control status to verify the end of a promotion.  From:
  Michael Paquier <michael(dot)paquier(at)gmail(dot)com>

- pg_ctl: Add wait option to promote action When waiting is selected for the
  promote action, look into pg_control until the state changes, then use the
  PQping-based waiting until the server is reachable.  Reviewed-by: Michael
  Paquier <michael(dot)paquier(at)gmail(dot)com>

- Make command_like output more compact.  Consistently print the test name, not
  the full command, which can be quite lenghty and include temporary directory
  names and other distracting details.  Reviewed-by: Michael Paquier

- Add tests for various connection string issues.  Add tests for consistent
  support of connection strings in frontend programs as well as proper handling
  of unusual characters in database and user names.  These tests were developed
  for the issues of CVE-2016-5424.  To allow testing of names with spaces,
  change the pg_regress command-line options --create-role and --dbname to split
  their arguments by comma only, not space or comma as before.  Only commas were
  actually used in existing uses.  Noah Misch, Michael Paquier, Peter Eisentraut

- pg_ctl: Add promote wait option to help output.  pointed out by Masahiko
  Sawada <sawada(dot)mshk(at)gmail(dot)com>

- pg_ctl: Detect current standby state from pg_control.  pg_ctl used to
  determine whether a server was in standby mode by looking for a recovery.conf
  file.  With this change, it instead looks into pg_control, which is
  potentially more accurate.  There are also occasional discussions about
  removing recovery.conf, so this removes one dependency.  Reviewed-by: Michael
  Paquier <michael(dot)paquier(at)gmail(dot)com>

Tom Lane pushed:

- Be sure to rewind the tuplestore read pointer in non-leader CTEScan nodes.
  ExecInitCteScan supposed that it didn't have to do anything to the extra
  tuplestore read pointer it gets from tuplestore_alloc_read_pointer.  However,
  it needs this read pointer to be positioned at the start of the tuplestore,
  while tuplestore_alloc_read_pointer is actually defined as cloning the current
  position of read pointer 0.  In normal situations that accidentally works
  because we initialize the whole plan tree at once, before anything gets read.
  But it fails in an EvalPlanQual recheck, as illustrated in bug #14328 from
  Dima Pavlov.  To fix, just forcibly rewind the pointer after
  tuplestore_alloc_read_pointer.  The cost of doing so is negligible unless the
  tuplestore is already in TSS_READFILE state, which wouldn't happen in normal
  cases.  We could consider altering tuplestore's API to make that case cheaper,
  but that would make for a more invasive back-patch and it doesn't seem worth
  it.  This has been broken probably for as long as we've had CTEs, so
  back-patch to all supported branches.  Discussion:

- Remove nearly-unused SizeOfIptrData macro.  Past refactorings have removed all
  but one reference to SizeOfIptrData (and that one place was in a pretty
  noncritical spot).  Since nobody's complained, it seems probable that there
  are no supported compilers that don't think sizeof(ItemPointerData) is 6.  If
  there are, we're wasting MAXALIGN per heap tuple anyway, so it's rather silly
  to worry about whether we can shave space in places like WAL records.  Pavan
  Deolasee Discussion:

- Avoid using PostmasterRandom() for DSM control segment ID.  Commits 470d886c3
  et al intended to fix the problem that the postmaster selected the same
  "random" DSM control segment ID on every start.  But using PostmasterRandom()
  for that destroys the intended property that the delay between
  random_start_time and random_stop_time will be unpredictable.  (Said delay is
  probably already more predictable than we could wish, but that doesn't mean
  that reducing it by a couple orders of magnitude is OK.) Revert the previous
  patch and add a comment warning against misuse of PostmasterRandom.  Fix the
  original problem by calling srandom() early in PostmasterMain, using a
  low-security seed that will later be overwritten by PostmasterRandom.
  Discussion: <20789(dot)1474390434(at)sss(dot)pgh(dot)pa(dot)us>

- Don't trust CreateFileMapping() to clear the error code on success.  We must
  test GetLastError() even when CreateFileMapping() returns a non-null handle.
  If that value were left over from some previous system call, we might be
  fooled into thinking the segment already existed.  Experimentation on Windows
  7 suggests that CreateFileMapping() clears the error code on success, but it
  is not documented to do so, so let's not rely on that happening in all Windows
  releases.  Amit Kapila Discussion: <20811(dot)1474390987(at)sss(dot)pgh(dot)pa(dot)us>

- Remove useless code.  Apparent copy-and-pasteo in standby_desc_invalidations()
  had two entries for msg->id == SHAREDINVALRELMAP_ID.  Aleksander Alekseev
  Discussion: <20160923090814(dot)GB1238(at)e733>

- Fix incorrect logic for excluding range constructor functions in pg_dump.
  Faulty AND/OR nesting in the WHERE clause of getFuncs' SQL query led to
  dumping range constructor functions if they are part of an extension and we're
  in binary-upgrade mode.  Actually, we don't want to dump them separately even
  then, since CREATE TYPE AS RANGE will create the range's constructor functions
  regardless.  Per report from Andrew Dunstan.  It looks like this mistake was
  introduced by me, in commit b985d4877, in perhaps-overzealous refactoring to
  reduce code duplication.  I'm suitably embarrassed.  Report:

- Doc: fix examples of # operators so they actually work.  These worked as-is
  until around 7.0, but fail in newer versions because there are more operators
  named "#".  Besides it's a bit inconsistent that only two of the examples on
  this page lack type names on their constants.  Report:

- Install TAP test infrastructure so it's available for extension testing.  When
  configured with --enable-tap-tests, "make install" will now install the Perl
  support files for TAP testing where PGXS will find them.  This allows
  extensions to rely on $(prove_check) even when being built out-of-tree.
  Back-patch to 9.4 where we first started to support TAP testing, to reduce the
  number of cases extension makefiles need to consider.  Craig Ringer

- Do a final round of updates on the 9.6 release notes.  Set release date,
  document a few recent commits, do one last pass of copy-editing.

Bruce Momjian pushed:

- C comment:  fix function header comment.  Fix for transformOnConflictClause().
  Author: Tomonari Katsumata

== Pending Patches ==

David Fetter sent in another revision of a patch to add a contrib hook and
associated GUCs for disallowing UPDATE and/or DELETE when no WHERE clause is

Vladimir Gordiychuk and Craig Ringer traded patches to permit pausing

Thomas Munro sent in a patch to check the return code for postmaster death.

Takayuki Tsunakawa sent in a patch to make large shared_buffers settings
effective on Windows.

Ashutosh Bapat sent in a patch to cache the result of code in
add_paths_to_joinrel() which computes the set of target relations that should
overlap parameterization of any proposed join path rather than re-computing it
each time it's used in a query.

Daniel Vérité sent in another revision of a patch to enable psql variable hooks
to return a boolean indicating whether a change is allowed.

Mithun Cy sent in another revision of a patch to add some tests to cover hash

Craig Ringer and Robert Haas traded patches to add a txid_status(bigint) to get
status of an xact.

Jesper Pedersen sent in four more revisions of a patch to add hash index support
to pageinspect.

Heikki Linnakangas and Fabien COELHO traded patches to refactor the pgbench meta
commands into a state machine.

Mark Dilger sent in a patch to fix a place that shouldn't have cast away const.

Michaël Paquier sent in a patch to add suitable OOM warnings to
palloc_extended() and pg_malloc_internal().

Haribabu Kommi sent in another revision of a patch to enable tracking the number
of commands executed grouped by command tag.

Ashutosh Bapat sent in two more revisions of a patch to enable optimizations of
partition-wise join for join between (declaratively) partitioned tables.

Michaël Paquier sent in three more revisions of a patch to track wait events for

Amit Kapila sent in another revision of a patch to implement concurrent hash

David Cramer and Pavel Stěhule traded patches to add PL/PythonU support for
multidimensional arrays.

Pavel Stěhule and Craig Ringer traded patches to add xmltable().

Anastasia Lubennikova sent in another revision of a patch to add covering &
unique indexes.

Heikki Linnakangas sent in a patch to refactor the LogicalTapeSet/LogicalTape

Ashutosh Bapat sent in a patch to refactor index creation so it plays better
with declaratively partitioned tables.

Julian Markwort sent in a patch to allow specifying a 'custom' pgpassfile within
the connection string along the lines of the existing parameters sslkey and

Michaël Paquier sent in another revision of a patch to move sync routines of
initdb into src/common, issue fsync more carefully in pg_receivexlog and
pg_basebackup [-X] stream, add --nosync option to pg_basebackup, and switch
pg_basebackup commands in to use --no-sync.

Peter Eisentraut sent in another revision of a patch to change pg_dump by
separate table and sequence data object types and fixing pg_upgrade to use this
facility from pg_dump.

David Steele sent in another revision of a patch to exclude additional
directories in pg_basebackup.

Robert Haas sent in a WIP patch to enable asynchronous execution.

Amit Kapila sent in another revision of a patch to do SetLastError(0) before
calling CreateFileMapping.

Thomas Munro sent in a patch to add psql tab completions for LOCK TABLE ... IN

Thomas Munro sent in a patch to refactor StartupXLOG.

Masahiko Sawada sent in another revision of a patch to add quorum commit.

Amit Kapila sent in another revision of a patch to add WAL for hash indexes.

pgsql-announce by date

Next:From: Britt ColeDate: 2016-09-27 10:14:38
Subject: Barman 2.0 Released
Previous:From: Christoph BergDate: 2016-09-22 14:25:52
Subject: postgresql-unit 1.0 released

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group