== PostgreSQL Weekly News - August 05 2018 ==

From: David Fetter <david(at)fetter(dot)org>
To: PostgreSQL Announce <pgsql-announce(at)postgresql(dot)org>
Subject: == PostgreSQL Weekly News - August 05 2018 ==
Date: 2018-08-05 22:12:21
Message-ID: 20180805221221.GA19081@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce

== PostgreSQL Weekly News - August 05 2018 ==

== PostgreSQL Product News ==

Pgpool-II 3.7.5, 3.6.12, 3.5.16, 3.4.18, and 3.3.22 released.
http://www.pgpool.net/docs/latest/en/html/release.html

repmgr 4.1.0, a replication manager for PostgreSQL, released.
https://repmgr.org/docs/4.1/release-4.1.0.html

== PostgreSQL Jobs for August ==

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

== PostgreSQL Local ==

PGConf.Brazil 2018 will take place in São Paulo, Brazil on August 3-4 2018.
http://pgconf.com.br

PostgreOpen Silicon Valley 2018 will be held in San Francisco on September 5-7, 2018.
https://2018.postgresopen.org/

The Portland PostgreSQL Users Group will be holding a PGDay on September 10,
2018 in Portland, OR. The CfP is open at https://goo.gl/forms/E0CiUQGSZGMYwh922
https://pdx.postgresql.us/pdxpgday2018

PostgresConf South Africa 2018 will take place in Johannesburg on October 9, 2018
https://postgresconf.org/conferences/SouthAfrica2018

PostgreSQL Conference Europe 2018 will be held on October 23-26, 2018 at the
Lisbon Marriott Hotel in Lisbon, Portugal. The CfP is open through August 6,
2018 midnight CET at https://2018.pgconf.eu/callforpapers
https://2017.pgconf.eu/

2Q PGConf will be on December 4-5, 2018 in Chicago, IL. The CfP is open through
August 27, 2018 at midnight Pacific Time at http://www.2qpgconf.com/#cfp
http://www.2qpgconf.com/

PGConf.ASIA 2018 will take place on December 10-12, 2018 in Akihabara, Tokyo,
Japan.
http://www.pgconf.asia/EN/2018/

== 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áš Vondra:

- Mark variable used only in assertion with PG_USED_FOR_ASSERTS_ONLY.
Perpendicular lines always intersect, so the line_interpt_line() return value
in line_closept_point() was used only in an assertion, triggering compiler
warnings in non-assert builds.
https://git.postgresql.org/pg/commitdiff/ab87b8fedce3fa77ca0d684a42ecc055f189eb33

Peter Eisentraut pushed:

- Add ssl_library preset parameter. This allows querying the SSL implementation
used on the server side. It's analogous to using PQsslAttribute(conn,
"library") in libpq. Reviewed-by: Daniel Gustafsson <daniel(at)yesql(dot)se>
https://git.postgresql.org/pg/commitdiff/98efa76fe313f62f84b94cd1f46c913c221b41fe

- doc: Improve CREATE COLLATION locking documentation. Move out of the
concurrency control chapter, where mostly only user table locks are discussed,
and move to CREATE COLLATION reference page. Author: Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> Author: Kyotaro HORIGUCHI
<horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
https://git.postgresql.org/pg/commitdiff/70de0abdb7c6dce24dd5c0e276708ca7c534f99f

- Allow multi-inserts during COPY into a partitioned table. CopyFrom allows
multi-inserts to be used for non-partitioned tables, but this was disabled for
partitioned tables. The reason for this appeared to be that the tuple may not
belong to the same partition as the previous tuple did. Not allowing
multi-inserts here greatly slowed down imports into partitioned tables. These
could take twice as long as a copy to an equivalent non-partitioned table. It
seems wise to do something about this, so this change allows the multi-inserts
by flushing the so-far inserted tuples to the partition when the next tuple
does not belong to the same partition, or when the buffer fills. This
improves performance when the next tuple in the stream commonly belongs to the
same partition as the previous tuple. In cases where the target partition
changes on every tuple, using multi-inserts slightly slows the performance.
To get around this we track the average size of the batches that have been
inserted and adaptively enable or disable multi-inserts based on the size of
the batch. Some testing was done and the regression only seems to exist when
the average size of the insert batch is close to 1, so let's just enable
multi-inserts when the average size is at least 1.3. More performance testing
might reveal a better number for, this, but since the slowdown was only 1-2%
it does not seem critical enough to spend too much time calculating it. In
any case it may depend on other factors rather than just the size of the
batch. Allowing multi-inserts for partitions required a bit of work around
the per-tuple memory contexts as we must flush the tuples when the next tuple
does not belong the same partition. In which case there is no good time to
reset the per-tuple context, as we've already built the new tuple by this
time. In order to work around this we maintain two per-tuple contexts and
just switch between them every time the partition changes and reset the old
one. This does mean that the first of each batch of tuples is not allocated
in the same memory context as the others, but that does not matter since we
only reset the context once the previous batch has been inserted. Author:
David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> Reviewed-by: Melanie Plageman
<melanieplageman(at)gmail(dot)com>
https://git.postgresql.org/pg/commitdiff/0d5f05cde011512e605bb2688d9b1fbb5b3ae152

