Thread: == PostgreSQL Weekly News - August 25, 2019 ==

== PostgreSQL Weekly News - August 25, 2019 ==

From
David Fetter
Date:
== PostgreSQL Weekly News - August 25, 2019 ==

PGConf India 2020 will be on February 26-28, 2020 in Bengaluru, Karnataka.
http://pgconf.in/

== PostgreSQL Product News ==

pg_partman 4.2.0, a management system for partitioned tables, released.
https://github.com/pgpartman/pg_partman

pgAdmin4 4.12, a web- and native GUI control center for PostgreSQL, released.
https://www.pgadmin.org/docs/pgadmin4/dev/release_notes_4_12.html

== PostgreSQL Jobs for August ==

http://archives.postgresql.org/pgsql-jobs/2019-08/

== PostgreSQL Local ==

The first Austrian pgDay, will take place September 6, 2019 at the Hilton Garden
Inn in Wiener Neustadt.
https://pgday.at/en/

PostgresOpen will be September 11th - 13th, 2019 in Orlando, Florida at the
Rosen Centre Hotel.
https://2019.postgresopen.org/

PostgresConf South Africa 2019 will take place in Johannesburg on October 8-9, 2019
https://postgresconf.org/conferences/SouthAfrica2019

PostgreSQL Conference Europe 2019 will be held on October 15-18, 2019 in Milan,
Italy.
https://2019.pgconf.eu/

2Q PGConf 2019 will be held December 4 & 5 in Chicago.
The CFP is open through August 30, 2019.
https://www.2qpgconf.com/

pgDay Paris 2020 will be held in Paris, France on March 26, 2020
at Espace Saint-Martin.
http://2020.pgday.paris/

Nordic PGDay 2020 will be held in Helsinki, Finland at the Hilton Helsinki
Strand Hotel on March 24, 2020.  The CfP is open through December 31, 2019 at
https://2020.nordicpgday.org/cfp/

PGConf India 2020 will be on February 26-28, 2020 in Bengaluru, Karnataka.
http://pgconf.in/

== 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 PST8PDT to david@fetter.org.

== Applied Patches ==

Tom Lane pushed:

- Disallow changing an inherited column's type if not all parents changed. If a
  table inherits from multiple unrelated parents, we must disallow changing the
  type of a column inherited from multiple such parents, else it would be out of
  step with the other parents.  However, it's possible for the column to
  ultimately be inherited from just one common ancestor, in which case a change
  starting from that ancestor should still be allowed.  (I would not be excited
  about preserving that option, were it not that we have regression test cases
  exercising it already ...)  It's slightly annoying that this patch looks
  different from the logic with the same end goal in renameatt(), and more
  annoying that it requires an extra syscache lookup to make the test.  However,
  the recursion logic is quite different in the two functions, and a
  back-patched bug fix is no place to be trying to unify them.  Per report from
  Manuel Rigger.  Back-patch to 9.5.  The bug exists in 9.4 too (and doubtless
  much further back); but the way the recursion is done in 9.4 is a good bit
  different, so that substantial refactoring would be needed to fix it in 9.4.
  I'm disinclined to do that, or risk introducing new bugs, for a bug that has
  escaped notice for this long.  Discussion:
  https://postgr.es/m/CA+u7OA4qogDv9rz1HAb-ADxttXYPqQdUdPY_yd4kCzywNxRQXA@mail.gmail.com
  https://git.postgresql.org/pg/commitdiff/4d4c66addfd4da51b0e4be456d6109bea4539fac

- Fix failure-to-compile-standalone in ecpg's dt.h. This has to have <time.h>,
  or the references to "struct tm" don't mean what they should.  We have some
  other recently-introduced issues of the same ilk, but this one seems old.  No
  backpatch though, as it's only a latent problem for most purposes.
  https://git.postgresql.org/pg/commitdiff/5c66e99178c2f72042034cceb6bc4902650a2608

- Fix failure-to-compile-standalone in scripts_parallel.h. Needs libpq-fe.h for
  references to PGConn.  Discussion:
  https://postgr.es/m/17463.1566153454@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/5f110933e1145ad40116cf3c67a454cb6cb71cc2

