== PostgreSQL Weekly News - June 28, 2020 ==

From: David Fetter <david(at)fetter(dot)org>
To: PostgreSQL Announce <pgsql-announce(at)postgresql(dot)org>
Subject: == PostgreSQL Weekly News - June 28, 2020 ==
Date: 2020-06-28 23:34:59
Message-ID: 20200628233459.GA17886@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-announce

== PostgreSQL Weekly News - June 28, 2020 ==

PostgreSQL 13 Beta 2 released. Test!

Person of the week: https://postgresql.life/post/simon_riggs/

== PostgreSQL Jobs for June ==


== PostgreSQL Local ==

FOSS4G 2020, will take place in Calgary, Alberta, Canada August 24-29 2020.
the Call for Papers is currently open at https://2020.foss4g.org/speakers/

PGDay Ukraine will take place September 5th, 2020 in Lviv at the Bank Hotel.

pgDay Israel 2020 will take place on September 10, 2020 in Tel Aviv.

PGDay Austria will take place September 18, 2020 at Schloss Schoenbrunn
(Apothekertrakt) in Vienna.

PostgreSQL Conference Europe 2020 will be held on October 20-23, 2020 in Berlin,
Germany. The CfP is open through July 31, 2020 at https://2020.pgconf.eu/callforpapers

PG Day Russia will take place in Saint Petersburg on July 9, 2021.

== 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(at)fetter(dot)org(dot)

== Applied Patches ==

Michaël Paquier pushed:

- Add --no-index-cleanup and --no-truncate to vacuumdb. Both INDEX_CLEANUP and
TRUNCATE have been available since v12, and are enabled by default except if
respectively vacuum_index_cleanup and vacuum_truncate are disabled for a given
relation. This change adds support for disabling these options from vacuumdb.
Author: Nathan Bossart Reviewed-by: Michael Paquier, Masahiko Sawada

- Fix inconsistent markups in catalogs.sgml. Some fields related to pg_opclass
and pg_opfamily were using incorrect markups, listing them as structname
instead of structfield. Author: Fabien Coelho Discussion:

- Fix comment in heap.c. The description of InsertPgAttributeTuple() does not
match its handling of pg_attribute contents with NULL values for a long time,
with 911e702 making things more inconsistent. This adjusts the description to
match the reality. Author: Daniel Gustafsson Discussion:

Tom Lane pushed:

- Undo double-quoting of index names in non-text EXPLAIN output formats.
explain_get_index_name() applied quote_identifier() to the index name. This is
fine for text output, but the non-text output formats all have their own
quoting conventions and would much rather start from the actual index name.
For example in JSON you'd get something like "Index Name": "\"My
Index\"", which is surely not desirable, especially when the same does not
happen for table names. Hence, move the responsibility for applying quoting
out to the callers, where it can go into already-existing special code paths
for text format. This changes the API spec for users of
explain_get_index_name_hook: before, they were supposed to apply
quote_identifier() if necessary, now they should not. Research suggests that
the only publicly available user of the hook is hypopg, and it actually forgot
to apply quoting anyway, so it's fine. (In any case, there's no behavioral
change for the output of a hook as seen in non-text EXPLAIN formats, so this
won't break any case that programs should be relying on.) Digging in the
commit logs, it appears that quoting was included in explain_get_index_name's
duties when commit 604ffd280 invented it; and that was fine at the time
because we only had text output format. This should have been rethought when
non-text formats were invented, but it wasn't. This is a fairly clear bug for
users of non-text EXPLAIN formats, so back-patch to all supported branches.
Per bug #16502 from Maciek Sakrejda. Patch by me (based on investigation by
Euler Taveira); thanks to Julien Rouhaud for review. Discussion:

- Fix compiler warning induced by commit d8b15eeb8. I forgot that INT64_FORMAT
can't be used with sscanf on Windows. Use the same trick of sscanf'ing into a
temp variable as we do in some other places in zic.c. The upstream IANA code
avoids the portability problem by relying on <inttypes.h>'s SCNdFAST64 macro.
Once we're requiring C99 in all branches, we should do likewise and drop this
set of diffs from upstream. For now, though, a hack seems fine, since we do
not actually care about leapseconds anyway. Discussion:

- Doc: correct nitpicky mistakes in array_position/array_positions examples.
Daniel Gustafsson and Erik Rijkers, per report from nick(at)cleaton Discussion:

