== PostgreSQL Weekly News - May 17, 2020 == - Mailing list pgsql-announce

From David Fetter
Subject == PostgreSQL Weekly News - May 17, 2020 ==
Date
Msg-id 20200517191325.GA29444@fetter.org
Whole thread Raw
List pgsql-announce
== PostgreSQL Weekly News - May 17, 2020 ==

PostgreSQL security releases 12.3, 11.8, 10.13, 9.6.18, and 9.5.22 are out.
Upgrade as soon as possible.
https://www.postgresql.org/about/news/2038/

PGDay Russia has been postponed to July 9, 2021. It will still be held in St.
Petersburg.

A new Spanish language text, Fundamentos para el trabajo con PostgreSQL is out.
https://www.amazon.com/dp/B088JZZHSR/ref=sr_1_1?dchild=1&keywords=yudisney&qid=1589400405&sr=8-1

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

== PostgreSQL Product News ==

pgtt 2.1, an extension to implement global temporary tables, released.
https://github.com/darold/pgtt/releases/tag/v2.1

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

SQL Data Analysis 1.3, a business intelligence tool, released.
https://www.yohz.com/sda_details.htm

== PostgreSQL Jobs for May ==

http://archives.postgresql.org/pgsql-jobs/2020-05/

== PostgreSQL Local ==

PGCon 2020 will take place online on May 26-29, 2020.
https://www.pgcon.org/2020/

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/
https://2020.foss4g.org/

PGDay Ukraine will take place September 5th, 2020 in Lviv at the Bank Hotel.
https://pgday.org.ua/

pgDay Israel 2020 will take place on September 10, 2020 in Tel Aviv.
http://pgday.org.il/

PGDay Austria will take place September 18, 2020 at Schloss Schoenbrunn
(Apothekertrakt) in Vienna. The CfP is open through May 17, 2020.
https://pgday.at/en/

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
https://2020.pgconf.eu/

PG Day Russia will take place in Saint Petersburg on July 9, 2021.
https://pgday.ru/en/2020/

== PostgreSQL in the News ==

Planet PostgreSQL: http://planet.postgresql.org/

PostgreSQL Weekly News is brought to you this week by David Fetter

Submit news and announcements by Sunday at 3:00pm PST8PDT to david@fetter.org.

== Applied Patches ==

Tom Lane pushed:

- Doc: marginal hacking to remove some PDF build warnings. This patch eliminates
  a few more "exceed the available area" warnings whose causes aren't
  particularly connected to anything else.  The only one really worthy of
  comment is that I increased the space allowed for an <orderedlist>'s numbers,
  because the default of 1em doesn't quite work for more than one digit.  The
  rest are one-off insertions of &zwsp; and suchlike tweaks, in places where
  they shouldn't do any damage to the material.  (In particular, although I
  split some long identifiers with zwsp's, there are other nearby occurrences of
  each one; so those changes shouldn't hurt greppability of the document
  sources.)
  https://git.postgresql.org/pg/commitdiff/336aa51b70e9cf7da3969a3f102ff4913717083d

- Doc: fix "Unresolved ID reference" warnings, clean up man page cross-refs. Use
  xreflabel attributes instead of endterm attributes to control the appearance
  of links to subsections of SQL command reference pages. This is simpler, it
  matches what we do elsewhere (e.g. for GUC variables), and it doesn't draw
  "Unresolved ID reference" warnings from the PDF toolchain.  Fix some places
  where the text was absolutely dependent on an <xref> rendering exactly so, by
  using a <link> around the required text instead.  At least one of those spots
  had already been turned into bad grammar by subsequent changes, and the whole
  idea is just too fragile for my taste.  <xref> does NOT have fixed output,
  don't write as if it does.  Consistently include a page-level link in
  cross-man-page references, because otherwise they are useless/nonsensical in
  man-page output. Likewise, be consistent about mentioning "below" or "above"
  in same-page references; we were doing that in about 90% of the cases, but now
  it's 100%.  Also get rid of another nonfunctional-in-PDF idea, of making
  cross-references to functions by sticking ID tags on <row> constructs. We can
  put the IDs on <indexterm>s instead --- which is probably not any more
  sensible in abstract terms, but it works where the other doesn't. (There is
  talk of attaching cross-reference IDs to most or all of the docs' function
  descriptions, but for now I just fixed the two that exist.)  Discussion:
  https://postgr.es/m/14480.1589154358@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/60c90c16c1885bb9aa2047b66f958b865c5d397e

- Doc: fix remaining over-length entries in SQL keywords table. Even after the
  tweaking I did in commit 5545b69ae, some of the longer keywords mentioned in
  the SQL standard don't fit the available space in PDF output.  I experimented
  with various solutions like putting such keywords on their own table lines,
  but everything looked ugly or confusing or both; worse, the weirdness also
  appeared in the HTML version, which (normally) doesn't need it.  The best
  answer seems to be to insert &zwsp; into long keywords so that they can be
  broken into two lines when, and only when, needed.  It doesn't look too awful
  if the break happens after an underscore --- and fortunately, all the
  problematic keywords have underscores.  Discussion:
  https://postgr.es/m/6916.1589146280@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/4d1563717fb1860168a40b852e1d61a33ecdd62f

- Doc: hack table 13.2 "Conflicting Lock Modes" till it fits in PDF. I can't see
  any way to make this table fit in PDF column width without either a
  fundamental redesign or abbreviating EXCLUSIVE. So I did the latter.  It'd be
  nicer if the abbreviating didn't leak into the HTML output as well; but the
  hackery required to make the output different seems like more trouble than
  it's really worth.  Discussion:
  https://postgr.es/m/6916.1589146280@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/57775e82b235b2c815d9fd85cea53d77373a9203