Tom Lane pushed:

- Doc: fix oversimplified example for CREATE POLICY. As written, this policy
constrained only the post-image not the pre-image of rows, meaning that users
could delete other users' rows or take ownership of such rows, contrary to
what the docs claimed would happen. We need two separate policies to achieve
the documented effect. While at it, try to explain what's happening a bit
more fully. Per report from Олег Самойлов. Back-patch to 9.5 where this was
added. Thanks to Stephen Frost for off-list discussion. Discussion:
https://postgr.es/m/3298321532002010@sas1-2b3c3045b736.qloud-c.yandex.net
https://git.postgresql.org/pg/commitdiff/9295d7cf50fbcf1f2be19f835c9b2b1f0186fd9b

- Fix pg_dump's failure to dump REPLICA IDENTITY for constraint indexes.
pg_dump knew about printing ALTER TABLE ... REPLICA IDENTITY USING INDEX for
indexes declared as indexes, but it failed to print that for indexes declared
as unique or primary-key constraints. Per report from Achilleas Mantzios.
This has been broken since the feature was introduced, AFAICS. Back-patch to
9.4. Discussion:
https://postgr.es/m/1e6cc5ad-b84a-7c07-8c08-a4d0c3cdc938@matrix.gatewaynet.com
https://git.postgresql.org/pg/commitdiff/c0a552921b0f5f22ac982b5ad24f1df4fd8ca1b1

- Ensure we build generated headers at the start of some more cases. "make
installcheck" and some related cases, when invoked from the toplevel
directory, start out by doing "make all" in src/test/regress. Since that's
one make recursion level down, the submake-generated-headers target will do
nothing, causing us to fail to create/update generated headers before building
pg_regress. This is, I believe, a new failure mode induced by commit
3b8f6e75f, so let's fix it. To do so, we have to invoke
submake-generated-headers at the top level. Discussion:
https://postgr.es/m/0401efec-68f1-679d-3ea3-21d4e8dd11af@gmail.com
https://git.postgresql.org/pg/commitdiff/7dc5a96aa21816ef1223be9c23e10a88db857d8f

- Remove dead code left behind by 1b6801051.
https://git.postgresql.org/pg/commitdiff/6574f19127ea539408267c1891ccc12ca5ebeca2

