Features Download
From: David Fetter <david <at> fetter.org>
Subject: == PostgreSQL Weekly News - June 09 2013 ==
Newsgroups: gmane.comp.db.postgresql.announce
Date: Monday 10th June 2013 06:50:14 UTC (over 5 years ago)
== PostgreSQL Weekly News - June 09 2013 ==

The first Commitfest for the next version of PostgreSQL will start
soon.  Dust off those patches and prepare to help others dust off

== PostgreSQL Product News ==

Slony-I 2.2.0 beta 4 released.

psqlODBC 09.02.0100 released.

== PostgreSQL Jobs for June ==


== PostgreSQL Local ==

PG Day France is the major French-speaking PostgreSQL community event.
It will be held June 13, 2013 in Nantes, France.

We're going to have a booth at OSCON this year.  Please sign up and
hang out at the booth for an hour or two:

PGDay UK 2013 is July 12, 2013.  Registration is open.

PostgreSQL Brazil will be held August 15-17, 2013 in Porto Velho, RO,

Save The Date!
Postgres Open 2013 will be in Chicago, IL, USA, September 16-18.
    Hotel Sax:
    Early Bird registration open through June 30, 2013:
    Presentations are due by July 1, 2013.

pgconf.EU 2013 will be held on Oct 29-Nov 1, 2013 at the Conrad Hotel
in downtown Dublin, Ireland.  The CfP is open.

PGConf.DE 2013 will be held November 8th, 2013, at the Rhineland
Industrial Museum in Oberhausen.  The CfP is open through September
15, 2013.

== 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 [email protected], German language
to [email protected], Italian language to [email protected]  Spanish language
to [email protected]

== Applied Patches ==

Noah Misch pushed:

- Don't emit non-canonical empty arrays in array_remove().  Dean

Heikki Linnakangas pushed:

- Code review of recycling WAL segments in a restartpoint.  Seems
  cleaner to get the currently-replayed TLI in the same call to
  GetXLogReplayRecPtr that we get the WAL position.  Make it more
  clear in the comment what the code does when recovery has already
  ended (RecoveryInProgress() will set ThisTimeLineID in that case).
  Finally, make resetting ThisTimeLineID afterwards more explicit.

- Put back allow_system_table_mods check in heap_create().  This
  reverts commit a475c6036752c26dca538632b68fd2cc592976b7.  Erik
  Rijkers reported back in January 2013 that after the patch, if you
  do "pg_dump -t myschema.mytable" to dump a single table, and restore
  that in a database where myschema does not exist, the table is
  silently created in pg_catalog instead. That is because pg_dump uses
  "SET search_path=myschema, pg_catalog" to set schema the table is
  created in. While allow_system_table_mods is not a very elegant
  solution to this, we can't leave it as it is, so for now, revert it
  back to the way it was previously.

- Fix off-by-one in pg_xlogdump -r option.  Because of the bug, -r
  would not accept the rmgr with the highest ID.

- Fix typo in comment.

Stephen Frost pushed:

- Additional spelling corrections.  A few more minor spelling
  corrections, no functional changes.  Thom Brown

Tom Lane pushed:

- Add semicolons to eval'd strings to hide a minor Perl behavioral
  change.  "eval q{foo}" used to complain that the error was on line 2
  of the eval'd string, because eval internally tacked on "\n;" so
  that the end of the erroneous command was indeed on line 2.  But as
  of Perl 5.18 it more sanely says that the error is on line 1.  To
  avoid Perl-version-dependent regression test results, use "eval
  q{foo;}" instead in the two places where this matters.  Per
  buildfarm.  Since people might try to use newer Perl versions with
  older PG releases, back-patch as far as 9.0 where these test cases
  were added.

- Fix memory leak in LogStandbySnapshot().  The array allocated by
  GetRunningTransactionLocks() needs to be pfree'd when we're done
  with it.  Otherwise we leak some memory during each checkpoint, if
  wal_level = hot_standby.  This manifests as memory bloat in the
  checkpointer process, or in bgwriter in versions before we made the
  checkpointer separate.  Reported and fixed by Naoya Anzai.
  Back-patch to 9.0 where the issue was introduced.  In passing,
  improve comments for GetRunningTransactionLocks(), and add an Assert
  that we didn't overrun the palloc'd array.

