== PostgreSQL Weekly News - November 3, 2019 == - Mailing list pgsql-announce

From David Fetter
Subject == PostgreSQL Weekly News - November 3, 2019 ==
Date
Msg-id 20191103220753.GA7270@fetter.org
Whole thread Raw
List pgsql-announce
== PostgreSQL Weekly News - November  3, 2019 ==

== PostgreSQL Product News ==

Pgpool-II 4.1, 4.0.7, 3.7.12, 3.6.19, 3.5.23, and 3.4.26 released.
http://www.pgpool.net/docs/latest/en/html/release.html
https://www.pgpool.net/docs/41/en/html/

pgCluu 3.1, a Perl program to audit PostgreSQL performance, released.
http://pgcluu.darold.net/

pg_probackup 2.2.4, a utility to manage backup and recovery of PostgreSQL
database clusters, released.
https://github.com/postgrespro/pg_probackup

datasketches 1.3.0, an extension that provides approximate algorithms for big data
analysis based on the Datasketches library, released.
https://pgxn.org/dist/datasketches/

== PostgreSQL Jobs for November ==

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

== PostgreSQL Local ==

2Q PGConf 2019 will be held December 4 & 5 in Chicago.
https://www.2qpgconf.com/

PGDay Down Under 2019 will be held on November 15, 2019 in Sydney,
Australia.
https://pgdu.org/

The CfP for FOSDEM PGDay is open through November 18th, 2019 at 24:00 CET.
https://2020.fosdempgday.org/

The CfP for FOSDEM is open through November 8, 2019.
https://fosdem.org/2020/news/2019-08-13-call-for-participation/

pgDay Israel 2020 will take place on March 19, 2020 in Tel Aviv.
The CfP is open through January 15, 2020.
http://pgday.org.il/

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. The
CfP is open until  November 15, 2019.
http://pgconf.in/

PostgreSQL@SCaLE is a two day, two track event which takes place on
March 5-6, 2020, at Pasadena Convention Center, as part of SCaLE 18X. The CfP is
open through November 30, 2019.
https://www.socallinuxexpo.org/scale/18x/postgresscale

The German-speaking PostgreSQL Conference 2020 will take place on May 15, 2019
in Stuttgart.

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

Michaël Paquier pushed:

- Fix dependency handling at swap phase of REINDEX CONCURRENTLY. When swapping
  the dependencies of the old and new indexes, the code has been correctly
  switching all links in pg_depend from the old to the new index for both
  referencing and referenced entries.  However it forgot the fact that the new
  index may itself have existing entries in pg_depend, like references to the
  parent table attributes.  This resulted in duplicated entries in pg_depend
  after running REINDEX CONCURRENTLY.  Fix this problem by removing any existing
  entries in pg_depend on the new index before switching the dependencies of the
  old index to the new one.  More regression tests are added to check the
  consistency of entries in pg_depend for indexes, including partition indexes.
  Author: Michael Paquier Discussion:
  https://postgr.es/m/20191025064318.GF8671@paquier.xyz Backpatch-through: 12
  https://git.postgresql.org/pg/commitdiff/68ac9cf2499236996f3d4bf31f7f16d5bd3c77af

- Doc: Add missing step for pg_stat_progress_cluster. There is a step to track
  when the new heap is written, but this was missing in the documentation.
  Author: Noriyoshi Shinoda Discussion:
  https://postgr.es/m/AT5PR8401MB06447FAE88E1592754E958B8EE640@AT5PR8401MB0644.NAMPRD84.PROD.OUTLOOK.COM
  Backpatch-through: 12
  https://git.postgresql.org/pg/commitdiff/61ecea45e50bcd3b87d4e905719e63e41d6321ce

- Fix handling of pg_class.relispartition at swap phase in REINDEX CONCURRENTLY.
  When cancelling REINDEX CONCURRENTLY after swapping the old and new indexes
  (for example interruption at step 5), the old index remains around and is
  marked as invalid.  The old index should also be manually droppable to clean
  up the parent relation from any invalid indexes still remaining.  For a
  partition index reindexed, pg_class.relispartition was not getting updated,
  causing the index to not be droppable as DROP INDEX would look for
  dependencies in a partition tree, which do not exist anymore after the swap
  phase is done.  The fix here is simple: when swapping the old and new indexes,
  make sure that pg_class.relispartition is correctly switched, similarly to
  what is done for the index name.  Reported-by: Justin Pryzby Author: Michael
  Paquier Discussion: https://postgr.es/m/20191015164047.GA22729@telsasoft.com
  Backpatch-through: 12
  https://git.postgresql.org/pg/commitdiff/d80be6f2f6c9793b92fc87c61d9ae2bcea3db560