- Further fixes for quoted-list GUC values in pg_dump and ruleutils.c. Commits
742869946 et al turn out to be a couple bricks shy of a load. We were dumping
the stored values of GUC_LIST_QUOTE variables as they appear in proconfig or
setconfig catalog columns. However, although that quoting rule looks a lot
like SQL-identifier double quotes, there are two critical differences: empty
strings ("") are legal, and depending on which variable you're considering,
values longer than NAMEDATALEN might be valid too. So the current technique
fails altogether on empty-string list entries (as reported by Steven Winfield
in bug #15248) and it also risks truncating file pathnames during dump/reload
of GUC values that are lists of pathnames. To fix, split the stored value
without any downcasing or truncation, and then emit each element as a SQL
string literal. This is a tad annoying, because we now have three copies of
the comma-separated-string splitting logic in varlena.c as well as a fourth
one in dumputils.c. (Not to mention the randomly-different-from-those
splitting logic in libpq...) I looked at unifying these, but it would be
rather a mess unless we're willing to tweak the API definitions of
SplitIdentifierString, SplitDirectoriesString, or both. That might be worth
doing in future; but it seems pretty unsafe for a back-patched bug fix, so for
now accept the duplication. Back-patch to all supported branches, as the
previous fix was. Discussion:
https://postgr.es/m/7585.1529435872@sss.pgh.pa.us
https://git.postgresql.org/pg/commitdiff/f3eb76b399efb88882b2984fccdefcea540b2749

- Fix libpq's code for searching .pgpass; rationalize empty-list-item cases.
Before v10, we always searched ~/.pgpass using the host parameter, and nothing
else, to match to the "hostname" field of ~/.pgpass. (However, null host or
host matching DEFAULT_PGSOCKET_DIR was replaced by "localhost".) In v10, this
got broken by commit 274bb2b38, repaired by commit bdac9836d, and broken again
by commit 7b02ba62e; in the code actually shipped, we'd search with hostaddr
if both that and host were specified --- though oddly, *not* if only hostaddr
were specified. Since this is directly contrary to the documentation, and not
backwards-compatible, it's clearly a bug. However, the change wasn't totally
without justification, even though it wasn't done quite right, because the
pre-v10 behavior has arguably been buggy since we added hostaddr. If hostaddr
is specified and host isn't, the pre-v10 code will search ~/.pgpass for
"localhost", and ship that password off to a server that most likely isn't
local at all. That's unhelpful at best, and could be a security breach at
worst. Therefore, rather than just revert to that old behavior, let's define
the behavior as "search with host if provided, else with hostaddr if provided,
else search for localhost". (As before, a host name matching
DEFAULT_PGSOCKET_DIR is replaced by localhost.) This matches the behavior of
the actual connection code, so that we don't pick up an inappropriate
password; and it allows useful searches to happen when only hostaddr is given.
While we're messing around here, ensure that empty elements within a host or
hostaddr list select the same behavior as a totally-empty field would; for
instance "host=a,,b" is equivalent to "host=a,/tmp,b" if DEFAULT_PGSOCKET_DIR
is /tmp. Things worked that way in some cases already, but not consistently
so, which contributed to the confusion about what key ~/.pgpass would get
searched with. Update documentation accordingly, and also clarify some nearby
text. Back-patch to v10 where the host/hostaddr list functionality was
introduced. Discussion: https://postgr.es/m/30805.1532749137@sss.pgh.pa.us
https://git.postgresql.org/pg/commitdiff/e3f99e03e2ec65e7ddb1f3056b545f2afa57b2d0

- Fix run-time partition pruning for appends with multiple source rels. The
previous coding here supposed that if run-time partitioning applied to a
particular Append/MergeAppend plan, then all child plans of that node must be
members of a single partitioning hierarchy. This is totally wrong, since an
Append could be formed from a UNION ALL: we could have multiple hierarchies
sharing the same Append, or child plans that aren't part of any hierarchy. To
fix, restructure the related plan-time and execution-time data structures so
that we can have a separate list or array for each partitioning hierarchy.
Also track subplans that are not part of any hierarchy, and make sure they
don't get pruned. Per reports from Phil Florent and others. Back-patch to
v11, since the bug originated there. David Rowley, with a lot of cosmetic
adjustments by me; thanks also to Amit Langote for review. Discussion:
https://postgr.es/m/HE1PR03MB17068BB27404C90B5B788BCABA7B0@HE1PR03MB1706.eurprd03.prod.outlook.com
https://git.postgresql.org/pg/commitdiff/1c2cb2744bf3d8ad751cd5cf3b347f10f48492b3

- Remove no-longer-appropriate special case in psql's \conninfo code. \conninfo
prints the results of PQhost() and some other libpq functions. It used to
override the PQhost() result with the hostaddr parameter if that'd been given,
but that's unhelpful when multiple hosts were listed in the connection string.
Furthermore, it seems unnecessary in the wake of commit 1944cdc98, since
PQhost does any useful substitution itself. So let's just remove the extra
code and print PQhost()'s result without any editorialization. Back-patch to
v10, as 1944cdc98 (just) was. Discussion:
https://postgr.es/m/23287.1533227021@sss.pgh.pa.us
https://git.postgresql.org/pg/commitdiff/c7a8f786775e073a3fa785ed2842cc24f9eb6ae8

- Change libpq's internal uses of PQhost() to inspect host field directly.
Commit 1944cdc98 changed PQhost() to return the hostaddr value when that is
specified and host isn't. This is a good idea in general, but fe-auth.c and
related files contain PQhost() calls for which it isn't. Specifically, when
we compare SSL certificates or other server identity information to the host
field, we do not want to use hostaddr instead; that's not what's documented,
that's not what happened pre-v10, and it doesn't seem like a good idea.
Instead, we can just look at connhost[].host directly. This does what we want
in v10 and up; in particular, if neither host nor hostaddr were given, the
host field will be replaced with the default host name. That seems useful,
and it's likely the reason that these places were coded to call PQhost()
originally (since pre-v10, the stored field was not replaced with the
default). Back-patch to v10, as 1944cdc98 (just) was. Discussion:
https://postgr.es/m/23287.1533227021@sss.pgh.pa.us
https://git.postgresql.org/pg/commitdiff/24986c95520e0761dbb3551196fda2305228557c