- Doc: explain that "timestamp - timestamp" applies justify_hours(). Back-patch
to v13; before that, there's not really space for this kind of detail.
Discussion: https://postgr.es/m/c1696f68-fa8d-7759-6a9c-eb293ab1bbc9@gmx.net

- Change libpq's default ssl_min_protocol_version to TLSv1.2. When we initially
created this parameter, in commit ff8ca5fad, we left the default as "allow any
protocol version" on grounds of backwards compatibility. However, that's
inconsistent with the backend's default since b1abfec82; protocol versions
prior to 1.2 are not considered very secure; and OpenSSL has had TLSv1.2
support since 2012, so the number of PG servers that need a lesser minimum is
probably quite small. On top of those things, it emerges that some popular
distros (including Debian and RHEL) set MinProtocol=TLSv1.2 in openssl.cnf.
Thus, far from having "allow any protocol version" behavior in practice, what
we actually have as things stand is a platform-dependent lower limit. So,
change our minds and set the min version to TLSv1.2. Anybody wanting to
connect with a new libpq to a pre-2012 server can either set
ssl_min_protocol_version=TLSv1 or accept the fallback to non-SSL. Back-patch
to v13 where the aforementioned patches appeared. Patch by me, reviewed by
Daniel Gustafsson Discussion:

- Add hints about protocol-version-related SSL connection failures. OpenSSL's
native reports about problems related to protocol version restrictions are
pretty opaque and inconsistent. When we get an SSL error that is plausibly
due to this, emit a hint message that includes the range of SSL protocol
versions we (think we) are allowing. This should at least get the user
thinking in the right direction to resolve the problem, even if the hint isn't
totally accurate, which it might not be for assorted reasons. Back-patch to
v13 where we increased the default minimum protocol version, thereby
increasing the risk of this class of failure. Patch by me, reviewed by Daniel
Gustafsson Discussion:

- Fix list of SSL error codes for older OpenSSL versions. Apparently 1.0.1 lacks

Jeff Davis pushed:

- Doc fixup for hashagg_avoid_disk_plan GUC. Reported-by: Justin Pryzby
Discussion: https://postgr.es/m/20200620220402.GZ17995@telsasoft.com
Backport-through: 13

Álvaro Herrera pushed:

- Add parens to ConvertToXSegs macro. The current definition is dangerous. No
bugs exist in our code at present, but backpatch to 11 nonetheless where it
was introduced. Author: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>

- Save slot's restart_lsn when invalidated due to size. We put it aside as
invalidated_at, which let us show "lost" in pg_replication slot. Prior to
this change, the state value was reported as NULL. Backpatch to 13. Author:
Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> Reviewed-by: Álvaro Herrera
<alvherre(at)alvh(dot)no-ip(dot)org> Discussion:

- Adjust max_slot_wal_keep_size behavior per review. In pg_replication_slot,
change output from normal/reserved/lost to reserved/extended/unreserved/ lost,
which better expresses the possible states particularly near the time where
segments are no longer safe but checkpoint has not run yet. Under the new
definition, reserved means the slot is consuming WAL that's still under the
normal WAL size constraints; extended means it's consuming WAL that's being
protected by wal_keep_segments or the slot itself, whose size is below
max_slot_wal_keep_size; unreserved means the WAL is no longer safe, but
checkpoint has not yet removed those files. Such as slot is in imminent
danger, but can still continue for a little while and may catch up to the
reserved WAL space. Also, there were some bugs in the calculations used to
report the status; fixed those. Backpatch to 13. Reported-by: Fujii Masao
<masao(dot)fujii(at)oss(dot)nttdata(dot)com> Author: Kyotaro Horiguchi
<horikyota(dot)ntt(at)gmail(dot)com> Reviewed-by: Fujii Masao
<masao(dot)fujii(at)oss(dot)nttdata(dot)com> Reviewed-by: Álvaro Herrera
<alvherre(at)alvh(dot)no-ip(dot)org> Discussion:

- Persist slot invalidation correctly. We failed to save slot to disk after
invalidating it, so the state was lost in case of server restart or crash.
Fix by marking it dirty and flushing. Also, if the slot is known invalidated
we don't need to reason about the LSN at all -- it's known invalidated. Only
test the LSN if the slot is known not invalidated. Author: Fujii Masao
<masao(dot)fujii(at)oss(dot)nttdata(dot)com> Author: Kyotaro Horiguchi
<horikyota(dot)ntt(at)gmail(dot)com> Reviewed-by: Álvaro Herrera
<alvherre(at)alvh(dot)no-ip(dot)org> Discussion:

Fujii Masao pushed:

- Remove erroneous assertion from pg_copy_logical_replication_slot(). If
restart_lsn of logical replication slot gets behind more than
max_slot_wal_keep_size from the current LSN, the logical replication slot
would be invalidated and its restart_lsn is reset to an invalid LSN. If this
logical replication slot with an invalid restart_lsn was specified as the
source slot in pg_copy_logical_replication_slot(), the function caused the
assertion failure unexpectedly. This assertion was added because restart_lsn
should not be invalid before. But in v13, it can be invalid thanks to
max_slot_wal_keep_size. So since this assertion is no longer useful, this
commit removes it. This commit also changes the errcode in the error message
that pg_copy_logical_replication_slot() emits when the slot with an invalid
restart_lsn is specified, to more appropriate one. Back-patch to v13 where
max_slot_wal_keep_size was added and the assertion was no longer valid.
Author: Fujii Masao Reviewed-by: Alvaro Herrera, Kyotaro Horiguchi Discussion:

Peter Geoghegan pushed:

- Fix misuse of table_index_fetch_tuple_check(). Commit 0d861bbb, which added
deduplication to nbtree, had _bt_check_unique() pass a TID to
table_index_fetch_tuple_check() that isn't safe to mutate.
table_index_fetch_tuple_check()'s tid argument is modified when the TID in
question is not the latest visible tuple in a hot chain, though this wasn't
documented. To fix, go back to using a local copy of the TID in
_bt_check_unique(), and update comments above table_index_fetch_tuple_check().
Backpatch: 13-, where B-Tree deduplication was introduced.

Bruce Momjian pushed:

- docs: clarify that CREATE DATABASE does not copy db permissions. That is,
those database permissions set by GRANT. Diagnosed-by: Joseph Nahmias
Discussion: https://postgr.es/m/20200614072613.GA21852@nahmias.net
Backpatch-through: 9.5

- doc: mention trigger helper functions in CREATE TRIGGER docs. Reported-by:
petermpallesen(at)gmail(dot)com Discussion:
Backpatch-through: 9.5

Amit Kapila pushed:

- Remove duplicate check added by commit b2a5545bd6. As this doesn't cause any
harm so we decided to this clean up in HEAD only. Author: Ádám Balogh

Noah Misch pushed:

- Fix documentation of "must be vacuumed within" warning. Warnings start 10M
transactions before xidStopLimit, which is 11M transactions before wraparound.
The sample WARNING output showed a value greater than 11M, and its HINT
message predated commit 25ec228ef760eb91c094cc3b6dea7257cc22ffb5. Hence, the
sample was impossible. Back-patch to 9.5 (all supported versions).

== Pending Patches ==

Odin Ugedal sent in another revision of a patch to add support for choosing huge
page size.

Tom Lane sent in a patch to make better AlternativeSubplan cost estimates.

Justin Pryzby sent in another revision of a patch to make pg_ls_*() show
directories and shared filesets.

Andrey V. Lepikhov sent in another revision of a patch to speed up COPY FROM to
tables with foreign partitions.

Justin Pryzby sent in a patch to make Testlib.pm write to stdout instead of

Daniel Gustafsson sent in a patch to update the InsertPgAttributeTuple comment
to match its new signature.

Movead Li sent in a patch to fix an issue that manifested as pg_resetwal
--next-transaction-id may cause database failed to restart.

Fujii Masao sent in two revisions of a patch to fix an assertion failure in

Michaël Paquier sent in another revision of a patch to add a
pg_wal_oldest_lsn() function and remove min_safe_lsn from the
pg_replication_slots view.

Daniel Gustafsson sent in two more revisions of a patch to make it possible to
turn checksums on online.

Amul Sul sent in another revision of a patch to implement ALTER SYSTEM READ

Bharath Rupireddy sent in a patch to fix an issue where postgres_fdw connection
caching would cause remote sessions linger till the local session exit.