- Add ARM64 (aarch64) support to s_lock.h.  Use the same gcc atomic
  functions as we do on newer ARM chips.  (Basically this is a copy
  and paste of the __arm__ code block, but omitting the SWPB option
  since that definitely won't work.) Back-patch to 9.2.  The patch
  would work further back, but we'd also need to update
  config.guess/config.sub in older branches to make them build
  out-of-the-box, and there hasn't been demand for it.  Mark Salter

- Provide better message when CREATE EXTENSION can't find a target
  schema.  The new message (and SQLSTATE) matches the corresponding
  error cases in namespace.c.  This was thought to be a "can't happen"
  case when extension.c was written, so we didn't think hard about how
  to report it.  But it definitely can happen in 9.2 and later, since
  we no longer require search_path to contain any valid schema names.
  It's probably also possible in 9.1 if search_path came from a
  noninteractive source.  So, back-patch to all releases containing
  this code.  Per report from Sean Chittenden, though this isn't
  exactly his patch.

- Put analyze_keyword back in explain_option_name production.  In
  commit 2c92edad48796119c83d7dbe6c33425d1924626d, I broke "EXPLAIN
  (ANALYZE)" syntax, because I mistakenly thought that ANALYZE/ANALYSE
  were only partially reserved and thus would be included in
  NonReservedWord; but actually they're fully reserved so they still
  need to be called out here.  A nicer solution would be to demote
  these words to type_func_name_keyword status (they can't be less
  than that because of "VACUUM [ANALYZE] ColId").  While that works
  fine so far as the core grammar is concerned, it breaks ECPG's
  grammar for reasons I don't have time to isolate at the moment.  So
  do this for the time being.  Per report from Kevin Grittner.
  Back-patch to 9.0, like the previous commit.

- Prevent pushing down WHERE clauses into unsafe UNION/INTERSECT
  nests.  The planner is aware that it mustn't push down upper-level
  quals into subqueries if the quals reference subquery output columns
  that contain set-returning functions or volatile functions, or are
  non-DISTINCT outputs of a DISTINCT ON subquery.  However, it missed
  making this check when there were one or more levels of UNION or
  INTERSECT above the dangerous expression.  This could lead to
  "set-valued function called in context that cannot accept a set"
  errors, as seen in bug #8213 from Eric Soroos, or to silently wrong
  answers in the other cases.  To fix, refactor the checks so that we
  make the column-is-unsafe checks during subquery_is_pushdown_safe(),
  which already has to recursively inspect all arms of a set-operation
  tree.  This makes qual_is_pushdown_safe() considerably simpler, at
  the cost that we will spend some cycles checking output columns that
  possibly aren't referenced in any upper qual.  But the cases where
  this code gets executed at all are already nontrivial queries, so
  it's unlikely anybody will notice any slowdown of planning.  This
  has been broken since commit
  05f916e6add9726bf4ee046e4060c1b03c9961f2, which makes the bug over
  ten years old.  A bit surprising nobody noticed it before now.

- Minor docs wordsmithing.  Swap the order of a couple of phrases to
  clarify what the adjective "subsequent" applies to.  Joshua Tolley

- Remove fixed limit on the number of concurrent AllocateFile()
  requests.  AllocateFile(), AllocateDir(), and some sister routines
  share a small array for remembering requests, so that the files can
  be closed on transaction failure.  Previously that array had a fixed
  size, MAX_ALLOCATED_DESCS (32).  While historically that had seemed
  sufficient, Steve Toutant pointed out that this meant you couldn't
  scan more than 32 file_fdw foreign tables in one query, because
  file_fdw depends on the COPY code which uses AllocateFile().  There
  are probably other cases, or will be in the future, where this
  nonconfigurable limit impedes users.  We can't completely remove any
  such limit, at least not without a lot of work, since each such
  request requires a kernel file descriptor and most platforms limit
  the number we can have.  (In principle we could "virtualize" these
  descriptors, as fd.c already does for the main VFD pool, but not
  without an additional layer of overhead and a lot of notational
  impact on the calling code.)  But we can at least let the array size
  be configurable.  Hence, change the code to allow up to
  max_safe_fds/2 allocated file requests.  On modern platforms this
  should allow several hundred concurrent file_fdw scans, or more if
  one increases the value of max_files_per_process.  To go much
  further than that, we'd need to do some more work on the data
  structure, since the current code for closing requests has
  potentially O(N^2) runtime; but it should still be all right for
  request counts in this range.  Back-patch to 9.1 where
  contrib/file_fdw was introduced.

- Remove ALTER DEFAULT PRIVILEGES' requirement of schema CREATE
  permissions.  Per discussion, this restriction isn't needed for any
  real security reason, and it seems to confuse people more often than
  it helps them.  It could also result in some database states being
  unrestorable.  So just drop it.  Back-patch to 9.0, where ALTER
  DEFAULT PRIVILEGES was introduced.

- Remove unnecessary restrictions about RowExprs in
  transformAExprIn().  When the existing code here was written, it
  made sense to special-case RowExprs because that was the only way
  that we could handle row comparisons at all.  Now that we have
  record_eq() and arrays of composites, the generic logic for "scalar"
  types will in fact work on RowExprs too, so there's no reason to
  throw error for combinations of RowExprs and other ways of forming
  composite values, nor to ignore the possibility of using a
  ScalarArrayOpExpr.  But keep using the old logic when comparing two
  RowExprs, for consistency with the main transformAExprOp() logic.
  (This allows some cases with not-quite-identical rowtypes to
  succeed, so we might get push-back if we removed it.)  Per bug #8198
  from Rafal Rzepecki.  Back-patch to all supported branches, since
  this works fine as far back as 8.4.  Rafal Rzepecki and Tom Lane

- Tweak postgres_fdw regression test so autovacuum doesn't change
  results.  Autovacuum occurring while the test runs could allow some
  of the inserts to go into recycled space, thus changing the output
  ordering of later queries.  While we could complicate those queries
  to force sorting of their output rows, it doesn't seem like that
  would make the test better in any meaningful way, and conceivably it
  could hide unexpected diffs.  Instead, tweak the affected queries so
  that the inserted rows aren't updated by the following UPDATE.  Per

Peter Eisentraut pushed:

- Update SQL features list

- doc: Clarify description of VALUES command.  Greg Smith

- doc: Fix  in  markup.  Although the DTD technically
  allows this, the resulting HTML is invalid because it puts block
  elements inside inline elements.  DocBook 5.0 also doesn't allow it
  anymore, so it's fair to assume that this was never really intended
  to work.  Replace  with , which is the markup
  used elsewhere in the documentation in similar cases.

Bruce Momjian pushed:

- pg_upgrade:  document that --link should be used with --check
  Backpatch to 9.2.

Robert Haas pushed:

- Ensure that XLOG_HEAP2_VISIBLE always targets an initialized page.
  Andres Freund

Kevin Grittner pushed:

- Correct the documentation of pg_rewrite.ev_attr.  It claimed the
  value was always zero; it is really always -1.  Per report from Hari

Andrew Dunstan pushed:

- Handle Unicode surrogate pairs correctly when processing JSON.  In
  9.2, Unicode escape sequences are not analysed at all other than to
  make sure that they are in the form \uXXXX.  But in 9.3 many of the
  new operators and functions try to turn JSON text values into text
  in the server encoding, and this includes de-escaping Unicode escape
  sequences. This processing had not taken into account the
  possibility that this might contain a surrogate pair to designate a
  character outside the BMP.  That is now handled correctly.  This
  also enforces correct use of surrogate pairs, something that is not
  done by the type's input routines.  This fact is noted in the docs.

- Don't downcase non-ascii identifier chars in multi-byte encodings.
  Long-standing code has called tolower() on identifier character
  bytes with the high bit set. This is clearly an error and produces
  junk output when the encoding is multi-byte. This patch therefore
  restricts this activity to cases where there is a character with the
  high bit set AND the encoding is single-byte.  There have been
  numerous gripes about this, most recently from Martin Schäfer.
  Backpatch to all live releases.

Joe Conway pushed:

- Fix ordering of obj id for Rules and EventTriggers in pg_dump.
  getSchemaData() must identify extension member objects and mark them
  as not to be dumped. This must happen after reading all objects that
  can be direct members of extensions, but before we begin to process
  table subsidiary objects. Both rules and event triggers were wrong
  in this regard.  Backport rules portion of patch to 9.1 -- event
  triggers do not exist prior to 9.3.  Suggested fix by Tom Lane,
  initial complaint and patch by me.

== Rejected Patches (for now) ==

No one was disappointed this week :-)