- First-draft release notes for 10.5. As usual, the release notes for other
branches will be made by cutting these down, but put them up for community
review first.
https://git.postgresql.org/pg/commitdiff/c1455de2af2eb06ee493f9982f060ac7e571f656

- Fix INSERT ON CONFLICT UPDATE through a view that isn't just SELECT *. When
expanding an updatable view that is an INSERT's target, the rewriter failed to
rewrite Vars in the ON CONFLICT UPDATE clause. This accidentally worked if
the view was just "SELECT * FROM ...", as the transformation would be a no-op
in that case. With more complicated view targetlists, this omission would
often lead to "attribute ... has the wrong type" errors or even crashes, as
reported by Mario De Frutos Dieguez. Fix by adding code to rewriteTargetView
to fix up the data structure correctly. The easiest way to update the
exclRelTlist list is to rebuild it from scratch looking at the new target
relation, so factor the code for that out of transformOnConflictClause to make
it sharable. In passing, avoid duplicate permissions checks against the
EXCLUDED pseudo-relation, and prevent useless view expansion of that
relation's dummy RTE. The latter is only known to happen (after this patch)
in cases where the query would fail later due to not having any INSTEAD OF
triggers for the view. But by exactly that token, it would create an
unintended and very poorly tested state of the query data structure, so it
seems like a good idea to prevent it from happening at all. This has been
broken since ON CONFLICT was introduced, so back-patch to 9.5. Dean Rasheed,
based on an earlier patch by Amit Langote; comment-kibitzing and back-patching
by me Discussion:
https://postgr.es/m/CAFYwGJ0xfzy8jaK80hVN2eUWr6huce0RU8AgU04MGD00igqkTg@mail.gmail.com
https://git.postgresql.org/pg/commitdiff/b8a1247a34e234be6becf7f70b9f1e8e9369db64

- Update version 11 release notes. Remove description of commit 1944cdc98,
which has now been back-patched so it's not relevant to v11 any longer. Add
descriptions of other recent commits that seemed worth mentioning. I marked
the update as stopping at 2018-07-30, because it's unclear whether d06eebce5
will be allowed to stay in v11, and I didn't feel like putting effort into
writing a description of it yet. If it does stay, I think it will deserve
mention in the Source Code section.
https://git.postgresql.org/pg/commitdiff/7a46068f47a2e407d80d9d552727dc102188bec2

- Doc: fix incorrectly stated argument list for pgcrypto's hmac() function. The
bytea variant takes (bytea, bytea, text). Per unsigned report. Discussion:
https://postgr.es/m/153344327294.1404.654155870612982042@wrigleys.postgresql.org
https://git.postgresql.org/pg/commitdiff/a3274e0d28871f25c4c76e335b39766d7e5be07c

- Release notes for 10.5, 9.6.10, 9.5.14, 9.4.19, 9.3.24.

Álvaro Herrera pushed:

- Set ActiveSnapshot when logically replaying inserts. Input functions for the
inserted tuples may require a snapshot, when they are replayed by native
logical replication. An example is a domain with a constraint using a
SQL-language function, which prior to this commit failed to apply on the
subscriber side. Reported-by: Mai Peng <maily(dot)peng(at)webedia-group(dot)com>
Co-authored-by: Minh-Quan TRAN <qtran(at)itscaro(dot)me> Co-authored-by: Álvaro
Herrera <alvherre(at)alvh(dot)no-ip(dot)org> Discussion:
https://postgr.es/m/4EB4BD78-BFC3-4D04-B8DA-D53DF7160354@webedia-group.com
Discussion:
https://postgr.es/m/153211336163.1404.11721804383024050689@wrigleys.postgresql.org
https://git.postgresql.org/pg/commitdiff/4f10e7ea7b2231f453bb18b6e710ac333eaf121b

- Verify range bounds to bms_add_range when necessary. Now that the
bms_add_range boundary protections are gone, some alternative ones are needed
in a few places. Author: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Discussion:
https://postgr.es/m/3437ccf8-a144-55ff-1e2f-fc16b437823b@lab.ntt.co.jp
https://git.postgresql.org/pg/commitdiff/d25d45e4d9221948e6b0d80ce22ce559e99c2f48