Dilip Kumar and Amit Kapila traded patches to fix an infelicity between
logical_work_mem and logical streaming of large in-progress transactions.

Mark Dilger sent in another revision of a patch to add verify_heapam in a new
contrib extension, pg_amcheck.

Pavel Stěhule sent in another revision of a patch to implement a
unicode_unescape() function.

Ranier Vilela sent in a patch to fix the table parallel scan estimate size.

Masahiko Sawada sent in another revision of a patch to implement an internal key
management system.

Thomas Munro sent in a patch to move syncscan.c to src/backend/access/table.

Peter Eisentraut sent in a patch to pg_dump which reorganizes dumpFunc() and
dumpAgg() to have less duplication in the queries they run.

Masahiko Sawada sent in another revision of a patch to enable transactions
involving multiple foreign servers.

Vigneshwaran C and Bharath Rupireddy traded patches to parallelize COPY.

Michaël Paquier sent in another revision of a patch to skip symlink TAP tests on

Álvaro Herrera and Kyotaro HORIGUCHI traded patches to review

Masahiko Sawada sent in another revision of a patch to fix a possible xid
wraparound caused by setting INDEX_CLEANUP to false.

Takashi Menjo sent in another revision of a patch to implement non-volatile WAL

Peter Eisentraut sent in another revision of a patch to pause recovery for
insufficient parameter settings.

Robert Haas sent in a patch to add flexible options for BASE_BACKUP and

Peter Eisentraut sent in a patch to allow CURRENT_ROLE in GRANTED BY.

Bharath Rupireddy sent in a patch to make COPY's format commands

Kyotaro HORIGUCHI sent in a patch to avoid archiving or sending immature

Melanie Plageman sent in a patch to move extracting columns for hashagg to the

Daniel Gustafsson sent in another revision of a patch to support libnss as TLS
backend, and make pg_stat_ssl reporting backend agnostic to support this and
similar work.

David Rowley sent in a patch to get EXPLAIN to drop on-disk sorts from non-text
output when it doesn't do one.

Michaël Paquier sent in a patch to fill in some missing ifndef FRONTEND at the
top of logging.c and file_utils.c.

David Rowley sent in a patch to keep elog(ERROR) and ereport(ERROR) calls in the
cold path.

Jehan-Guillaume de Rorthais and Kyotaro HORIGUCHI traded patches to implement

Daniel Gustafsson and Michaël Paquier traded patches to use heap_multi_insert()
for pg_attribute/depend insertions.

Ádám Balogh sent in a patch to remove a redundant condition check.

Melanie Plageman sent in another revision of a patch to implement adaptive

Amit Langote sent in a patch to revise how some FDW executor APIs obtain
ResultRelInfo, avoid setting rootResultRelIndex unnecessarily, and delay
initializing UPDATE/DELETE ResultRelInfos.

Fabrízio de Royes Mello sent in a patch to fix a bug in pg_dump where extension
objects were not schema-qualified, causing a crash.

Ranier Vilela sent in a patch to fix a possible null dereference in

Bharath Rupireddy and Rushabh Lathia traded patches to remove an extra palloc of
raw_buf for binary format in COPY FROM.

Quan Zongliang and Tom Lane traded patches to fix an issue where the "%c" format
was being used on data that might not be ASCII.

Vigneshwaran C sent in a patch to add tab completion for the missing options in
copy statement to psql.

Peter Eisentraut sent in another revision of a patch to add the current
substring regular expression syntax.

Felix Lechner sent in a PoC patch to support WolfSSL for TLS.

Joe Conway sent in two revisions of a patch to fix an issue that manifested as
pg_read_file() with virtual files returns empty string.

Noah Misch sent in a patch to raise xidWrapLimit-xidStopLimit to 3M and
xidWrapLimit-xidWarnLimit to 40M. Likewise for mxact counterparts.

Daniel Gustafsson sent in a patch to generalize TLS checking in pgstat beyond
the OpenSSL-specific implementation details.

Tomáš Vondra sent in a PoC patch to batch writes to FDWs as a way to speed up
from the current situation, which does a synchronous write at each row.

Browse pgsql-announce by date

  From Date Subject
Next Message Hamid Akhtar 2020-06-30 08:54:35 ORC FDW v1.0.0 is Released
Previous Message Grigory Smolkin 2020-06-26 10:38:49 pg_probackup 2.4.1 released