== PostgreSQL Weekly News - December 15, 2019 ==

From: David Fetter <david(at)fetter(dot)org>
To: PostgreSQL Announce <pgsql-announce(at)postgresql(dot)org>
Subject: == PostgreSQL Weekly News - December 15, 2019 ==
Date: 2019-12-15 21:49:20
Message-ID: 20191215214920.GA20131@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce

== PostgreSQL Weekly News - December 15, 2019 ==

pgBackRest 2.20, a backup and restore system for PostgreSQL, released.
https://pgbackrest.org/release.html#2.20

barman 2.10, a backup and recovery manager for PostgreSQL, released.
https://www.pgbarman.org/barman-2-10-released/

Odyssey 1.0, a multi-threaded connection pooler for PostgreSQL, released.
https://github.com/yandex/odyssey/releases

phpPgAdmin 7.12.1, a web-based administration tool for PostgreSQL, released.
https://xzilla.net//blog/2019/Dec/phpPgAdmin-7-12-1-released.html

PGCon 2019 will take place in Ottawa on May 26-29, 2020. The CfP is open
through January 19, 2020 at http://www.pgcon.org/2020/papers.php
https://www.pgcon.org/2020/

pg_chameleon 2.0.12, a tool for replicating from MySQL to PostgreSQL, released.
https://pgchameleon.org/blog/2019/12/11/release-2012/

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

The German-speaking PostgreSQL Conference 2020 will take place on May 15, 2020
in Stuttgart. The CfP is open until February 3, 2020 at https://2020.pgconf.de/callforpapers/
https://2020.pgconf.de/

pitrery 2.4, a set of Bash scripts to manage PITR backups for PostgreSQL, released.
http://dalibo.github.io/pitrery/

== PostgreSQL Product News ==

== PostgreSQL Jobs for December ==

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

== PostgreSQL Local ==

PGDay SF will take place on January 21, 2020 at the Swedish American Hall in San
Francisco.
https://2020.pgdaysf.org/

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. The CfP is open through December 31, 2019 at midnight, Paris time
at https://2020.pgday.paris/callforpapers/
https://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(at)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.
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(at)fetter(dot)org(dot)

== Applied Patches ==

Tom Lane pushed:

- Doc: improve documentation about run-time pruning's effects on EXPLAIN. Tatsuo
Ishii complained that this para wasn't very intelligible. Try to make it
better. Discussion:
https://postgr.es/m/20191207.200500.989741087350666720.t-ishii@sraoss.co.jp
https://git.postgresql.org/pg/commitdiff/a395e21e989af0c2aab9dd1b1e0a1842ca42a063

- Improve isolationtester's timeout management. isolationtester.c had a
hard-wired limit of 3 minutes per test step. It now emerges that this isn't
quite enough for some of the slowest buildfarm animals. This isn't the first
time we've had to raise this limit (cf. 1db439ad4), so let's make it
configurable. This patch raises the default to 5 minutes, and introduces an
environment variable PGISOLATIONTIMEOUT that can be set if more time is
needed, following the precedent of PGCTLTIMEOUT. Also, modify isolationtester
so that when the timeout is hit, it explicitly reports having sent a cancel.
This makes the regression failure log considerably more intelligible. (In the
worst case, a timed-out test might actually be reported as "passing" without
this extra output, so arguably this is a bug fix in itself.) In passing,
update the README file, which had apparently not gotten touched when we added
"make check" support here. Back-patch to 9.6; older versions don't have
comparable timeout logic. Discussion:
https://postgr.es/m/22964.1575842935@sss.pgh.pa.us
https://git.postgresql.org/pg/commitdiff/99351a8b5a3882ee5d131bd37d03a67ab07b4fea

