Josette Garcia | 26 Feb 16:50 2015
Picon

Manchester PostgreSQL Meetup

New Manchester PostgreSQL meetup

We have organized a PostgreSQL meetup in Manchester on March 4th

(http://www.meetup.com/The-Manchester-PostgreSQL-Meetup/) and would love to see as many of you as possible! We're kicking off with a talk by Simon Riggs on the new features of PostgreSQL 9.4. If enough time is available, Simon might mention release 9.5 due later on this year. Followed by Question Time - ask as many questions as you wish.

 

Who is Simon Riggs, you wonder?

Simon is a major developer and committer of the PostgreSQL project and has contributed major features in each of the last 8 versions of PostgreSQL. His work includes recovery and replication, performance and monitoring as well as designs for many other features.

Simon has worked as a Database Architect for more than 25 years, with high-end solutions experience and certifications on Oracle, Teradata and DB2.

No pizza this time, but Simon will buy the first round of drinks at the local pub.

Hope you are able to spend the evening with us.

 

Many thanks

Josette

 

 

Josette Garcia . Community Manager

2ndQuadrant.com . Blog: josetteorama.com . <at> josetteg

 

David Fetter | 23 Feb 00:48 2015

== PostgreSQL Weekly News - February 22 2015 ==

== PostgreSQL Weekly News - February 22 2015 ==

India PostgreSQL UserGroup will hold a PGday in Bengaluru, Karnataka,
India on April 11, 2015.  RSVP at
http://www.meetup.com/India-PUG/events/220553997/

== PostgreSQL Product News ==

pypgTAP, a framework intended to improve the SDLC for PostgreSQL,
released.
https://github.com/itissid/pypgTAP

PostgreSQL Dashboard 0.2, a real-time monitoring screen based on
Dashing and Sinatra, released.
http://daamien.github.io/PostgreSQL-Dashboard/

ODB 2.4.0, an ORM for C++ which supports PostgreSQL, released.
http://www.codesynthesis.com/~boris/blog/2015/02/11/odb-2-4-0-released/

pgpool-II versions 3.4.1, 3.3.5, 3.2.10, 3.1.13, and 3.0.17 released
with pgpoolAdmin 3.4.1.
pgpool-II is a connection pooler and replication system for PostgreSQL.
http://pgpool.net/mediawiki/index.php/Downloads
http://pgpool.net/mediawiki/index.php/Yum_Repository
psycopg2 2.6 and 2.5.5 Python connector for PostgreSQL, released.
http://initd.org/psycopg/articles/2015/02/09/psycopg-26-and-255-released/

== PostgreSQL Jobs for February ==

http://archives.postgresql.org/pgsql-jobs/2015-02/threads.php

== PostgreSQL Local ==

pgDaySF 2015 will be held March 10, 2015 in Burlingame, California.
http://sfpostgres.org/pgday-sf-2015-call-for-speakers-and-sponsors/

Registration for Nordic PostgreSQL Day, March 11, 2015 in  Copenhagen,
Denmark, is open.
http://2015.nordicpgday.org/registration/

PGConf US 2015 takes place March 25-27, 2015 in NYC.
http://nyc.pgconf.us/2015/

PGCon 2015 is June 16-20 in Ottawa, Canada.
http://www.pgcon.org/2015/

== 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 ==

Tom Lane pushed:

- Fix null-pointer-deref crash while doing COPY IN with check
  constraints.  In commit bf7ca15875988a88e97302e012d7c4808bef3ea9 I
  introduced an assumption that an RTE referenced by a whole-row Var
  must have a valid eref field.  This is false for RTEs constructed by
  DoCopy, and there are other places taking similar shortcuts.
  Perhaps we should make all those places go through
  addRangeTableEntryForRelation or its siblings instead of having
  ad-hoc logic, but the most reliable fix seems to be to make the new
  code in ExecEvalWholeRowVar cope if there's no eref.  We can
  reasonably assume that there's no need to insert column aliases if
  no aliases were provided.  Add a regression test case covering this,
  and also verifying that a sane column name is in fact available in
  this situation.  Although the known case only crashes in 9.4 and
  HEAD, it seems prudent to back-patch the code change to 9.2, since
  all the ingredients for a similar failure exist in the variant patch
  applied to 9.3 and 9.2.  Per report from Jean-Pierre Pelletier.
  http://git.postgresql.org/pg/commitdiff/08361cea2b333189fa3736f2dc6452cef654923d

- Rationalize the APIs of array element/slice access functions.  The
  four functions array_ref, array_set, array_get_slice,
  array_set_slice have traditionally declared their array inputs and
  results as being of type "ArrayType *".  This is a lie, and has been
  since Berkeley days, because they actually also support
  "fixed-length array" types such as "name" and "point"; not to
  mention that the inputs could be toasted.  These values should be
  declared Datum instead to avoid confusion.  The current coding
  already risks possible misoptimization by compilers, and it'll get
  worse when "expanded" array representations become a valid
  alternative.  However, there's a fair amount of code using array_ref
  and array_set with arrays that *are* known to be ArrayType
  structures, and there might be more such places in third-party code.
  Rather than cluttering those call sites with
  PointerGetDatum/DatumGetArrayTypeP cruft, what I did was to rename
  the existing functions to array_get_element/array_set_element, fix
  their signatures, then reincarnate array_ref/array_set as backwards
  compatibility wrappers.  array_get_slice/array_set_slice have no
  such constituency in the core code, and probably not in third-party
  code either, so I just changed their APIs.
  http://git.postgresql.org/pg/commitdiff/e983c4d1aa42d613542cf222e222b034918374b1

- Use fast path in plpgsql's RETURN/RETURN NEXT in more cases.
  exec_stmt_return() and exec_stmt_return_next() have fast-path code
  for handling a simple variable reference (i.e. "return var") without
  going through the full expression evaluation machinery.  For some
  reason, pl_gram.y was under the impression that this fast path only
  applied for record/row variables; but in reality code for handling
  regular scalar variables has been there all along.  Adjusting the
  logic to allow that code to be used actually results in a net
  savings of code in pl_gram.y (by eliminating some redundancy), and
  it buys a measurable though not very impressive amount of speedup.
  Noted while fooling with my expanded-array patch, wherein this makes
  a much bigger difference because it enables returning an expanded
  array variable without an extra flattening step.  But AFAICS this is
  a win regardless, so commit it separately.
  http://git.postgresql.org/pg/commitdiff/9e3ad1aac52454569393a947c06be0d301749362

- Fix misuse of memcpy() in check_ip().  The previous coding copied
  garbage into a local variable, pretty much ensuring that the
  intended test of an IPv6 connection address against a promoted IPv4
  address from pg_hba.conf would never match.  The lack of field
  complaints likely indicates that nobody realized this was supposed
  to work, which is unsurprising considering that no user-facing docs
  suggest it should work.  In principle this could have led to a
  SIGSEGV due to reading off the end of memory, but since the source
  address would have pointed to somewhere in the function's stack
  frame, that's quite unlikely.  What led to discovery of the bug is
  Hugo Osvaldo Barrera's report of a crash after an OS upgrade, which
  is probably because he is now running a system in which memcpy
  raises abort() upon detecting overlapping source and destination
  areas.  (You'd have to additionally suppose some things about the
  stack frame layout to arrive at this conclusion, but it seems
  plausible.) This has been broken since the code was added, in commit
  f3aec2c7f51904e7, so back-patch to all supported branches.
  http://git.postgresql.org/pg/commitdiff/cb66f495f5d0c204f051971f2c549d5c3ac850ea

- Remove code to match IPv4 pg_hba.conf entries to IPv4-in-IPv6
  addresses.  In investigating yesterday's crash report from Hugo
  Osvaldo Barrera, I only looked back as far as commit
  f3aec2c7f51904e7 where the breakage occurred (which is why I thought
  the IPv4-in-IPv6 business was undocumented).  But actually the logic
  dates back to commit 3c9bb8886df7d56a and was simply broken by
  erroneous refactoring in the later commit.  A bit of archives
  excavation shows that we added the whole business in response to a
  report that some 2003-era Linux kernels would report IPv4
  connections as having IPv4-in-IPv6 addresses.  The fact that we've
  had no complaints since 9.0 seems to be sufficient confirmation that
  no modern kernels do that, so let's just rip it all out rather than
  trying to fix it.  Do this in the back branches too, thus
  essentially deciding that our effective behavior since 9.0 is
  correct.  If there are any platforms on which the kernel reports
  IPv4-in-IPv6 addresses as such, yesterday's fix would have made for
  a subtle and potentially security-sensitive change in the effective
  meaning of IPv4 pg_hba.conf entries, which does not seem like a good
  thing to do in minor releases.  So let's let the post-9.0 behavior
  stand, and change the documentation to match it.  In passing, I
  failed to resist the temptation to wordsmith the description of
  pg_hba.conf IPv4 and IPv6 address entries a bit.  A lot of this text
  hasn't been touched since we were IPv4-only.
  http://git.postgresql.org/pg/commitdiff/2e105def09f27d49c1761abab06b427cfaa5d304

- Fix EXPLAIN output for cases where parent table is excluded by
  constraints.  The previous coding in EXPLAIN always labeled a
  ModifyTable node with the name of the target table affected by its
  first child plan.  When originally written, this was necessarily the
  parent table of the inheritance tree, so everything was unconfusing.
  But when we added NO INHERIT constraints, it became possible for the
  parent table to be deleted from the plan by constraint exclusion
  while still leaving child tables present.  This led to the
  ModifyTable plan node being labeled with the first surviving child,
  which was deemed confusing.  Fix it by retaining the parent table's
  RT index in a new field in ModifyTable.  Etsuro Fujita, reviewed by
  Ashutosh Bapat and myself
  http://git.postgresql.org/pg/commitdiff/abe45a9b315d7b3739f442597f570f9454bd466d

- Fix failure to honor -Z compression level option in pg_dump -Fd.
  cfopen() and cfopen_write() failed to pass the compression level
  through to zlib, so that you always got the default compression
  level if you got any at all.  In passing, also fix these and related
  functions so that the correct errno is reliably returned on failure;
  the original coding supposes that free() cannot change errno, which
  is untrue on at least some platforms.  Per bug #12779 from Christoph
  Berg.  Back-patch to 9.1 where the faulty code was introduced.
  Michael Paquier
  http://git.postgresql.org/pg/commitdiff/0e7e355f27302b62af3e1add93853ccd45678443

- Fix placement of "SET row_security" command issuance in pg_dump.
  Somebody apparently threw darts at the code to decide where to
  insert these.  They certainly didn't proceed by adding them where
  other similar SETs were handled.  This at least broke pg_restore,
  and perhaps other use-cases too.
  http://git.postgresql.org/pg/commitdiff/297b2c1ef9878f84a9951beadf831ef390227238

- Split array_push into separate array_append and array_prepend
  functions.  There wasn't any good reason for a single C function to
  implement both these SQL functions: it saved very little code
  overall, and it required significant pushups to re-determine at
  runtime which case applied.  Redoing it as two functions ends up
  with just slightly more lines of code, but it's simpler to
  understand, and faster too because we need not repeat syscache
  lookups on every call.  An important side benefit is that this
  eliminates the only case in which different aliases of the same C
  function had both anyarray and anyelement arguments at the same
  position, which would almost always be a mistake.  The opr_sanity
  regression test will now notice such mistakes since there's no
  longer a valid case where it happens.
  http://git.postgresql.org/pg/commitdiff/56a79a869bedc4bf6c35853642694cc0b0594dd2

- Update assorted TOAST-related documentation.  While working on
  documentation for expanded arrays, I noticed a number of details in
  the TOAST-related documentation that were already inaccurate or
  obsolete.  This should be fixed independently of whether expanded
  arrays get in or not.  One issue is that the already existing
  indirect-pointer facility was not documented at all.  Also, the
  documentation says that you only need to use VARSIZE/SET_VARSIZE if
  you've made your variable-length type TOAST-aware, but actually
  we've forced that business on all varlena types even if they've
  opted out of TOAST by setting storage = plain.  Wordsmith a few
  other things too, like an amusingly archaic claim that there are few
  64-bit machines.  I thought about back-patching this, but since all
  this doco is oriented to hackers and C-coded extension authors,
  fixing it in HEAD is probably good enough.
  http://git.postgresql.org/pg/commitdiff/9bb955c8286c20474b5462eea3e3cf76c694d88f

- Add pg_stat_get_snapshot_timestamp() to show statistics snapshot
  timestamp.  Per discussion, this could be useful for purposes such
  as programmatically detecting a nonresponding stats collector.  We
  already have the timestamp anyway, it's just a matter of providing a
  SQL-accessible function to fetch it.  Matt Kelly, reviewed by Jim
  Nasby
  http://git.postgresql.org/pg/commitdiff/2fb7a75f37d0beca80f45e15736ec8d50064228a

- Use "#ifdef CATALOG_VARLEN" to protect nullable fields of pg_authid.
  This gives a stronger guarantee than a mere comment against
  accessing these fields as simple struct members.  Since rolpassword
  is in fact varlena, it's not clear why these didn't get marked from
  the beginning, but let's do it now.  Michael Paquier
  http://git.postgresql.org/pg/commitdiff/692bd09ad12a27fda3566787b089fbd394d7b65b

- Remove unused variable.  Per buildfarm.
  http://git.postgresql.org/pg/commitdiff/9aa53bbd15ef65a4be6c09709fbe985898ae9ad7

- Some more FLEXIBLE_ARRAY_MEMBER hacking.
  http://git.postgresql.org/pg/commitdiff/5740be6d6e39dd85587aa71b3bd1fb0a423858b0

- Use FLEXIBLE_ARRAY_MEMBER in struct varlena.  This forces some minor
  coding adjustments in tuptoaster.c and inv_api.c, but the new coding
  there is cleaner anyway.  Michael Paquier
  http://git.postgresql.org/pg/commitdiff/e38b1eb0986990d539e056a65c6b122b295ce932

- Use FLEXIBLE_ARRAY_MEMBER in struct RecordIOData.  I (tgl) fixed
  this last night in rowtypes.c, but I missed that the code had been
  copied into a couple of other places.  Michael Paquier
  http://git.postgresql.org/pg/commitdiff/c110eff1324f5c882c737ad988191ed4a54c4936

- Use FLEXIBLE_ARRAY_MEMBER in some more places.  Fix a batch of
  structs that are only visible within individual .c files.  Michael
  Paquier
  http://git.postgresql.org/pg/commitdiff/33a3b03d636b529b27f869e332b6344d52635331

- Fix statically allocated struct with FLEXIBLE_ARRAY_MEMBER member.
  clang complains about this, not unreasonably, so define another
  struct that's explicitly for a WordEntryPos with exactly one
  element.  While at it, get rid of pretty dubious use of a static
  variable for more than one purpose --- if it were being treated as
  const maybe I'd be okay with this, but it isn't.
  http://git.postgresql.org/pg/commitdiff/33b2a2c97f3dd4cf8bbc2c020e34129886367b72

- Some more FLEXIBLE_ARRAY_MEMBER fixes.
  http://git.postgresql.org/pg/commitdiff/f2874feb7c4e71200539c0287544eeebd8fcb3d4

- Use FLEXIBLE_ARRAY_MEMBER in a bunch more places.  Replace some
  bogus "x[1]" declarations with "x[FLEXIBLE_ARRAY_MEMBER]".  Aside
  from being more self-documenting, this should help prevent bogus
  warnings from static code analyzers and perhaps compiler
  misoptimizations.  This patch is just a down payment on eliminating
  the whole problem, but it gets rid of a lot of easy-to-fix cases.
  Note that the main problem with doing this is that one must no
  longer rely on computing sizeof(the containing struct), since the
  result would be compiler-dependent.  Instead use offsetof(struct,
  lastfield).  Autoconf also warns against spelling that
  offsetof(struct, lastfield[0]).  Michael Paquier, review and
  additional fixes by me.
  http://git.postgresql.org/pg/commitdiff/09d8d110a604e52216102e73fb8475b7aa88f1d1

- Fix misparsing of empty value in conninfo_uri_parse_params().  After
  finding an "=" character, the pointer was advanced twice when it
  should only advance once.  This is harmless as long as the value
  after "=" has at least one character; but if it doesn't, we'd miss
  the terminator character and include too much in the value.  In
  principle this could lead to reading off the end of memory.  It does
  not seem worth treating as a security issue though, because it would
  happen on client side, and besides client logic that's taking
  conninfo strings from untrusted sources has much worse security
  problems than this.  Report and patch received off-list from Thomas
  Fanghaenel.  Back-patch to 9.2 where the faulty code was introduced.
  http://git.postgresql.org/pg/commitdiff/b26e2081423cf1c70f83a11787351017c97cfd7c

- Minor code beautification in conninfo_uri_parse_params().  Reading
  this made me itch, so clean the logic a bit.
  http://git.postgresql.org/pg/commitdiff/3d9b6f31eec150b5a6000e0814e81e36d9eb069a

- Use FLEXIBLE_ARRAY_MEMBER for HeapTupleHeaderData.t_bits[].  This
  requires changing quite a few places that were depending on
  sizeof(HeapTupleHeaderData), but it seems for the best.  Michael
  Paquier, some adjustments by me
  http://git.postgresql.org/pg/commitdiff/e1a11d93111ff3fba7a91f3f2ac0b0aca16909a8

- Use FLEXIBLE_ARRAY_MEMBER in a number of other places.  I think
  we're about done with this...
  http://git.postgresql.org/pg/commitdiff/2e211211a76782b6084194a5ced94c0795460047

- Don't need to explain [1] kluge anymore in xfunc.sgml.
  http://git.postgresql.org/pg/commitdiff/0627eff3602c0ce0e8358d48ddb3ffa73963e4d0

- Use FLEXIBLE_ARRAY_MEMBER in Windows-specific code.  Be a tad more
  paranoid about overlength input, too.
  http://git.postgresql.org/pg/commitdiff/332f02f88beead6365bc2126c95451520bbfe163

- Try to fix busted gettimeofday() code.  Per buildfarm, we have to
  match the _stdcall property of the system functions.
  http://git.postgresql.org/pg/commitdiff/e9fd5545de3bb4efe163af4a9c957badac86ccd7

- Represent BETWEEN as a special node type in raw parse trees.
  Previously, gram.y itself converted BETWEEN into AND (or AND/OR)
  nests of expression comparisons.  This was always as bogus as could
  be, but fixing it hasn't risen to the top of the to-do list.  The
  present patch invents an A_Expr representation for BETWEEN
  expressions, and does the expansion to comparison trees in
  parse_expr.c which is at least a slightly saner place to be doing
  semantic conversions.  There should be no change in the post-
  parse-analysis results.  This does nothing for the semantic issues
  with BETWEEN (dubious connection to btree-opclass semantics, and
  multiple evaluation of possibly volatile subexpressions) ... but
  it's a necessary preliminary step before we could fix any of that.
  The main immediate benefit is that preserving BETWEEN as an
  identifiable raw-parse-tree construct will enable better error
  messages.  While at it, fix the code so that multiply-referenced
  subexpressions are physically duplicated before being passed through
  transformExpr().  This gets rid of one of the principal reasons why
  transformExpr() has historically had to allow already-processed
  input.
  http://git.postgresql.org/pg/commitdiff/34af082f95aa6adb8af5fbd4da46bd4c3c176856

- Get rid of multiple applications of transformExpr() to the same
  tree.  transformExpr() has for many years had provisions to do
  nothing when applied to an already-transformed expression tree.
  However, this was always ugly and of dubious reliability, so we'd be
  much better off without it.  The primary historical reason for it
  was that gram.y sometimes returned multiple links to the same
  subexpression, which is no longer true as of my BETWEEN fixes.  We'd
  also grown some lazy hacks in CREATE TABLE LIKE (failing to
  distinguish between raw and already-transformed index
  specifications) and one or two other places.  This patch removes the
  need for and support for re-transforming already transformed
  expressions.  The index case is dealt with by adding a flag to
  struct IndexStmt to indicate that it's already been transformed;
  which has some benefit anyway in that tablecmds.c can now Assert
  that transformation has happened rather than just assuming.  The
  other main reason was some rather sloppy code for array type
  coercion, which can be fixed (and its performance improved too) by
  refactoring.  I did leave transformJoinUsingClause() still
  constructing expressions containing untransformed operator nodes
  being applied to Vars, so that transformExpr() still has to allow
  Var inputs.  But that's a much narrower, and safer, special case
  than before, since Vars will never appear in a raw parse tree, and
  they don't have any substructure to worry about.  In passing fix
  some oversights in the patch that added CREATE INDEX IF NOT EXISTS
  (missing processing of IndexStmt.if_not_exists).  These appear
  relatively harmless, but still sloppy coding practice.
  http://git.postgresql.org/pg/commitdiff/6a75562ed16b5fa52cfd8830e4546972e647db26

- Add parse location fields to NullTest and BooleanTest structs.  We
  did not need a location tag on NullTest or BooleanTest before,
  because no error messages referred directly to their locations.
  That's planned to change though, so add these fields in a separate
  housekeeping commit.  Catversion bump because stored rules may
  change.
  http://git.postgresql.org/pg/commitdiff/c063da1769229efa8d8d21f0d068b3199ea3a6b3

Fujii Masao pushed:

- Correct the path of pg_lzcompress.c in doc.  Commit 40bede5 moved
  pg_lzcompress.c to src/common, but forgot to update its path in doc.
  This commit fixes that oversight.
  http://git.postgresql.org/pg/commitdiff/cef30974dec2c052170b80eff1fe4b9bb285e903

Heikki Linnakangas pushed:

- In the SSL test suite, use a root CA cert that won't expire (so
  quickly).  All the other certificates were created to be valid for
  10000 days, because we don't want to have to recreate them. But I
  missed the root CA cert, and the pre-created certificates included
  in the repository expired in January.  Fix, and re-create all the
  certificates.
  http://git.postgresql.org/pg/commitdiff/2c75531a6cc49a56afbd5619c36b3daccbe243fa