- Fix typos in the code. Author: Vignesh C Reviewed-by: Dilip Kumar, Michael
  Paquier Discussion:
  https://postgr.es/m/CALDaNm0ni+GAOe4+fbXiOxNrVudajMYmhJFtXGX-zBPoN8ixhw@mail.gmail.com
  https://git.postgresql.org/pg/commitdiff/6ca86bb7e9c72f428c7f4e3f2b48dd6c4084429c

- Fix typo in comment of syncrep.c. Author: Kyotaro Horiguchi Discussion:
  https://postgr.es/m/20191030.123428.18823202335157111.horikyota.ntt@gmail.com
  https://git.postgresql.org/pg/commitdiff/f921ea624eb8695c6ccaaf3410b9f9d9926d71c7

- Fix race condition at backend exit when deleting element in syncrep queue.
  When a backend exits, it gets deleted from the syncrep queue if present. The
  queue was checked without SyncRepLock taken in exclusive mode, so it would
  have been possible for a backend to remove itself after a WAL sender already
  did the job.  Fix this issue based on a suggestion from Fujii Masao, by first
  checking the queue without the lock.  Then, if the backend is present in the
  queue, take the lock and perform an additional lookup check before doing the
  element deletion.  Author: Dongming Liu Reviewed-by: Kyotaro Horiguchi, Fujii
  Masao, Michael Paquier Discussion:
  https://postgr.es/m/a0806273-8bbb-43b3-bbe1-c45a58f6ae21.lingce.ldm@alibaba-inc.com
  Backpatch-through: 9.4
  https://git.postgresql.org/pg/commitdiff/20345197ff48c99a8a20dd3cd191d2aad5c7271c

- Add some assertions in syncrep.c. A couple of routines assume that the LWLock
  SyncRepLock needs to be taken, so add a couple of assertions to be sure of
  that.  Also, when waiting for a given LSN at transaction commit, the code
  implied that the syncrep queue cleanup happens while holding interrupts, but
  the code never checked after that.  Author: Michael Paquier Reviewed-by: Fujii
  Masao, Kyotaro Horiguchi, Dongming Liu Discussion:
  https://postgr.es/m/a0806273-8bbb-43b3-bbe1-c45a58f6ae21.lingce.ldm@alibaba-inc.com
  https://git.postgresql.org/pg/commitdiff/e174f699c476a4cc01875211a5f43e57c3190a37

- Fix failure when creating cloned indexes for a partition. When using CREATE
  TABLE for a new partition, the partitioned indexes of the parent are created
  automatically in a fashion similar to LIKE INDEXES.  The new partition and its
  parent use a mapping for attribute numbers for this operation, and while the
  mapping was correctly built, its length was defined as the number of
  attributes of the newly-created child, and not the parent.  If the parent
  includes dropped columns, this could cause failures.  This is wrong since
  8b08f7d which has introduced the concept of partitioned indexes, so backpatch
  down to 11.  Reported-by: Wyatt Alt Author: Michael Paquier Reviewed-by: Amit
  Langote Discussion:
  https://postgr.es/m/CAGem3qCcRmhbs4jYMkenYNfP2kEusDXvTfw-q+eOhM0zTceG-g@mail.gmail.com
  Backpatch-through: 11
  https://git.postgresql.org/pg/commitdiff/dc816e5815913e2b2ae2327a4d3e4d4416ed6898

Tom Lane pushed:

- Handle empty-string edge cases correctly in strpos(). Commit 9556aa01c
  rearranged the innards of text_position() in a way that would make it not work
  for empty search strings.  Which is fine, because all callers of that code
  special-case an empty pattern in some way.  However, the primary use-case
  (text_position itself) got special-cased incorrectly: historically it's
  returned 1 not 0 for an empty search string.  Restore the historical behavior.
  Per complaint from Austin Drenski (via Shay Rojansky). Back-patch to v12 where
  it got broken.  Discussion:
  https://postgr.es/m/CADT4RqAz7oN4vkPir86Kg1_mQBmBxCp-L_=9vRpgSNPJf0KRkw@mail.gmail.com
  https://git.postgresql.org/pg/commitdiff/bd1ef5799b04168d8a869197dd9b85935d5d5da9