- Change bms_add_range to be a no-op for empty ranges. In commit 84940644de93,
bms_add_range was added with an API to fail with an error if an empty range
was specified. This seems arbitrary and unhelpful, so turn that case into a
no-op instead. Callers that require further verification on the arguments or
result can apply them by themselves. This fixes the bug that partition
pruning throws an API error for a case involving the default partition of a
default partition, as in the included test case. Reported-by: Rajkumar
Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com> Diagnosed-by: Tom Lane
<tgl(at)sss(dot)pgh(dot)pa(dot)us> Discussion:
https://postgr.es/m/16590.1532622503@sss.pgh.pa.us
https://git.postgresql.org/pg/commitdiff/1b68010518c9d2ede24e6c721a9c0dc82c358fb1

- Fix typo in file identification and copyright year.
https://git.postgresql.org/pg/commitdiff/23ca82d7ef6c386f2995b812d93426a349e17438

- Fix per-tuple memory leak in partition tuple routing. Some operations were
being done in a longer-lived memory context, causing intra-query leaks. It's
not noticeable unless you're doing a large COPY, but if you are, it eats
enough memory to cause a problem. Co-authored-by: Kohei KaiGai
<kaigai(at)heterodb(dot)com> Co-authored-by: Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> Co-authored-by: Álvaro Herrera
<alvherre(at)alvh(dot)no-ip(dot)org> Discussion:
https://postgr.es/m/CAOP8fzYtVFWZADq4c=KoTAqgDrHWfng+AnEPEZccyxqxPVbbWQ@mail.gmail.com
https://git.postgresql.org/pg/commitdiff/1c9bb02d8ec1d5b1b319e4fed70439a403c245b1

- Fix unnoticed variable shadowing in previous commit. Per buildfarm.
https://git.postgresql.org/pg/commitdiff/91bc213d90c5a8f2b2e162d4ecf09b9301027ceb

- Fix logical replication slot initialization. This was broken in commit
9c7d06d60680, which inadvertently gave the wrong value to fast_forward in one
StartupDecodingContext call. Fix by flipping the value. Add a test for the
obvious error, namely trying to initialize a replication slot with an
nonexistent output plugin. While at it, move the CreateDecodingContext call
earlier, so that any errors are reported before sending the CopyBoth message.
Author: Dave Cramer <davecramer(at)gmail(dot)com> Reviewed-by: Andres Freund
<andres(at)anarazel(dot)de> Discussion:
https://postgr.es/m/CADK3HHLVkeRe1v4P02-5hj55H3_yJg3AEtpXyEY5T3wuzO2jSg@mail.gmail.com
https://git.postgresql.org/pg/commitdiff/c40489e449ea08e154cd62fa055785873f7bdac8

- Fix pg_replication_slot example output. The example output of
pg_replication_slot is wrong. Correct it and make the output stable by
explicitly listing columns to output. Author: Kyotaro Horiguchi
<horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> Reviewed-by: Michael Paquier
<michael(at)paquier(dot)xyz> Discussion:
https://postgr.es/m/20180731.190909.42582169.horiguchi.kyotaro@lab.ntt.co.jp
https://git.postgresql.org/pg/commitdiff/416db2412bdae1cfb6bd18203a15fb6617935690

- Add 'n' to list of possible values to pg_default_acl.defaclobjtype. This was
missed in commit ab89e465cb20; backpatch to v10. Author: Fabien Coelho
<coelho(at)cri(dot)ensmp(dot)fr> Discussion:
https://postgr.es/m/alpine.DEB.2.21.1807302243001.13230@lancre
https://git.postgresql.org/pg/commitdiff/f6f8d55c4b47454f0e22bbabdc6a5711848b4931

Andrew Dunstan pushed:

- Provide a log_level setting for auto_explain. Up to now the log level has
been hardcoded at LOG. A new auto_explain.log_level setting allows that to be
modified. Discussion:
https://postgr.es/m/CAPPfruyZh+snR2AdmutrA0B_caj=yWZkLqxUTZYNjJCaQ_wKQg@mail.gmail.com
Tom Dunstan and Andrew Dunstan Reviewed by Daniel Gustafsson
https://git.postgresql.org/pg/commitdiff/2d36a5e9dab6eda817b3d72a2d0f42c3d0cd922c

- Remove SGMLism from commit 2d36a5e9dab6.
https://git.postgresql.org/pg/commitdiff/ed0cfde2e7fca2c129e560491bbb15331f2ff2f4

Andrew Gierth pushed:

- Provide for contrib and pgxs modules to install include files. This allows
out-of-tree PLs and similar code to get access to definitions needed to work
with extension data types. The following existing modules now install
headers: contrib/cube, contrib/hstore, contrib/isn, contrib/ltree,
contrib/seg. Discussion:
https://postgr.es/m/87y3euomjh.fsf%40news-spur.riddles.org.uk
https://git.postgresql.org/pg/commitdiff/df163230b92b79468c241e9480e7fb85b7614440

Bruce Momjian pushed:

- pg_upgrade: fix --check for live source server checks. Fix for commit
244142d32afd02e7408a2ef1f249b00393983822. Backpatch-through: 9.3
https://git.postgresql.org/pg/commitdiff/b6d6488a3a7077fb2305c360c241a0789d7b657e

Robert Haas pushed:

- Update parallel.sgml for Parallel Append. Patch by me, reviewed by Thomas
Munro, in response to a complaint from Adrien Nayrat. Discussion:
http://postgr.es/m/baa0d036-7349-f722-ef88-2d8bb3413045@anayrat.info
https://git.postgresql.org/pg/commitdiff/e80f2b335ecd410b76f7812f728aa4d585ef6f28

Thomas Munro pushed:

- Add missing header include to pmsignal.h. pmsignal.h uses sig_atomic_t in
some builds, but relied on signal.h having been included already. We could
include it conditionally but evidently that wouldn't save anything in practice
and would add more ugly macros, so let's just include signal.h always.
Reported-by: Tom Lane Discussion:
https://postgr.es/m/4166.1533154074%40sss.pgh.pa.us
https://git.postgresql.org/pg/commitdiff/579b985b22928ef2aecacb679ac65e6a48b00113

Amit Kapila pushed:

- Match the buffer usage tracking for leader and worker backends. In the leader
backend, we don't track the buffer usage for ExecutorStart phase whereas in
worker backend we track it for ExecutorStart phase as well. This leads to
different value for buffer usage stats for the parallel and non-parallel
query. Change the code so that worker backend also starts tracking buffer
usage after ExecutorStart. Author: Amit Kapila and Robert Haas Reviewed-by:
Robert Haas and Andres Freund Backpatch-through: 9.6 where this code was
introduced Discussion:
https://postgr.es/m/86137f17-1dfb-42f9-7421-82fd786b04a1@anayrat.info
https://git.postgresql.org/pg/commitdiff/ccc84a956b00bdd4c162ca8951dd1ff7890cb51f

- Fix buffer usage stats for parallel nodes. The buffer usage stats is
accounted only for the execution phase of the node. For Gather and Gather
Merge nodes, such stats are accumulated at the time of shutdown of workers
which is done after execution of node due to which we missed to account them
for such nodes. Fix it by treating nodes as running while we shut down them.
We can also miss accounting for a Limit node when Gather or Gather Merge is
beneath it, because it can finish the execution before shutting down such
nodes. So we allow a Limit node to shut down the resources before it
completes the execution. In the passing fix the gather node code to allow
workers to shut down as soon as we find that all the tuples from the workers
have been retrieved. The original code use to do that, but is accidently
removed by commit 01edb5c7fc. Reported-by: Adrien Nayrat Author: Amit Kapila
and Robert Haas Reviewed-by: Robert Haas and Andres Freund Backpatch-through:
9.6 where this code was introduced Discussion:
https://postgr.es/m/86137f17-1dfb-42f9-7421-82fd786b04a1@anayrat.info
https://git.postgresql.org/pg/commitdiff/85c9d3475e4f680dbca7c04fe096af018f3b8760

Peter Geoghegan pushed:

- Add table relcache invalidation to index builds. It's necessary to make sure
that owning tables have a relcache invalidation prior to advancing the command
counter to make newly-entered catalog tuples for the index visible. inval.c
must be able to maintain the consistency of the local caches in the event of
transaction abort. There is usually only a problem when CREATE INDEX
transactions abort, since there is a generic invalidation once we reach
index_update_stats(). This bug is of long standing. Problems were made much
more likely by the addition of parallel CREATE INDEX (commit 9da0cc35284), but
it is strongly suspected that similar problems can be triggered without
involving plan_create_index_workers(). (plan_create_index_workers() triggers
a relcache build or rebuild, which previously only happened in rare edge
cases.) Author: Peter Geoghegan Reported-By: Luca Ferrari Diagnosed-By: Andres
Freund Reviewed-By: Andres Freund Discussion:
https://postgr.es/m/CAKoxK+5fVodiCtMsXKV_1YAKXbzwSfp7DgDqUmcUAzeAhf=HEQ@mail.gmail.com
Backpatch: 9.3-
https://git.postgresql.org/pg/commitdiff/b3f919da07540d7c968e8495482336304badcef7