- Restore the SSL_set_session_id_context() call to OpenSSL
  renegotiation.  This reverts the removal of the call in commit
  (272923a0). It turns out it wasn't superfluous after all: without
  it, renegotiation fails if a client certificate was used. The rest
  of the changes in that commit are still OK and not reverted.  Per
  investigation of bug #12769 by Arne Scheffer, although this doesn't
  fix the reported bug yet.
  http://git.postgresql.org/pg/commitdiff/1c2b7c0879d83ff79e4adf2c0a883df92b713da4

- Fix comment in libpq OpenSSL code about why a substitue BIO is used.
  The comment was copy-pasted from the backend code along with the
  implementation, but libpq has different reasons for using the BIO.
  http://git.postgresql.org/pg/commitdiff/c478959a009a926ec441f355219eae18537e648c

- Fix knn-GiST queue comparison function to return heap tuples first.
  The part of the comparison function that was supposed to keep heap
  tuples ahead of index items was backwards. It would not lead to
  incorrect results, but it is more efficient to return heap tuples
  first, before scanning more index pages, when both have the same
  distance.  Alexander Korotkov
  http://git.postgresql.org/pg/commitdiff/d17b6df239e6eebf288969e931cdbe8076d1fe12

- Fix a bug in pairing heap removal code.  After removal, the
  next_sibling pointer of a node was sometimes incorrectly left to
  point to another node in the heap, which meant that a node was
  sometimes linked twice into the heap. Surprisingly that didn't cause
  any crashes in my testing, but it was clearly wrong and could easily
  segfault in other scenarios.  Also always keep the prev_or_parent
  pointer as NULL on the root node. That was not a correctness issue
  AFAICS, but let's be tidy.  Add a debugging function, to dump the
  contents of a pairing heap as a string. It's #ifdef'd out, as it's
  not used for anything in any normal code, but it was highly useful
  in debugging this. Let's keep it handy for further reference.
  http://git.postgresql.org/pg/commitdiff/931bf3eb9b203ca02d729f5122a44cc250c27695

- Remove dead structs.  These are not used with the new WAL format
  anymore. GIN split records are simply always recorded as full-page
  images.  Michael Paquier
  http://git.postgresql.org/pg/commitdiff/634618ecd039cf99fb8212b0314ef8a3754ca9c2

Kevin Grittner pushed:

- Eliminate unnecessary NULL checks in picksplit method of intarray.
  Where these checks were being done there was no code path which
  could leave them NULL.  Michael Paquier per Coverity
  http://git.postgresql.org/pg/commitdiff/c923e82a231ebfe7c4329984c68819e26837bee6

Robert Haas pushed:

- Improve pg_check_dir code and comments.  Avoid losing errno if
  readdir() fails and closedir() works.  Consistently return 4 rather
  than 3 if both a lost+found directory and other files are found,
  rather than returning one value or the other depending on the order
  of the directory listing.  Update comments to match the actual
  behavior.  These oversights date to commits
  6f03927fce038096f53ca67eeab9adb24938f8a6 and
  17f15239325a88581bb4f9cf91d38005f1f52d69.  Marco Nenciarini
  http://git.postgresql.org/pg/commitdiff/5d6c2405f4bae6c87533d981d6a47587db501220

- Don't require users of src/port/gettimeofday.c to initialize it.
  Commit 8001fe67a3d66c95861ce1f7075ef03953670d13 introduced this
  requirement, but per discussion, we want to avoid requirements of
  this type to make things easier on the calling code.  An especially
  important consideration is that this may be used in frontend code,
  not just the backend.  Asif Naeem, reviewed by Michael Paquier
  http://git.postgresql.org/pg/commitdiff/64235fecc6d377690444ca3702257b5e39ed3413

Álvaro Herrera pushed:

- Fix object identities for pg_conversion objects.  We were neglecting
  to schema-qualify them.  Backpatch to 9.3, where object identities
  were introduced as a concept by commit f8348ea32ec8.
  http://git.postgresql.org/pg/commitdiff/0d906798f680b2dd86cbc8d31ba64685aeb12092

- Fix opclass/opfamily identity strings.  The original representation
  uses "opcname for amname", which is good enough; but if we replace
  "for" with "using", we can apply the returned identity directly in a
  DROP command, as in DROP OPERATOR CLASS opcname USING amname This
  slightly simplifies code using object identities to programatically
  execute commands on these kinds of objects.  Note
  backwards-incompatible change: The previous representation dates
  back to 9.3 when object identities were introduced by commit
  f8348ea3, but we don't want to change the behavior on released
  branches unnecessarily and so this is not backpatched.
  http://git.postgresql.org/pg/commitdiff/9c7dd350199fa030ccbd5538e1b8e13a9603fda4