- On Windows, use COMSPEC to find the location of cmd.exe. Historically, psql
  consulted COMSPEC to spawn a shell in its \! command, but we just invoked
  "cmd" when spawning shells in pg_ctl and pg_regress. It seems better to rely
  on the environment variable, if it's set, in all cases.  It's debatable
  whether this is a bug fix or just a behavioral change, so no back-patch.  Juan
  José Santamaría Flecha  Discussion:
  https://postgr.es/m/16080-5d7f03222469f717@postgresql.org
  https://git.postgresql.org/pg/commitdiff/f88544904e4b57b1a8e969a5d594288554417c88

- Allow extracting fields from a ROW() expression in more cases. Teach
  get_expr_result_type() to manufacture a tuple descriptor directly from a
  RowExpr node.  If the RowExpr has type RECORD, this is the only way to get a
  tupdesc for its result, since even if the rowtype has been blessed, we don't
  have its typmod available at this point.  (If the RowExpr has some named
  composite type, we continue to let the existing code handle it, since the
  RowExpr might well not have the correct column names embedded in it.)  This
  fixes assorted corner cases illustrated by the added regression tests.
  Discussion: https://postgr.es/m/10872.1572202006@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/8b7a0f1d118282f612e5b9686d820edcddedd081

- Validate ispell dictionaries more carefully. Using incorrect, or just
  mismatched, dictionary and affix files could result in a crash, due to failure
  to cross-check offsets obtained from the file.  Add necessary validation, as
  well as some Asserts for future-proofing.  Per bug #16050 from Alexander
  Lakhin.  Back-patch to 9.6 where the problem was introduced.  Arthur Zakirov,
  per initial investigation by Tomas Vondra  Discussion:
  https://postgr.es/m/16050-024ae722464ab604@postgresql.org Discussion:
  https://postgr.es/m/20191013012610.2p2fp3zzpoav7jzf@development
  https://git.postgresql.org/pg/commitdiff/8af1624e3f0efd2d029217a91d07bd3795f080a6

- Fix PG_GETARG_SEG_P() definition. DatumGetPointer() takes a Datum argument,
  not a pointer. This is cosmetic given the current definitions of the
  underlying macros, but it's still formally a type violation.  Bug was
  introduced in commit 389bb2818, but there seems no need to back-patch.
  Dagfinn Ilmari Mannsåker  Discussion:
  https://postgr.es/m/d8jlfsxq3a0.fsf@dalvik.ping.uio.no
  https://git.postgresql.org/pg/commitdiff/741b1aaf61a3da10250555f827c0a7a2f9bc2822

Peter Eisentraut pushed:

- Fix compiler warnings in ecpg tests. Under MinGW, when compiling the ecpg test
  files, you get compiler warnings about the use of %lld in printf().  These
  files don't use our printf replacement or the c.h porting layer, so determine
  the appropriate format conversion the hard way.  Reviewed-by: Michael Meskes
  <meskes@postgresql.org> Discussion:
  https://www.postgresql.org/message-id/flat/760c9dd1-2d80-c223-3f90-609b615f7918%402ndquadrant.com
  https://git.postgresql.org/pg/commitdiff/517bf2d9107f0d45c5fea2e3904e8d3b10ce6bb2

- Update code comments about peer authenticaton. For historical reasons, the
  functions for peer authentication were grouped under ident authentication.
  But they are really completely separate, so give them their own section
  headings.
  https://git.postgresql.org/pg/commitdiff/5cc1e64fb6f59aa8621caae03be36400807e3575

- Remove one use of IDENT_USERNAME_MAX. IDENT_USERNAME_MAX is the maximum length
  of the information returned by an ident server, per RFC 1413.  Using it as the
  buffer size in peer authentication is inappropriate.  It was done here because
  of the historical relationship between peer and ident authentication.  To
  reduce confusion between the two authenticaton methods and disentangle their
  code, use a dynamically allocated buffer instead.  Discussion:
  https://www.postgresql.org/message-id/flat/c798fba5-8b71-4f27-c78e-37714037ea31%402ndquadrant.com
  https://git.postgresql.org/pg/commitdiff/c5e1df951d9d70ab7d53ce47caaf73f3b2d6b1e1

- Add const qualifiers to internal range type APIs. Reviewed-by: Andres Freund
  <andres@anarazel.de> Discussion:
  https://www.postgresql.org/message-id/flat/dc9b45fa-b950-fadc-4751-85d6f729df55%402ndquadrant.com
  https://git.postgresql.org/pg/commitdiff/73025140885c889410b9bfc4a30a3866396fc5db