- Fix race condition in our Windows signal emulation.
pg_signal_dispatch_thread() responded to the client (signal sender) and
disconnected the pipe before actually setting the shared variables that make
the signal visible to the backend process's main thread. In the worst case, it
seems, effective delivery of the signal could be postponed for as long as the
machine has any other work to do. To fix, just move the pg_queue_signal()
call so that we do it before responding to the client. This essentially makes
pgkill() synchronous, which is a stronger guarantee than we have on Unix.
That may be overkill, but on the other hand we have not seen comparable timing
bugs on any Unix platform. While at it, add some comments to this sadly
underdocumented code. Problem diagnosis and fix by Amit Kapila; I just added
the comments. Back-patch to all supported versions, as it appears that this
can cause visible NOTIFY timing oddities on all of them, and there might be
other misbehavior due to slow delivery of other signals. Discussion:
https://postgr.es/m/32745.1575303812@sss.pgh.pa.us
https://git.postgresql.org/pg/commitdiff/28e6a2fd6358c1b75ce2f4e7cb3fcff979dbe539

- In pg_ctl, work around ERROR_SHARING_VIOLATION on the postmaster log file. On
Windows, we use CMD.EXE to redirect the postmaster's stdout/stderr into a log
file. CMD.EXE will open that file with non-sharing-friendly parameters, and
the file will remain open for a short time after the postmaster has removed
postmaster.pid. This can result in an ERROR_SHARING_VIOLATION failure if we
attempt to start a new postmaster immediately with the same log file (e.g.
during "pg_ctl restart"). This seems to explain intermittent buildfarm
failures we've been seeing on Windows machines. To fix, just open and close
the log file using our own pgwin32_open(), which will wait if necessary to
avoid the failure. (Perhaps someday we should stop using CMD.EXE, but that
would be a far more complex patch, and it doesn't seem worth the trouble ...
yet.) Back-patch to v12. This only solves the problem when frontend fopen()
is redirected to pgwin32_fopen(), which has only been true since commit
0ba06e0bf. Hence, no point in back-patching further, unless we care to
back-patch that change too. Diagnosis and patch by Alexander Lakhin (bug
#16154). Discussion:
https://postgr.es/m/16154-1ccf0b537b24d5e0@postgresql.org
https://git.postgresql.org/pg/commitdiff/0da33c762b85aeada111aa1371c33ac6737f8396

- Fix tuple column count in pg_control_init(). Oversight in commit 2e4db241b.
Nathan Bossart Discussion:
https://postgr.es/m/1B616360-396A-4482-AA28-375566C86160@amazon.com
https://git.postgresql.org/pg/commitdiff/8729fa72483f8a9acf299508bb2cbae1aa9a29b8

- Use only one thread to handle incoming signals on Windows. Since its
inception, our Windows signal emulation code has worked by running a main
signal thread that just watches for incoming signal requests, and then spawns
a new thread to handle each such request. That design is meant for servers in
which requests can take substantial effort to process, and it's worth
parallelizing the handling of requests. But those assumptions are just bogus
for our signal code. It's not much more than pg_queue_signal(), which is cheap
and can't parallelize at all, plus we don't really expect lots of signals to
arrive at the same backend at once. More importantly, this approach creates
failure modes that we could do without: either inability to spawn a new thread
or inability to create a new pipe handle will risk loss of signals. Hence,
dispense with the separate per-signal threads and just service each request
in-line in the main signal thread. This should be a bit faster (for the
normal case of one signal at a time) as well as more robust. Patch by me;
thanks to Andrew Dunstan for testing and Amit Kapila for review. Discussion:
https://postgr.es/m/4412.1575748586@sss.pgh.pa.us
https://git.postgresql.org/pg/commitdiff/16114f2ea0c0aba75d10b622797d31bcd296fadd

- Further adjust EXPLAIN's choices of table alias names. This patch causes
EXPLAIN to always assign a separate table alias to the parent RTE of an append
relation (inheritance set); before, such RTEs were ignored if not actually
scanned by the plan. Since the child RTEs now always have that same alias to
start with (cf. commit 55a1954da), the net effect is that the parent RTE
usually gets the alias used or implied by the query text, and the children all
get that alias with "_N" appended. (The exception to "usually" is if there
are duplicate aliases in different subtrees of the original query; then some
of those original RTEs will also have "_N" appended.) This results in more
uniform output for partitioned-table plans than we had before: the partitioned
table itself gets the original alias, and all child tables have aliases with
"_N", rather than the previous behavior where one of the children would get an
alias without "_N". The reason for giving the parent RTE an alias, even if it
isn't scanned by the plan, is that we now use the parent's alias to qualify
Vars that refer to an appendrel output column and appear above the Append or
MergeAppend that computes the appendrel. But below the append, Vars refer to
some one of the child relations, and are displayed that way. This seems
clearer than the old behavior where a Var that could carry values from any
child relation was displayed as if it referred to only one of them. While at
it, change ruleutils.c so that the code paths used by EXPLAIN deal in Plan
trees not PlanState trees. This effectively reverts a decision made in commit
1cc29fe7c, which seemed like a good idea at the time to make ruleutils.c
consistent with explain.c. However, it's problematic because we'd really like
to allow executor startup pruning to remove all the children of an append node
when possible, leaving no child PlanState to resolve Vars against. (That's
not done here, but will be in the next patch.) This requires different
handling of subplans and initplans than before, but is otherwise a pretty
straightforward change. Discussion:
https://postgr.es/m/001001d4f44b$2a2cca50$7e865ef0$@lab.ntt.co.jp
https://git.postgresql.org/pg/commitdiff/6ef77cf46e81f45716ec981cb08781d426181378

- Allow executor startup pruning to prune all child nodes. Previously, if the
startup pruning logic proved that all child nodes of an Append or MergeAppend
could be pruned, we still kept one, just to keep EXPLAIN from failing. The
previous commit removed the ruleutils.c limitation that required this kluge,
so drop it. That results in less-confusing EXPLAIN output, as per a complaint
from Yuzuko Hosoya. David Rowley Discussion:
https://postgr.es/m/001001d4f44b$2a2cca50$7e865ef0$@lab.ntt.co.jp
https://git.postgresql.org/pg/commitdiff/5935917ce59e2e613ac7a4b54ed49a7b9f8f28ac

- Remove unstable test case added in commit 5935917ce. The buildfarm says this
produces some unexpected output with force_parallel_mode = regress. There's
probably a bug underneath that, but for the moment just delete the test case
to make the buildfarm green again. (I now notice that the case had also
failed to get updated to follow commit d52eaa094, which made plan_cache_mode =
force_generic_plan prevail throughout partition_prune.sql; it was thereby
managing to break a later test. When/if we put this back in, *don't* include
the SET and RESET commands.)
https://git.postgresql.org/pg/commitdiff/776a2c887480977a4327108945364fb4d84a817f

- Add readfuncs.c support for AppendRelInfo. This is made necessary by the fact
that commit 6ef77cf46 added AppendRelInfos to plan trees. I'd concluded that
this extra code was not necessary because we don't transmit that data to
parallel workers ... but I forgot about -DWRITE_READ_PARSE_PLAN_TREES. Per
buildfarm.
https://git.postgresql.org/pg/commitdiff/591d404b9cd2c562bfe7fe60d76988d49b5ba2b1

- Remove redundant function calls in timestamp[tz]_part(). The
DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() and
timestamptz_part() contained calls of timestamp2tm() that were fully redundant
with the ones done just above the switch. This evidently crept in during
commit 258ee1b63, which relocated that code from another place where the calls
were indeed needed. Just delete the redundant calls. I (tgl) noted that our
test coverage of these functions left quite a bit to be desired, so extend
timestamp.sql and timestamptz.sql to cover all the branches. Back-patch to
all supported branches, as the previous commit was. There's no real issue here
other than some wasted cycles in some not-too-heavily-used code paths, but the
test coverage seems valuable. Report and patch by Li Japin; test case
adjustments by me. Discussion:
https://postgr.es/m/SG2PR06MB37762CAE45DB0F6CA7001EA9B6550@SG2PR06MB3776.apcprd06.prod.outlook.com
https://git.postgresql.org/pg/commitdiff/26ae3aa80e337261203ba4442452bed261ff9888

- Fix EXTRACT(ISOYEAR FROM timestamp) for years BC. The test cases added by
commit 26ae3aa80 exposed an old oversight in timestamp[tz]_part: they didn't
correct the result of date2isoyear() for BC years, so that we produced an
off-by-one answer for such years. Fix that, and back-patch to all supported
branches. Discussion:
https://postgr.es/m/SG2PR06MB37762CAE45DB0F6CA7001EA9B6550@SG2PR06MB3776.apcprd06.prod.outlook.com
https://git.postgresql.org/pg/commitdiff/1a3efa1eb67ab752231a6fff2743a77ae55808d5

- Put back regression test case in a more robust form. This undoes my hurried
commit 776a2c887, restoring the removed test case in a form that passes with
or without force_parallel_mode = regress. It turns out that
force_parallel_mode = regress simply fails to mask the Worker lines that will
be produced by EXPLAIN (ANALYZE, VERBOSE). I'd say that's a bug in that
feature, as its entire alleged reason for existence is to make the EXPLAIN
output the same. It's certainly not a bug in the plan node pruning logic.
Fortunately, this test case doesn't really need to use ANALYZE, so just drop
that. Discussion: https://postgr.es/m/18891.1576109690@sss.pgh.pa.us
https://git.postgresql.org/pg/commitdiff/22864f6e02f8fc19f6167442f13d1f917e36548e

- Modernize our readline API a tad. Prefer to call
"rl_filename_completion_function" and "rl_completion_matches", rather than
using the names without the rl_ prefix. This matches Readline's
documentation, and makes our code a little clearer about which names are
external. On platforms that only have the un-prefixed names (just some very
ancient versions of libedit, AFAICT), reverse the direction of the
compatibility macro definitions to match. Also, remove our extern declaration
of "filename_completion_function"; whatever libedit versions may have failed
to declare that are surely dead and buried. Discussion:
https://postgr.es/m/23608.1576248145@sss.pgh.pa.us
https://git.postgresql.org/pg/commitdiff/5e7bedc5adba570b526d89746201481616756779

- Prevent overly-aggressive collapsing of joins to RTE_RESULT relations. The
RTE_RESULT simplification logic added by commit 4be058fe9 had a flaw: it would
collapse out a RTE_RESULT that is due to compute a PlaceHolderVar, and
reassign the PHV to the parent join level, even if another input relation of
the join contained a lateral reference to the PHV. That can't work because
the PHV would be computed too late. In practice it led to failures of internal
sanity checks later in planning (either assertion failures or errors such as
"failed to construct the join relation"). To fix, add code to check for the
presence of such PHVs in relevant portions of the query tree. Notably, this
required refactoring range_table_walker so that a caller could ask to walk
individual RTEs not the whole list. (It might be a good idea to refactor
range_table_mutator in the same way, if only to keep those functions looking
similar; but I didn't do so here as it wasn't necessary for the bug fix.)
This exercise also taught me that find_dependent_phvs(), as it stood, could
only safely be used on the entire Query, not on subtrees. Adjust its API to
reflect that; which in passing allows it to have a fast path for the common
case of no PHVs anywhere. Per report from Will Leinweber. Back-patch to v12
where the bug was introduced. Discussion:
https://postgr.es/m/CALLb-4xJMd4GZt2YCecMC95H-PafuWNKcmps4HLRx2NHNBfB4g@mail.gmail.com
https://git.postgresql.org/pg/commitdiff/6ea364e7e7d5f298fc965006caa6c228c743fe77

- Try to stabilize results of new tuplesort regression test. It appears that a
concurrent autovacuum/autoanalyze run can cause changes in the plans expected
by this test. To prevent that, change the tables it uses to be temp tables
--- there's no need for them to be permanent, and this should save a few
cycles too. Discussion: https://postgr.es/m/3244.1576160824@sss.pgh.pa.us
https://git.postgresql.org/pg/commitdiff/baa32ce28b39eccdf384e979dac5ad8be91ff44e

Noah Misch pushed:

- Document search_path security with untrusted dbowner or CREATEROLE. Commit
5770172cb0c9df9e6ce27c507b449557e5b45124 wrote, incorrectly, that certain
schema usage patterns are secure against CREATEROLE users and database owners.
When an untrusted user is the database owner or holds CREATEROLE privilege, a
query is secure only if its session started with SELECT
pg_catalog.set_config('search_path', '', false) or equivalent. Back-patch to
9.4 (all supported versions). Discussion:
https://postgr.es/m/20191013013512.GC4131753@rfd.leadboat.com
https://git.postgresql.org/pg/commitdiff/fd5e16e782fc6cd829b27e2c83c623b8020e5774

Amit Kapila pushed:

- Fix typos in miscinit.c. Commit f13ea95f9e moved the description of
postmaster.pid file contents from miscadmin.h to pidfile.h, but missed to
update the comments in miscinit.c. Author: Hadi Moshayedi Reviewed-by: Amit
Kapila Backpatch-through: 10 Discussion:
https://postgr.es/m/CAK=1=WpYEM9x3LGkaxgXaxeYQjnkdW8XLsxrYRTE2Gq-H83FMw@mail.gmail.com
https://git.postgresql.org/pg/commitdiff/2d0fdfaccec8b314895e026018874dcc5565b43e

Etsuro Fujita pushed:

- Fix handling of multiple AFTER ROW triggers on a foreign table.
AfterTriggerExecute() retrieves a fresh tuple or pair of tuples from a
tuplestore and then stores the tuple(s) in the passed-in slot(s) if
AFTER_TRIGGER_FDW_FETCH, while it uses the most-recently-retrieved tuple(s)
stored in the slot(s) if AFTER_TRIGGER_FDW_REUSE. This was done correctly
before 12, but commit ff11e7f4b broke it by mistakenly clearing the tuple(s)
stored in the slot(s) in that function, leading to an assertion failure as
reported in bug #16139 from Alexander Lakhin. Also, fix some other issues
with the aforementioned commit in passing: * For tg_newslot, which is a slot
added to the TriggerData struct by the commit to store new updated tuples,
it didn't ensure the slot was NULL if there was no such tuple. * The commit
failed to update the documentation about the trigger interface. Author:
Etsuro Fujita Backpatch-through: 12 Discussion:
https://postgr.es/m/16139-94f9ccf0db6119ec%40postgresql.org
https://git.postgresql.org/pg/commitdiff/5a20b0219e7684788a1b63e812dd44b31361b259

- Remove extra parenthesis from comment.
https://git.postgresql.org/pg/commitdiff/a41a1456c4a1040974939db23a81101a2f6ade6f

Álvaro Herrera pushed:

- Add backend-only appendStringInfoStringQuoted. This provides a mechanism to
emit literal values in informative messages, such as query parameters. The
new code is more complex than what it replaces, primarily because it wants to
be more efficient. It also has the (currently unused) additional optional
capability of specifying a maximum size to print. The new function lives out
of common/stringinfo.c so that frontend users of that file need not pull in
unnecessary multibyte-encoding support code. Author: Álvaro Herrera and
Alexey Bashtanov, after a suggestion from Andres Freund Reviewed-by: Tom Lane
Discussion:
https://postgr.es/m/20190920203905.xkv5udsd5dxfs6tr@alap3.anarazel.de
https://git.postgresql.org/pg/commitdiff/6cafde1bd43f1c28b044953cac2f2999eb425b22

- Emit parameter values during query bind/execute errors. This makes such log
entries more useful, since the cause of the error can be dependent on the
parameter values. Author: Alexey Bashtanov, Álvaro Herrera Discussion:
https://postgr.es/m/0146a67b-a22a-0519-9082-bc29756b93a2@imap.cc Reviewed-by:
Peter Eisentraut, Andres Freund, Tom Lane
https://git.postgresql.org/pg/commitdiff/ba79cb5dc841104cf4810b5c23af4f881079dbb5

- (Blindly) tweak new test regex. gcc-based Windows buildfarm animals are not
happy about a multiline regular expression I added recently. Try to
accomodate; existing pg_basebackup tests suggest that \n should work instead
of a bare newline, but throw in \r also. This being perl, TIMTOWTDI. Also
remove the pointless $ at the end of the pattern, for extra luck. (If this
doesn't work, I'll probably just split the regex in two.) Per buildfarm
members jacana and fairywren. Discussion:
https://postgr.es/m/3562.1576161217@sss.pgh.pa.us
https://git.postgresql.org/pg/commitdiff/8ed428dc977f6d3e454892ddca089f17e150384f

Peter Eisentraut pushed:

- Cosmetic cleaning of pg_config.h.win32. Clean up some comments (some generated
by old versions of autoconf) and some random ordering differences, so it's
easier to diff this against the default pg_config.h or pg_config.h.in. Remove
LOCALEDIR handling from pg_config.h.win32 altogether because it's already in
pg_config_paths.h.
https://git.postgresql.org/pg/commitdiff/877b61e9ce95934c71a9c01614db4be1b395fff6

- Fix output of Unicode normalization test. Several off-by-more-than-one errors
caused the output in case of a test failure to be truncated and
unintelligible. Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> Discussion:
https://www.postgresql.org/message-id/flat/6a7a8516-7d11-8fbd-0e8b-eadb4f0679eb%402ndquadrant.com
https://git.postgresql.org/pg/commitdiff/b802412106e82ccf1aef36a4984e321082c122cb

- Remove ATPrepSetStatistics. It was once possible to do ALTER TABLE ... SET
STATISTICS on system tables without allow_sytem_table_mods. This was changed
apparently by accident between PostgreSQL 9.1 and 9.2, but a code comment
still claimed this was possible. Without that functionality, having a
separate ATPrepSetStatistics() is useless, so use the generic
ATSimplePermissions() instead and move the remaining custom code into
ATExecSetStatistics(). Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> Discussion:
https://www.postgresql.org/message-id/flat/cc8d2648-a0ec-7a86-13e5-db473484e19e%402ndquadrant.com
https://git.postgresql.org/pg/commitdiff/105eb360f2513523d221302b2d52880a14afae34

Michaël Paquier pushed:

- Fix some compiler warnings with timestamp parsing in formatting.c. gcc-7 used
with a sufficient optimization level complains about warnings around
do_to_timestamp() regarding the initialization and handling of some of its
variables. Recent commits 66c74f8 and d589f94 made things made the interface
more confusing, so document which variables are always expected and initialize
properly the optional ones when they are set. Author: Andrey Lepikhov,
Michael Paquier Discussion:
https://postgr.es/m/a7e28b83-27b1-4e1c-c76b-4268c4b785bc@postgrespro.ru
https://git.postgresql.org/pg/commitdiff/c341c7d391e256f80cfbae53b4f55278bffca699

- Fix memory leak when initializing DH parameters in backend. When loading DH
parameters used for the generation of ephemeral DH keys in the backend, the
code has never bothered releasing the memory used for the DH information
loaded from a file or from libpq's default. This commit makes sure that the
information is properly free()'d. Note that as SSL parameters can be
reloaded, this can cause an accumulation of memory leaked. As the leak is
minor, no backpatch is done. Reported-by: Dmitry Uspenskiy Discussion:
https://postgr.es/m/16160-18367e56e9a28264@postgresql.org
https://git.postgresql.org/pg/commitdiff/e0e569e1d192c3fed942257302f24b550cf982f4

- Remove duplicated progress reporting during heap scan of VACUUM. This has been
introduced by c16dc1a since progress reporting for VACUUM has been added. As
this issue just causes some extra work and is harmless, no backpatch is done.
Author: Justin Pryzby Discussion:
https://postgr.es/m/20191213030831.GT2082@telsasoft.com
https://git.postgresql.org/pg/commitdiff/e5a02e0fc68bd57048f2c74a89f5412dbf87015e

Heikki Linnakangas pushed:

- Fix crash when a page was split during GiST index creation. The bug was
similar to the one that was fixed in commit 22251686f0. When we split page X
and insert the downlink for the new page, the parent page might also need to
be split. When that happens, the downlink offset number we remembered for X is
no longer valid. We correctly called gistFindCorrectParent() to re-find it,
but gistFindCorrectParent() doesn't do anything if the LSN of the page hasn't
changed, and we stopped updating LSNs during index build in commit 9155580fd5.
The buggy codepath was taken if the page was split into three or more pages,
and inserting the downlink caused the parent page to split. To fix, explicitly
mark the downlink offset number as invalid, to force gistFindCorrectParent()
to re-find it. Fixes bug #16134 reported by Alexander Lakhin, reported again
as #16162 by Andreas Kunert. Thanks to Jeff Janes, Tom Lane and Tomas Vondra
for debugging. Backpatch to v12, where we stopped WAL-logging during index
build. Discussion:
https://www.postgresql.org/message-id/16134-0423f729671dec64%40postgresql.org
Discussion:
https://www.postgresql.org/message-id/16162-45d21b7b6c1a3105%40postgresql.org
https://git.postgresql.org/pg/commitdiff/a7ee7c85132221ff7231b6f910915a1b3ce1ecbc

Thomas Munro pushed:

- Don't use _mdfd_getseg() in mdsyncfiletag(). _mdfd_getseg() opens all segments
up to the requested one. That causes problems for mdsyncfiletag(), if
mdunlinkfork() has already unlinked other segment files. Open the file we
want directly by name instead, if it's not already open. The consequence of
this bug was a rare panic in the checkpointer, made more likely if you
saturated the sync request queue so that the SYNC_FORGET_REQUEST messages for
a given relation were more likely to be absorbed in separate cycles by the
checkpointer. Back-patch to 12. Defect in commit 3eb77eba. Author: Thomas
Munro Reported-by: Justin Pryzby Discussion:
https://postgr.es/m/20191119115759.GI30362%40telsasoft.com
https://git.postgresql.org/pg/commitdiff/7bb3102cea02101efcbb4c4fba3fdd452a52bdab

- Fix mdsyncfiletag(), take II. The previous commit failed to consider that
FileGetRawDesc() might not return a valid fd, as discovered on the build farm.
Switch to using the File interface only. Back-patch to 12, like the previous
commit.
https://git.postgresql.org/pg/commitdiff/7c85be08a2d404ec2a1a6a3b089e7f08d62e5db8

== Pending Patches ==

Michaël Paquier sent in another revision of a patch to rework the manipulation
and structure of attribute mappings.

Peter Eisentraut sent in a patch to support ALTER TABLE ... DROP EXPRESSION ...
per the standard.

Amit Kapila sent in two more revisions of a patch to delete empty pages in each
pass during GIST VACUUM.

Kyotaro HORIGUCHI sent in another revision of a patch to rework the WAL-skipping
optimization.

Amul Sul sent in another revision of a patch to improve the partition-matching
algorithm for partition-wise JOINs.

Pavel Stěhule sent in two more revisions of a patch to add min_scale() and
trim_scale() functions for NUMERIC.

Ranier Vilela, Mark Dilger, and Michaël Paquier traded patches to un-shadow some
variable names.

Suraj Kharage and Rushabh Lathia traded patches to implement backup manifests
and some utilities to use them.

Ibrar Ahmed sent in two revisions of a patch to improve the management of memory
in VACUUM by using a list instead of a fixed size array and allocating the
memory in chunks.

Robert Haas sent in another revision of a patch to move interrupting-handling
code into subroutines, use PostgresSigHupHandler in more places, partially
deduplicate interrupt handling for background processes, and extend the
ProcSignal mechanism to support barriers.

Peter Eisentraut sent in a patch to remove support for Python versions older
than 2.6.

Justin Pryzby sent in a patch to make a "Cost" structure and allow EXPLAIN to
show its members.

Peter Eisentraut sent in another revision of a patch to remove
ATPrepSetStatistics.

Jiankang Liu sent in a patch to ensure that Walreceiver is completely started
before shutting down it on the standby server.

Andres Freund sent in a patch to implement varint.

Tomáš Vondra sent in a patch to fix a bug in pg_stat_activity's tracking of
walsender processes where xact_start is only updated at the very beginning when
the walsender starts (so it's almost exactly equal to backend_start) and then
just flips between NULL and that value.

Tomáš Vondra and Adam Lee traded patches to implement memory-bounded hash
aggregation.

Dilip Kumar and Amit Kapila traded patches to change an overly strict Assert in
TransactionGroupUpdateXidStatus.

Robert Haas sent in a patch to allow the use of simplehash without MemoryContext
and leverage that to enable its use in front-end code.

Vigneshwaran C sent in a patch to reorder buffer crash while aborting old
transactions.

Leif Gunnar Erlandsen sent in another revision of a patch to pause recovery if
pitr target not reached.

Konstantin Knizhnik sent in another revision of a patch to add a
pg_stat_wal_activity view.

Peter Eisentraut sent in a patch to add an .editorconfig file.

Julien Rouhaud sent in another revision of a patch to support collation
versioning.

Robert Haas sent in a patch to remove misuse of cancel_before_shmem_exit.

Andrey V. Lepikhov sent in two revisions of a patch to skip the scan of the
outer subtree if the inner side of a NestedLoop node is guaranteed empty.

Justin Pryzby sent in three more revisions of a patch to add a vacuum errcontext
to show the block being processed and use same to do that showing.

Peter Eisentraut sent in a patch to add support for other normal forms to the
Unicode normalization API, and add SQL functions for Unicode normalization.

David Fetter sent in two revisions of a patch to make it possible to set
host(no)ssl lines via initdb.

Asif Rehman sent in another revision of a patch to implement parallel WAL-based
backup.

Peter Eisentraut sent in a patch to support MSYS2 directly.

Nathan Bossart sent in two revisions of a patch to fix a bug wherein archive
status ".ready" files could be created too early.

Amit Khandekar and Amit Kapila traded patches to use vfd for logrep.

Peter Geoghegan sent in another revision of a patch to add deduplication to
nbtree.

Vigneshwaran C sent in a patch to fix subscriber invalid memory access on DDL.

Josef Šimánek sent in a patch to improve the documentation of REINDEX options.

Etsuro Fujita sent in a patch to clean up the partition join test.

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

Peter Eisentraut sent in a patch to generate pg_config.h from pg_config.h.in on
Windows and remove pg_config.h.win32, as it's no longer needed.

Jeff Janes sent in a patch to add a GUC, enable_singleseqscan, that does what's
on the label.

Tom Lane sent in another revision of a patch to prevent COPY's tab completion
from stripping needed quotes.

Tom Lane sent in another revision of a patch to fix some multi-operations bugs
in ALTER TABLE.

Peter Eisentraut sent in a patch to have logical replication subscriber fire
column triggers.

Álvaro Herrera sent in a patch to Demote an xlog.c variable from global to
local.

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

Justin Pryzby sent in a patch to make pg_ls_tmpdir to show directories.

Michaël Paquier sent in a patch to fix a recently introduced infelicity between
query cancellation and \watch in psql.

Tom Lane sent in a patch to ensure that ensure invisible Gathers have invisible
workers.

Browse pgsql-announce by date

  From Date Subject
Next Message Lætitia Avrot 2019-12-16 07:33:53 FOSDEM PGDay and Devroom announcement!
Previous Message Britt Cole 2019-12-12 14:56:01 2Q PGConf 2019 Wrap Up