- Update PGSTAT_FILE_FORMAT_ID.  Previous commit should have bumped it
  but didn't.  Oops.  Per note from Tom Lane.
  http://git.postgresql.org/pg/commitdiff/3b14bb77716a01915da4833194e7c8c1c51da66d

- Have TRUNCATE update pgstat tuple counters.  This works by keeping a
  per-subtransaction record of the ins/upd/del counters before the
  truncate, and then resetting them; this record is useful to return
  to the previous state in case the truncate is rolled back, either in
  a subtransaction or whole transaction.  The state is propagated
  upwards as subtransactions commit.  When the per-table data is sent
  to the stats collector, a flag indicates to reset the live/dead
  counters to zero as well.  Catalog version bumped due to the change
  in pgstat format.  Author: Alexander Shulgin Discussion:
  1007.1207238291 <at> sss.pgh.pa.us Discussion:
  548F7D38.2000401 <at> BlueTreble.com Reviewed-by: Álvaro Herrera, Jim
  Nasby
  http://git.postgresql.org/pg/commitdiff/d42358efb16cc81122c53ffb35ac381b9158e519

- Remove unnecessary and unreliable test
  http://git.postgresql.org/pg/commitdiff/8902f79264d95ed84e4c9fb4749b3956b4c74349

Peter Eisentraut pushed:

- Fix Perl coding error in msvc build system.  Code like 'open(P, "cl
  /? 2>&1 |") || die "cl command not found";' does not actually catch
  any errors, because the exit status of the command before the pipe
  is ignored.  The fix is to look at $?.  This also gave the
  opportunity to clean up the logic of this code a bit.
  http://git.postgresql.org/pg/commitdiff/d30292b8c45a1d909ff7d84bd6787c8827134fc3

Andres Freund pushed:

- Force some system catalog table columns to be marked NOT NULL.  In a
  manual pass over the catalog declaration I found a number of columns
  which the boostrap automatism didn't mark NOT NULL even though they
  actually were. Add BKI_FORCE_NOT_NULL markings to them.  It's
  usually not critical if a system table column is falsely determined
  to be nullable as the code should always catch relevant cases. But
  it's good to have a extra layer in place.  Discussion:
  20150215170014.GE15326 <at> awork2.anarazel.de
  http://git.postgresql.org/pg/commitdiff/82a532b34d7547b43b90e2e4d4953f4be1c655b8

- Allow forcing nullness of columns during bootstrap.  Bootstrap
  determines whether a column is null based on simple builtin rules.
  Those work surprisingly well, but nonetheless a few existing columns
  aren't set correctly. Additionally there is at least one patch sent
  to hackers where forcing the nullness of a column would be helpful.
  The boostrap format has gained FORCE [NOT] NULL for this, which will
  be emitted by genbki.pl when BKI_FORCE_(NOT_)?NULL is specified for
  a column in a catalog header.  This patch doesn't change the marking
  of any existing columns.  Discussion:
  20150215170014.GE15326 <at> awork2.anarazel.de
  http://git.postgresql.org/pg/commitdiff/eb68379c38202180bc8e33fb9987284e314b7fc8

Jeff Davis pushed:

- In array_agg(), don't create a new context for every group.
  Previously, each new array created a new memory context that started
  out at 8kB. This is incredibly wasteful when there are lots of small
  groups of just a few elements each.  Change initArrayResult() and
  friends to accept a "subcontext" argument to indicate whether the
  caller wants the ArrayBuildState allocated in a new subcontext or
  not. If not, it can no longer be released separately from the rest
  of the memory context.  Fixes bug report by Frank van Vugt on
  2013-10-19.  Tomas Vondra. Reviewed by Ali Akbar, Tom Lane, and me.
  http://git.postgresql.org/pg/commitdiff/b419865a814abbca12bdd6eef6a3d5ed67f432e1

- Rename variable in AllocSetContextCreate to be consistent.
  Everywhere else in the file, "context" is of type MemoryContext and
  "set" is of type AllocSet. AllocSetContextCreate uses a variable of
  type AllocSet, so rename it from "context" to "set".
  http://git.postgresql.org/pg/commitdiff/74811c4050921959d54d42e2c15bb79f0e2c37f3

== Rejected Patches (for now) ==

No one was disappointed this week :-)

== Pending Patches ==

Shigeru HANADA sent in two more revisions of a patch to implement join
push-down support for foreign tables.

Michael Paquier sent in two more revisions of a patch to ensure that
pg_dump gets attributes from tables in extensions.

Syed Rahila sent in another revision of a patch to implement
compression of full-page writes.

Tom Lane sent in two more revisions of a patch to manipulate complex
types as non-contiguous structures in-memory.

Peter Geoghegan sent in two more revisions of a patch to add INSERT
... ON CONFLICT {UPDATE | IGNORE}.

Amit Kapila sent in another revision of a patch to implement parallel
sequential scans.

Petr (PJMODOS) Jelinek sent in two more revisions of a patch to
implement TABLESAMPLE.

Ashutosh Bapat sent in a patch to implement some infrastructure for
allowing 2PC across FDWs.

Michael Paquier sent in another revision of a patch to fix pg_dump's
treatment of tables in EXTENSIONs.

Oskari Saarenmaa sent in another revision of a patch to fix aligned
attribute for Sun CC and use custom macros for all attributes.

Alexander Korotkov sent in another revision of a patch to implement
KNN-GiST with recheck.

Michael Paquier sent in another revision of a patch to enable
table-level log_autovacuum_min_duration.

Stephen Frost sent in two more revisions of a patch to fix some odd
behavior of updatable security barrier views on foreign tables.

Michael Paquier sent in two more revisions of a patch to fix a strange
assertion using VACOPT_FREEZE in vacuum.c.

Kyotaro HORIGUCHI sent in three more revisions of a patch to fix a bug
where pg_basebackup may fail to send feedback.

Robert Haas sent in another revision of a patch to allow assessing
parallel safety.

Kyotaro HORIGUCHI sent in another revision of a patch to add regrole
and regnamespace.

Adam Brightwell sent in another revision of a patch to remove the
catupdate check.

Rugal Bernstein sent in a patch to fix psql/po/zh_CN.po for better
comprehension by people in mainland China.

Corey Huinker sent in a patch to add polymorphic functions to dblink.

Etsuro Fujita sent in another revision of a patch to allow foreign
tables to participate in table inheritance hierarchies.

Bruce Momjian sent in a patch to better document pg_upgrade on
replicas.

David Fetter, Pavel Stehule, and Álvaro Herrera traded patches to fix
a broken behavior in psql's \c for URIs and connect strings where only
part of the specified item got used.

Álvaro Herrera sent in a patch to have RENAME routines return
ObjectAddress rather than OID.

Álvaro Herrera sent in a patch to support more commands in event
triggers.

Fujii Masao sent in another revision of a patch to add
recovery_timeout option to control timeout of restore_command nonzero
status code.

Andres Freund sent in a patch to debloat and deduplicate transaction
commit/abort records.

Peter Geoghegan sent in a patch to make tuplesort_begin_datum()
consistent with other comparable routines for other tuple cases.

Andres Freund sent in a WIP patch to resolve regtype/regproc in
genbki.pl.

Andrew Dunstan sent in another revision of a patch to add min and max
execute statement time in pg_stat_statement.

Andres Freund sent in a flock of patches to improve deparsing support.

Tom Lane sent in a patch to fix the precedence of standard comparison
operators.

Peter Geoghegan sent in a patch to add a decay to the threshold that
(estimated) abbreviated key cardinality must cross as a proportion of
the (estimated) cardinality of the original set of strings to be
sorted, while also quadrupling the initial required proportional
cardinality to 20% of full key cardinality (but for just the first
10,000 strings, before this threshold is decayed aggressively).

Pavel Stehule sent in another revision of a patch to add
array_position().

--

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

Nikhil Sontakke | 18 Feb 13:00 2015
Picon

India PostgreSQL UserGroup Meetup: PGday in Bengaluru on 11th April, 2015

Hi,

India PostgreSQL UserGroup is pleased to announce that registrations for the FIRST ever full day - PGday to be held in Bengaluru, India on 11th April, 2015 are now open.

We will be extending a Call For Papers soon.

Kindly spread the word around of this first ever Indian PGday in Bengaluru, India.

Please RSVP at:
http://www.meetup.com/India-PUG/events/220553997/

Feel free to contact us on postgresindia <at> gmail.com for any further comments or feedback. See you in April in Bengaluru!

Warm Regards,
On behalf of India PostgreSQL User Group Meetup Organizers,
Nikhils
--
www.SecureDB.co | Encrypted Backend as a Service
David Fetter | 16 Feb 02:29 2015

== PostgreSQL Weekly News - February 15 2015 ==

== PostgreSQL Weekly News - February 15 2015 ==

== PostgreSQL Product News ==

pgpool-II versions 3.4.1, 3.3.5, 3.2.10, 3.1.13, and 3.0.17 released
with pgpoolAdmin 3.4.1.
pgpool-II is a connection pooler and replication system for PostgreSQL.
http://pgpool.net/mediawiki/index.php/Downloads
http://pgpool.net/mediawiki/index.php/Yum_Repository

psycopg2 2.6 and 2.5.5 Python connector for PostgreSQL, released.
http://initd.org/psycopg/articles/2015/02/09/psycopg-26-and-255-released/

== PostgreSQL Jobs for February ==

http://archives.postgresql.org/pgsql-jobs/2015-02/threads.php

== PostgreSQL Local ==

The Melbourne PostgreSQL meetup on February 18, 2015 will be hosting
Gabriele Bartolini on PostgreSQL 9.4 for devops.  Details below, and
R, SVP.
http://www.meetup.com/melpug/events/219082475/

pgDaySF 2015 will be held March 10, 2015 in Burlingame, California.
http://sfpostgres.org/pgday-sf-2015-call-for-speakers-and-sponsors/

Registration for Nordic PostgreSQL Day, March 11, 2015 in  Copenhagen,
Denmark, is open.
http://2015.nordicpgday.org/registration/

PGConf US 2015 takes place March 25-27, 2015 in NYC.
http://nyc.pgconf.us/2015/

PGCon 2015 is June 16-20 in Ottawa, Canada.
http://www.pgcon.org/2015/

== 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 ==

Fujii Masao pushed:

- Move pg_lzcompress.c to src/common.  The meta data of PGLZ
  symbolized by PGLZ_Header is removed, to make the compression and
  decompression code independent on the backend-only varlena facility.
  PGLZ_Header is being used to store some meta data related to the
  data being compressed like the raw length of the uncompressed record
  or some varlena-related data, making it unpluggable once PGLZ is
  stored in src/common as it contains some backend-only code paths
  with the management of varlena structures. The APIs of PGLZ are
  reworked at the same time to do only compression and decompression
  of buffers without the meta-data layer, simplifying its use for a
  more general usage.  On-disk format is preserved as well, so there
  is no incompatibility with previous major versions of PostgreSQL for
  TOAST entries.  Exposing compression and decompression APIs of pglz
  makes possible its use by extensions and contrib modules. Especially
  this commit is required for upcoming WAL compression feature so that
  the WAL reader facility can decompress the WAL data by using
  pglz_decompress.  Michael Paquier, reviewed by me.
  http://git.postgresql.org/pg/commitdiff/40bede5477bb5bce98ce9548841cb414634c26f7

Heikki Linnakangas pushed:

- Fix MSVC build.  When I moved pg_crc.c from src/port to src/common,
  I forgot to modify MSVC build script accordingly.
  http://git.postgresql.org/pg/commitdiff/cc761b170c5e7b4ef22ed918f4785ec1fabe62cd