== Pending Patches ==

Noah Misch sent in a patch to improve partitioning performance by
caching stringToNode() of pg_constraint.ccbin.

Robert Haas sent in another revision of a patch to enable MVCC catalog

Pavel Raiskup sent in a patch to add support for the TAS/S_UNLOCK
instructions for aarch64.

Michael Paquier sent in another revision of a patch to add support for

Andres Freund sent in a WIP patch to add extensible external toast
tuples and add the "snappy" compression algorithm as a contrib module.

Gurjeet Singh and Heikki Linnakangas traded patches to introduce a new
automatic variable to pgbench: client_id.

Amit Kapila sent in another revision of a patch to move unused buffers
to freelist.

Gurjeet Singh sent in another revision of a patch to make processing
of long AND/OR lists more efficient.

Greg Smith and Heikki Linnakangas traded patches to redesign how
checkpoint segments are done.

Dean Rasheed sent in two more revisions of a patch to make sure they
catalog knows when a relation is updateable.

Amit Kapila sent in another revision of a patch to reduce the amount
of WAL for an update operation.

Greg Smith sent in another revision of a patch to add a --throttle
option to pgbench.

Simon Riggs sent in a patch to batch trigger executions together to
avoid execution overhead.

Simon Riggs sent in a patch to make it possible to do ALTER TABLE ...

Dean Rasheed sent in another revision of a patch to add WITH CHECK
OPTION to updateable views.

Noah Misch sent in a flock of patches dealing with memory errors in

Noah Misch sent in two more revisions of a patch to do Valgrind memory

Tatsuo Ishii sent in a patch to rationalize client-side large object

Jeff Davis sent in another revision of a patch to eliminate

Jeff Davis sent in a patch to update pg_filedump to deal with current
technologies like checksums.

Sent via pgsql-announce mailing list ([email protected])
To make changes to your subscription:
CD: 4ms