- Do pre-release housekeeping on catalog data. Run renumber_oids.pl to move
  high-numbered OIDs down, as per pre-beta tasks specified by RELEASE_CHANGES.
  For reference, the command was ./renumber_oids.pl --first-mapped-oid=8000
  --target-oid=5032  Also run reformat_dat_file.pl while I'm here.  Renumbering
  recently-added types changed some results in the opr_sanity test.  To make
  those a bit easier to eyeball-verify, change the queries to show regtype not
  just bare type OIDs.  (I think we didn't have regtype when these queries were
  written.)
  https://git.postgresql.org/pg/commitdiff/7b48f1b490978a8abca61e9a9380f8de2a56f266

- Improve management of SLRU statistics collection. Instead of re-identifying
  which statistics bucket to use for a given SLRU on every counter increment, do
  it once during shmem initialization. This saves a fair number of cycles, and
  there's no real cost because we could not have a bucket assignment that varies
  over time or across backends anyway.  Also, get rid of the ill-considered
  decision to let pgstat.c pry directly into SLRU's shared state; it's cleaner
  just to have slru.c pass the stats bucket number.  In consequence of these
  changes, there's no longer any need to store an SLRU's LWLock tranche info in
  shared memory, so get rid of that, making this a net reduction in shmem
  consumption.  (That partly reverts fe702a7b3.)  This is basically code review
  for 28cac71bd, so I also cleaned up some comments, removed a dangling extern
  declaration, fixed some things that should be static and/or const, etc.
  Discussion: https://postgr.es/m/3618.1589313035@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/81ca8686305c4c62d723ab224ad5c414f350a3a0

- Fix async.c to not register any SLRU stats counts in the postmaster.
  Previously, AsyncShmemInit forcibly initialized the first page of the async
  SLRU, to save dealing with that case in asyncQueueAddEntries. But this is a
  poor tradeoff, since many installations do not ever use NOTIFY; for them,
  expending those cycles in AsyncShmemInit is a complete waste.  Besides, this
  only saves a couple of instructions in asyncQueueAddEntries, which hardly
  seems likely to be measurable.  The real reason to change this now, though, is
  that now that we track SLRU access stats, the existing code is causing the
  postmaster to accumulate some access counts, which then get inherited into
  child processes by fork(), messing up the statistics.  Delaying the
  initialization into the first child that does a NOTIFY fixes that.  Hence, we
  can revert f3d23d83e, which was an incorrect attempt at fixing that issue.
  Also, add an Assert to pgstat.c that should catch any future errors of the
  same sort.  Discussion: https://postgr.es/m/8367.1589391884@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/7fd89f4d7a51af77175a876613cffb490b9e5df1

- Doc: reformat catalog/view description tables. This changes our catalog and
  view descriptions to use a style inspired by the new format for
  function/operator tables: each table entry is formatted roughly like a
  <varlistentry>, with the column name and type on the first line and then an
  indented description.  This provides much more room for expansive descriptions
  than we had before, and thereby eliminates a passel of PDF build warnings.
  Discussion: https://postgr.es/m/12984.1588643549@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/a042750646db7ea28ff722855cf163401761937f

- Doc: split up wait_event table. The previous design for this table didn't
  really work in narrow views, such as PDF output; besides which its reliance on
  large morerows values made it a pain to maintain (cf ab3e4fbd5, for example).
  I experimented with a couple of ways to fix it, but the best and simplest is
  to split it up into a separate table for each event type category.  I also
  rearranged the event ordering to be strictly alphabetical, as nobody would
  ever be able to find entries otherwise.  There is work afoot to revise the set
  of event names described in this table, but this commit just changes the
  layout, not the contents.  In passing, add a missing entry to
  pg_locks.locktype, and cross-reference that to the related wait event list.
  Discussion: https://postgr.es/m/6916.1589146280@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/4fa8bd392d02637b4e4f27b79c06079e47765cbc

- Collect built-in LWLock tranche names statically, not dynamically. There is
  little point in using the LWLockRegisterTranche mechanism for built-in tranche
  names.  It wastes cycles, it creates opportunities for bugs (since failing to
  register a tranche name is a very hard-to-detect problem), and the lack of any
  centralized list of names encourages sloppy nonconformity in name choices.
  Moreover, since we have a centralized list of the tranches anyway in enum
  BuiltinTrancheIds, we're certainly not buying any flexibility in return for
  these disadvantages.  Hence, nuke all the backend-internal
  LWLockRegisterTranche calls, and instead provide a const array of the builtin
  tranche names.  (I have in mind to change a bunch of these names shortly, but
  this patch is just about getting them into one place.)  Discussion:
  https://postgr.es/m/9056.1589419765@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/29c3e2dd5a6aeaf1a23d7d83d665501e2dcc6955

- Initial pgindent and pgperltidy run for v13. Includes some manual cleanup of
  places that pgindent messed up, most of which weren't per project style
  anyway.  Notably, it seems some people didn't absorb the style rules of commit
  c9d297751, because there were a bunch of new occurrences of function calls
  with a newline just after the left paren, all with faulty expectations about
  how the rest of the call would get indented.
  https://git.postgresql.org/pg/commitdiff/5cbfce562f7cd2aab0cdc4694ce298ec3567930e

- Doc: tweak examples to silence line-too-long PDF build warnings. In one or two
  places it seemed reasonable to modify the example so as to shorten its output
  slightly; but for the most part I just added a &zwsp; after 67 characters,
  which is the most we can fit on a line of monospace text in A4 format.
  Discussion: https://postgr.es/m/6916.1589146280@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/3d14c174cbbb6f83d8ac63fa7d0e1f42e0ae8d30

- Doc: hack on table 26.1 till it fits in PDF format. I abbreviated the heck out
  of the column headings, and made a few small wording changes, to get it to
  build warning-free.  I can't say that the result is pretty, but it's probably
  better than removing this table entirely.  As of this commit, we have zero
  "exceed the available area" warnings in a US-letter PDF build, and one such
  warning (about an 863-millipoint overrun) in an A4 build.  I expect to get rid
  of that one by renaming wait events, so I'm not doing anything about it at the
  formatting level.  Discussion:
  https://postgr.es/m/6916.1589146280@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/2e619f86a96c32a710a09a4ff555952746813ba8