Noah Misch pushed:

- Make "kerberos" test suite independent of "localhost" name resolution. This
suite malfunctioned if the canonical name of "localhost" was something other
than "localhost", such as "localhost.localdomain". Use hostaddr=127.0.0.1 and
a fictitious host=, so the resolver's answers for "localhost" don't affect the
outcome. Back-patch to v11, which introduced this test suite. Discussion:
https://postgr.es/m/20180801050903.GA1392916@rfd.leadboat.com
https://git.postgresql.org/pg/commitdiff/e61f21b921aebc0870d3ac47f77fc17e75e2fefb

Michaël Paquier pushed:

- Reset properly errno before calling write(). 6cb3372 enforces errno to ENOSPC
when less bytes than what is expected have been written when it is unset,
though it forgot to properly reset errno before doing a system call to
write(), causing errno to potentially come from a previous system call.
Reported-by: Tom Lane Author: Michael Paquier Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/31797.1533326676@sss.pgh.pa.us
https://git.postgresql.org/pg/commitdiff/5a23c74b63ec9f63c648f79b13a900c37332ee55

Heikki Linnakangas pushed:

- Remove support for tls-unique channel binding. There are some problems with
the tls-unique channel binding type. It's not supported by all SSL libraries,
and strictly speaking it's not defined for TLS 1.3 at all, even though at
least in OpenSSL, the functions used for it still seem to work with TLS 1.3
connections. And since we had no mechanism to negotiate what channel binding
type to use, there would be awkward interoperability issues if a server only
supported some channel binding types. tls-server-end-point seems feasible to
support with any SSL library, so let's just stick to that. This removes the
scram_channel_binding libpq option altogether, since there is now only one
supported channel binding type. This also removes all the channel binding
tests from the SSL test suite. They were really just testing the
scram_channel_binding option, which is now gone. Channel binding is used if
both client and server support it, so it is used in the existing tests. It
would be good to have some tests specifically for channel binding, to make
sure it really is used, and the different combinations of a client and a
server that support or doesn't support it. The current set of settings we have
make it hard to write such tests, but I did test those things manually, by
disabling HAVE_BE_TLS_GET_CERTIFICATE_HASH and/or
HAVE_PGTLS_GET_PEER_CERTIFICATE_HASH. I also removed the
SCRAM_CHANNEL_BINDING_TLS_END_POINT constant. This is a matter of taste, but
IMO it's more readable to just use the "tls-server-end-point" string.
Refactor the checks on whether the SSL library supports the functions needed
for tls-server-end-point channel binding. Now the server won't advertise, and
the client won't choose, the SCRAM-SHA-256-PLUS variant, if compiled with an
OpenSSL version too old to support it. In the passing, add some sanity checks
to check that the chosen SASL mechanism, SCRAM-SHA-256 or SCRAM-SHA-256-PLUS,
matches whether the SCRAM exchange used channel binding or not. For example,
if the client selects the non-channel-binding variant SCRAM-SHA-256, but in
the SCRAM message uses channel binding anyway. It's harmless from a security
point of view, I believe, and I'm not sure if there are some other conditions
that would cause the connection to fail, but it seems better to be strict
about these things and check explicitly. Discussion:
https://www.postgresql.org/message-id/ec787074-2305-c6f4-86aa-6902f98485a4%40iki.fi
https://git.postgresql.org/pg/commitdiff/77291139c7c1dffac61e8db88cef98933677db18

- Remove now unused check for HAVE_X509_GET_SIGNATURE_NID in test. I removed
the code that used this in the previous commit. Spotted by Michael Paquier.
https://git.postgresql.org/pg/commitdiff/6b9eb503d28b1e6d94961d2aee833c931a887ee6

== Pending Patches ==

Andrey Borodin sent in another revision of a patch to implement covering GiST
indexes.

Justin Pryzby sent in another revision of a patch to improve psql's tab
completion for partitioned tables.

Liudmila Mantrova sent in a patch to improve the documentation of covering
indexes.

Alexander Kuzmenkov sent in another revision of a patch to separate the concepts
of "mergejoinable clause" and "equivalence clause," then use that separation to
implement merge joins on inequality clauses.

Michaël Paquier sent in a patch to make autovacuum more aggressive to remove
orphaned temp tables.