- Fix incidental warnings from cpluspluscheck. Remove use of "register" keyword
  in hashfn.c.  It's obsolescent according to recent C++ compilers, and no
  modern C compiler pays much attention to it either.  Also fix one cosmetic
  warning about signed vs unsigned comparison.  Discussion:
  https://postgr.es/m/20518.1559494394@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/232720be9b6412ec2b6bee405299bcbbbe700f0b

- Avoid conflicts with library versions of inet_net_ntop() and friends. Prefix
  inet_net_ntop and sibling routines with "pg_" to ensure that they aren't
  mistaken for C-library functions.  This fixes warnings from cpluspluscheck on
  some platforms, and should help reduce reader confusion everywhere, since our
  functions aren't exactly interchangeable with the library versions (they may
  have different ideas about address family codes).  This shouldn't be fixing
  any actual bugs, unless somebody's linker is misbehaving, so no need to
  back-patch.  Discussion: https://postgr.es/m/20518.1559494394@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/927f34ce8a215c8b254136f710cca9ca4da1352c

- Use zic's new "-b slim" option to generate smaller timezone files. IANA tzcode
  release 2019b adds an option that tells zic not to emit the old 32-bit section
  of the timezone files, and to skip some other space-wasting hacks needed for
  compatibility with old timezone client libraries.  Since we only expect our
  own code to use the timezone data we install, and our code is up-to-date with
  2019b, there's no apparent reason not to generate the smallest possible files.
  Unfortunately, while the individual zone files do get significantly smaller in
  many cases, they were not that big to begin with; which means that no real
  space savings ensues on filesystems that don't optimize small files.  (For
  instance, on ext4 with 4K block size, "du" says the installed timezone tree is
  the same size as before.) Still, it seems worth making the change, if only
  because this is presumably the wave of the future.  At the very least, we'll
  save some cycles while reading a zone file.  But given the marginal value and
  the fact that this is a new code path, it doesn't seem worth the risk of
  back-patching this change into stable branches.  Hence, unlike most of our
  timezone-related changes, apply to HEAD only.  Discussion:
  https://postgr.es/m/24998.1563403327@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/a12079109686e75c833b0b04925af8cb2fa011c0

- Add "headerscheck" script to test header-file compilability under C. We
  already had "cpluspluscheck", which served the dual purposes of verifying that
  headers compile standalone and that they compile as C++. However, C++
  compilers don't have the exact same set of error conditions as C compilers, so
  this doesn't really prove that a header will compile standalone as C.  Hence,
  add a second script that's largely similar but runs the C compiler not C++.
  Also add a bit more documentation than the none-at-all we had before.
  Discussion: https://postgr.es/m/14803.1566175851@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/55ea109188474dae22d90f743d7189a8bdf94d49