- Rename SLRU structures and associated LWLocks. Originally, the names assigned
  to SLRUs had no purpose other than being shmem lookup keys, so not a lot of
  thought went into them. As of v13, though, we're exposing them in the
  pg_stat_slru view and the pg_stat_reset_slru function, so it seems advisable
  to take a bit more care.  Rename them to names based on the associated on-disk
  storage directories (which fortunately we *did* think about, to some extent;
  since those are also visible to DBAs, consistency seems like a good thing).
  Also rename the associated LWLocks, since those names are likewise
  user-exposed now as wait event names.  For the most part I only touched
  symbols used in the respective modules' SimpleLruInit() calls, not the names
  of other related objects.  This renaming could have been taken further, and
  maybe someday we will do so. But for now it seems undesirable to change the
  names of any globally visible functions or structs, so some inconsistency is
  unavoidable.  (But I *did* terminate "oldserxid" with prejudice, as I found
  that name both unreadable and not descriptive of the SLRU's contents.)  Table
  27.12 needs re-alphabetization now, but I'll leave that till after the other
  LWLock renamings I have in mind.  Discussion:
  https://postgr.es/m/28683.1589405363@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/5da14938f7bfb96b648ee3c47e7ea2afca5bcc4a

- Rename assorted LWLock tranches. Choose names that fit into the conventions
  for wait event names (particularly, that multi-word names are in the style
  MultiWordName) and hopefully convey more information to non-hacker users than
  the previous names did.  Also rename SerializablePredicateLockListLock to
  SerializablePredicateListLock; the old name was long enough to cause table
  formatting problems, plus the double occurrence of "Lock" seems
  confusing/error-prone.  Also change a couple of particularly opaque LWLock
  field names.  Discussion: https://postgr.es/m/28683.1589405363@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/36ac359d3621578cefc2156a3917024cdd3b1829

- Fix bogus initialization of replication origin shared memory state. The
  previous coding zeroed out offsetof(ReplicationStateCtl, states) more bytes
  than it was entitled to, as a consequence of starting the zeroing from the
  wrong pointer (or, if you prefer, using the wrong calculation of how much to
  zero).  It's unsurprising that this has not caused any reported problems,
  since it can be expected that the newly-allocated block is at the end of what
  we've used in shared memory, and we always make the shmem block substantially
  bigger than minimally necessary.  Nonetheless, this is wrong and it could bite
  us someday; plus it's a dangerous model for somebody to copy.  This dates back
  to the introduction of this code (commit 5aa235042), so back-patch to all
  supported branches.
  https://git.postgresql.org/pg/commitdiff/8048404939bb0fcef80b0ab57910b6e10d4289a3

- Drop the redundant "Lock" suffix from LWLock wait event names. This was mostly
  confusing, especially since some wait events in this class had the suffix and
  some did not.  While at it, stop exposing MainLWLockNames[] as a globally
  visible name; any code using that directly is almost certainly wrong, as its
  name has been misleading for some time. (GetLWLockIdentifier() is what to use
  instead.)  Discussion: https://postgr.es/m/28683.1589405363@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/14a91010912632cae322b06fce0425faedcf7353

- Change locktype "speculative token" to "spectoken". It's just weird that this
  name wasn't chosen to look like an identifier.  The suspicion that it wasn't
  thought about too hard is reinforced by the fact that it wasn't documented in
  the pg_locks view (until I did so, a day or two back).  Update, and add a
  comment reminding future adjusters of this array to fix the docs too.  Do some
  desultory wordsmithing on various entries in the wait events tables.
  Discussion: https://postgr.es/m/24595.1589326879@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/474e7da6485687425d216eda1685d7e530b24fd6

- Final pgindent run with pg_bsd_indent version 2.1. This is just to provide a
  clean basis for comparison of the results of the new version.  I did fix a
  typo that crept into 242dfcbaf.  Discussion:
  https://postgr.es/m/20200114221814.GA19630@alvherre.pgsql
  https://git.postgresql.org/pg/commitdiff/e02ad575d8ab6b44500d2a3fd8c3212345e3aa2b

- Run pgindent with new pg_bsd_indent version 2.1.1. Thomas Munro fixed a
  longstanding annoyance in pg_bsd_indent, that it would misformat lines
  containing IsA() macros on the assumption that the IsA() call should be
  treated like a cast.  This improves some other cases involving field/variable
  names that match typedefs, too.  The only places that get worse are a couple
  of uses of the OpenSSL macro STACK_OF(); we'll gladly take that trade-off.
  Discussion: https://postgr.es/m/20200114221814.GA19630@alvherre.pgsql
  https://git.postgresql.org/pg/commitdiff/fa27dd40d5c5f56a1ee837a75c97549e992e32a4

- Fix bugs in OpenSSL hook renaming. libpq's exports.txt was overlooked in
  commit 36d108761, which the buildfarm is quite unhappy about.  Also, I'd
  gathered that the plan included renaming PQgetSSLKeyPassHook to
  PQgetSSLKeyPassHook_OpenSSL, but that didn't happen in the patch as committed.
  I'm taking it on my own authority to do so now, since the window before beta1
  is closing fast.
  https://git.postgresql.org/pg/commitdiff/e78b93094518b1e262cba8115470f252dde6f446

- Mop-up for wait event naming issues. Synchronize the event names for parallel
  hash join waits with other event names, by getting rid of the slashes and
  dropping "-ing" suffixes.  Rename ClogGroupUpdate to XactGroupUpdate, to match
  the new SLRU name.  Move the ProcSignalBarrier event to the IPC category; it
  doesn't belong under IO.  Also a bit more wordsmithing in the wait event
  documentation tables.  Discussion:
  https://postgr.es/m/4505.1589640417@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/3048898e73c75f54bb259323382e0e7f6368cb6f

Peter Eisentraut pushed:

- Translation updates. Source-Git-URL:
  https://git.postgresql.org/git/pgtranslation/messages.git Source-Git-Hash:
  80d8f54b3c5533ec036404bd3c3b24ff4825d037
  https://git.postgresql.org/pg/commitdiff/7a9c9ce6411720c2bbeaf6e64855d4263c47ea80

Álvaro Herrera pushed:

- Fix obsolete references to "XLogRead". The one in xlogreader.h was pointed out
  by Antonin Houska; I (Álvaro) noticed the others by grepping.  Author: Antonin
  Houska <ah@cybertec.at> Discussion: https://postgr.es/m/28250.1589186654@antos
  https://git.postgresql.org/pg/commitdiff/a8be5364ac1678e35029f547632d4002552f943c

- Add -Wimplicit-fallthrough to CFLAGS and CXXFLAGS. Use it at level 4, a bit
  more restrictive than the default level, and tweak our commanding comments to
  FALLTHROUGH.  (However, leave zic.c alone, since it's external code; to avoid
  the warnings that would appear there, change CFLAGS for that file in the
  Makefile.)  Author: Julien Rouhaud <rjuju123@gmail.com> Author: Álvaro Herrera
  <alvherre@alvh.no-ip.org> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
  Discussion: https://postgr.es/m/20200412081825.qyo5vwwco3fv4gdo@nol
  Discussion: https://postgr.es/m/flat/E1fDenm-0000C8-IJ@gemulon.postgresql.org
  https://git.postgresql.org/pg/commitdiff/3e9744465dbe51822c7d76baca1f934d54ba9452

- Fix straggler. contrib/pgcrypto did contain an unedited fall-through marker
  after all.
  https://git.postgresql.org/pg/commitdiff/87c291e29d6bf403c6adefd81ddafa134c254a3e

- Adjust walsender usage of xlogreader, simplify APIs. * Have both physical and
  logical walsender share a 'xlogreader' state   struct for tracking state.
  This replaces the existing globals sendSeg   and sendCxt.  * Change WALRead
  not to receive XLogReaderState->seg and ->segcxt as   separate arguments
  anymore; just use the ones from 'state'.  This is   made possible by the above
  change.  * have the XLogReader segment_open contract require the callbacks to
  install the file descriptor in the state struct themselves instead of
  returning it.  xlogreader was already ignoring any possible failed   return
  from the callbacks, relying solely on them never returning.    (This point is
  not altogether excellent, as it means the callbacks   have to know more of
  XLogReaderState; but to really improve on that   we would have to pass back
  error info from the callbacks to   xlogreader.  And the complexity would not
  be saved but instead just   transferred to the callers of WALRead, which would
  have to learn how   to throw errors from the open_segment callback in addition
  of, as   currently, from pg_pread.)  * segment_open no longer receives the
  'segcxt' as a separate argument,   since it's part of the XLogReaderState
  argument.  Per comments from Kyotaro Horiguchi.  Author: Álvaro Herrera
  <alvherre@alvh.no-ip.org> Discussion:
  https://postgr.es/m/20200511203336.GA9913@alvherre.pgsql
  https://git.postgresql.org/pg/commitdiff/850196b610d2a1802b4ed7f9f608153a949eda34

- Dial back -Wimplicit-fallthrough to level 3. The additional pain from level 4
  is excessive for the gain.  Also revert all the source annotation changes to
  their original wordings, to avoid back-patching pain.  Discussion:
  https://postgr.es/m/31166.1589378554@sss.pgh.pa.us
  https://git.postgresql.org/pg/commitdiff/17cc133f017cb13737e23ce0da4415daf2c34cc3

- Review of the glossary. Add some more terms, clarify some definitions, remove
  redundant terms, move a couple of terms to keep alphabetical order.
  Co-authored-by: Jürgen Purtz <juergen@purtz.de> Co-authored-by: Erik Rijkers
  <er@xs4all.nl> Co-authored-by: Laurenz Albe <laurenz.albe@cybertec.at>
  Discussion: https://postgr.es/m/7b9b469e804777ac9df4d37716db935e@xs4all.nl
  https://git.postgresql.org/pg/commitdiff/756abe2bc7608b38c579c510eb66f2bd80d10785

- Avoid killing btree items that are already dead. _bt_killitems marks btree
  items dead when a scan leaves the page where they live, but it does so with
  only share lock (to improve concurrency). This was historicall okay, since
  killing a dead item has no consequences.  However, with the advent of data
  checksums and wal_log_hints, this action incurs a WAL full-page-image record
  of the page.  Multiple concurrent processes would write the same page several
  times, leading to WAL bloat.  The probability of this happening can be reduced
  by only killing items if they're not already dead, so change the code to do
  that.  The problem could eliminated completely by having _bt_killitems upgrade
  to exclusive lock upon seeing a killable item, but that would reduce
  concurrency so it's considered a cure worse than the disease.  Backpatch all
  the way back to 9.5, since wal_log_hints was introduced in 9.4.  Author:
  Masahiko Sawada <masahiko.sawada@2ndquadrant.com> Discussion:
  https://postgr.es/m/CA+fd4k6PeRj2CkzapWNrERkja5G0-6D-YQiKfbukJV+qZGFZ_Q@mail.gmail.com
  https://git.postgresql.org/pg/commitdiff/242dfcbafac592a3f097ec2e4e36fe1b739f7f29

- Add comments linking pg_strftime to timestamptz_to_str.
  https://git.postgresql.org/pg/commitdiff/a0ab4f4909a3f52e8b8243d2ae2dbb6f5027136c

- Fix walsender error cleanup code. In commit 850196b610d2 I (Álvaro) failed to
  handle the case of walsender shutting down on an error before setting up its
  'xlogreader' pointer; the error handling code dereferences the pointer,
  causing a crash. Fix by testing the pointer before trying to dereference it.
  Kyotaro authored the code fix; I adopted Nathan's test case to be used by the
  TAP tests and added the necessary PostgresNode change.  Reported-by: Nathan
  Bossart <bossartn@amazon.com> Author: Kyotaro Horiguchi
  <horikyota.ntt@gmail.com> Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
  Discussion:
  https://postgr.es/m/C04FC24E-903D-4423-B312-6910E4D846E5@amazon.com
  https://git.postgresql.org/pg/commitdiff/1d3743023ef8fa665902e791b0d52e9a1ab419cb

- Fix typo in glossary. Reported privately by Justin Pryzby
  https://git.postgresql.org/pg/commitdiff/1cbc143f06113cbd1b94790c0781aa4b410cffc2

- Fix more typos and grammar problems in the glossary. Author: Erik Rijkers
  <er@xs4all.nl> Discussion:
  https://postgr.es/m/508f2fb1764c3bd518ee96a4f2247d6f@xs4all.nl
  https://git.postgresql.org/pg/commitdiff/eeba6c7e4366057a09c53efe11f144db55e68c5e

Peter Geoghegan pushed:

- Adjust "root of to-be-deleted subtree" function. Restructure the function that
  locates the root of the to-be-deleted subtree during nbtree page deletion.
  Handle the conditions that make page deletion unsafe in a slightly more
  uniform way, and acknowledge the fact that the behavior with incomplete splits
  on internal pages is different (as pointed out in the nbtree README as of
  commit 35bc0ec7). Also invent new terminology that avoids ambiguity around
  which pages are about to be deleted.  Consistently use the term "to-be-deleted
  subtree", not the ambiguous term "branch".  We were calling the subtree parent
  page the "top parent page", but that was quite misleading.  The top parent
  page usually refers to a page unlinked from its siblings and marked deleted
  (during the second stage of page deletion).  There was one kind of top parent
  page that we merely removed a downlink from, and another kind of top parent
  page that we actually marked deleted.  Eliminate the ambiguity by inventing a
  new term ("subtree parent page") that refers to the former kind of page only.
  https://git.postgresql.org/pg/commitdiff/624686abcf87d26fe7c03543c4a54aad2237cb93

Bruce Momjian pushed:

- doc:  PG 13 relnotes:  cumulative fixes from email feedback.
  https://git.postgresql.org/pg/commitdiff/ca4599b0dcc4ed44e24cc4f2cd39677a19356324

- doc:  PG 13 relnotes:  add duplicate btree optimization details.
  https://git.postgresql.org/pg/commitdiff/aa976d3b9004bd2c275e4ad17fa897ce5fe5127e

- doc:  PG 13 relnotes:  add documentation section and reformat. Add section
  about function table reformatting.
  https://git.postgresql.org/pg/commitdiff/b89d90b051a1da7a447b25dc749ce42ccb4dc5bd

- docs:  PG 13 relnotes:  adjust wal_skip_threshold and UTF8 items.
  https://git.postgresql.org/pg/commitdiff/ac3a4866c0bf1d7a14009f18d3b42ffcb063a7e9

- doc:  PG 13 relnotes:  adjust wal_skip_threshold wording.
  https://git.postgresql.org/pg/commitdiff/d82a5058fdb5905abc9867da302000c39aa30f01

- doc:  PG 13 relnotes:  move docbook version change to doc sect.
  https://git.postgresql.org/pg/commitdiff/1255466f8358ecac29581aa5ecec76628dc2e33c

- docs:  PG 13 relnotes:  add links and SGML formatting.
  https://git.postgresql.org/pg/commitdiff/39e7bcbbff82e25441529349134bf41fc336169b

- doc:  PG 13 relnotes:  fix xref link and remove extra word.
  https://git.postgresql.org/pg/commitdiff/ec5afb0a4e050616fe6953e597fd1f61d47edc3a

- doc:  make ref/*.sgml file header comment layout consistent.
  https://git.postgresql.org/pg/commitdiff/8d4b23fcae1f368122eb900489d6d24df75cff13

- doc:  remove extra blank line at the top of SGML files. Backpatch-through: 9.5
  https://git.postgresql.org/pg/commitdiff/e936fcb54d22561ad49c6c18f91dcb7566a58da1

- doc:  PG 13 relnotes:  final SGML indenting adjustments.
  https://git.postgresql.org/pg/commitdiff/e90807085c7f398c52a1567daf9cacff578031cf

- doc:  PG 13 relnotes:  fix uuid item.
  https://git.postgresql.org/pg/commitdiff/065ea0c30d2c8290af368721708bd369b5020996

- doc: PG 13 relnotes:  adjust UUID item, again.
  https://git.postgresql.org/pg/commitdiff/bc1c1de2cc30411bc5551ce1c7443914efa1fb86

- doc:  add missing xreflabels to the main docs (not refs). Add missing
  xreflabels for index types, geqo, libpq, spi, server-side languages, ecpg, and
  vaacuumlo.  Backpatch-through: 9.5
  https://git.postgresql.org/pg/commitdiff/75fcdd2ae2174c49a56acb4d10c920a6a45570f7

- docs:  add xreflabel entries for autovacuum, SP-GiST, and TOAST. This is for
  use by the PG 13 release notes, but might be used for minor release notes in
  the future.  Backpatch-through: 9.5
  https://git.postgresql.org/pg/commitdiff/85af628da5e8dfea068559d076ad26b9a3378bfc

- doc:  PG 13 rels:  use xref labels referencing ref/*.sgml files. This avoids
  using <link> and supplied text.
  https://git.postgresql.org/pg/commitdiff/6755b618997424b9e651126f59bf4109d680fffe

Fujii Masao pushed:

- Correct standbycheck regression test output. Commit 2eb34ac369 changed error
  messages emit when commands are rejected during recovery. But it forgot to
  update the standbycheck regression test output with those error message
  changes.  Reported-by: Michail Nikolaev Author: Michail Nikolaev Reviewed-by:
  Fujii Masao Discussion:
  https://postgr.es/m/CANtu0ojFPgcspH=0nNZ+qmu0XD69sXKtVttuSoYKHawRADSQGg@mail.gmail.com
  https://git.postgresql.org/pg/commitdiff/81ec990a23b9cbfaa5684e90091164f1d85f24d3

- Initialize SLRU stats entries to zero. Previously since SLRUStats was not
  initialized, SLRU stats counters could begin with non-zero value. Which could
  lead to incorrect results in pg_stat_slru view.  Author: Fujii Masao
  Reviewed-by: Tomas Vondra Discussion:
  https://postgr.es/m/976bbb73-a112-de3c-c488-b34b64609793@oss.nttdata.com
  https://git.postgresql.org/pg/commitdiff/f3d23d83ef9a33344391acbaa92a6235a4350791

- Use proper GetDatum function in pg_stat_get_slru(). This commit changes
  pg_stat_get_slru() so that it uses TimestampTzGetDatum() for stats_reset field
  because that field stores the timestamp with time zone value. Previously
  Int64GetDatum() was used.  Author: Fujii Masao Reviewed-by: Tomas Vondra
  Discussion:
  https://postgr.es/m/b8784fe6-1401-ab35-aa14-d57b5bb8e312@oss.nttdata.com
  https://git.postgresql.org/pg/commitdiff/043e3e04016077735f986726a3a74192c295ace7

Michaël Paquier pushed:

- Fix comment in xlogutils.c. The existing callers of
  XLogReadDetermineTimeline() performing recovery need to check a replay LSN
  position when determining on which timeline to read a WAL page.  A portion of
  the comment describing this function said exactly that, while referring to a
  routine for fetching a write LSN, something not available in recovery.
  Author: Kyotaro Horiguchi Discussion:
  https://postgr.es/m/20200511.101619.2043820539323292957.horikyota.ntt@gmail.com
  https://git.postgresql.org/pg/commitdiff/078c9cd258e5ad8f54081c971b7b927f845e7505

- Doc: Fix some inconsistencies with markups. This addresses some whitespace
  issues with programlisting, and corrects the spelling of "Enter PEM pass
  phrase" to be consistent with the code.  Author: Daniel Gustafsson Discussion:
  https://postgr.es/m/401F9024-20EA-4239-83C4-6B7AD35F94BD@yesql.se
  https://git.postgresql.org/pg/commitdiff/07451e1f1adc4ff832196f1f47def13e49d2ed38

- Remove duplicated comment block in event_trigger.c. The reasons why event
  triggers are disabled in standalone mode are documented in the code path of
  ddl_command_start, and other places checking if standalone mode is enabled or
  not mention to refer to the comment for ddl_command_start, except for
  table_rewrite that duplicated the same explanation.  Reported-by: David G.
  Johnston Discussion:
  https://postgr.es/m/CAKFQuwYqHtXpvr2mBJRwH9f+Y5y1GXw3rhbaAu0Dk2MoNevsmA@mail.gmail.com
  https://git.postgresql.org/pg/commitdiff/ff87fabef20ef40c8438e25fe28e9159f874183d

- Fix assertion with relation using REPLICA IDENTITY FULL in subscriber. In a
  logical replication subscriber, a table using REPLICA IDENTITY FULL which has
  a primary key would try to use the primary key's index available to scan for a
  tuple, but an assertion only assumed as correct the case of an index
  associated to REPLICA IDENTITY USING INDEX.  This commit corrects the
  assertion so as the use of a primary key index is a valid case.  Reported-by:
  Dilip Kumar Analyzed-by: Dilip Kumar Author: Euler Taveira Reviewed-by:
  Michael Paquier, Masahiko Sawada Discussion:
  https://postgr.es/m/CAFiTN-u64S5bUiPL1q5kwpHNd0hRnf1OE-bzxNiOs5zo84i51w@mail.gmail.com
  Backpatch-through: 10
  https://git.postgresql.org/pg/commitdiff/7ccb2f54d9f3f3c5b4ac092d62c846b02a47f8d5

- Make pg_stat_wal_receiver consistent with the WAL receiver's shmem info.
  d140f2f3 has renamed receivedUpto to flushedUpto, and has added writtenUpto to
  the WAL receiver's shared memory information, but pg_stat_wal_receiver was not
  consistent with that.  This commit renames received_lsn to flushed_lsn, and
  adds a new column called written_lsn.  Bump catalog version.  Author: Michael
  Paquier Reviewed-by: Álvaro Herrera Discussion:
  https://postgr.es/m/20200515090817.GA212736@paquier.xyz
  https://git.postgresql.org/pg/commitdiff/2c8dd05d6cbc86b7ad21cfd7010e041bb4c3950b

Etsuro Fujita pushed:

- Remove unnecessary #include. My oversight in commit c8434d64c.
  https://git.postgresql.org/pg/commitdiff/2793bbe75e276476877ff9af6bb7effe92eff782

Tomáš Vondra pushed:

- Fix typos and improve incremental sort comments. Author: Justin Pryzby, James
  Coleman Discussion: https://postgr.es/m/20200419023625.GP26953@telsasoft.com
  https://git.postgresql.org/pg/commitdiff/1a40d37a9faff562a36bd255a993fd3503bdf2b1

- Rework EXPLAIN format for incremental sort. The explain format used by
  incremental sort was somewhat inconsistent with other nodes, making it harder
  to parse and understand. This commit addresses that by   - adding an extra
  space to better separate groups of values   - using colons instead of equal
  signs to separate key/value   - properly capitalizing first letter of a key
  - using separate lines for full and pre-sorted groups  These changes were
  proposed by Justin Pryzby and mostly copy the final explain format used to
  report WAL usage.  Author: Justin Pryzby Reviewed-by: James Coleman
  Discussion: https://postgr.es/m/20200419023625.GP26953@telsasoft.com
  https://git.postgresql.org/pg/commitdiff/6a918c3ac8a6b1d8b53cead6fcb7cbd84eee5750

Noah Misch pushed:

- Fix pg_recvlogical avoidance of superfluous Standby Status Update. The defect
  suppressed a Standby Status Update message when bytes flushed to disk had
  changed but bytes received had not changed.  If pg_recvlogical then exited
  with no intervening Standby Status Update, the next pg_recvlogical repeated
  already-flushed records.  The defect could also cause superfluous messages,
  which are functionally harmless. Back-patch to 9.5 (all supported versions).
  Discussion: https://postgr.es/m/20200502221647.GA3941274@rfd.leadboat.com
  https://git.postgresql.org/pg/commitdiff/cee9cadb592fed6a6cb126f02002aba029544bd8

- In successful pg_recvlogical, end PGRES_COPY_OUT cleanly. pg_recvlogical
  merely called PQfinish(), so the backend sent messages after the disconnect.
  When that caused EPIPE in internal_flush(), before a
  LogicalConfirmReceivedLocation(), the next pg_recvlogical would repeat
  already-acknowledged records.  Whether or not the defect causes EPIPE,
  post-disconnect messages could contain an ErrorResponse that the user should
  see.  One properly ends PGRES_COPY_OUT by repeating PQgetCopyData() until it
  returns a negative value.  Augment one of the tests to cover the case of WAL
  past --endpos.  Back-patch to v10, where commit
  7c030783a5bd07cadffc2a1018bc33119a4c7505 first appeared.  Before that commit,
  pg_recvlogical never reached PGRES_COPY_OUT.  Reported by Thomas Munro.
  Discussion:
  https://postgr.es/m/CAEepm=1MzM2Z_xNe4foGwZ1a+MO_2S9oYDq3M5D11=JDU_+0Nw@mail.gmail.com
  https://git.postgresql.org/pg/commitdiff/8222a9d9a12356349114ec275b01a1a58da2b941

Amit Kapila pushed:

- Fix the MSVC build for versions 2015 and later. Visual Studio 2015 and later
  versions should still be able to do the same as Visual Studio 2012, but the
  declaration of locale_name is missing in _locale_t, causing the code
  compilation to fail, hence this falls back instead on to enumerating all
  system locales by using EnumSystemLocalesEx to find the required locale name.
   If the input argument is in Unix-style then we can get ISO Locale name
  directly by using GetLocaleInfoEx() with LCType as LOCALE_SNAME.  In passing,
  change the documentation references of the now obsolete links.  Note that this
  problem occurs only with NLS enabled builds.  Author: Juan José Santamaría
  Flecha, Davinder Singh and Amit Kapila Reviewed-by: Ranier Vilela and Amit
  Kapila Backpatch-through: 9.5 Discussion:
  https://postgr.es/m/CAHzhFSFoJEWezR96um4-rg5W6m2Rj9Ud2CNZvV4NWc9tXV7aXQ@mail.gmail.com
  https://git.postgresql.org/pg/commitdiff/a169155453e3d1c40c729a5318fd5298a990e5b0

- Make COPY TO keep locks until the transaction end. COPY TO released the ACCESS
  SHARE lock immediately when it was done rather than holding on to it until the
  end of the transaction.  This breaks the case where a REPEATABLE READ
  transaction could see an empty table if it repeats a COPY statement and
  somebody truncated the table in the meantime.  Before 4dded12faad the lock was
  also released after COPY FROM, but the commit failed to notice the
  irregularity in COPY TO.  This is old behavior but doesn't seem important
  enough to backpatch.  Author: Laurenz Albe, based on suggestion by Robert Haas
  and Tom Lane Reviewed-by: Amit Kapila Discussion:
  https://postgr.es/m/7bcfc39d4176faf85ab317d0c26786953646a411.camel@cybertec.at
  https://git.postgresql.org/pg/commitdiff/a9cf48a4cf0c878684a2f52a3a88e29399b2065e

Heikki Linnakangas pushed:

- Move check for fsync=off so that pendingOps still gets cleared. Commit
  3eb77eba5a moved the loop and refactored it, and inadvertently changed the
  effect of fsync=off so that it also skipped removing entries from the
  pendingOps table. That was not intentional, and leads to an assertion failure
  if you turn fsync on while the server is running and reload the config.
  Backpatch-through: 12- Reviewed-By: Thomas Munro Discussion:
  https://www.postgresql.org/message-id/3cbc7f4b-a5fa-56e9-9591-c886deb07513%40iki.fi
  https://git.postgresql.org/pg/commitdiff/e8abf585ab453ca9c2f66f2138baf6d3c9c8fbf0

- Fix typo in comment on OpenSSL PEM password callback type name. The type is
  called "pem_password_cb", not "pem_passwd_cb".  Author: Daniel Gustafsson
  Discussion:
  https://www.postgresql.org/message-id/22108CF6-228B-45CF-9CDA-5C5F658DCC22@yesql.se
  https://git.postgresql.org/pg/commitdiff/267cc6ed29668fcf2e527f514f0fbbeaa73c388e

Alexander Korotkov pushed:

- Fix amcheck for page checks concurrent to replay of btree page deletion.
  amcheck expects at least hikey to always exist on leaf page even if it is
  deleted page.  But replica reinitializes page during replay of page deletion,
  causing deleted page to have no items.  Thus, replay of page deletion can
  cause an error in concurrent amcheck run.  This commit relaxes amcheck
  expectation making it tolerate deleted page with no items.  Reported-by:
  Konstantin Knizhnik Discussion:
  https://postgr.es/m/CAPpHfdt_OTyQpXaPJcWzV2N-LNeNJseNB-K_A66qG%3DL518VTFw%40mail.gmail.com
  Author: Alexander Korotkov Reviewed-by: Peter Geoghegan Backpatch-through: 11
  https://git.postgresql.org/pg/commitdiff/34dae902ca1c7d32a24b711131911e3045c0097d

- Improve ordering for \dAo and \dAp psql commands. This commit changes ORDER BY
  clause for \dAo and \dAp psql commands in the following way.  * Operators for
  the same types are grouped together.  * Same-class operators and procedures
  are listed before cross-class operators    and procedures.  Modification of
  ORDER BY clause for \dAp required removing DISTINCT clause, which doesn't seem
  to affect anything.  Discussion:
  https://postgr.es/m/20200511210856.GA18368%40alvherre.pgsql Author: Alvaro
  Herrera revised by me Reviewed-by: Alexander Korotkov, Nikita Glukhov
  https://git.postgresql.org/pg/commitdiff/b1953e67e4c481f8d3844dcdd8fdd4054d7e7604

- Fix translate_columns[] arrays in opfamily-related psql functions. Make number
  of translate_columns elements match the number of output columns. The only
  "true" value, which was previously specified, seems to be intended for
  opfamily operator "purpose" column.  But that column has already translated
  values substituted.  So, all elements in translate_columns[] should be
  "false".
  https://git.postgresql.org/pg/commitdiff/29b6ddd38d0914340c3c4bb4bb4bd5c4a3c02dca

- Cosmetic improvement for psql opfamily-related information.  * Rename column
  "Opfamily Name" to "Operator family" for uniformity.  * Rename column alias
  from "t1" to "t".
  https://git.postgresql.org/pg/commitdiff/18b9d22cef988c4a67d440f6cafc160d9c05871b

Andrew Dunstan pushed:

- Rename PQsetSSLKeyPassHook and friends. 4dc6355210 provided a way for
  libraries and clients to modify how libpq handles client certificate
  passphrases, by installing a hook. However, these routines are quite specific
  to how OpenSSL works, so it's misleading and not future-proof to have these
  names not refer to OpenSSL. Change all the names to add "_OpenSSL" after
  "Hook", and fix the docs accordingly.  Author: Daniel Gustafsson  Discussion:
  https://postgr.es/m/981DE552-E399-45C2-9F60-3F0E3770CC61@yesql.se
  https://git.postgresql.org/pg/commitdiff/36d1087611bf96b0cd716666fc8c4a2d168fa501

== Pending Patches ==

Euler Taveira de Oliveira sent in a patch to fix an issue where tables with
deferred primary keys weren't replicated correctly via logical replication.

Movead Li sent in two revisions of a patch to make it possible to get the origin
from commit_ts.

Álvaro Herrera and Alexander Lakhin traded patches to expand gcov coverage data
to fully covered in the case of an immediate stop.

Mark Dilger sent in another revision of a patch to add verify_heapam and
pg_amcheck to the amcheck contrib extension.

Kyotaro HORIGUCHI sent in two more revisions of a patch to move tablespace
cleanup out of pg_regress.

Andrey Borodin and Kyotaro HORIGUCHI traded patches to make SLRU buffer sizes
for MultiXacOffsets and MultiXactMembers configurable, reduce the locking level
to shared on read of MultiXactId members, and make cache size configurable.

Euler Taveira de Oliveira and Michaël Paquier traded patches to fix an assert
failure with REPLICA IDENTITY FULL in the subscriber by adding a condition to it
that reflects reality better.

Pavel Stěhule sent in two revisions of a patch to speed up procedure calls.

Andrey V. Lepikhov sent in another revision of a patch to implement global
snapshots via CSNs.

Joe Conway sent in a patch to add a CHECK_FOR_INTERRUPTS call to the repeat()
function.

Masahiko Sawada and Muhammad Usama traded patches to support atomic commit among
multiple foreign servers.

Tomáš Vondra sent in another revision of a patch to implement BRIN multi-range
indexes.

Fujii Masao sent in a patch to remove unnecessary sets of stat_reset_timestamp
from pgstat_read_statsfiles().

Andy Fan sent in another revision of a patch to track uniqueness with UniqueKey.

Tom Lane sent in a patch to avoid doing SLRU operations in the postmaster.

Atsushi Torikoshi and Fujii Masao traded patches to add explanations of which
things are influenced by track_io_timing.

Thomas Munro sent in a patch to use MinimalTuple for tuple queues.

Masahiko Sawada sent in two revisions of a patch to fix a typo in slot.c.

Kyotaro HORIGUCHI sent in another revision of a patch to change the stats
collector's storage from files to shared memory.

Daniel Gustafsson sent in a patch to support NSS as a libpq TLS backend.

Michaël Paquier sent in two revisions of a patch to rename received_lsn to
flushed_lsn, and add written_lsn to pg_stat_walreceiver.

Dilip Kumar sent in two more revisions of a patch to fix an infelicity between
logical_work_mem and logical streaming of large in-progress transactions.

Dmitry Dolgov sent in another revision of a patch to implement generic type
subscripting.

Tomáš Vondra sent in a patch to use the recently added incremental sorting to
make GROUP BY more efficient.

David Gilman sent in a patch to warn when parallel restoring a custom dump
without data offsets.

Tom Lane sent in another revision of a patch to fix GIN index search sometimes
losing results.

Andres Freund sent in a patch to move the WaitLatch() call to much earlier, and
only do a WaitLatch() if do_checkpoint is false.

Fabien COELHO sent in another revision of a patch to pgbench which adds an
option delaying queries till connections are established.




pgsql-announce by date:

Previous
From: Grigory Smolkin
Date:
Subject: pg_probackup 2.3.3 released
Next
From: Artyom Kartasov
Date:
Subject: Query optimization assistant Joe now supports Web UI and multiple databases