Tatsuo Ishii sent in two revisions of a patch to add a note to protocol.sgml
regarding CopyData.

Robert Haas sent in another revision of a patch to document Parallel Append.

Michaël Paquier sent in a patch to restrict access to reindex of shared catalogs
for non-privileged users.

Amit Langote and David Rowley traded patches to speed up INSERTs and UPDATEs to
partitioned tables.

Amit Langote sent in two more revisions of a patch to add assorted partition
reporting functions.

Andrey V. Lepikhov sent in another revision of a patch to reduce amount of WAL
generated by CREATE INDEX for gist, gin and sp-gist.

Daniel Vérité sent in a patch to add RECURSIVE to the bookindex part of the
documentation source.

Fabien COELHO sent in a patch to make psql's \dp/\z do a better job of
describing permissions including the default ones.

MyungKyu LIM sent in two revisions of a patch to add a creation timestamp column
to pg_stat_replication.

Kyotaro HORIGUCHI sent in another revision of a patch to add a WAL relief vent
for replication slots, a monitoring aid for max_slot_wal_keep_size, TAP test for
the slot limit feature, and documentation for same.

Fabien COELHO sent in two revisions of a patch to improve the documentation of
the description of default privileges.

Andrey Borodin sent in another revision of a patch to implement GiST VACUUM.

Paul Guo sent in a patch to fix a pg_ugprade test failure on a data set with
column with default value with type bit/varbit.

Kyotaro HORIGUCHI sent in another revision of a patch to fix a race condition in
updates of the fullPageWrites flag. This race could cause a crash.

Alexander Kukushkin sent in a patch to add a replication_reserved_connections
GUC.

Alexander Lakhin sent in another revision of a patch to ensure that make
installcheck-world always works in a clean environment.

Marco van Eck sent in another revision of a patch to add a PGPASSCOMMAND
parameter.

Paul Guo sent in a patch to create a new session in postmaster by calling
setsid().

Nikhil Sontakke sent in two more revisions of a patch to implement logical
decoding of two-phase transactions.

Artur Zakirov and Alexander Korotkov traded patches to fix a bug in
to_timestamp().

Konstantin Knizhnik sent in two more revisions of a patch to implement
autoprepare.

Emre Hasegeli sent in another revision of a patch to fix floating point handling
for several types.

Fabien COELHO sent in two revisions of a patch to add missing documentation for
"acldefault".

David Rowley sent in two revisions of a patch to fix a bug which manifested as
FailedAssertion on partprune.

Etsuro Fujita sent in another revision of a patch to redesign partition-wise
join child tlist handling.

Daniel Vérité sent in another revision of a patch to make it possible to use ICU
as the default collation provider.

David Rowley sent in a patch to implement ATTACH/DETACH PARTITION CONCURRENTLY.

Álvaro Herrera sent in a patch to have heap_xlog_visible compute free space for
any page being marked frozen, and make heap_xlog_clean compute free space for
all pages.

Alexandra Ryzhevich sent in two revisions of a patch to add regress tests for
the pg_read_all_stats role.

Simon Muller sent in another revision of a patch to allow COPY's 'text' format
to output a header.

David Fetter sent in another revision of a patch to add a new new auth option :
clientcert=verify-full.

Masahiko Sawada sent in another revision of a patch to support atomic commit
among multiple foreign servers.

Amit Langote sent in another revision of a patch to add pg_partition_children to
report partitions.

Dean Rasheed sent in a patch to implement multivariate MCV lists with base
frequencies.

Antonin Houska sent in another revision of a patch to push down aggregates below
joins.

Alexander Kuzmenkov sent in another revision of a patch to remove unique self
joins.

Etsuro Fujita sent in a patch to refuse partiton-wise joins when whole-row vars
are involved.

Andrew Dunstan sent in a patch to provide an --exclude-database option for
pg_dumpall.

Haribabu Kommi sent in a patch to support of passing slots instead of tuples
when doing multi insert and fix isolation tests in light of same.

Surafel Temesgen sent in a patch to implement ON CONFLICT IGNORE for COPY ...
FROM and add new GUC, copy_max_error_limit, to control same.

Andrew Gierth sent in a patch to fix the way PGXS builds of all the
contrib/*_pl{perl,python} modules with appropriate headers.

Browse pgsql-announce by date

  From Date Subject
Next Message Mahadevan Ramachandran 2018-08-07 07:34:00 pgmetrics 1.4 released
Previous Message Monica Real Amores 2018-07-31 14:33:06 repmgr 4.1 Now Available