- PG_FINALLY. This gives an alternative way of catching exceptions, for the
  common case where the cleanup code is the same in the error and non-error
  cases.  So instead of      PG_TRY();     {         ... code that might throw
  ereport(ERROR) ...     }     PG_CATCH();     {         cleanup();
  PG_RE_THROW();     }     PG_END_TRY();     cleanup();  one can write
  PG_TRY();     {         ... code that might throw ereport(ERROR) ...     }
  PG_FINALLY();     {         cleanup();     }     PG_END_TRY();  Discussion:
  https://www.postgresql.org/message-id/flat/95a822c3-728b-af0e-d7e5-71890507ae0c%402ndquadrant.com
  https://git.postgresql.org/pg/commitdiff/604bd3671121b51f977de146ed95484c2297fb3e

- Add some assertions to view reloption macros. In these macros, the rd_options
  pointer is cast to ViewOption *.  Add some assertions that the passed-in
  relation is actually a view before doing that.  Author: Nikolay Shaplov
  <dhyan@nataraj.su> Discussion:
  https://www.postgresql.org/message-id/flat/3634983.eHpMQ1mJnI@x200m
  https://git.postgresql.org/pg/commitdiff/396773762425126a85243fc85a267d401496beb8

Andres Freund pushed:

- pg_waldump: Fix small memory leak when rmgr->rm_identify returns NULL. This
  got broken in 604f7956b94, shortly after rm_identify's introduction.  Author:
  Andres Freund Discussion:
  https://postgr.es/m/20191029233341.4gnyau7e5v2lh5sc@alap3.anarazel.de
  Backpatch: 9.5, where rm_identify was introduced
  https://git.postgresql.org/pg/commitdiff/e0f76f204ccb870fc207546eaeae65abeacb7dad

- pg_waldump: Fix --bkp-details to not issue spurious newlines for FPWs. The
  additional newline seems to have accidentally been introduced in 2c03216d831,
  in 9.5. The newline is only issued when an FPW is present for the block
  reference.  While there could be an argument that removing the newlines in the
  back branches could cause a problem for somebody parsing the pg_waldump
  output, the likelihood of that seems small enough. It seems at least equally
  likely that the randomness of when newlines are issued causes problems.
  Author: Andres Freund Discussion:
  https://postgr.es/m/20191029233341.4gnyau7e5v2lh5sc@alap3.anarazel.de
  Backpatch: 9.5, like 2c03216d831.
  https://git.postgresql.org/pg/commitdiff/e4d92126fda1defd9be201b97b162d1568122064

== Pending Patches ==

Alexander Korotkov sent in another revision of a patch to fix deadlock between
ginDeletePage() and ginStepRight(), fix traversing to the deleted GIN page via
downlink, and revise the concurrency section in GIN README.

Joe Nelson sent in another revision of a patch to change atoi to strtol in same
place.

Peter Smith sent in another revision of a patch to add more compile-time asserts
to expose inconsistencies.

Kirk Jamison sent in a patch to optimize dropping of relation buffers using
dlist.

Peter Eisentraut sent in another revision of a patch to make the base backup
client an auxiliary backend process.

Anastasia Lubennikova sent in another revision of a patch to fix a bug that
manifested as pg_upgrade fails with non-standard ACL.

Andrew Dunstan sent in a patch to add a jsonb_set_lax() function.

Tomáš Vondra sent in a patch to use multiple extended statistics where needed.

Anastasia Lubennikova sent in another revision of a patch to add a bitwise
equality qualifier for opclasses.

Peter Eisentraut sent in a patch to preserve versions of initdb-created
collations in pg_upgrade.

Thunder sent in another revision of a patch to fix a bug where standby node can
not provide service even it replays all log files.

Soumyadeep Chakraborty sent in two more revisions of a patch to improve
expression evaluation.

Vigneshwaran C sent in two more revisions of a patch to fix typos and
inconsistencies in the code.

Peter Eisentraut sent in a patch to add const qualifiers to internal range type
APIs.

Amit Langote and Michaël Paquier traded patches to remove calls to StdRdOptions
in Access Methods.

Fabien COELHO sent in two more revisions of a patch to pgbench to extend
initialization phase control.

Asif Rehman sent in two more revisions of a patch to implement parallel backup.

Justin Pryzby and Michaël Paquier traded patches to mention the reduced locking
strength of ATTACH PARTITION, and tweak the language for ATTACH PARTITION docs.

Peter Eisentraut sent in another revision of a patch to add PG_FINALLY.

Konstantin Knizhnik sent in three more revisions of a patch to implement global
temporary tables.

Artur Zakirov sent in a patch to fix a segfault in CREATE TEXT SEARCH
DICTIONARY.

Dilip Kumar and Masahiko Sawada traded patches to implement block-level parallel
vacuum.

Andres Freund sent in a patch to fix some infelicities between JIT and EXPLAIN.