- Move pg_crc.c to src/common, and remove pg_crc_tables.h.  To get CRC
  functionality in a client program, you now need to link with
  libpgcommon instead of libpgport. The CRC code has nothing to do
  with portability, so libpgcommon is a better home. (libpgcommon
  didn't exist when pg_crc.c was originally moved to src/port.) Remove
  the possibility to get CRC functionality by just #including
  pg_crc_tables.h. I'm not aware of any extensions that actually did
  that and couldn't simply link with libpgcommon.  This also moves the
  pg_crc.h header file from src/include/utils to src/include/common,
  which will require changes to any external programs that currently
  does #include "utils/pg_crc.h". That seems acceptable, as
  include/common is clearly the right home for it now, and the change
  needed to any such programs is trivial.
  http://git.postgresql.org/pg/commitdiff/c619c2351f7ec429b6ddce519c939f7b8465d711

- Speed up CRC calculation using slicing-by-8 algorithm.  This speeds
  up WAL generation and replay. The new algorithm is significantly
  faster with large inputs, like full-page images or when inserting
  wide rows. It is slower with tiny inputs, i.e. less than 10 bytes or
  so, but the speedup with longer inputs more than make up for that.
  Even small WAL records at least have 24 byte header in the front.
  The output is identical to the current byte-at-a-time computation,
  so this does not affect compatibility. The new algorithm is only
  used for the CRC-32C variant, not the legacy version used in tsquery
  or the "traditional" CRC-32 used in hstore and ltree. Those are not
  as performance critical, and are usually only applied over small
  inputs, so it seems better to not carry around the extra lookup
  tables to speed up those rare cases.  Abhijit Menon-Sen
  http://git.postgresql.org/pg/commitdiff/025c02420de990c15a90e9e3f86fcfbc5b59ee88

- Simplify waiting logic in reading from / writing to client.  The
  client socket is always in non-blocking mode, and if we actually
  want blocking behaviour, we emulate it by sleeping and retrying. But
  we have retry loops at different layers for reads and writes, which
  was confusing.  To simplify, remove all the sleeping and retrying
  code from the lower levels, from be_tls_read and secure_raw_read and
  secure_raw_write, and put all the logic in secure_read() and
  secure_write().
  http://git.postgresql.org/pg/commitdiff/80788a431e9bff06314a054109fdea66ac538199

- Simplify the way OpenSSL renegotiation is initiated in server.  At
  least in all modern versions of OpenSSL, it is enough to call
  SSL_renegotiate() once, and then forget about it. Subsequent
  SSL_write() and SSL_read() calls will finish the handshake.  The
  SSL_set_session_id_context() call is unnecessary too. We only have
  one SSL context, and the SSL session was created with that to begin
  with.
  http://git.postgresql.org/pg/commitdiff/272923a0a6956187471df4f032eee06559520390

- Fix broken #ifdef for __sparcv8.  Rob Rowan. Backpatch to all
  supported versions, like the patch that added the broken #ifdef.
  http://git.postgresql.org/pg/commitdiff/33e879c4e9f485405fc19b663392d8635714d020

Tom Lane pushed:

- Minor cleanup/code review for "indirect toast" stuff.  Fix some
  issues I noticed while fooling with an extension to allow an
  additional kind of toast pointer.  Much of this is just comment
  improvement, but there are a couple of actual bugs, which might or
  might not be reachable today depending on what can happen during
  logical decoding.  An example is that toast_flatten_tuple() failed
  to cover the possibility of an indirection pointer in its input.
  Back-patch to 9.4 just in case that is reachable now.  In HEAD, also
  correct some really minor issues with recent compression
  reorganization, such as dangerously underparenthesized macros.
  http://git.postgresql.org/pg/commitdiff/bc4de01db3a210e988dc88b585d7c38e6e7054c7

- Fix GEQO to not assume its join order heuristic always works.  Back
  in commit 400e2c934457bef4bc3cc9a3e49b6289bd761bc0 I rewrote GEQO's
  gimme_tree function to improve its heuristic for modifying the given
  tour into a legal join order.  In what can only be called a fit of
  hubris, I supposed that this new heuristic would *always* find a
  legal join order, and ripped out the old logic that allowed
  gimme_tree to sometimes fail.  The folly of this is exposed by bug
  #12760, in which the "greedy" clumping behavior of merge_clump() can
  lead it into a dead end which could only be recovered from by
  un-clumping.  We have no code for that and wouldn't know exactly
  what to do with it if we did.  Rather than try to improve the
  heuristic rules still further, let's just recognize that it *is* a
  heuristic and probably must always have failure cases.  So, put back
  the code removed in the previous commit to allow for failure (but
  comment it a bit better this time).  It's possible that this code
  was actually fully correct at the time and has only been broken by
  the introduction of LATERAL.  But having seen this example I no
  longer have much faith in that proposition, so back-patch to all
  supported branches.
  http://git.postgresql.org/pg/commitdiff/1a179f36f7c612d3560a72396c559cd876dfab6b

- Fix pg_dump's heuristic for deciding which casts to dump.  Back in
  2003 we had a discussion about how to decide which casts to dump.
  At the time pg_dump really only considered an object's containing
  schema to decide what to dump (ie, dump whatever's not in
  pg_catalog), and so we chose a complicated idea involving whether
  the underlying types were to be dumped (cf commit
  a6790ce85752b67ad994f55fdf1a450262ccc32e).  But users are allowed to
  create casts between built-in types, and we failed to dump such
  casts.  Let's get rid of that heuristic, which has accreted even
  more ugliness since then, in favor of just looking at the cast's OID
  to decide if it's a built-in cast or not.  In passing, also fix some
  really ancient code that supposed that it had to manufacture a
  dependency for the cast on its cast function; that's only true when
  dumping from a pre-7.3 server.  This just resulted in some wasted
  cycles and duplicate dependency-list entries with newer servers, but
  we might as well improve it.  Per gripes from a number of people,
  most recently Greg Sabino Mullane.  Back-patch to all supported
  branches.
  http://git.postgresql.org/pg/commitdiff/9feefedf9e92066fa6609d1e1e17b4892d81716f

- Fix more memory leaks in failure path in buildACLCommands.  We
  already had one go at this issue in commit d73b7f973db5ec7e, but we
  failed to notice that buildACLCommands also leaked several
  PQExpBuffers along with a simply malloc'd string.  This time let's
  try to make the fix a bit more future-proof by eliminating the
  separate exit path.  It's still not exactly critical because pg_dump
  will curl up and die on failure; but since the amount of the
  potential leak is now several KB, it seems worth back-patching as
  far as 9.2 where the previous fix landed.  Per Coverity, which
  evidently is smarter than clang's static analyzer.
  http://git.postgresql.org/pg/commitdiff/9179444d070713f53a97bc8f5c898a8304424c4d

- Fix minor memory leak in ident_inet().  We'd leak the ident_serv
  data structure if the second pg_getaddrinfo_all (the one for the
  local address) failed.  This is not of great consequence because a
  failure return here just leads directly to backend exit(), but if
  this function is going to try to clean up after itself at all, it
  should not have such holes in the logic.  Try to fix it in a
  future-proof way by having all the failure exits go through the same
  cleanup path, rather than "optimizing" some of them.  Per Coverity.
  Back-patch to 9.2, which is as far back as this patch applies
  cleanly.
  http://git.postgresql.org/pg/commitdiff/58146d35deed3bd3e05ce4b5ba529e4e4a369ddb

- Fix missing PQclear() in libpqrcv_endstreaming().  This omission
  leaked one PGresult per WAL streaming cycle, which possibly would
  never be enough to notice in the real world, but it's still a leak.
  Per Coverity.  Back-patch to 9.3 where the error was introduced.
  http://git.postgresql.org/pg/commitdiff/4f38a281a3d4a7cbcf9de2f676d44336d57b7717

- Avoid returning undefined bytes in chkpass_in().  We can't really
  fix the problem that the result is defined to depend on random(), so
  it is still going to fail the "unstable input conversion" test in
  parse_type.c.  However, we can at least satify valgrind.  (It looks
  like this code used to be valgrind-clean, actually, until somebody
  did a careless s/strncpy/strlcpy/g on it.) In passing, let's just
  make real sure that chkpass_out doesn't overrun its output buffer.
  No need for backpatch, I think, since this is just to satisfy
  debugging tools.  Asif Naeem
  http://git.postgresql.org/pg/commitdiff/80986e85aafd64165efc7f45b330f2f213713032

Michael Meskes pushed:

- Fixed array handling in ecpg.  When ecpg was rewritten to the new
  protocol version not all variable types were corrected. This patch
  rewrites the code for these types to fix that. It also fixes the
  documentation to correctly tell the status of array handling.
  http://git.postgresql.org/pg/commitdiff/1f393fc923ec77f25fd37e16fd8ccb480df82ebb

Andres Freund pushed:

- Fix typo in logicaldecoding.sgml.  Author: Tatsuo Ishii.  Backpatch
  to 9.4, where logical decoding was introduced.
  http://git.postgresql.org/pg/commitdiff/8785e6e378f919827d851926ea0f400f08afd477

Bruce Momjian pushed:

- pg_upgrade:  preserve freeze info for postgres/template1 dbs.
  pg_database.datfrozenxid and pg_database.datminmxid were not
  preserved for the 'postgres' and 'template1' databases.  This could
  cause missing clog file errors on access to user tables and indexes
  after upgrades in these databases.  Backpatch through 9.0
  http://git.postgresql.org/pg/commitdiff/866f3017a88b9cb639f05c9ad413e5eafe0266e3

- pg_upgrade:  improve checksum mismatch error message.  Patch by Greg
  Sabino Mullane, slight adjustments by me
  http://git.postgresql.org/pg/commitdiff/dc01efa5ccdd9804b0c97d4d9b651ba9360ebb11

- pg_upgrade:  quote directory names in delete_old_cluster script.
  This allows the delete script to properly function when special
  characters appear in directory paths, e.g. spaces.  Backpatch
  through 9.0
  http://git.postgresql.org/pg/commitdiff/056764b10248bff702d9d7b8b97690668eaf1c93

Peter Eisentraut pushed:

- pg_regress: Write processed input/*.source into output dir.  Before,
  it was writing the processed files into the input directory, which
  is incorrect in a vpath build.
  http://git.postgresql.org/pg/commitdiff/64cdbbc48cade73d7b0831444a62e19fd4a342f8

Andrew Dunstan pushed:

- Minor housekeeping on JSON docs.
  http://git.postgresql.org/pg/commitdiff/c5b31e29f0128b1c3c1caeeef81b0986cebdcd03

== Rejected Patches (for now) ==

No one was disappointed this week :-)

== Pending Patches ==

Tatsuo Ishii and Michael Paquier traded patches to fix some
incompatible options in pgbench.

David Steele sent in two more revisions of a patch to implement
pgaudit.

Jan Urbański sent in two revisions of a patch to fix broken
multi-threaded SSL callback handling in libpq.

Rahila Syed sent in three more revisions of a patch to implement
compression of full-page writes.

Peter Geoghegan and Heikki Linnakangas traded patches to implement
INSERT ... ON CONFLICT {UPDATE | IGNORE}.

Heikki Linnakangas sent in two revisions of a patch to use use Intel
SSE4.2 CRC instructions where available.

Michael Paquier sent in three more revisions of a patch to implement
table-level autovacuum_min_duration.

Michael Paquier sent in a patch to add a wal_retrieve_retry_interval.

Kyotaro HORIGUCHI sent in two revisions of a patch to fix an issue
where pg_basebackup fails silently.

Tom Lane sent in two revisions of a patch to manipulate complex types
as non-contiguous structures in-memory.

Etsuro Fujita sent in another revision of a patch to fix
ExplainModifyTarget to work as expected.

Michael Paquier sent in a patch to add palloc_extended for frontend
and backend, and another to rework handling of OOM when allocating
record buffer in XLOG reader.

Anastasia Lubennikova sent in two more revisions of a patch to allow
index-only scans for GiST indexes.

Emre Hasegeli sent in another revision of a patch to add a BRIN range
operator class.

Robert Haas sent in two more revisions of a patch to implement
parallel mode and parallel contexts.

Marco Nenciarini sent in another revision of a patch to implement
file-based incremental backup.

Marco Nenciarini sent in another revision of a patch to fix
pg_check_dir.

Michael Paquier sent in a patch to fix an odd assertion using
VACOPT_FREEZE in vacuum.c.

Teodor Sigaev sent in a patch to implement some of the intarray
features for all arrays.

Teodor Sigaev sent in another revision of a patch to add a compress
method for SP-GiST.

Heikki Linnakangas sent in another revision of a patch to redesign
checkpoint_segments.

Heikki Linnakangas sent in a patch to refactor unit conversions.

Atri Sharma sent in another revision of a patch to implement UPDATE
... SET(*) =.

Asif Naeem sent in a patch to fix chkpass to work under
RANDOMIZE_ALLOCATED_MEMORY.

Kevin Grittner sent in two revisions of a patch to fix an issue
manifesting as "multiple backends attempting to wait for pincount 1".

Kevin Grittner sent in a patch to help control bloat in the face of
old snapshots.

Peter Eisentraut sent in a patch to speed up make check-world.

Álvaro Herrera sent in another revision of a patch to add CREATE
ALTER, GRANT/REVOKE, COMMENT ON, and SECURITY LABEL command deparsing
support to event triggers.

Peter Eisentraut sent in a patch to add a pg_settings.pending_restart
column.

Peter Eisentraut sent in a patch to use forward slashes exclusively in
Windows builds, making it possible at least in theory to build such on
non-Windows machines.

Kevin Grittner sent in a patch to allow a "snapshot too old" error.

Andrew Dunstan sent in two revisions of a patch to add mogrify and
indent to JSONB.

Robert Haas sent in another revision of a patch to allow assessing
parallel safety.

Alexander Korotkov sent in another revision of a patch to implement
KNN-GiST with recheck.

Kaigai Kouhei sent in another revision of a patch to implement join
replacement with foreign-/custom-scan.

Petr (PJMODOS) Jelinek sent in another revision of a patch to
implement a sequence access method.

Tomas Vondra sent in a PoC patch to implement a mmap-based memory
context / allocator.

Emre Hasegeli sent in another revision of a patch to implement
selectivity estimation for inet operators.

Andres Freund sent in another revision of a patch to implement
replication identifiers.

David Steele sent in a patch to fix some dependency issues in the
documentation build for OSX.

Andrew (RhodiumToad) Gierth and Tomas Vondra traded patches to fix
some really bad blowups with hash outer join and nulls.

--

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

damien clochard | 16 Feb 10:49 2015

Introducing PostgreSQL Dashboard


## A real-time monitoring screen based on Dashing and Sinatra

PostgreSQL Dashboard is simple monitoring tool that provides a live
activity report of a PostgreSQL instance.

Here's a screenshot :
https://raw.githubusercontent.com/daamien/pgDashboard/master/public/pgdashboard.screenshot2.png

It is designed to be displayed on a large screen in a monitoring room or
an open space office. The current dashboard is currently composed of 5
widgets :

* General Info : Version, number of host databases, etc.
* Hit Ratio : The % of data found in cache
* Buffers : The number of new buffers allocated
* Queries : The number of active queries currently running
* Twitter : A glimpse of the #PostgreSQL feed

## Extensibility

Adding a new widget should be fairly easy. This tool is designed so that
you can write a custom widget to display the stats you find relevant or
a dynamic graph on some "business logic" valuation.

The layout is also entirely flexible. You can easily drag'n'drop any
widget to put it wherever you want on the screen. And HTML code of the
dashboard can be modified for specific needs, such as specific screen
dimensions.

## Links & Credits

Some parts of this tool are based on the work done on other PostgreSQL
tools, especially [pgstats](https://github.com/gleu/pgstats) and
[pgcluu](http://pgcluu.darold.net/)

PostgreSQL Dashboard is an open project distributed under the PostgreSQL
license. Any contribution to build a better tool is welcome. You just
have to send your ideas, features requests or patches using the GitHub
tools.

**Links :**

* website: http://daamien.github.io/PostgreSQL-Dashboard/
* code: https://github.com/daamien/PostgreSQL-Dashboard

--

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

Boris Kolpackov | 16 Feb 15:18 2015

ODB C++ ORM 2.4.0 released, adds object loading views

I am pleased to announce the release of ODB 2.4.0.

ODB is an open source object-relational mapping (ORM) system for C++. It
allows you to persist C++ objects to a relational database without having
to deal with tables, columns, or SQL and without manually writing any of
the mapping code.

Major new features in this release:

 * Ability to join and load one or more complete objects instead of, or
   in addition to, a subset of their data members with a single SELECT
   statement execution (object loading views).

 * Support for specifying object and table join types in views (LEFT,
   RIGHT, FULL, INNER, or CROSS).

 * Support for bulk operations in Oracle and SQL Server. Bulk operations
   can be used to persist, update, or erase a range of objects using a
   single database statement execution which often translates to a
   significantly better performance.

 * Support for calling MySQL and SQL Server stored procedures.

 * Support for defining persistent objects as instantiations of C++ class
   templates.

A more detailed discussion of these features can be found in the following
blog post:

http://www.codesynthesis.com/~boris/blog/2015/02/11/odb-2-4-0-released/

For the complete list of new features in this version see the official
release announcement:

http://codesynthesis.com/pipermail/odb-announcements/2015/000041.html

ODB is written in portable C++ (both C++98/03 and C++11 are supported) and
you should be able to use it with any modern C++ compiler. In particular, we
have tested this release on GNU/Linux (x86/x86-64/ARM), Windows (x86/x86-64),
Mac OS X (x86/x86_64), and Solaris (x86/x86-64/SPARC) with GNU g++ 4.2.x-5.x,
MS Visual C++ 2005, 2008, 2010, 2012, and 2013, Sun Studio 12u2, and Clang 3.x.

The currently supported database systems are MySQL, SQLite, PostgreSQL,
Oracle, and SQL Server. ODB also provides optional profiles for Boost and
Qt, which allow you to seamlessly use value types, containers, and smart
pointers from these libraries in your persistent classes.

More information, documentation, source code, and pre-compiled binaries are
available from:

http://www.codesynthesis.com/products/odb/

Enjoy,
	Boris

--

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

Tatsuo Ishii | 9 Feb 05:46 2015

pgpool-II 3.4.1, 3.3.5, 3.2.10, 3.1.13, and 3.0.17 released

Pgpool Global Development Group is pleased to announce the
availability of pgpool-II 3.4.1, 3.3.5, 3.2.10, 3.1.13, and
3.0.17.

Pgpool-II is a tool to add usefull features to PostgreSQL, including
connection pooling, load balancing, automatic fail over and more.
http://pgpool.net/

A pgpool-II web management tool pgpoolAdmin 3.4.1 is also released
(this can be used for all supported pgpool-II versions).

You can download the source codes from:
http://pgpool.net/mediawiki/index.php/Downloads

Also CentOS/RHEL rpms are availble from:
http://pgpool.net/mediawiki/index.php/Yum_Repository

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

                        3.4.1 (tataraboshi) 2015/02/05

* Version 3.4.1

    This is a bugfix release against pgpool-II 3.4.0.

    __________________________________________________________________

* Bug fixes

    - RPM: Add to support for memcached. (Tatsuo Ishii)

    - Fix number of parameters of pgpool_recovery from 3 to 4. (Tatsuo Ishii)

      This really should be done before releasing 3.4.0.

    - test: Allow pgpool_setup to set configuration file directory by setting
      environment variable PGPOOLDIR (Tatsuo Ishii)

    - RPM: Rename RPM file (Yugo Nagata)

      Rename filename to include the RHEL version number like PostgreSQL's
      official RPM file. (e.g. pgpool-II-pg93-3.4.0-2pgdg.rhel6.x86_64.rpm)

    - Fix node id range check bug in trigger_failover_command(). (Tatsuo Ishii)

      The node id should be lower than NUM_BACKENDS. Probably harmless since
      callers never pass node ids greater or equal to NUM_BACKENDS.

    - Fix occasional stuck that occures when a NOTIFY message is sent from
      a backend. (Muhammad Usama)

      The issue happens in master slave mode with load balancing when the
      client is doing extended query messaging.

      per bug #116
      http://www.pgpool.net/mantisbt/view.php?id=116

    - test: Fix failover script of pgpool_setup to use absolute path to the
      database cluster (Tatsuo Ishii)

    - test: Reorganize port numbers assigned in pgpool_setup (Tatsuo Ishii)

      Assign base port (11000 by default) to pgpool, base port + 1 to pcp,
      port + 2 to PostgreSQL node0, port + 3 to PostgreSQL node1 and so on.

    - Fix a bug that pgpool-II 3.4 can't cancel query (Muhammad Usama)

    - test: Add regression test for cancelling query (Muhammad Usama)

    - Fix to not use non-thread-safe APIs in thread functions
      (Muhammad Usama)

      pgpool-II has borrowed the Memory and Exception managers from PostgreSQL
      which never utilizes the threads so its APIs are not thread safe.
      Previously, those API functions which manipulate the global variables
      in thread functions, and it caused to undefined behavior or a
      segmentation fault. Especially, the main process could die silently.

    - test: Add memory leak regression test (Tatsuo Ishii)

    - Fix a memory leak with long-lived connections (Muhammad Usama)

      Problem reporeted in [pgpool-general: 3325].

    - Change the log level of "Frontend Terminated" message to DEBUG1 from LOG
      (Muhammad Usama)

    - Fix ill signal befavior of SIGCHLD in exec_ifconfig() (Tatsuo Ishii)

      For some reason SIGCHLD was set to SIG_IGN *and* tries to wait
      child process which always fails because SIGCHLD is never delivered.
      Due to this "ifconfig up" fails when switching to watchdog master.

      See "[pgpool-general: 3310] for more details.

    - Allow $_IP_$ having address prefix in if_up_cmd and if_down_cmd
      (Muhammad Usama)

      Previously, it is assumed that "$_IP_$" keyword will always have a
      white space at the end, and when "$_IP_$" has address prefix (e.g.
      $_IP_$/24), this prefix was ignored.

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

    - Fix to not send signal to init process (Muhammad Usama)

      This is more of a guard against a situation where a crash of the
      pgpool main process can make the child processes to send the signal
      to system's init process.

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

    - RPM: Fix "error: Installed (but unpackaged) file(s) found" while
      creating RPMs for PostgreSQL 9.4 (Tatsuo Ishii)

    - Allow "show pool_nodes" to print node ids having more than one digits
      (Muhammad Usama)

      Problem reported in [pgpool-general: 3374].

    - Prevent "WARNING: failed to execute regex matching, pattern is NULL"
      message that could happen when application name is not set in the old
      clients (Tatsuo Ishii)

    - Fix pgpool main process to shutdown in case of child process start-up
      failures (Muhammad Usama)

      Problem rported in [pgpool-general: 3358].

    - Fix a segmentation fault that could happen in child process error
      (Muhammad Usama)

      Problem reported in [pgpool-general: 3377].

    - Fix occasional failure in regression test '004.watchdog' (Yugo Nagata)

      The patch provided by uehara in bug #127.
      http://www.pgpool.net/mantisbt/view.php?id=127

    - Fix client connection leak (Tatsuo Ishii)

      Since 3.4.0 pgpool-II child does not close the connection to client
      when it ends the session.  This leads to serious "CLOSE_WAIT" flood,
      which makes pgpool-II unusable since no new connection from clients
      accepted.

      Problem reported by Pablo Sanchez in [pgpool-general: 3394].

    - Restore SIGCHLD handler to its original after executing if_up/down_cmd
      (Yugo Nagata)

      Previously SIGCHLD was set to SIGIGN always after if_up/down_cmd.
      This led to a incorrect error handling of ping or other commands
      execution, and warning messages were output to log even when the
      command exited successfully.

    - RPM: Add pgpool.service for systemd in RHEL/CentOS 7 (Nozomi Anzai)

    - Fix process termination after several reload with enabled_pool_hba
      (Muhammad Usama)

    - Tighten up checking for app_name_redirect_preference_list and
      database_redirect_preference_list (Tatsuo Ishii)

      Before empty application name or database name or invalid DB node
      number were silently accepted. Now they are strictly checked and
      let raise fatal error when starting up.

      Problem reported in [pgpool-general-jp: 1337].

    - RPM: Change to use systemd if it is available (Nozomi Anzai)

    - Fix the behavior of "client_min_messages" configuration parameter
      (Muhammad Usama)

      This parameter controls the minimum message levels to be sent to the
      frontend. Previously, regardless of the value of the parameter all
      the messages with severity less than NOTICE level were not being
      forwarded to the client.

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

                        3.3.5 (tokakiboshi) 2015/02/05

* Version 3.3.5

    This is a bugfix release against pgpool-II 3.3.4.

    __________________________________________________________________

* Bug fixes

    - doc: Describe explicitly that the number of slave nodes is not
      necessarily 1 (Tatsuo Ishii)

    - Fix occasinal deadlock in failover with watchdog enabled
      (Muhammad Usama)

      per bug #105
      http://www.pgpool.net/mantisbt/view.php?id=105

    - Fix uninitialized variable (Tatsuo Ishii)

      Per Coverity 1234603.

    - doc: Fix missing release note entries in the previous release
      (Tatsuo Ishii)

    - test: Fix wait_for_pgpool_startup in pgpool_setup to use "postgres"
      database rather than "test" (Tatsuo Ishii)

      The test database may or may not exist and if it does not, it will
      always retry until timeout expired (20 seconds), and regression test
      takes unnecessary long.

    - Fix possible segmentation fault in query cache (Tatsuo Ishii)

    - RPM: Add to support for memcached. (Tatsuo Ishii)

    - test: Allow pgpool_setup to set configuration file directory by setting
      environment variable PGPOOLDIR (Tatsuo Ishii)

    - RPM: Rename RPM file (Yugo Nagata)

      Rename filename to include the RHEL version number like PostgreSQL's
      official RPM file. (e.g. pgpool-II-pg93-3.4.0-2pgdg.rhel6.x86_64.rpm)

    - Fix node id range check bug in trigger_failover_command(). (Tatsuo Ishii)

      The node id should be lower than NUM_BACKENDS. Probably harmless since
      callers never pass node ids greater or equal to NUM_BACKENDS.

    - test: Fix failover script of pgpool_setup to use absolute path to the
      database cluster (Tatsuo Ishii)

    - test: Add memory leak regression test (Tatsuo Ishii)

    - Fix ill signal befavior of SIGCHLD in exec_ifconfig() (Tatsuo Ishii)

      For some reason SIGCHLD was set to SIG_IGN *and* tries to wait
      child process which always fails because SIGCHLD is never delivered.
      Due to this "ifconfig up" fails when switching to watchdog master.

      See "[pgpool-general: 3310] for more details.

    - Allow $_IP_$ having address prefix in if_up_cmd and if_down_cmd
      (Muhammad Usama)

      Previously, it is assumed that "$_IP_$" keyword will always have a
      white space at the end, and when "$_IP_$" has address prefix (e.g.
      $_IP_$/24), this prefix was ignored.

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

    - Allow "show pool_nodes" to print node ids having more than one digits
      (Muhammad Usama)

      Problem reported in [pgpool-general: 3374].

    - Fix occasional failure in regression test '004.watchdog' (Yugo Nagata)

      The patch provided by uehara in bug #127.
      http://www.pgpool.net/mantisbt/view.php?id=127

    - Restore SIGCHLD handler to its original after executing if_up/down_cmd
      (Yugo Nagata)

      Previously SIGCHLD was set to SIGIGN always after if_up/down_cmd.
      This led to a incorrect error handling of ping or other commands
      execution, and warning messages were output to log even when the
      command exited successfully.

    - RPM: Add pgpool.service for systemd in RHEL/CentOS 7 (Nozomi Anzai)

    - RPM: Split pgpool_regclass and pgpool_recovery as a separate extension
      package (Tatsuo Ishii)

      On PostgreSQL server, only the extension package is required, no pgpool
      full package is necessary.

      Per Andrew N Golovkov.

    - RPM: Fix wrong SSL configure option in the RPM spec file (Tatsuo Ishii)

      SSL enabling option is "--with-openssl=/usr" and this is wrong. This
      should be "--with-openssl".

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

    - RPM: Change to use systemd if it is available and adopt to PostgreSQL 9.4
      (Nozomi Anzai)

    - Fix to disable debug mode by reloading config (Yugo Nagata)

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

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

                        3.2.10 (namameboshi) 2015/02/05

* Version 3.2.10

    This is a bugfix release against pgpool-II 3.2.9.

    __________________________________________________________________

* Bug fixes

    - doc: Describe explicitly that the number of slave nodes is not
      necessarily 1 (Tatsuo Ishii)

    - Fix uninitialized variable (Tatsuo Ishii)

      Per Coverity 1234603.

    - doc: Fix missing release note entries in the previous release
      (Tatsuo Ishii)

    - Fix possible segmentation fault in query cache (Tatsuo Ishii)

    - Fix node id range check bug in trigger_failover_command(). (Tatsuo Ishii)

      The node id should be lower than NUM_BACKENDS. Probably harmless since
      callers never pass node ids greater or equal to NUM_BACKENDS.

    - Allow $_IP_$ having address prefix in if_up_cmd and if_down_cmd
      (Muhammad Usama)

      Previously, it is assumed that "$_IP_$" keyword will always have a
      white space at the end, and when "$_IP_$" has address prefix (e.g.
      $_IP_$/24), this prefix was ignored.

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

    - Allow "show pool_nodes" to print node ids having more than one digits
      (Muhammad Usama)

      Problem reported in [pgpool-general: 3374].

    - Fix to disable debug mode by reloading config (Yugo Nagata)

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

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

                        3.1.13 (hatsuiboshi) 2015/02/05

* Version 3.1.13

    This is a bugfix release against pgpool-II 3.1.12.

    __________________________________________________________________

* Bug fixes

    - doc: Describe explicitly that the number of slave nodes is not
      necessarily 1 (Tatsuo Ishii)

    - Fix uninitialized variable (Tatsuo Ishii)

      Per Coverity 1234603.

    - doc: Fix missing release note entries in the previous release
      (Tatsuo Ishii)

    - Fix node id range check bug in trigger_failover_command(). (Tatsuo Ishii)

      The node id should be lower than NUM_BACKENDS. Probably harmless since
      callers never pass node ids greater or equal to NUM_BACKENDS.

    - Fix to disable debug mode by reloading config (Yugo Nagata)

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

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

                        3.0.17 (umiyameboshi) 2015/02/05

* Version 3.0.17

    This is a bugfix release against pgpool-II 3.0.16.

    __________________________________________________________________

* Bug fixes

    - doc: Describe explicitly that the number of slave nodes is not
      necessarily 1 (Tatsuo Ishii)

    - Fix uninitialized variable (Tatsuo Ishii)

      Per Coverity 1234603.

    - doc: Fix missing release note entries in the previous release
      (Tatsuo Ishii)

    - Fix node id range check bug in trigger_failover_command(). (Tatsuo Ishii)

      The node id should be lower than NUM_BACKENDS. Probably harmless since
      callers never pass node ids greater or equal to NUM_BACKENDS.

    - Fix to disable debug mode by reloading config (Yugo Nagata)

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

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

--

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

Daniele Varrazzo | 9 Feb 11:42 2015
Picon

Psycopg 2.6 and 2.5.5 released

We have just released two Psycopg versions: 2.5.5 containing a few bug
fixes and 2.6 introducing some new features.

The main new feature in Psycopg 2.6 is the support for the large
objects 64 bits API, allowing access to large objects of more than 2GB
size. Note that the feature is only supported on 64 bits clients and
with at least PostgreSQL 9.3 server and client library.

I wish to thank all the people who have contributed to these releases,
and especially Blake Rouse and the MAAS Team for the development of
the large objects 64 bits API support.

Psycopg 2.6: http://initd.org/psycopg/tarballs/PSYCOPG-2-6/psycopg2-2.6.tar.gz
Signature: http://initd.org/psycopg/tarballs/PSYCOPG-2-6/psycopg2-2.6.tar.gz.asc

Psycopg 2.5.5: http://initd.org/psycopg/tarballs/PSYCOPG-2-5/psycopg2-2.5.5.tar.gz
Signature: http://initd.org/psycopg/tarballs/PSYCOPG-2-5/psycopg2-2.5.5.tar.gz.asc

This is the full list of changes for the new versions:

- Psycopg 2.6 new features

  - Added support for large objects larger than 2GB.
  - Python time objects with a tzinfo specified and PostgreSQL timetz data are
    converted  into each other (ticket #272).

- Psycopg 2.6 bug fixes

 - Json adapter's str() returns the adapted content instead of the repr()
    (ticket #191).

- Psycopg 2.5.5 bug fixes

  - Named cursors used as context manager don't swallow the exception on exit
    (ticket #262).
  - cursor.description can be pickled (ticket #265).
  - Propagate read error messages in COPY FROM (ticket #270).
  - PostgreSQL time 24:00 is converted to Python 00:00 (ticket #278).

A further note for the packagers: the Psycopg 2.6 source tarball
doesn't contain the HTML rendered documentation anymore: you will find
Makefile targets to easily build it.

----

Psycopg is the most popular PostgreSQL adapter for the Python
programming language. At its core it fully implements the Python DB
API 2.0 specifications. Several extensions allow access to many of the
features offered by PostgreSQL.

--

-- 
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 | 9 Feb 00:04 2015

== PostgreSQL Weekly News - February 08 2015 ==

== PostgreSQL Weekly News - February 08 2015 ==

PostgreSQL Security Releases 9.4.1, 9.3.6, 9.2.10, 9.1.15, and 9.0.19
are out.  Upgrade!
http://www.postgresql.org/about/news/1569/

== PostgreSQL Product News ==

Ora2PG 15.1, a migration system for moving from Oracle to PostgreSQL, released.
http://ora2pg.darold.net/

oracle_fdw 1.2.0 released.
https://github.com/laurenz/oracle_fdw

pgpool-II versions 3.4.1, 3.3.5, 3.2.10, 3.1.13, and 3.0.17 released.
pgpool-II is a connection pooler and replication system for PostgreSQL.
http://pgpool.net/mediawiki/index.php/Downloads

skit 0.1 alpha, a command line tool to extract schema definitions,
perform diffs, and generate ddl, released.
http://pgfoundry.org/projects/skit/

== PostgreSQL Jobs for February ==

http://archives.postgresql.org/pgsql-jobs/2015-02/threads.php

== PostgreSQL Local ==

Prague PostgreSQL Developer Day (P2D2) 2015 will be in Prague, Czech
Republic February 11-12, 2015.
http://www.p2d2.cz/

The Melbourne PostgreSQL meetup on February 18, 2015 will be hosting
Gabriele Bartolini on PostgreSQL 9.4 for devops.  Details below, and
R, SVP.
http://www.meetup.com/melpug/events/219082475/

pgDaySF 2015 will be held March 10, 2015 in Burlingame, California.
http://sfpostgres.org/pgday-sf-2015-call-for-speakers-and-sponsors/

Registration for Nordic PostgreSQL Day, March 11, 2015 in  Copenhagen,
Denmark, is open.
http://2015.nordicpgday.org/registration/

PGConf US 2015 takes place March 25-27, 2015 in NYC.
http://nyc.pgconf.us/2015/

PGCon 2015 is June 16-20 in Ottawa, Canada.
http://www.pgcon.org/2015/

== 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 ==

Peter Eisentraut pushed:

- Translation updates Source-Git-URL:
  git://git.postgresql.org/git/pgtranslation/messages.git
  Source-Git-Hash: 19c72ea8d856d7b1d4f5d759a766c8206bf9ce53
  http://git.postgresql.org/pg/commitdiff/f8948616c9403effb84ed09c244650d9750243a2

- doc: Improve claim about location of pg_service.conf.  The previous
  wording claimed that the file was always in /etc, but of course this
  varies with the installation layout.  Write instead that it can be
  found via `pg_config --sysconfdir`.  Even though this is still
  somewhat incorrect because it doesn't account of moved
  installations, it at least conveys that the location depends on the
  installation.
  http://git.postgresql.org/pg/commitdiff/1332bbb30cd1e6beb7b43c26ca5728c715c1a9c8

Tom Lane pushed:

- Doc: fix syntax description for psql's \setenv.  The variable name
  isn't optional --- looks like a copy-and-paste-o from the \set
  command, where it is.  Dilip Kumar
  http://git.postgresql.org/pg/commitdiff/f9ee8ea10a432bd5692ef9ff25055717fbf290ce

- Fix breakage in GEODEBUG debug code.  LINE doesn't have an "m" field
  (anymore anyway).  Also fix unportable assumption that %x can print
  the result of pointer subtraction.  In passing, improve
  single_decode() in minor ways: Remove unnecessary leading-whitespace
  skip (strtod does that already).  Make GEODEBUG message more
  intelligible.  Remove entirely-useless test to see if strtod
  returned a silly pointer.  Don't bother computing
  trailing-whitespace skip unless caller wants an ending pointer.
  This has been broken since 261c7d4b653bc3e44c31fd456d94f292caa50d8f.
  Although it's only debug code, might as well fix the 9.4 branch too.
  http://git.postgresql.org/pg/commitdiff/778d498c7d9099c784f14199a319ec2a84d91191

- Remove unused "m" field in LSEG.  This field has been unreferenced
  since 1998, and does not appear in lseg values stored on disk (since
  sizeof(lseg) is only 32 bytes according to pg_type).  There was
  apparently some idea of maintaining it just in values appearing in
  memory, but the bookkeeping required to make that work would surely
  far outweigh the cost of recalculating the line's slope when needed.
  Remove it to (a) simplify matters and (b) suppress some
  uninitialized-field whining from Coverity.
  http://git.postgresql.org/pg/commitdiff/cec916f35be5531efdaf721a46313feb36e0cd76

Noah Misch pushed:

- Prevent Valgrind Memcheck errors around
  px_acquire_system_randomness().  This function uses uninitialized
  stack and heap buffers as supplementary entropy sources.  Mark them
  so Memcheck will not complain.  Back-patch to 9.4, where Valgrind
  Memcheck cooperation first appeared.  Marko Tiikkaja
  http://git.postgresql.org/pg/commitdiff/59b919822ab060f721e235964d19b55a19c815f0

- Cherry-pick security-relevant fixes from upstream imath library.
  This covers alterations to buffer sizing and zeroing made between
  imath 1.3 and imath 1.20.  Valgrind Memcheck identified the buffer
  overruns and reliance on uninitialized data; their exploit potential
  is unknown.  Builds specifying --with-openssl are unaffected,
  because they use the OpenSSL BIGNUM facility instead of imath.
  Back-patch to 9.0 (all supported versions).  Security: CVE-2015-0243
  http://git.postgresql.org/pg/commitdiff/8b59672d8d23ea4203cf2701d126a96edca5bdd6

- Fix buffer overrun after incomplete read in pullf_read_max().  Most
  callers pass a stack buffer.  The ensuing stack smash can crash the
  server, and we have not ruled out the viability of attacks that lead
  to privilege escalation.  Back-patch to 9.0 (all supported
  versions).  Marko Tiikkaja Security: CVE-2015-0243
  http://git.postgresql.org/pg/commitdiff/1dc75515868454c645ded22d38054ec693e23ec6

- Check DCH_MAX_ITEM_SIZ limits with <=, not <.  We reserve space for
  the full amount, not one less.  The affected checks deal with
  localized month and day names.  Today's DCH_MAX_ITEM_SIZ value would
  suffice for a 60-byte day name, while the longest known is the
  49-byte mn_CN.utf-8 word for "Saturday."  Thus, the upshot of this
  change is merely to avoid misdirecting future readers of the code;
  users are not expected to see errors either way.
  http://git.postgresql.org/pg/commitdiff/237795a7b4ccf359423bdd99476782d4880eda83

- Assert(PqCommReadingMsg) in pq_peekbyte().  Interrupting
  pq_recvbuf() can break protocol sync, so its callers all deserve
  this assertion.  The one pq_peekbyte() caller suffices already.
  http://git.postgresql.org/pg/commitdiff/a7a4adcf8d1e5a34a15ad86aee7d6aa0b8c15d43

Robert Haas pushed:

- Add new function BackgroundWorkerInitializeConnectionByOid.
  Sometimes it's useful for a background worker to be able to
  initialize its database connection by OID rather than by name, so
  provide a way to do that.
  http://git.postgresql.org/pg/commitdiff/5d2f957f3f9dcd88384780876f535b423151f9bf

- pgcrypto: Code cleanup for decrypt_internal.  Remove some
  unnecessary null-tests, and replace a goto-label construct with an
  "if" block.  Michael Paquier, reviewed by me.
  http://git.postgresql.org/pg/commitdiff/370b3a4618c48cb44a1137f47cf1156836cf8a90

Heikki Linnakangas pushed:

- Remove dead code.  Commit 13629df changed metaphone() function to
  return an empty string on empty input, but it left the old error
  message in place. It's now dead code.  Michael Paquier, per Coverity
  warning.
  http://git.postgresql.org/pg/commitdiff/4eaafa045362298adfe61fdd83b47b22211c75d1

- Fix typo in comment.  Amit Langote
  http://git.postgresql.org/pg/commitdiff/efba7a542fd52ed7607f1d8b162d898da0baa22c

- Rephrase the documentation on pg_receivexlog --synchronous option.
  The old wording talked about a "sync command", meaining fsync(), but
  it was not very clear.
  http://git.postgresql.org/pg/commitdiff/507627f5b5c009aa95c04254614778c6263a3dc2

- Refactor page compactifying code.  The logic to compact away removed
  tuples from page was duplicated with small differences in
  PageRepairFragmentation, PageIndexMultiDelete, and
  PageIndexDeleteNoCompact. Put it into a common function.  Reviewed
  by Peter Geoghegan.
  http://git.postgresql.org/pg/commitdiff/809d9a260b5d068a6a366273cd724bf9b396b026

- Add API functions to libpq to interrogate SSL related stuff.  This
  makes it possible to query for things like the SSL version and
  cipher used, without depending on OpenSSL functions or macros. That
  is a good thing if we ever get another SSL implementation.
  PQgetssl() still works, but it should be considered as deprecated as
  it only works with OpenSSL. In particular, PQgetSslInUse() should be
  used to check if a connection uses SSL, because as soon as we have
  another implementation, PQgetssl() will return NULL even if SSL is
  in use.
  http://git.postgresql.org/pg/commitdiff/91fa7b4719ac583420d9143132ba4ccddefbc5b2

- Add dummy PQsslAttributes function for non-SSL builds.  All the
  other new SSL information functions had dummy versions in
  be-secure.c, but I missed PQsslAttributes(). Oops. Surprisingly, the
  linker did not complain about the missing function on most platforms
  represented in the buildfarm, even though it is exported, except for
  a few Windows systems.
  http://git.postgresql.org/pg/commitdiff/302262d52111ce71dececfe18448792cee415a57

- Fix memory leaks on OOM in ecpg.  These are fairly obscure cases,
  but let's keep Coverity happy.  Michael Paquier with some further
  fixes by me.
  http://git.postgresql.org/pg/commitdiff/c31b5d9ddf25d26dac5f5c215b8a5e8b3dfa37e6

- Fix reference-after-free when waiting for another xact due to
  constraint.  If an insertion or update had to wait for another
  transaction to finish, because there was another insertion with
  conflicting key in progress, we would pass a just-free'd item
  pointer to XactLockTableWait().  All calls to XactLockTableWait()
  and MultiXactIdWait() had similar issues.  Some passed a pointer to
  a buffer in the buffer cache, after already releasing the lock. The
  call in EvalPlanQualFetch had already released the pin too. All but
  the call in execUtils.c would merely lead to reporting a bogus ctid,
  however (or an assertion failure, if enabled).  All the callers that
  passed HeapTuple->t_data->t_ctid were slightly bogus anyway: if the
  tuple was updated (again) in the same transaction, its ctid field
  would point to the next tuple in the chain, not the tuple itself.
  Backpatch to 9.4, where the 'ctid' argument to XactLockTableWait was
  added (in commit f88d4cfc)
  http://git.postgresql.org/pg/commitdiff/57fe246890ad51e166fb6a8da937e41c35d7a279

- Use a separate memory context for GIN scan keys.  It was getting
  tedious to track and release all the different things that form a
  scan key. We were leaking at least the queryCategories array, and
  possibly more, on a rescan. That was visible if a GIN index was used
  in a nested loop join. This also protects from leaks in extractQuery
  method.  No backpatching, given the lack of complaints from the
  field. Maybe later, after this has received more field testing.
  http://git.postgresql.org/pg/commitdiff/d88976cfa1302e8dccdcbfe55e9e29faee8c0cdf

- Report WAL flush, not insert, position in replication
  IDENTIFY_SYSTEM.  When beginning streaming replication, the client
  usually issues the IDENTIFY_SYSTEM command, which used to return the
  current WAL insert position. That's not suitable for the intended
  purpose of that field, however. pg_receivexlog uses it to start
  replication from the reported point, but if it hasn't been flushed
  to disk yet, it will fail. Change IDENTIFY_SYSTEM to report the
  flush position instead.  Backpatch to 9.1 and above. 9.0 doesn't
  report any WAL position.
  http://git.postgresql.org/pg/commitdiff/ff16b40f8cac67a740f4edaa9fc2d9c7ba44c73a

- Be more careful to not lose sync in the FE/BE protocol.  If any
  error occurred while we were in the middle of reading a protocol
  message from the client, we could lose sync, and incorrectly try to
  interpret a part of another message as a new protocol message. That
  will usually lead to an "invalid frontend message" error that
  terminates the connection. However, this is a security issue because
  an attacker might be able to deliberately cause an error, inject a
  Query message in what's supposed to be just user data, and have the
  server execute it.  We were quite careful to not have
  CHECK_FOR_INTERRUPTS() calls or other operations that could
  ereport(ERROR) in the middle of processing a message, but a query
  cancel interrupt or statement timeout could nevertheless cause it to
  happen. Also, the V2 fastpath and COPY handling were not so careful.
  It's very difficult to recover in the V2 COPY protocol, so we will
  just terminate the connection on error. In practice, that's what
  happened previously anyway, as we lost protocol sync.  To fix, add a
  new variable in pqcomm.c, PqCommReadingMsg, that is set whenever
  we're in the middle of reading a message. When it's set, we cannot
  safely ERROR out and continue running, because we might've read only
  part of a message. PqCommReadingMsg acts somewhat similarly to
  critical sections in that if an error occurs while it's set, the
  error handler will force the connection to be terminated, as if the
  error was FATAL. It's not implemented by promoting ERROR to FATAL in
  elog.c, like ERROR is promoted to PANIC in critical sections,
  because we want to be able to use PG_TRY/CATCH to recover and regain
  protocol sync. pq_getmessage() takes advantage of that to prevent an
  OOM error from terminating the connection.  To prevent unnecessary
  connection terminations, add a holdoff mechanism similar to
  HOLD/RESUME_INTERRUPTS() that can be used hold off query cancel
  interrupts, but still allow die interrupts. The rules on which
  interrupts are processed when are now a bit more complicated, so
  refactor ProcessInterrupts() and the calls to it in signal handlers
  so that the signal handlers always call it if ImmediateInterruptOK
  is set, and ProcessInterrupts() can decide to not do anything if the
  other conditions are not met.  Reported by Emil Lenngren. Patch
  reviewed by Noah Misch and Andres Freund.  Backpatch to all
  supported versions.  Security: CVE-2015-0244
  http://git.postgresql.org/pg/commitdiff/2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b

Andres Freund pushed:

- Use a nonblocking socket for FE/BE communication and block using
  latches.  This allows to introduce more elaborate handling of
  interrupts while reading from a socket.  Currently some interrupt
  handlers have to do significant work from inside signal handlers,
  and it's very hard to correctly write code to do so.  Generic signal
  handler limitations, combined with the fact that we can't safely
  jump out of a signal handler while reading from the client have
  prohibited implementation of features like timeouts for
  idle-in-transaction.  Additionally we use the latch code to wait in
  a couple places where we previously only had waiting code on windows
  as other platforms just busy looped.  This can increase the number
  of systemcalls happening during FE/BE communication. Benchmarks so
  far indicate that the impact isn't very high, and there's room for
  optimization in the latch code. The chance of cleaning up the usage
  of latches gives us, seem to outweigh the risk of small performance
  regressions.  This commit theoretically can't used without the next
  patch in the series, as WaitLatchOrSocket is not defined to be fully
  signal safe. As we already do that in some cases though, it seems
  better to keep the commits separate, so they're easier to
  understand.  Author: Andres Freund Reviewed-By: Heikki Linnakangas
  http://git.postgresql.org/pg/commitdiff/387da18874afa17156ee3af63766f17efb53c4b9

- Introduce and use infrastructure for interrupt processing during
  client reads.  Up to now large swathes of backend code ran inside
  signal handlers while reading commands from the client, to allow for
  speedy reaction to asynchronous events. Most prominently shared
  invalidation and NOTIFY handling. That means that complex code like
  the starting/stopping of transactions is run in signal handlers...
  The required code was fragile and verbose, and is likely to contain
  bugs.  That approach also severely limited what could be done while
  communicating with the client. As the read might be from within
  openssl it wasn't safely possible to trigger an error, e.g. to
  cancel a backend in idle-in-transaction state. We did that in some
  cases, namely fatal errors, nonetheless.  Now that FE/BE
  communication in the backend employs non-blocking sockets and
  latches to block, we can quite simply interrupt reads from signal
  handlers by setting the latch. That allows us to signal an
  interrupted read, which is supposed to be retried after returning
  from within the ssl library.  As signal handlers now only need to
  set the latch to guarantee timely interrupt processing, remove a
  fair amount of complicated & fragile code from async.c and sinval.c.
  We could now actually start to process some kinds of interrupts,
  like sinval ones, more often that before, but that seems better done
  separately.  This work will hopefully allow to handle cases like
  being blocked by sending data, interrupting idle transactions and
  similar to be implemented without too much effort.  In addition to
  allowing getting rid of ImmediateInterruptOK, that is.  Author:
  Andres Freund Reviewed-By: Heikki Linnakangas
  http://git.postgresql.org/pg/commitdiff/4f85fde8eb860f263384fffdca660e16e77c7f76

- Process 'die' interrupts while reading/writing from the client
  socket.  Up to now it was impossible to terminate a backend that was
  trying to send/recv data to/from the client when the socket's buffer
  was already full/empty. While the send/recv calls itself might have
  gotten interrupted by signals on some platforms, we just immediately
  retried.  That could lead to situations where a backend couldn't be
  terminated , after a client died without the connection being
  closed, because it was blocked in send/recv.  The problem was far
  more likely to be hit when sending data than when reading. That's
  because while reading a command from the client, and during
  authentication, we processed interrupts immediately . That primarily
  left COPY FROM STDIN as being problematic for recv.  Change things
  so that that we process 'die' events immediately when the
  appropriate signal arrives. We can't sensibly react to query cancels
  at that point, because we might loose sync with the client as we
  could be in the middle of writing a message.  We don't interrupt
  writes if the write buffer isn't full, as indicated by write()
  returning EWOULDBLOCK, as that would lead to fewer error messages
  reaching clients.  Per discussion with Kyotaro HORIGUCHI and Heikki
  Linnakangas Discussion: 20140927191243.GD5423 <at> alap3.anarazel.de
  http://git.postgresql.org/pg/commitdiff/4fe384bd858671d40d311ca68cc9b80f4c683a3e

- Don't allow immediate interrupts during authentication anymore.  We
  used to handle authentication_timeout by setting
  ImmediateInterruptOK to true during large parts of the
  authentication phase of a new connection.  While that happens to
  work acceptably in practice, it's not particularly nice and has ugly
  corner cases.  Previous commits converted the FE/BE communication to
  use latches and implemented support for interrupt handling during
  both send/recv. Building on top of that work we can get rid of
  ImmediateInterruptOK during authentication, by immediately treating
  timeouts during authentication as a reason to die. As die interrupts
  are handled immediately during client communication that provides a
  sensibly quick reaction time to authentication timeout.
  Additionally add a few CHECK_FOR_INTERRUPTS() to some more complex
  authentication methods. More could be added, but this already should
  provides a reasonable coverage.  While it this overall increases the
  maximum time till a timeout is reacted to, it greatly reduces
  complexity and increases reliability. That seems like a overall win.
  If the increase proves to be noticeable we can deal with those cases
  by moving to nonblocking network code and add interrupt checking
  there.  Reviewed-By: Heikki Linnakangas
  http://git.postgresql.org/pg/commitdiff/6647248e3708843be93c7ca670cd219fe8e61026

- Move deadlock and other interrupt handling in proc.c out of signal
  handlers.  Deadlock checking was performed inside signal handlers up
  to now. While it's a remarkable feat to have made this work
  reliably, it's quite complex to understand why that is the case.
  Partially it worked due to the assumption that semaphores are signal
  safe - which is not actually documented to be the case for sysv
  semaphores.  The reason we had to rely on performing this work
  inside signal handlers is that semaphores aren't guaranteed to be
  interruptable by signals on all platforms. But now that latches
  provide a somewhat similar API, which actually has the guarantee of
  being interruptible, we can avoid doing so.  Signalling between
  ProcSleep, ProcWakeup, ProcWaitForSignal and ProcSendSignal is now
  done using latches. This increases the likelihood of spurious
  wakeups. As spurious wakeup already were possible and aren't likely
  to be frequent enough to be an actual problem, this seems
  acceptable.  This change would allow for further simplification of
  the deadlock checking, now that it doesn't have to run in a signal
  handler. But even if I were motivated to do so right now, it would
  still be better to do that separately. Such a cleanup shouldn't have
  to be reviewed a the same time as the more fundamental changes in
  this commit.  There is one possible usability regression due to this
  commit. Namely it is more likely than before that log_lock_waits
  messages are output more than once.  Reviewed-By: Heikki Linnakangas
  http://git.postgresql.org/pg/commitdiff/6753333f55e1d9bcb9da4323556b456583624a07

- Remove the option to service interrupts during PGSemaphoreLock().
  The remaining caller (lwlocks) doesn't need that facility, and we
  plan to remove ImmedidateInterruptOK entirely. That means that
  interrupts can't be serviced race-free and portably anyway, so
  there's little reason for keeping the feature.  Reviewed-By: Heikki
  Linnakangas
  http://git.postgresql.org/pg/commitdiff/d06995710bc7e347d39866c1793ae282498d65e0

- Remove remnants of ImmediateInterruptOK handling.  Now that nothing
  sets ImmediateInterruptOK to true anymore, we can remove all the
  supporting code.  Reviewed-By: Heikki Linnakangas
  http://git.postgresql.org/pg/commitdiff/2505ce0be0b686c5a0a5141e9d080e7fdc35988a

- Remove ill-conceived Assertion in ProcessClientWriteInterrupt().
  It's perfectly fine to have blocked interrupts when
  ProcessClientWriteInterrupt() is called. In fact it's commonly the
  case when emitting error reports. And we deal with that correctly.
  Even if that'd not be the case, it'd be a bad location for such a
  assertion. Because ProcessClientWriteInterrupt() is only called when
  the socket is blocked it's hard to hit.  Per Heikki and buildfarm
  animals nightjar and dunlin.
  http://git.postgresql.org/pg/commitdiff/3a54f4a4944b849846c5a1494810ea06bd6601b7

- Add missing float.h include to snprintf.c.  On windows _isnan()
  (which isnan() is redirected to in port/win32.h) is declared in
  float.h, not math.h.  Per buildfarm animal currawong.  Backpatch to
  all supported branches.
  http://git.postgresql.org/pg/commitdiff/ff8ca3b04c15eace1de1a7a66e3a05426b07b773

Fujii Masao pushed:

- doc: Fix markup.  Ian Barwick
  http://git.postgresql.org/pg/commitdiff/c036edb7b35fda18b93a6eacac5b14fcee4693a4

Michael Meskes pushed:

- This routine was calling ecpg_alloc to allocate to memory but did
  not actually check the returned pointer allocated, potentially NULL
  which could be the result of a malloc call.  Issue noted by
  Coverity, fixed by Michael Paquier <michael <at> otacoo.com>
  http://git.postgresql.org/pg/commitdiff/5ee5bc387319b9ac33083bacebd3ab7046666328

Bruce Momjian pushed:

- to_char():  prevent writing beyond the allocated buffer.  Previously
  very long localized month and weekday strings could overflow the
  allocated buffers, causing a server crash.  Reported and patch
  reviewed by Noah Misch.  Backpatch to all supported versions.
  Security: CVE-2015-0241
  http://git.postgresql.org/pg/commitdiff/9241c84cbcb82174a7d986242f233aa6472c1129

- to_char():  prevent accesses beyond the allocated buffer.
  Previously very long field masks for floats could access memory
  beyond the existing buffer allocated to hold the result.  Reported
  by Andres Freund and Peter Geoghegan.  Backpatch to all supported
  versions.  Security: CVE-2015-0241
  http://git.postgresql.org/pg/commitdiff/0150ab567bcf5e5913e2b62a1678f84cc272441f

- port/snprintf():  fix overflow and do padding.  Prevent
  port/snprintf() from overflowing its local fixed-size buffer and pad
  to the desired number of digits with zeros, even if the precision is
  beyond the ability of the native sprintf().  port/snprintf() is only
  used on systems that lack a native snprintf().  Reported by Bruce
  Momjian. Patch by Tom Lane.   Backpatch to all supported versions.
  Security: CVE-2015-0242
  http://git.postgresql.org/pg/commitdiff/29725b3db67ad3f09da1a7fb6690737d2f8d6c0a

== Rejected Patches (for now) ==

No one was disappointed this week :-)

== Pending Patches ==

Kyotaro HORIGUCHI sent in another revision of a patch to make
fetch_size settable per foreign server and foreign table.

Kyotaro HORIGUCHI sent in a patch to ensure pg_basebackup sends
feedback at desired times.

Andres Freund sent in a WIP patch to cache snapshots in
GetSnapshotData().

Ryan Kelly sent in two revisions of a patch to add LINE: hint when
schemaname.typename is a non-existent schema.

Kyotaro HORIGUCHI sent in a patch to add regnamespace and regrole
types.

Peter Geoghegan sent in a patch to Make UPDATE privileges distinct
from INSERT privileges in RTEs.

Robert Haas sent in two more revisions of a patch to add parallel mode
and parallel contexts.

Noah Misch sent in a patch to allow no-rewrite timestamp<->timestamptz
conversions.

Michael Paquier sent in two more revisions of a patch to make
log_autovacuum_min_duration a relation option.

Heikki Linnakangas sent in a patch to simplify the waiting logic in
reading from / writing to client.

Ian Lawrence Barwick sent in a patch to ensure that paths are
canonicalized in pg_basebackup.

Fujii Masao, Michael Paquier, and Syed Rahila traded patches to
implement compression of full-page writes.

Michael Paquier sent in three more revisions of a patch to add
wal_availability_check_interval.

Daniel Bausch sent in a PoC patch to prefetch from storage for
indexscans.

Amit Kapila sent in another revision of a patch to allow doing
sequential scans in parallel.

Robert Haas sent in a patch to support parallel heap scans, and
another to implement contrib/parallel_count, now using
heap_parallel_beginscan.

Stas Kelvich sent in a patch to add kNN support for the contrib cube
extension. 

Jeff Davis sent in a patch sketching out Inclusion Constraints, a
generlized form of foreign key.

Andreas Karlsson sent in another revision of a patch to reduce the
lock strength of trigger and foreign key DDL.

Robert Haas sent in a patch to assess parallel-safety of query plans
before attempting to parallelize them.

--

-- 
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 | 6 Feb 11:48 2015

Ora2Pg 15 released

Ora2Pg 15 released

Version 15.1 of Ora2Pg, a free and reliable tool used to migrate an
Oracle database to PostgreSQL, has been officially released and is
publicly available for download.

This major release improve PL/SQL code replacement, fixes several bugs and
adds some new useful features:

    - Add support to the PostgreSQL external_file extension to mimic BFILE
      type from Oracle. See https://github.com/darold/external_file for
      more information.
    - Allow export of Oracle's DIRECTORY as external_file extension objects
      This will also try to export read/write privilege on those
directories.
    - Allow export of Oracle's DATABASE LINK as Oracle foreign data wrapper
      server using oracle_fdw.
    - Allow function with PRAGMA AUTONOMOUS_TRANSACTION to be exported
through
      a dblink wrapper to achieve the autonomous transaction.
    - Allow export of Oracle's SYNONYMS as views. Views can use foreign
table
      to create "synonym" on object of a remote database.
    - Add trimming of data when DATA_TYPE is used to convert CHAR(n) Oracle
      column into varchar(n) or text. Default is to trim both side any space
      character. This behavior can be controlled using two new configuration
      directives TRIM_TYPE and TRIM_CHAR.
    - Add auto detection of geometry constraint type and dimensions through
      spatial index parameters. This avoid the overhead of sequential scan
      of the geometric column.
    - Add support to export Oracle sub partition and create sub partition
      for PostgreSQL with the corresponding trigger.
    - ALLOW and EXCLUDE directives are now able to apply filter on the
object
      type. Backward compatibility can not be fully preserved, older
definition
      will apply to current export type only, this could change your
export in
      some conditions. See documentation update for more explanation.
    - Add PACKAGE_AS_SCHEMA directive to change default behavior that use a
      schema to emulate Oracle package function call. When disable, all
calls
      to package_name.function_name() will be turn into
package_name_function_name()
      just like a function call in current schema.
    - Add FKEY_OPTIONS to force foreign keys options. List of supported
options
      are: ON DELETE|UPDATE CASCADE|RESTRICT|NO ACTION.
    - Add rewriting of internal functions in package body, those
functions will
      be prefixed by the package name. Thanks to Dominique Legendre for the
      feature request.

Some change can break backward compatibility and make configuration
directives
obsolete:

    - The ALLOW_PARTITION configuration directive has been removed. With new
      extended filters in ALLOW/EXCLUDE directive, this one is obsolete.
      Backward compatibility is preserved but may be removed in the future.
    - ALLOW and EXCLUDE directives do not works as previously. Backward
      compatibility may be preserved with some export type but may be broken
      in most of them. See documentation.
    - It is recommended now to leave the NLS_LANG and CLIENT_ENCODING
commented
      to let Ora2Pg handle automatically the encoding. Those directives
may be
      removed in the future.

As usual these also some bug fixes and Oracle to PostgreSQl conversion
adjustments, see https://github.com/darold/ora2pg/blob/master/changelog
for a complete list.

Thanks to all contributors, they are all cited in the changelog file.
With again
for this release very specials thanks to Dominique Legendre.

Useful Links:

    - Website: http://ora2pg.darold.net/
    - Download: http://sourceforge.net/projects/ora2pg/
    - Development: https://github.com/darold/ora2pg
    - Changelog: https://github.com/darold/ora2pg/blob/master/changelog
    - Documentation: https://github.com/darold/ora2pg/blob/master/README

About Ora2Pg :

Ora2Pg is an easy and reliable tool to migrate from Oracle to PostgreSQL.
It is developed since 2001 and can export most of the Oracle objects
(table, view, materialized view, tablespace, sequence, indexes, trigger,
grant, function, procedure, package, partition, data, blob and external
table).

Ora2Pg works on any platform and is available under the GPL v3 licence.

Docs, Download & Support at http://ora2pg.darold.net/

-- 
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

Dave Page | 5 Feb 16:00 2015

PostgreSQL 9.4.1, 9.3.6, 9.2.10, 9.1.15, and 9.0.19 released

The PostgreSQL Global Development Group has released an important
update with fixes for multiple security issues to all supported
versions of the PostgreSQL database system, which includes minor
versions 9.4.1, 9.3.6, 9.2.10, 9.1.15, and 9.0.19. This update
includes both security fixes and fixes for issues discovered since the
last release.  In particular for the 9.4 update, there is a change to
the way unicode strings are escaped for the JSON and JSONB data types.

All users should update their PostgreSQL installation at the next opportunity.

Security Fixes
--------------

This update fixes multiple security issues reported in PostgreSQL over
the past few months.  All of these issues require prior
authentication, and some require additional conditions, and as such
are not considered generally urgent.  However, users should examine
the list of security holes patched below in case they are particularly
vulnerable.

* CVE-2015-0241:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-0241 - Buffer
overruns in "to_char" functions.
* CVE-2015-0242:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-0242 - Buffer
overrun in replacement printf family of functions.
* CVE-2015-0243:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-0243 - Memory
errors in functions in the pgcrypto extension.
* CVE-2015-0244:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-0244 - An error
in extended protocol message reading.
* CVE-2014-8161:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-8161 -
Constraint violation errors can cause display of values in columns
which the user would not normally have rights to see.

This update also fixes the previously reported problem that, during
regression testing on Windows, the test postmaster process was
vulnerable to unauthorized connections.  This vulnerability was fixed
on non-Windows platforms in the prior update releases.

More information about these issues, as well as older patched issues,
is available on the PostgreSQL Security Page.

JSON and JSONB Unicode Escapes
------------------------------

The handling of Unicode escape strings for JSON and JSONB in
PostgreSQL 9.4.0 has been changed in a way which may break
compatibility for some users.  To fix some inconsistencies, type JSONB
no longer accepts the escape sequence "\u0000".  Type JSON accepts
"\u0000" only in contexts where it does not need to be converted to
de-escaped form.  See the release notes for more detail.

Other Fixes and Improvements
----------------------------

In addition to the above, more than 60 reported issues have been fixed
in this cumulative update release.  Some of them affect only version
9.4, but many of them fix problems present in older versions.  These
fixes include:

* Cope with the non-ASCII Norwegian Windows locale name.
* Avoid data corruption when databases are moved to new tablespaces
and back again.
* Ensure that UNLOGGED tables are correctly copied during ALTER
DATABASE operations.
* Avoid deadlocks when locking recently modified rows.
* Fix two SELECT FOR UPDATE query issues.
* Prevent false negative for shortest-first regular expression matches.
* Fix false positives and negatives in tsquery contains operator.
* Fix namespace handling in xpath().
* Prevent row-producing functions from creating empty column names.
* Make autovacuum use per-table cost_limit and cost_delay settings.
* When autovacuum=off, limit autovacuum work to wraparound prevention only.
* Multiple fixes for logical decoding in 9.4.
* Fix transient errors on hot standby queries due to page replacement.
* Prevent duplicate WAL file archiving at end of recovery or standby promotion.
* Prevent deadlock in parallel restore of schema-only dump.

In addition to the fixes above, the following contrib modules and
extensions have had bugs fixed in this release: pg_upgrade,
auto_explain, hstore, pageinspect, pgcrypto, pg_test_fsync, tablefunc,
and xml2.  Also, multiple functions across several contrib modules
have been modified with the correct level of volatility.  There are
also multiple cleanup fixes based on minor issues found by the
Coverity Scan static analyzer.

This update also contains many changes to PostgreSQL's timezone files.
This includes an update to tzdata release 2015a, with updates to
Chile, Mexico, Caicos Islands, and Fiji.  PostgreSQL now takes date
into account when assigning an offset based on a timezone abbreviation
for historically changeable timezones.  We have also done a general
cleanup on timezone abbreviations, and added "CST" as an abbreviation
for China Standard Time.

As with other minor releases, users are not required to dump and
reload their database or use pg_upgrade in order to apply this update
release; you may simply shut down PostgreSQL and update its binaries.
Users who have skipped multiple update releases may need to perform
additional post-update steps; see the Release Notes for details.

Links:
  * Download: http://www.postgresql.org/download
  * Release Notes: http://www.postgresql.org/docs/current/static/release.html
  * Security Page: http://www.postgresql.org/support/security/

-- 
Dave Page
PostgreSQL Core Team
http://www.postgresql.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


Gmane