- Restore json{b}_populate_record{set}'s ability to take type info from AS. If
  the record argument is NULL and has no declared type more concrete than
  RECORD, we can't extract useful information about the desired rowtype from it.
  In this case, see if we're in FROM with an AS clause, and if so extract the
  needed rowtype info from AS.  It worked like this before v11, but commit
  37a795a60 removed the behavior, reasoning that it was undocumented,
  inefficient, and utterly not self-consistent.  If you want to take type info
  from an AS clause, you should be using the json_to_record() family of
  functions not the json_populate_record() family.  Also, it was already the
  case that the "populate" functions would fail for a null-valued RECORD input
  (with an unfriendly "record type has not been registered" error) when there
  wasn't an AS clause at hand, and it wasn't obvious that that behavior wasn't
  OK when there was one.  However, it emerges that some people were depending on
  this to work, and indeed the rather off-point error message you got if you
  left off AS encouraged slapping on AS without switching to the
  json_to_record() family.  Hence, put back the fallback behavior of looking for
  AS.  While at it, improve the run-time error you get when there's no place to
  obtain type info; we can do a lot better than "record type has not been
  registered". (We can't, unfortunately, easily improve the parse-time error
  message that leads people down this path in the first place.)  While at it, I
  refactored the code a bit to avoid duplicating the same logic in several
  different places.  Per bug #15940 from Jaroslav Sivy.  Back-patch to v11 where
  the current coding came in.  (The pre-v11 deficiencies in this area aren't
  regressions, so we'll leave those branches alone.)  Patch by me, based on
  preliminary analysis by Dmitry Dolgov.  Discussion:
  https://postgr.es/m/15940-2ab76dc58ffb85b6@postgresql.org
  https://git.postgresql.org/pg/commitdiff/e136a0d8ca31d1c94b3f2868ae0e735b8d9ff12f

- Remove unnecessary test dependency on the contents of pg_pltemplate. Using
  pg_pltemplate as test data was probably not very forward-looking, considering
  we've had many discussions around removing that catalog altogether.  Use a
  nearby temp table instead, to make these two test scripts more self-contained.
  This is a better test case anyway, since it exercises the scenario where the
  entries in the anyarray column actually vary in type intra-query.
  https://git.postgresql.org/pg/commitdiff/bbd93667bde56d3900add55479759f33d20ece1e

- Back off output precision in circle.sql regression test. We were setting
  extra_float_digits = 0 to avoid platform-dependent output in this test, but
  that's still able to expose platform-specific roundoff behavior in some new
  test cases added by commit a3d284485, as reported by Peter Eisentraut.  Reduce
  it to -1 to hide that.  (Over in geometry.sql, we're using -3, which is an
  ancient decision dating to 337f73b1b.  I wonder whether that's overkill now.
  But there's probably little value in trying to change it.)  Back-patch to v12
  where a3d284485 came in; there's no evidence that we have any
  platform-dependent issues here before that.  Discussion:
  https://postgr.es/m/15551268-e224-aa46-084a-124b64095ee3@2ndquadrant.com
  https://git.postgresql.org/pg/commitdiff/faee5a12ecf13190d7ca11d6dcc7078e494f46ca

- Avoid platform-specific null pointer dereference in psql. POSIX permits
  getopt() to advance optind beyond argc when the last argv entry is an option
  that requires an argument and hasn't got one. It seems that no major platforms
  actually do that, but musl does, so that something like "psql -f" would crash
  with that libc. Add a check that optind is in range before trying to look at
  the possibly-bogus option.  Report and fix by Quentin Rameau.  Back-patch to
  all supported branches.  Discussion:
  https://postgr.es/m/20190825100617.GA6087@fifth.space
  https://git.postgresql.org/pg/commitdiff/6338fa3e715ad1cb12e0760bf73ffc2a906098ea

Michaël Paquier pushed:

- Fix inconsistencies and typos in the tree, take 11. This fixes various typos
  in docs and comments, and removes some orphaned definitions.  Author:
  Alexander Lakhin Discussion:
  https://postgr.es/m/5da8e325-c665-da95-21e0-c8a99ea61fbf@gmail.com
  https://git.postgresql.org/pg/commitdiff/c96581abe418a3bf64b643aa4e27091d1eaea1c1

- Fix tab completion for CREATE TYPE in psql. Oversight in 7bdc655.  Author:
  Alexander Lakhin Discussion:
  https://postgr.es/m/5da8e325-c665-da95-21e0-c8a99ea61fbf@gmail.com
  https://git.postgresql.org/pg/commitdiff/71851e9ab7ac8409fabc6f64273149aa71fa29f5

- Doc: Improve wording of multiple places in documentation. This has been found
  during its translation.  Author: Liudmila Mantrova Discussion:
  https://postgr.es/m/CAEkD-mDJHV3bhgezu3MUafJLoAKsOOT86+wHukKU8_NeiJYhLQ@mail.gmail.com
  Backpatch-through: 12
  https://git.postgresql.org/pg/commitdiff/0431a787469265776eeb9a472beb3457d2990edb

- Fix compilation failure of vacuumdb and reindexdb with OpenBSD. FD_SETSIZE is
  included in sys/select.h per POSIX, and this header inclusion has been moved
  to scripts_parallel.c as of 5f38403 without moving the variable, causing a
  compilation failure on recent versions of OpenBSD (6.6 was the version used in
  the report).  In order to take care of the failure, move FD_SETSIZE directly
  to scripts_parallel.c with a wrapper controlling the maximum number of
  parallel slots supported, based on a suggestion by Andres Freund.  While on
  it, reduce the maximum number to be less than FD_SETSIZE, leaving some room
  for stdin, stdout and such as they consume some file descriptors.  The
  buildfarm did not complain about that, as it happens to only be an issue on
  recent versions of OpenBSD and there is no coverage in this area.  51c3e9f
  fixed a similar set of issues.  Bug: #15964 Reported-by: Sean Farrell
  Discussion: https://postgr.es/m/15964-c1753bdfed722e04@postgresql.org
  https://git.postgresql.org/pg/commitdiff/56f8f9624ba050c7c47dd97547b7fafb866f2bdd

- Doc: Remove mention to "Visual Studio Express 2019". The "Express" flavor of
  Visual Studio exists up to 2017, and the documentation referred to "Express"
  for Visual Studio 2019.  Author: Takuma Hoshiai Discussion:
  https://postgr.es/m/20190820120231.f905542e685140258ca73d82@sraoss.co.jp
  Backpatch-through: 9.4
  https://git.postgresql.org/pg/commitdiff/37093766b2f489128564774995f02d4e7d00dccd

- Improve documentation of pageinspect. This adds a section for heap-related
  functions.  These were previously mixed with functions having a more general
  purpose, leading to confusion.  While on it, add a query example for
  fsm_page_contents.  Backpatch down to 10, where b5e3942 introduced the
  subsections for function types in pageinspect documentation.  Author: Masahiko
  Sawada Discussion:
  https://postgr.es/m/CAD21AoDyM7E1+cK3-aWejxKTGC-wVVP2B+RnJhN6inXyeRmqzw@mail.gmail.com
  Backpatch-through: 10
  https://git.postgresql.org/pg/commitdiff/292ae8af79b4f1b09a327d39e80ef70943a28194

- Remove dry-run mode from isolationtester. The original purpose of the dry-run
  mode is to be able to print all the possible permutations from a spec file,
  but it has become less useful since isolation tests has improved regarding
  deadlock detection as one step not wanted by the author could block
  indefinitely now (originally the step blocked would have been detected rather
  quickly).  Per discussion, let's remove it.  Author: Michael Paquier
  Reviewed-by: Asim Praveen, Melanie Plageman Discussion:
  https://postgr.es/m/20190819080820.GG18166@paquier.xyz
  https://git.postgresql.org/pg/commitdiff/9903338b5ea59093d77cfe50ec0b1c22d4a7d843

- Detect unused steps in isolation specs and do some cleanup. This is useful for
  developers to find out if an isolation spec is over-engineered or if it needs
  more work by warning at the end of a test run if a step is not used,
  generating a failure with extra diffs.  While on it, clean up all the specs
  which include steps not used in any permutations to simplify them.  Author:
  Michael Paquier Reviewed-by: Asim Praveen, Melanie Plageman Discussion:
  https://postgr.es/m/20190819080820.GG18166@paquier.xyz
  https://git.postgresql.org/pg/commitdiff/989d23b04beac0c26f44c379b04ac781eaa4265e

- Do more cleanup of isolation tests for test_decoding. 989d23b has caused its
  tests to be broken as the module defines unused steps, turning the buildfarm
  red.
  https://git.postgresql.org/pg/commitdiff/06fdc4e4d33c40dbf886565336574da5566878f4

Peter Eisentraut pushed:

- doc: Fix image use in PDF build with vpath. In a vpath build, we need to point
  to the source directory to allow FOP to find the images.
  https://git.postgresql.org/pg/commitdiff/a407012c07844b5d81012d6960c4b2ec11d6af9c

- Clean up some SCRAM attribute processing. Correct the comment for
  read_any_attr().  Give a clearer error message when parsing at the end of the
  string, when the client-final-message does not contain a "p" attribute (for
  some reason).  Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion:
  https://www.postgresql.org/message-id/flat/2fb8a15b-de35-682d-a77b-edcc9c52fa12%402ndquadrant.com
  https://git.postgresql.org/pg/commitdiff/db1f28917bac5e008dcb2653a54e73d2d0571e06

- Remove master/slave usage from plpgsql tests. Author: Dagfinn Ilmari Mannsåker
  <ilmari@ilmari.org> Discussion:
  https://www.postgresql.org/message-id/flat/E393EC88-377F-4C59-A67A-69F2A38D17C7@yesql.se
  https://git.postgresql.org/pg/commitdiff/3f0f99125e5c0fd704de3c07abe691ebefc51a50

- Remove configure detection of crypt(). crypt() hasn't been needed since crypt
  detection was removed from PostgreSQL, so these configure checks are not
  necessary.  Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion:
  https://www.postgresql.org/message-id/flat/21f88934-f00c-27f6-a9d8-7ea06d317781%402ndquadrant.com
  https://git.postgresql.org/pg/commitdiff/c45643d618e35ec2fe91438df15abd4f3c0d85ca

- Make SQL/JSON error code names match SQL standard. There were some minor
  differences that didn't seem necessary.  Discussion:
  https://www.postgresql.org/message-id/flat/86b67eef-bb26-c97d-3e35-64f1fbd4f9fe%402ndquadrant.com
  https://git.postgresql.org/pg/commitdiff/a00c53b0cbf06dd6c01f5a1d55ebe21310a250af

- Update SQL conformance information. T612 has been fully supported since the
  major window function enhancements in PostgreSQL 11, but it wasn't updated at
  the time.
  https://git.postgresql.org/pg/commitdiff/21e60fa8fe296355dca96c451fb13119cc0e6bd2

Álvaro Herrera pushed:

- Replace genetic algorithm ASCII-art with a real figure. Author: Jürgen Purtz
  Discussion: https://postgr.es/m/c6027f7a-78ea-8453-0837-09903ba5fd9b@purtz.de
  https://git.postgresql.org/pg/commitdiff/28b6ec1df64775db6d6eb47655141cda1240d901

- Fix bogus comment. Author: Alexander Lakhin Discussion:
  https://postgr.es/m/20190819072244.GE18166@paquier.xyz
  https://git.postgresql.org/pg/commitdiff/f8cf524da15ec4d8fad26aeff44af9928d30eb3d

- Fix typo. In early development patches, "replication origins" were called
  "identifiers"; almost everything was renamed, but these references to the old
  terminology went unnoticed.  Reported-by: Craig Ringer
  https://git.postgresql.org/pg/commitdiff/8f75e8e44609335e6bdd73123284682235f242a2

Andres Freund pushed:

- Add fmgr.h include to selfuncs.h. Necessary after fb3b098f. That previously
  escaped notice, because all including sites already include fmgr.h some other
  way.  Reported-By: Tom Lane Author: Andres Freund Discussion:
  https://postgr.es/m/17463.1566153454@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/4c01a1110388661d8752fee35e9c5614aa4a2d32

Peter Geoghegan pushed:

- Update comments on nbtree stack struct. Adjust the struct comment that
  describes how page splits use their descent stack to cascade up the tree from
  the leaf level.  In passing, fix up some unrelated nbtree comments that had
  typos or were obsolete.
  https://git.postgresql.org/pg/commitdiff/091bd6befcb71feb58b1478e1b976c85ae504822

- Explain subtlety in nbtree locking protocol. The Postgres approach to coupling
  locks during an ascent of the tree is slightly different to the approach taken
  by Lehman and Yao.  Add a new paragraph to the "Differences to the Lehman &
  Yao algorithm" section of the nbtree README that explains the similarities and
  differences.
  https://git.postgresql.org/pg/commitdiff/867d25ccb4c7f290d08c720622ecaae4afd1dc3f

Thomas Munro pushed:

- Don't rely on llvm::make_unique. Bleeding-edge LLVM has stopped supplying
  replacements for various C++14 library features, for people on older C++
  versions.  Since we're not ready to require C++14 yet, just use plain old new
  instead of make_unique.  As revealed by buildfarm animal seawasp.  Back-patch
  to 11.  Reviewed-by: Andres Freund Discussion:
  https://postgr.es/m/CA%2BhUKGJWG7unNqmkxg7nC5o3o-0p2XP6co4r%3D9epqYMm8UY4Mw%40mail.gmail.com
  https://git.postgresql.org/pg/commitdiff/f493d98c167321e5d5c17dd7d795721045a81c97

== Pending Patches ==

Tom Lane sent in a patch to add an amcheckmembers callback.

Juan José Santamaría Flecha sent in two revisions of a patch to allow to_date()
and to_timestamp() to accept localized names.

Alexander Korotkov sent in another revision of a patch to improve checking for
missing parent links in nbtree.

Masahiko Sawada sent in another revision of a patch to add a RESUME option to
VACUUM and autovacuum.

Alexander Lakhin sent in a patch to add a tool for checking unique spellings.

Alexander Lakhin sent in another revision of a patch to fix typos and spelling
inconsistencies.

John Naylor and Binguo Bao traded patches to de-TOAST using an iterator.

Surafel Temesgen sent in two more revisions of a patch to add FETCH FIRST ...
PERCENT.

Michaël Paquier sent in a patch to add common/logging.h to vacuumlo and
oid2name.

Peter Eisentraut sent in a patch to add the option to use ICU as the global
collation provider.

Konstantin Knizhnik sent in another revision of a patch to implement global
temporary tables.

Anastasia Lubennikova sent in a patch to attempt to check proc signatures and
ACL in pg_upgrade.

Robert Haas and Thomas Munro traded patches to clean up orphaned files using
undo logs.

Sergei Kornilov sent in two more revisions of a patch to change the ereport
level for QueuePartitionConstraintValidation.

Jeff Davis sent in another revision of a patch to add a 'channel_binding' libpq
parameter.

Tom Lane sent in a patch to remove pg_pltemplate and create "trustable"
extensions.

Melanie Plageman sent in another revision of a patch to test additional
speculative conflict scenarios.

Kyotaro HORIGUCHI sent in another revision of a patch to add a TAP test for the
copy-truncation optimization, fix the WAL-skipping feature, and rename
smgrDoPendingDeletes to smgrDoPendingOperations.

Konstantin Knizhnik sent in two revisions of a patch to make vacuum for logical
replication more efficient.

Anastasia Lubennikova sent in another revision of a patch to implement
deduplication in nbtree.

Asif Rehman sent in a WIP patch to parallelize pg_basebackup.

Konstantin Knizhnik sent in three revisions of a patch to reduce the overhead of
SPI.

Shenhao Wang sent in a patch to add tab completion for CREATE OR REPLACE in
psql.

Michaël Paquier sent in a patch to refactor the connection with password prompt
loop for frontends.

Surafel Temesgen sent in a patch to remove a skip header from a loop in COPY
FROM.

Heikki Linnakangas sent in another revision of a patch to refactor the
XlogReaderState callback.

Asim Praveen sent in a patch to implement a fault injection framework.

Paul Guo sent in another revision of a patch to skip copydir() if either src
directory or dst directory is missing due to re-redoing create database but the
tablespace is dropped.

Heikki Linnakangas sent in a patch to fix an overflow check and comment in GIN
posting list encoding.

Movead Li sent in a patch to increase regression test coverage.

Michaël Paquier sent in another revision of a patch to add hooks for session
start and end.

Alexander Kukushkin sent in a patch to ensure that pg_rewind isn't thwarted by a
statement_timeout setting that's too low.

Masahiko Sawada sent in two more revisions of a patch to introduce
heap_infomask_flags to decode infomask and infomask2.

Fabien COELHO sent in two more revisions of a patch to shorten the pg_checksums
--help synopsis.

Thomas Munro sent in a patch to avoid unnecessary copying in tqueue.c.

Peter Eisentraut sent in another revision of a patch to use explicit_bzero.

Tom Lane sent in a patch to tighten up config file inclusions.

Tom Lane sent in a patch to handle dead-end child crash better.

Peter Eisentraut and Ibrar Ahmed traded patches to ensure that pg_upgrade and
oid2name error out on too many command line arguments.