Peter Eisentraut sent in another revision of a patch to add support for
automatically updating Unicode derived files.

Peter Eisentraut sent in a patch to remove an unused function argument.

Andres Freund sent in a patch to merge Hash and Hash Join nodes.

Vik Fearing sent in a patch to make it possible to refer to a JOIN (USING)
correlation name.

Tom Lane sent in a patch to get psql to redisplay the command after \e.

Peter Eisentraut sent in another revision of a patch to sort out getpeereid()
and peer auth handling on Windows.

Peter Eisentraut sent in a patch to remove HAVE_LONG_LONG_INT.

David Cramer sent in another revision of a patch to add binary support for the
pgoutput plugin.

Imai Yoshikazu add a pg_stat_waitaccum view which shows counts and duration of
each wait events, and changed the measuring method of wait event timed from
INSTR_TIME (which uses gettimeofday or clock_gettime) to rdtsc.

Dongming Liu and Michaël Paquier traded patches to fix a problem with
synchronous replication.

Amit Langote and Tom Lane traded patches to fix a bug that manifested as ERROR:
could not find pathkey item to sort.

Andres Freund sent in a patch to make StringInfo available to frontend code.

Nikita Glukhov sent in another revision of a patch to implement generic type
subscripting.

Sergei Kornilov sent in another revision of a patch to allow an online change of
primary_conninfo.

Hayato Kuroda sent in another revision of a patch to add DECLARE STATEMENT to
ECPG.

Andrew Dunstan sent in a patch to add a libpq sslpassword parameter and callback
function.

Fujii Masao and Ibrar Ahmed traded patches to allow CREATE OR REPLACE VIEW to
rename the columns.

Etsuro Fujita sent in two more revisions of a patch to improve the
partition-matching algorithm for partition-wise JOINs.

Ibrar Ahmed sent in another revision of a patch to add a RESUME option to VACUUM
and autovacuum.

Andrew Dunstan sent in a patch to add an ssl passphrase callback.

Andrew Dunstan sent in a patch to allow superuser to grant passwordless
connection rights on postgres_fdw.

Fabien COELHO sent in four revisions of a patch to fe-utils to share query
cancellation code.

Michaël Paquier and Ibrar Ahmed traded patches to fix a bug that manifested as
partition creation fails after dropping a column and adding a partial index.

Ibrar Ahmed and Fujii Masao traded patches to fix the command tag returned by
"ALTER MATERIALIZED VIEW RENAME COLUMN".

Andrew Dunstan sent in a patch to enhance Testlib's command_fails_like by
allowing the passing of extra keyword type arguments.

Jesper Pedersen sent in a patch to pg_receivewal and friends that adds an -a /
--appname command line switch to control the application_name property.

Masahiko Sawada sent in another revision of a patch to implement TDE.

Peter Eisentraut sent in two revisions of a patch to remove configure
--disable-float4-byval and --disable-float8-byval.

Alexander Korotkov sent in a patch to improve checking for pg_index.xmin.

Andrew Dunstan sent in a patch to allow 'sslkey' and 'sslcert' in postgres_fdw
user mappings.

Euler Taveira de Oliveira sent in a patch to implement an abs function for
interval.

Amit Langote sent in a PoC patch to build PartitionDesc when needed.

Tom Lane sent in a patch to fix alter table order of operations.

Gilles Darold sent in two revisions of a patch to fix the PREPARE TRANSACTION
doc and postgres_fdw message.

Vigneshwaran C sent in another revision of a patch to fix the ordering of header
file inclusion.

Justin Pryzby sent in another revision of a patch to use correlation statistics
in costing bitmap scans.

Pavel Stěhule sent in another revision of a patch to implement dropdb --force.

Andrey Borodin sent in another revision of a patch to use memcpy in pglz
decompression, and use memcpy in pglz decompression for long matches.

Jeff Janes sent in a patch to fix a logical replication wal sender timestamp bug
which caused some timestamps to be set to NULL.

John Dent sent in a patch to add a PIPELINED modifier to functions.

kerbrose khaled sent in a patch to update unaccent.rules file to support Arabic
letters.

Pavel Stěhule sent in another revision of a patch to implement schema variables.

Andrzej Barszcz sent in a patch to avoid repeated calls of immutable/stable
functions.

Josef Šimánek sent in a patch to include triggers in EXPLAIN.



pgsql-announce by date:

Previous
From: Michael Goldberg
Date:
Subject: PGDAY ISRAEL 2020 CFP is Now Open!
Next
From: "Hans-Jürgen Schönig (PostgreSQL)"
Date:
Subject: Announcing Cybertec Migrator 1.0