Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kc7HK-00070p-Jc for pgsql-announce@arkaria.postgresql.org; Mon, 09 Nov 2020 13:32:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kc7HJ-0008Ru-Jd for pgsql-announce@arkaria.postgresql.org; Mon, 09 Nov 2020 13:32:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kc7HI-00089g-Bp for pgsql-announce@lists.postgresql.org; Mon, 09 Nov 2020 13:32:12 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kc7HC-0001uq-8E for pgsql-announce@lists.postgresql.org; Mon, 09 Nov 2020 13:32:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:From:To:Subject: MIME-Version:Content-Type:Sender:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=7AFiDVN33M0gwfkht5nOovr1ia37qyLrfLo5dLv1Gsw=; b=Zh/n1ihOXxCwvheB0/M57+yBoq AV5ePwGCtPMOPP8O8oGIBh58DpykNryR9LjsKBskQuszb3HeqgSRexAkMcoR7KTNPklBqDzdJ2ZDV kl8kd9J/2kiE70dFQf+U73uZ2uiXOLatUjS7JOMbqUF/Tz9mTKXIYC6L33aqlQbfpxsltRQyLOPZm rfSPEgp8vj6qDJGmS1r5fDqBCbZOd1T1O6VntWCEe3GELtVbqW7MkZtzJeNgWthrbVDvDXmT4V2QL kylfaUXzibKgPM2IdIEa3rj0/PWmv1QKuBdSydb3oMkj5J4F5DiFgQUprkPlNne8Z/xg5RmH1aqS9 Nu74RPBg==; Received: from wrigleys.postgresql.org ([2a02:c0:301:0:ffff::34]) by mahout.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kc7H9-0005qD-Ev for pgsql-announce@lists.postgresql.org; Mon, 09 Nov 2020 13:32:04 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kc7H8-0008RE-7r for pgsql-announce@lists.postgresql.org; Mon, 09 Nov 2020 13:32:02 +0000 Content-Type: multipart/mixed; boundary="===============3863432263182160421==" MIME-Version: 1.0 Subject: PostgreSQL Weekly News - November 8, 2020 To: PostgreSQL Announce From: PWN via PostgreSQL Announce Reply-To: david@fetter.org Date: Mon, 09 Nov 2020 13:31:16 +0000 Message-ID: <160492867662.25505.9664044358928345339@wrigleys.postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-pglister-tags: pwn X-pglister-tagsig: 3ba2eef0f98d9e7e94cf99eab61532b4efb810c8495e8b881ce851bc723162e0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --===============3863432263182160421== Content-Type: multipart/alternative; boundary="===============7828189117301818021==" MIME-Version: 1.0 --===============7828189117301818021== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable # PostgreSQL Weekly News - November 8, 2020 Congratulations to new core team members Andres Freund and Jonathan Katz! [https://www.postgresql.org/developer/core/](https://www.postgresql.org/dev= eloper/core/) Person of the week: [https://postgresql.life/post/elein\_mustain/](https://= postgresql.life/post/elein\_mustain/) # PostgreSQL Product News phpPgAdmin 7.13.1, a web-based administration tool for PostgreSQL, released. [https://xzilla.net//blog/2020/Nov/phpPgAdmin-7-13-1-released.html](https:/= /xzilla.net//blog/2020/Nov/phpPgAdmin-7-13-1-released.html) Ajqvue Version 3.3, a java-based UI which supports PostgreSQL, released. [http://ajqvue.com](http://ajqvue.com) pg\_statement\_rollback, an extension that adds server side transaction with rollback at statement level, released. [https://github.com/lzlabs/pg\_statement\_rollback/releases/](https://githu= b.com/lzlabs/pg\_statement\_rollback/releases/) # PostgreSQL Jobs for November [http://archives.postgresql.org/pgsql-jobs/2020-11/](http://archives.postgr= esql.org/pgsql-jobs/2020-11/) # PostgreSQL in the News Planet PostgreSQL: [http://planet.postgresql.org/](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.o= rg. # Applied Patches Tom Lane pushed: - Fix two issues in TOAST decompression. pglz\_maximum\_compressed\_size() potentially underestimated the amount of compressed data required to prod= uce N bytes of decompressed data; this is a fault in commit 11a078cf8. Separat= ely from that, pglz\_decompress() failed to protect itself against corrupt compressed data, particularly off =3D=3D 0 in a match tag. Commit c60e52= 0f6 turned such a situation into an infinite loop, where before it'd just have resulted in garbage output. The combination of these two bugs seems like= it may explain bug #16694 from Tom Vijlbrief, though it's impossible to be q= uite sure without direct inspection of the failing session. (One needs to ass= ume that the pglz\_maximum\_compressed\_size() bug caused us to fail to fetch= the second byte of a match tag, and what happened to be there instead was a z= ero. The reported infinite loop is hard to explain without off =3D=3D 0, thoug= h.) Aside from fixing the bugs, rewrite associated comments for more clarity. Back-patch to v13 where both these commits landed. Discussion: [https://postgr.es/m/16694-f107871e499ec114@postgresql.org](https://postg= r.es/m/16694-f107871e499ec114@postgresql.org) [https://git.postgresql.org/pg/commitdiff/dfc797730fc7a07c0e6bd636ad1a564= aecab3161](https://git.postgresql.org/pg/commitdiff/dfc797730fc7a07c0e6bd63= 6ad1a564aecab3161) - Second thoughts on TOAST decompression. On detecting a corrupted match ta= g, pglz\_decompress() should just summarily return -1. Breaking out of the = loop, as I did in dfc797730, doesn't quite guarantee that will happen. Also, w= e can use unlikely() on that check, just in case it helps. Backpatch to v13, l= ike the previous patch. [https://git.postgresql.org/pg/commitdiff/fd2997565c6f66837440dd57f5e52b5= 6aa964d14](https://git.postgresql.org/pg/commitdiff/fd2997565c6f66837440dd5= 7f5e52b56aa964d14) - Rethink the generation rule for fmgroids.h macros. Traditionally, the nam= es of fmgroids.h macros for pg\_proc OIDs have been constructed from the prosrc field. But sometimes the same C function underlies multiple pg\_proc ent= ries, forcing us to make an arbitrary choice of which OID to reference; the oth= er entries are then not namable via fmgroids.h. Moreover, we could not have macros at all for pg\_proc entries that aren't for C-coded functions. In= stead, use the proname field, and append the proargtypes field (replacing inter-argument spaces with underscores) if proname is not unique. Special-casing unique entries such as F\_OIDEQ removes the need to change= a lot of code. Indeed, I can only find two places in the tree that need to be adjusted; while this changes quite a few existing entries in fmgroids.h, = few of them are referenced from C code. With this patch, all entries in pg\_proc.dat have macros in fmgroids.h. Discussion: [https://postgr.es/m/472274.1604258384@sss.pgh.pa.us](https://postgr.es/m= /472274.1604258384@sss.pgh.pa.us) [https://git.postgresql.org/pg/commitdiff/8e1f37c07aafd4bb7aa6e1e1982010a= f11f8b5c7](https://git.postgresql.org/pg/commitdiff/8e1f37c07aafd4bb7aa6e1e= 1982010af11f8b5c7) - Remove special checks for pg\_rewrite.ev\_qual and ev\_action being NULL. make\_ruledef() and make\_viewdef() were coded to cope with possible null= -ness of these columns, but they've been marked BKI\_FORCE\_NOT\_NULL for some = time. So there's not really any need to do more than what we do for the other columns of pg\_rewrite, i.e. just Assert that we got non-null results. (= There is a school of thought that says Asserts aren't the thing to do to check = for corrupt data, but surely here is not the place to start if we want such a policy.) Also, remove long-dead-if-indeed-it-ever-wasn't-dead handling o= f an empty actions list in make\_ruledef(). That's an error case and should be treated as such. (DO INSTEAD NOTHING is represented by a CMD\_NOTHING Qu= ery, not an empty list; cf transformRuleStmt.) Kyotaro Horiguchi, some change= s by me Discussion: [https://postgr.es/m/CAEudQApoA=3DtMTic6xEPYP\_hsNZ8XtToVThK\_0x7D\_aFQYo= wq3w@mail.gmail.com](https://postgr.es/m/CAEudQApoA=3DtMTic6xEPYP\_hsNZ8XtT= oVThK\_0x7D\_aFQYowq3w@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/e1339bfc7a2fd4629e1c3f8f919ddd0= 5b4745e13](https://git.postgresql.org/pg/commitdiff/e1339bfc7a2fd4629e1c3f8= f919ddd05b4745e13) - Fix unportable use of getnameinfo() in pg\_hba\_file\_rules view. fill\_h= ba\_line() thought it could get away with passing sizeof(struct sockaddr\_storage) r= ather than the actual addrlen previously returned by getaddrinfo(). While that appears to work on many platforms, it does not work on FreeBSD 11: you get back a failure, which leads to the view showing NULL for the address and netmask columns in all rows. The POSIX spec for getnameinfo() is pretty clearly on FreeBSD's side here: you should pass the actual address length= . So it seems plausible that there are other platforms where this coding also fails, and we just hadn't noticed. Also, IMO the fact that getnameinfo() failure leads to a NULL output is pretty bogus in itself. Our pg\_getnameinfo\_all() wrapper is careful to emit "???" on failure, and we should use that in such cases. NULL should only be emitted in rows that = don't have IP addresses. Per bug #16695 from Peter Vandivier. Back-patch to v= 10 where this code was added. Discussion: [https://postgr.es/m/16695-a665558e2f630be7@postgresql.org](https://postg= r.es/m/16695-a665558e2f630be7@postgresql.org) [https://git.postgresql.org/pg/commitdiff/0a4b34031279d938c2e59df8df7159d= 6c11e39b5](https://git.postgresql.org/pg/commitdiff/0a4b34031279d938c2e59df= 8df7159d6c11e39b5) - Allow users with BYPASSRLS to alter their own passwords. The intention in commit 491c029db was to require superuserness to change the BYPASSRLS property, but the actual effect of the coding in AlterRole() was to requi= re superuserness to change anything at all about a BYPASSRLS role. Other properties of a BYPASSRLS role should be changeable under the same rules = as for a normal role, though. Fix that, and also take care of some document= ation omissions related to BYPASSRLS and REPLICATION role properties. Tom Lane= and Stephen Frost, per bug report from Wolfgang Walther. Back-patch to all supported branches. Discussion: [https://postgr.es/m/a5548a9f-89ee-3167-129d-162b5985fcf8@technowledgy.de= ](https://postgr.es/m/a5548a9f-89ee-3167-129d-162b5985fcf8@technowledgy.de) [https://git.postgresql.org/pg/commitdiff/d907bd0543aa63e59653d7345840bed= 0f8b3a83b](https://git.postgresql.org/pg/commitdiff/d907bd0543aa63e59653d73= 45840bed0f8b3a83b) - Improve error messages around REPLICATION and BYPASSRLS properties. Clari= fy wording as per suggestion from Wolfgang Walther. No back-patch; this does= n't seem worth thrashing translatable strings in the back branches. Tom Lane= and Stephen Frost Discussion: [https://postgr.es/m/a5548a9f-89ee-3167-129d-162b5985fcf8@technowledgy.de= ](https://postgr.es/m/a5548a9f-89ee-3167-129d-162b5985fcf8@technowledgy.de) [https://git.postgresql.org/pg/commitdiff/17fb60387ce3fdc2bbb13d9b67bed0e= 4da77e173](https://git.postgresql.org/pg/commitdiff/17fb60387ce3fdc2bbb13d9= b67bed0e4da77e173) - Guard against core dump from uninitialized subplan. If the planner errone= ously puts a non-parallel-safe SubPlan into a parallelized portion of the query tree, nodeSubplan.c will fail in the worker processes because it finds a = null in es\_subplanstates, which it's unable to cope with. It seems worth a test-and-elog to make that an error case rather than a core dump case. T= his probably should have been included in commit 16ebab688, which was respons= ible for allowing nulls to appear in es\_subplanstates to begin with. So, back-patch to v10 where that came in. Discussion: [https://postgr.es/m/924226.1604422326@sss.pgh.pa.us](https://postgr.es/m= /924226.1604422326@sss.pgh.pa.us) [https://git.postgresql.org/pg/commitdiff/92f87182f2c617fd420832972b6d0ae= 4527301c8](https://git.postgresql.org/pg/commitdiff/92f87182f2c617fd4208329= 72b6d0ae4527301c8) - Remove useless entries for aggregate functions from fmgrtab.c. Gen\_fmgrt= ab.pl treated aggregate functions the same as other built-in functions, which is wasteful because there is no real need to have entries for them in the fmgr\_builtins[] table. Suppressing those entries saves about 3KB in the compiled table on my machine; which is not a lot but it's not nothing eit= her, considering that that table is pretty "hot". The only outside code change needed is that ExecInitWindowAgg() can't be allowed to call fmgr\_info\_c= xt() on a plain aggregate function. But that saves a few cycles anyway. Having = done that, the aggregate\_dummy() function is unreferenced and might as well be dropped. Using "aggregate\_dummy" as the prosrc value for an aggregate i= s now just a documentation convention not something that matters. There was so= me discussion of using NULL instead to save a few bytes in pg\_proc, but we'= d have to remove prosrc's BKI\_FORCE\_NOT\_NULL marking which doesn't seem a gre= at idea. Anyway, it's possible there's client-side code that expects to see "aggregate\_dummy" there, so I'm loath to change it without a strong reas= on. Discussion: [https://postgr.es/m/533989.1604263665@sss.pgh.pa.us](https:/= /postgr.es/m/533989.1604263665@sss.pgh.pa.us) [https://git.postgresql.org/pg/commitdiff/f21636e5d5b8394ed076e18ddc5f4ba= 710c69c99](https://git.postgresql.org/pg/commitdiff/f21636e5d5b8394ed076e18= ddc5f4ba710c69c99) - Improve our ability to regurgitate SQL-syntax function calls. The SQL spec calls out nonstandard syntax for certain function calls, for example substring() with numeric position info is supposed to be spelled "SUBSTRING(string FROM start FOR count)". We accept many of these things= , but up to now would not print them in the same format, instead simplifying do= wn to "substring"(string, start, count). That's long annoyed me because it crea= tes an interoperability problem: we're gratuitously injecting Postgres-specif= ic syntax into what might otherwise be a perfectly spec-compliant view definition. However, the real reason for addressing it right now is to su= pport a planned change in the semantics of EXTRACT() a/k/a date\_part(). When we switch that to returning numeric, we'll have the parser translate EXTRACT= () to some new function name (might as well be "extract" if you ask me) and then teach ruleutils.c to reverse-list that per SQL spec. In this way existing calls to date\_part() will continue to have the old semantics. To implem= ent this, invent a new CoercionForm value COERCE\_SQL\_SYNTAX, and make the p= arser insert that rather than COERCE\_EXPLICIT\_CALL when the input has SQL-spec decoration. (But if the input has the form of a plain function call, con= tinue to mark it COERCE\_EXPLICIT\_CALL, even if it's calling one of these func= tions.) Then ruleutils.c recognizes COERCE\_SQL\_SYNTAX as a cue to emit SQL call syntax. It can know which decoration to emit using hard-wired knowledge = about the functions that could be called this way. (While this solution isn't extensible without manual additions, neither is the grammar, so this does= n't seem unmaintainable.) Notice that this solution will reverse-list a func= tion call with SQL decoration only if it was entered that way; so dump-and-rel= oad will not by itself produce any changes in the appearance of views. This requires adding a CoercionForm field to struct FuncCall. (I couldn't resi= st the temptation to rearrange that struct's field order a tad while I was at it.) FuncCall doesn't appear in stored rules, so that change isn't a rea= son for a catversion bump, but I did one anyway because the new enum value for CoercionForm fields could confuse old backend code. Possible future work= : \* Perhaps CoercionForm should now be renamed to DisplayForm, or something l= ike that, to reflect its more general meaning. This'd require touching a coup= le hundred places, so it's not clear it's worth the code churn. \* The SQLValueFunction node type, which was invented partly for the same goal of improving SQL-compatibility of view output, could perhaps be replaced with regular function calls marked with COERCE\_SQL\_SYNTAX. It's unclear if = this would be a net code savings, however. Discussion: [https://postgr.es/m/42b73d2d-da12-ba9f-570a-420e0cce19d9@phystech.edu](h= ttps://postgr.es/m/42b73d2d-da12-ba9f-570a-420e0cce19d9@phystech.edu) [https://git.postgresql.org/pg/commitdiff/40c24bfef92530bd846e111c1742c2a= 54441c62c](https://git.postgresql.org/pg/commitdiff/40c24bfef92530bd846e111= c1742c2a54441c62c) - Declare lead() and lag() using anycompatible not anyelement. This allows = use of a "default" expression that doesn't slavishly match the data column's = type. Formerly you got something like "function lag(numeric, integer, integer) = does not exist", which is not just unhelpful but actively misleading. The SQL= spec suggests that the default should be coerced to the data column's type, but this implementation instead chooses the common supertype, which seems at = least as reasonable. (Note: I took the opportunity to run "make reformat-dat-f= iles" on pg\_proc.dat, so this commit includes some cosmetic changes to recently-added entries that aren't related to lead/lag.) Vik Fearing Discussion: [https://postgr.es/m/77675130-89da-dab1-51dd-492c93dcf5d1@postgresfriends= .org](https://postgr.es/m/77675130-89da-dab1-51dd-492c93dcf5d1@postgresfrie= nds.org) [https://git.postgresql.org/pg/commitdiff/5c292e6b90433c760a3e15027646c7b= 94afd0cdd](https://git.postgresql.org/pg/commitdiff/5c292e6b90433c760a3e150= 27646c7b94afd0cdd) - Declare assorted array functions using anycompatible not anyelement. Conv= ert array\_append, array\_prepend, array\_cat, array\_position, array\_positi= ons, array\_remove, array\_replace, and width\_bucket to use anycompatiblearra= y. This is a simple extension of commit 5c292e6b9 to hit some other places where there's a pretty obvious gain in usability from doing so. Ideally we'd a= lso modify other functions taking multiple old-style polymorphic arguments. = But most of the remainder are tied into one or more operator classes, making = any such change a much larger can of worms than I desire to open right now. Discussion: [https://postgr.es/m/77675130-89da-dab1-51dd-492c93dcf5d1@postgresfriends= .org](https://postgr.es/m/77675130-89da-dab1-51dd-492c93dcf5d1@postgresfrie= nds.org) [https://git.postgresql.org/pg/commitdiff/9e38c2bb5093ceb0c04d6315ccd8975= bd17add66](https://git.postgresql.org/pg/commitdiff/9e38c2bb5093ceb0c04d631= 5ccd8975bd17add66) - Remove underflow error in float division with infinite divisor. float4\_d= iv and float8\_div correctly produced zero for zero divided by infinity, but thr= ew an underflow error for nonzero finite values divided by infinity. This seems wrong; at the very least it's inconsistent with the behavior recently implemented for numeric infinities. Remove the error and allow zero to be returned. This patch also removes a useless isinf() test from the overfl= ow checks in these functions (non-Inf divided by Inf can't produce Inf). Extracted from a larger patch; this seems significant outside the context= of geometric operators, so it deserves its own commit. Kyotaro Horiguchi Discussion: [https://postgr.es/m/CAGf+fX70rWFOk5cd00uMfa\_\_0yP+vtQg5ck7c2Onb-Yczp0UR= A@mail.gmail.com](https://postgr.es/m/CAGf+fX70rWFOk5cd00uMfa\_\_0yP+vtQg5c= k7c2Onb-Yczp0URA@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/fac83dbd6fe1ac3d4125bfa39f287f9= 5bffe6cda](https://git.postgresql.org/pg/commitdiff/fac83dbd6fe1ac3d4125bfa= 39f287f95bffe6cda) - Don't throw an error for LOCK TABLE on a self-referential view. LOCK TABL= E has complained about "infinite recursion" when applied to a self-referential = view, ever since we made it recurse into views in v11. However, that breaks pg\_dump's new assumption that it's okay to lock every relation. There d= oesn't seem to be any good reason to throw an error: if we just abandon the recursion, we've still satisfied the requirement of locking every referen= ced relation. Per bug #16703 from Andrew Bille (via Alexander Lakhin). Discussion: [https://postgr.es/m/16703-e348f58aab3cf6cc@postgresql.org](h= ttps://postgr.es/m/16703-e348f58aab3cf6cc@postgresql.org) [https://git.postgresql.org/pg/commitdiff/5b7bfc39726ff9f6c52dd73e337c34e= 74e0d1f39](https://git.postgresql.org/pg/commitdiff/5b7bfc39726ff9f6c52dd73= e337c34e74e0d1f39) - Revert "pg\_dump: Lock all relations, not just plain tables". Revert 403a= 3d91c, as well as the followup fix 7f4235032, in all branches. We need to think= a bit harder about what the behavior of LOCK TABLE on views should be, and there's no time for that before next week's releases. We'll take another crack at this later. Discussion: [https://postgr.es/m/16703-e348f58aab3cf6cc@postgresql.org](https://postg= r.es/m/16703-e348f58aab3cf6cc@postgresql.org) [https://git.postgresql.org/pg/commitdiff/d3adaabaf7d555ec8bb1d83c43f72e7= 9f1bf0b7d](https://git.postgresql.org/pg/commitdiff/d3adaabaf7d555ec8bb1d83= c43f72e79f1bf0b7d) - Revert "Accept relations of any kind in LOCK TABLE". Revert 59ab4ac32, as= well as the followup fix 33862cb9c, in all branches. We need to think a bit h= arder about what the behavior of LOCK TABLE on views should be, and there's no = time for that before next week's releases. We'll take another crack at this l= ater. Discussion: [https://postgr.es/m/16703-e348f58aab3cf6cc@postgresql.org](h= ttps://postgr.es/m/16703-e348f58aab3cf6cc@postgresql.org) [https://git.postgresql.org/pg/commitdiff/eeda7f6338095701cfe1ba3da370705= 08efe019e](https://git.postgresql.org/pg/commitdiff/eeda7f6338095701cfe1ba3= da37070508efe019e) - Fix ecpg's mishandling of B'...' and X'...' literals. These were broken in multiple ways: \* The xbstart and xhstart lexer actions neglected to set "state\_before\_str\_start" before transitioning to the xb/xh states, thus possibly resulting in "internal error: unreachable state" later. \* The = test for valid string contents at the end of xb state was flat out wrong, as it accounted incorrectly for the "b" prefix that the xbstart action had inje= cted. Meanwhile, the xh state had no such check at all. \* The generated liter= al value failed to include any quote marks. \* The grammar did the wrong th= ing anyway, typically ignoring the literal value and emitting something else, since BCONST and XCONST tokens were handled randomly differently from SCO= NST tokens. The first of these problems is evidently an oversight in commit 7f380c59f, but the others seem to be very ancient. The lack of complaints shows that ECPG users aren't using these syntaxes much (although I do vag= uely remember one previous complaint). As written, this patch is dependent on 7f380c59f, so it can't go back further than v13. Given the shortage of complaints, I'm not excited about adapting the patch to prior branches. Report and patch by Shenhao Wang (test case adjusted by me) Discussion: [https://postgr.es/m/d6402f1bacb74ecba22ef715dbba17fd@G08CNEXMBPEKD06.g08= .fujitsu.local](https://postgr.es/m/d6402f1bacb74ecba22ef715dbba17fd@G08CNE= XMBPEKD06.g08.fujitsu.local) [https://git.postgresql.org/pg/commitdiff/1e3868ab3bef5cfa0f4d44a6937a880= be7a3a482](https://git.postgresql.org/pg/commitdiff/1e3868ab3bef5cfa0f4d44a= 6937a880be7a3a482) - Avoid re-using output variables in new ecpg test case. The buildfarm thin= ks this leads to memory stomps, though annoyingly I can't duplicate that her= e. The existing code in strings.pgc is doing something that doesn't seem to = be sanctioned at all really by the documentation, but I'm disinclined to try= to make that nicer right now. Let's just declare some more output variables= in hopes of working around it. [https://git.postgresql.org/pg/commitdiff/eed4356fad84b0fd6e3caa49c7006f4= 01159ac9a](https://git.postgresql.org/pg/commitdiff/eed4356fad84b0fd6e3caa4= 9c7006f401159ac9a) David Rowley pushed: - Allow run-time pruning on nested Append/MergeAppend nodes. Previously we = only tagged on the required information to allow the executor to perform run-t= ime partition pruning for Append/MergeAppend nodes belonging to base relation= s. It was thought that nested Append/MergeAppend nodes were just about always pulled up into the top-level Append/MergeAppend and that making the run-t= ime pruning info for any sub Append/MergeAppend nodes was a waste of time. However, that was likely badly thought through. Some examples of cases w= e're unable to pullup nested Append/MergeAppends are: 1) Parallel Append nodes= with a mix of parallel and non-parallel paths into a Parallel Append. 2) When planning an ordered Append scan a sub-partition which is unordered may re= quire a nested MergeAppend path to ensure sub-partitions don't mix up the order= of tuples being fed into the top-level Append. Unfortunately, it was not ju= st as simple as removing the lines in createplan.c which were purposefully not building the run-time pruning info for anything but RELOPT\_BASEREL relat= ions. The code in add\_paths\_to\_append\_rel() was far too sloppy about which partitioned\_rels it included for the Append/MergeAppend paths. The orig= inal code there would always assume accumulate\_append\_subpath() would pull e= ach sub-Append and sub-MergeAppend path into the top-level path. While it do= es not appear that there were any actual bugs caused by having the additional partitioned table RT indexes recorded, what it did mean is that later in planning, when we built the run-time pruning info that we wasted effort a= nd built PartitionedRelPruneInfos for partitioned tables that we had no subp= aths for the executor to run-time prune. Here we tighten that up so that partitioned\_rels only ever contains the RT index for partitioned tables = which actually have subpaths in the given Append/MergeAppend. We can now Assert that every PartitionedRelPruneInfo has a non-empty present\_parts. That = should allow us to catch any weird corner cases that have been missed. In passi= ng, it seems there is no longer a good reason to have the AppendPath and MergeAppendPath's partitioned\_rel fields a List of IntList. We can simpl= y have a List of Relids instead. This is more compact in memory and faster to a= dd new members to. We still know which is the root level partition as these always have a lower relid than their children. Previously this field was = used for more things, but run-time partition pruning now remains the only user= of it and it has no need for a List of IntLists. Here we also get rid of the RelOptInfo partitioned\_child\_rels field. This is what was previously us= ed to (sometimes incorrectly) set the Append/MergeAppend path's partitioned\_re= ls field. That was the only usage of that field, so we can happily just rem= ove it. I also couldn't resist changing some nearby code to make use of the = newly added for\_each\_from macro so we can skip the first element in the list = without checking if the current item was the first one on each iteration. A bug report from Andreas Kretschmer prompted all this work, however, after some consideration, I'm not personally classing this as a bug fix. So no backp= atch. In Andreas' test case, it just wasn't that clear that there was a nested Append since the top-level Append just had a single sub-path which was pu= lled up a level, per 8edd0e794. Author: David Rowley Reviewed-by: Amit Langote Discussion: [https://postgr.es/m/flat/CAApHDvqSchs%2BubdybcfFaSPB%2B%2BEA7kqMaoqajtP0= GtZvzOOR3g%40mail.gmail.com](https://postgr.es/m/flat/CAApHDvqSchs%2Bubdybc= fFaSPB%2B%2BEA7kqMaoqajtP0GtZvzOOR3g%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/a929e17e5a8c9b751b66002c8a89fde= bdacfe194](https://git.postgresql.org/pg/commitdiff/a929e17e5a8c9b751b66002= c8a89fdebdacfe194) - Fix unstable partition\_prune regression tests. This was broken recently = by a929e17e5. I'd failed to remember that parallel tests should have their EXPLAIN output run through the explain\_parallel\_append function so that= the output is stable when parallel workers fail to start. fairywren was firs= t to notice. Reported-by: Michael Paquier Discussion: [https://postgr.es/m/20201102062951.GB15770@paquier.xyz](https://postgr.e= s/m/20201102062951.GB15770@paquier.xyz) [https://git.postgresql.org/pg/commitdiff/90d8f1b1826ce076a502a43fe7c8842= 3b46c6349](https://git.postgresql.org/pg/commitdiff/90d8f1b1826ce076a502a43= fe7c88423b46c6349) Amit Kapila pushed: - Use Enum for top level logical replication message types. Logical replica= tion protocol uses a single byte character to identify a message type in logic= al replication protocol. The code uses string literals for the same. Use Enu= m so that 1. All the string literals used can be found at a single place. This makes it easy to add more types without the risk of conflicts. 2. It's e= asy to locate the code handling a given message type. 3. When used with swit= ch statements, it is easy to identify the missing cases using -Wswitch. Aut= hor: Ashutosh Bapat Reviewed-by: Kyotaro Horiguchi, Andres Freund, Peter Smith= and Amit Kapila Discussion: [https://postgr.es/m/CAExHW5uPzQ7L0oAd\_ENyvaiYMOPgkrAoJpE+ZY5-obdcVT6NPg= @mail.gmail.com](https://postgr.es/m/CAExHW5uPzQ7L0oAd\_ENyvaiYMOPgkrAoJpE+= ZY5-obdcVT6NPg@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/644f0d7cc9c2cb270746f2024c70655= 4e0fbec82](https://git.postgresql.org/pg/commitdiff/644f0d7cc9c2cb270746f20= 24c706554e0fbec82) - Fix typos. Author: Hou Zhijie Discussion: [https://postgr.es/m/855a9421839d402b8b351d273c89a8f8@G08CNEXMBPEKD05.g08= .fujitsu.local](https://postgr.es/m/855a9421839d402b8b351d273c89a8f8@G08CNE= XMBPEKD05.g08.fujitsu.local) [https://git.postgresql.org/pg/commitdiff/8c2d8f6cc4848cf9276dff445bb0f2f= 664083eca](https://git.postgresql.org/pg/commitdiff/8c2d8f6cc4848cf9276dff4= 45bb0f2f664083eca) - Use strlcpy instead of memcpy for copying the slot name in pgstat.c. Ther= e is no outright bug here but it is better to be consistent with the usage at = other places in the same file. In the passing, fix a wrong assertion in pgstat\_recv\_replslot. Author: Kyotaro Horiguchi Reviewed-by: Sawada Ma= sahiko and Amit Kapila Discussion: [https://postgr.es/m/20201104.175523.1704166915688949637.horikyota.ntt@gm= ail.com](https://postgr.es/m/20201104.175523.1704166915688949637.horikyota.= ntt@gmail.com) [https://git.postgresql.org/pg/commitdiff/4f841ce3f7f4d429a3a275f82745d63= c78cde4b2](https://git.postgresql.org/pg/commitdiff/4f841ce3f7f4d429a3a275f= 82745d63c78cde4b2) Micha=C3=ABl Paquier pushed: - Fix some grammar and typos in comments and docs. The documentation fixes = are backpatched down to where they apply. Author: Justin Pryzby Discussion: [https://postgr.es/m/20201031020801.GD3080@telsasoft.com](https://postgr.= es/m/20201031020801.GD3080@telsasoft.com) Backpatch-through: 9.6 [https://git.postgresql.org/pg/commitdiff/8a15e735be00f156a7227741c0ce887= 02e6de099](https://git.postgresql.org/pg/commitdiff/8a15e735be00f156a722774= 1c0ce88702e6de099) - Revert pg\_relation\_check\_pages(). This reverts the following set of co= mmits, following complaints about the lack of portability of the central part of= the code in bufmgr.c as well as the use of partition mapping locks during page reads: c780a7a9 f2b88396 b787d4ce ce7f772c 60a51c6b Per discussion with Andres Freund, Robert Haas and myself. Bump catalog version. Discussion: [https://postgr.es/m/20201029181729.2nrub47u7yqncsv7@alap3.anarazel.de](h= ttps://postgr.es/m/20201029181729.2nrub47u7yqncsv7@alap3.anarazel.de) [https://git.postgresql.org/pg/commitdiff/e152506adef4bc503ea7b8ebb4fedc0= b8eebda81](https://git.postgresql.org/pg/commitdiff/e152506adef4bc503ea7b8e= bb4fedc0b8eebda81) - Fix minor issues with new unicode {de,re}composition code. The table generation script would incorrectly complain in the recomposition sorting= when matching code points. This would not have caused the generation of an incorrect table. Note that this condition is not reachable yet, but could have been reached with future updates. pg\_bswap.h does not need to be included in the frontend.x Author: John Naylor Discussion: [https://postgr.es/m/CAFBsxsGWmExpvv=3D61vtDKCs7+kBbhkwBDL2Ph9CacziFKnV\_= yw@mail.gmail.com](https://postgr.es/m/CAFBsxsGWmExpvv=3D61vtDKCs7+kBbhkwBD= L2Ph9CacziFKnV\_yw@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/ceaeac54f75f0117a7b3caa2f8ecba5= cfac18ee5](https://git.postgresql.org/pg/commitdiff/ceaeac54f75f0117a7b3caa= 2f8ecba5cfac18ee5) - Add GUC\_LIST\_INPUT and GUC\_LIST\_QUOTE to unix\_socket\_directories. T= his should have been done in the initial commit that made unix\_socket\_directories = a list as of c9b0cbe. This change allows to support correctly the case of ALTER SYSTEM, where it is possible to specify multiple paths as a list, like the following pattern where flattening is applied to each item: ALTER SYSTEM = SET unix\_socket\_directories =3D '/path1', '/path2'; Any parameters specifi= ed in postgresql.conf are parsed the same way, so there is no compatibility cha= nge. pg\_dump has a hardcoded list of parameters marked with GUC\_LIST\_QUOTE,= that gets its routine update. These are reordered alphabetically for clarity. Author: Ian Lawrence Barwick Reviewed-by: Peter Eisentraunt, Tom Lane, Mi= chael Paquier Discussion: [https://postgr.es/m/CAB8KJ=3DiMOtNY6\_sUwV=3DLQVCJ2zgYHBDyNzVfvE5GN3WQ3v= 9kQg@mail.gmail.com](https://postgr.es/m/CAB8KJ=3DiMOtNY6\_sUwV=3DLQVCJ2zgY= HBDyNzVfvE5GN3WQ3v9kQg@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/a05dbf477b0ef173adb1ae5d004cbeb= 0cf400b66](https://git.postgresql.org/pg/commitdiff/a05dbf477b0ef173adb1ae5= d004cbeb0cf400b66) Heikki Linnakangas pushed: - doc: Mention UNION/ORDER BY etc. keywords in section headers. Most of the section and sub-section headers in the Queries chapter have the keywords literally stated, but neither "Sorting Rows" nor "Combining Rows" did. Th= ere's no rule that they must be, but it seems like a good practice. The keywords will ring a bell to anyone with with even a little bit of SQL experience. David G. Johnston, per suggestion by bilge@scriptfusion.com Discussion: [https://www.postgresql.org/message-id/159981394174.31338.701451939674985= 9167%40wrigleys.postgresql.org](https://www.postgresql.org/message-id/15998= 1394174.31338.7014519396749859167%40wrigleys.postgresql.org) [https://git.postgresql.org/pg/commitdiff/8ef2a5afdf8ec9e4c8b28a7042c9508= eb6161671](https://git.postgresql.org/pg/commitdiff/8ef2a5afdf8ec9e4c8b28a7= 042c9508eb6161671) - pg\_rewind: Move syncTargetDirectory() to file\_ops.c. For consistency. A= ll the other low-level functions that operate on the target directory are in file\_ops.c. Reviewed-by: Michael Paquier Discussion: [https://www.postgresql.org/message-id/0c5b3783-af52-3ee5-f8fa-6e794061f7= 0d%40iki.fi](https://www.postgresql.org/message-id/0c5b3783-af52-3ee5-f8fa-= 6e794061f70d%40iki.fi) [https://git.postgresql.org/pg/commitdiff/ffb4e27e9c5ea87f9fecb7036dfc7cc= 1f38169b6](https://git.postgresql.org/pg/commitdiff/ffb4e27e9c5ea87f9fecb70= 36dfc7cc1f38169b6) - Refactor pg\_rewind for more clear decision making. Deciding what to do w= ith each file is now a separate step after all the necessary information has = been gathered. It is more clear that way. Previously, the decision-making was divided between process\_source\_file() and process\_target\_file(), and = it was a bit hard to piece together what the overall rules were. Reviewed-by: Kyo= taro Horiguchi, Soumyadeep Chakraborty Discussion: [https://www.postgresql.org/message-id/0c5b3783-af52-3ee5-f8fa-6e794061f7= 0d%40iki.fi](https://www.postgresql.org/message-id/0c5b3783-af52-3ee5-f8fa-= 6e794061f70d%40iki.fi) [https://git.postgresql.org/pg/commitdiff/eb00f1d4bf96bdba236bcc089f3ae94= db9b7c603](https://git.postgresql.org/pg/commitdiff/eb00f1d4bf96bdba236bcc0= 89f3ae94db9b7c603) - pg\_rewind: Replace the hybrid list+array data structure with simplehash.= Now that simplehash can be used in frontend code, let's make use of it. Reviewed-by: Kyotaro Horiguchi, Soumyadeep Chakraborty Discussion: [https://www.postgresql.org/message-id/0c5b3783-af52-3ee5-f8fa-6e794061f7= 0d%40iki.fi](https://www.postgresql.org/message-id/0c5b3783-af52-3ee5-f8fa-= 6e794061f70d%40iki.fi) [https://git.postgresql.org/pg/commitdiff/f81e97d0475cd4bc597adc23b665bd8= 4fbf79a0d](https://git.postgresql.org/pg/commitdiff/f81e97d0475cd4bc597adc2= 3b665bd84fbf79a0d) - pg\_rewind: Refactor the abstraction to fetch from local/libpq source. Th= is makes the abstraction of a "source" server more clear, by introducing a c= ommon abstract class, borrowing the object-oriented programming term, that represents all the operations that can be done on the source server. Ther= e are two implementations of it, one for fetching via libpq, and another to fet= ch from a local directory. This adds some code, but makes it easier to under= stand what's going on. The copy\_executeFileMap() and libpq\_executeFileMap() functions contained basically the same logic, just calling different func= tions to fetch the source files. Refactor so that the common logic is in one pl= ace, in a new function called perform\_rewind(). Reviewed-by: Kyotaro Horiguc= hi, Soumyadeep Chakraborty Discussion: [https://www.postgresql.org/message-id/0c5b3783-af52-3ee5-f8fa-6e794061f7= 0d%40iki.fi](https://www.postgresql.org/message-id/0c5b3783-af52-3ee5-f8fa-= 6e794061f70d%40iki.fi) [https://git.postgresql.org/pg/commitdiff/37d2ff38031262a1778bc76a9c55fff= 7afbcf275](https://git.postgresql.org/pg/commitdiff/37d2ff38031262a1778bc76= a9c55fff7afbcf275) Thomas Munro pushed: - Add pg\_depend.refobjversion. Provide a place for the version of referenc= ed database objects to be recorded. A follow-up commit will use this to rec= ord dependencies on collation versions for indexes, but similar ideas for oth= er kinds of objects have also been mooted. Author: Thomas Munro thomas.munro [AT] gmail.com Reviewed-by: Julien Rouhaud rjuju123 [AT] gma= il.com Reviewed-by: Peter Eisentraut peter.eisentraut [AT] 2ndquadrant.com Discu= ssion: [https://postgr.es/m/CAEepm%3D0uEQCpfq\_%2BLYFBdArCe4Ot98t1aR4eYiYTe%3Dya= vQygiQ%40mail.gmail.com](https://postgr.es/m/CAEepm%3D0uEQCpfq\_%2BLYFBdArC= e4Ot98t1aR4eYiYTe%3DyavQygiQ%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/cd6f479e79f3a33ef7a919c6b6c0c49= 8c790f154](https://git.postgresql.org/pg/commitdiff/cd6f479e79f3a33ef7a919c= 6b6c0c498c790f154) - Remove pg\_collation.collversion. This model couldn't be extended to cove= r the default collation, and didn't have any information about the affected dat= abase objects when the version changed. Remove, in preparation for a follow-up commit that will add a new mechanism. Author: Thomas Munro thomas.munro [AT] gmail.com Reviewed-by: Julien Rouhaud rjuju123 [AT] gma= il.com Reviewed-by: Peter Eisentraut peter.eisentraut [AT] 2ndquadrant.com Discu= ssion: [https://postgr.es/m/CAEepm%3D0uEQCpfq\_%2BLYFBdArCe4Ot98t1aR4eYiYTe%3Dya= vQygiQ%40mail.gmail.com](https://postgr.es/m/CAEepm%3D0uEQCpfq\_%2BLYFBdArC= e4Ot98t1aR4eYiYTe%3DyavQygiQ%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/7d1297df0830725d4434ba7dbf71a9e= 8221ad49e](https://git.postgresql.org/pg/commitdiff/7d1297df0830725d4434ba7= dbf71a9e8221ad49e) - Track collation versions for indexes. Record the current version of depen= dent collations in pg\_depend when creating or rebuilding an index. When acce= ssing the index later, warn that the index may be corrupted if the current vers= ion doesn't match. Thanks to Douglas Doole, Peter Eisentraut, Christoph Berg, Laurenz Albe, Michael Paquier, Robert Haas, Tom Lane and others for very helpful discussion. Author: Thomas Munro thomas.munro [AT] gmail.com Aut= hor: Julien Rouhaud rjuju123 [AT] gmail.com Reviewed-by: Peter Eisentraut peter.eisentraut [AT] 2ndquadrant.com (earlier versions) Discussion: [https://postgr.es/m/CAEepm%3D0uEQCpfq\_%2BLYFBdArCe4Ot98t1aR4eYiYTe%3Dya= vQygiQ%40mail.gmail.com](https://postgr.es/m/CAEepm%3D0uEQCpfq\_%2BLYFBdArC= e4Ot98t1aR4eYiYTe%3DyavQygiQ%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/257836a75585934cc05ed7a80bccf81= 90d41e056](https://git.postgresql.org/pg/commitdiff/257836a75585934cc05ed7a= 80bccf8190d41e056) - Tolerate version lookup failure for old style Windows locale names. Accept that we can't get versions for such locale names for now. Users will nee= d to specify the newer language tag format to enable the collation versioning feature. It's not clear that we can do automatic conversion from the old style to the new style reliably enough for this purpose. Unfortunately, = this means that collation versioning probably won't work for the default colla= tion unless you provide something like en-US at initdb or CREATE DATABASE time (though, for reasons not yet understood, it does seem to work on some systems). It'd be nice to find a better solution, or document this quirk= if we settle on it, but this should unbreak the 3 failing build farm animals= in the meantime. Reviewed-by: David Rowley dgrowleyml [AT] gmail.com Review= ed-by: Tom Lane tgl [AT] sss.pgh.pa.us Discussion: [https://postgr.es/m/CAEepm%3D0uEQCpfq\_%2BLYFBdArCe4Ot98t1aR4eYiYTe%3Dya= vQygiQ%40mail.gmail.com](https://postgr.es/m/CAEepm%3D0uEQCpfq\_%2BLYFBdArC= e4Ot98t1aR4eYiYTe%3DyavQygiQ%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/9f12a3b95dd56c897f1aa3d756d8fb4= 19e84a187](https://git.postgresql.org/pg/commitdiff/9f12a3b95dd56c897f1aa3d= 756d8fb419e84a187) - Fix unlinking of SLRU segments. Commit dee663f7 intended to drop any queu= ed up fsync requests before unlinking segment files, but missed a code path. F= ix, by centralizing the forget-and-unlink code into a single function. Reported-by: Tomas Vondra tomas.vondra [AT] 2ndquadrant.com Discussion: [https://postgr.es/m/20201104013205.icogbi773przyny5%40development](https= ://postgr.es/m/20201104013205.icogbi773przyny5%40development) [https://git.postgresql.org/pg/commitdiff/c732c3f8c122009de373cff9b44b5cf= 0992ba1bf](https://git.postgresql.org/pg/commitdiff/c732c3f8c122009de373cff= 9b44b5cf0992ba1bf) - Fix assertion in collation version lookup. Commit 257836a7 included an assertion that a version lookup routine is not trying to look up "C" or "POSIX", but that case is reachable with the user-facing SQL function pg\_collation\_actual\_version(). Remove the assertion. [https://git.postgresql.org/pg/commitdiff/d50e3b1f8d763d51080ca4f6cbaa681= 8a6472292](https://git.postgresql.org/pg/commitdiff/d50e3b1f8d763d51080ca4f= 6cbaa6818a6472292) Magnus Hagander pushed: - Clarify temporary table name shadowing in CREATE TABLE docs. Author: David Johnston [https://git.postgresql.org/pg/commitdiff/5b3dca096f8e504b73812f68716fb68= dd1176d6d](https://git.postgresql.org/pg/commitdiff/5b3dca096f8e504b73812f6= 8716fb68dd1176d6d) - Use be\_tls\_\* API for SSL information in sslinfo. sslinfo was passing t= he Port->ssl member directly to OpenSSL in order to extract information r= egarding the connection. This breaks the API provided by the backend TLS implementation, as well as duplicates code for no benefit. Rewrite to mak= e use of the backend API as much as possible. Author: Daniel Gustafsson daniel [AT] yesql.se [https://git.postgresql.org/pg/commitdiff/5d1833f414973595411779b86e085fb= 05907a805](https://git.postgresql.org/pg/commitdiff/5d1833f414973595411779b= 86e085fb05907a805) - Improve error handling in backend OpenSSL implementation. Commit d94c36a4= 5ab introduced error handling to sslinfo to handle OpenSSL errors gracefully.= This ports this errorhandling to the backend TLS implementation. Author: Dani= el Gustafsson daniel [AT] yesql.se [https://git.postgresql.org/pg/commitdiff/13cfa02f77936895bff6ffabf1fde5d= 47fd1df07](https://git.postgresql.org/pg/commitdiff/13cfa02f77936895bff6ffa= bf1fde5d47fd1df07) - Use the non-deprecated TG\_TABLE\_MAME in test trigger. Commit 3a9ae3d206= 8 (back in 2006) deprecated TG\_RELNAME in favor of TG\_TABLE\_NAME, but the exis= ting usage in test cases has remained till today. Change to use TG\_TABLE\_NAME instead (TG\_RELNAME is still covered by a test case). [https://git.postgresql.org/pg/commitdiff/44a184cb686866b10d63695db344195= c239f9374](https://git.postgresql.org/pg/commitdiff/44a184cb686866b10d63695= db344195c239f9374) - Add pg\_strong\_random\_init function to initialize random number generat= or. Currently only OpenSSL requires this initialization, but in the future ot= her SSL implementations are likely to need it as well. Abstracting this functionality out into a separate function makes this cleaner and more cl= ear, and also removes the dependency on OpenSSL headers from fork\_process.c. OpenSSL is special in that we need to initialize this random number gener= ator even if we're not going to use it directly, until we drop support for everything prior to OpenSSL 1.1.1. (And of course also if we actually use= it). All other implementations are left empty at this time, but more are expec= ted to be added in the future. Author: Daniel Gustafsson daniel [AT] yesql.s= e, Michael Paquier michael [AT] paquier.xyz Reviewed-By: Magnus Hagander magnus [AT] hagander.net Discussion: [https://postgr.es/m/F6291C3C-747C-4C93-BCE0-28BB420B1FF5@yesql.se](https= ://postgr.es/m/F6291C3C-747C-4C93-BCE0-28BB420B1FF5@yesql.se) [https://git.postgresql.org/pg/commitdiff/5ee180a3947060b98284a935f26f92c= 71d698f7c](https://git.postgresql.org/pg/commitdiff/5ee180a3947060b98284a93= 5f26f92c71d698f7c) Peter Eisentraut pushed: - Use PG\_GETARG\_TRANSACTIONID where appropriate. Some places were using PG\_GETARG\_UINT32 where PG\_GETARG\_TRANSACTIONID would be more appropri= ate. (Of course, they are the same internally, so there is no externally visible effect.) To do that, export PG\_GETARG\_TRANSACTIONID outside of xid.c. = We also export PG\_RETURN\_TRANSACTIONID for symmetry, even though there are currently no external users. Author: Ashutosh Bapat ashutosh.bapat [AT] 2ndquadrant.com Discussion: [https://www.postgresql.org/message-id/flat/d8f6bdd536df403b9b33816e9f7e0= b9d@G08CNEXMBPEKD05.g08.fujitsu.local](https://www.postgresql.org/message-i= d/flat/d8f6bdd536df403b9b33816e9f7e0b9d@G08CNEXMBPEKD05.g08.fujitsu.local) [https://git.postgresql.org/pg/commitdiff/dd26a0ad760b11237d7ea9cda8ccccc= 1826c2c64](https://git.postgresql.org/pg/commitdiff/dd26a0ad760b11237d7ea9c= da8ccccc1826c2c64) - Remove use of deprecated containment operators in tests. Switch @ to `<= ;@` and ~ to `@>` in gist-related tests. The old operator names have been depre= cated and will eventually (possibly soon) be removed. Author: Justin Pryzby pryzby [AT] telsasoft.com Discussion: [https://www.postgresql.org/message-id/flat/20201027032511.GF9241@telsaso= ft.com](https://www.postgresql.org/message-id/flat/20201027032511.GF9241@te= lsasoft.com) [https://git.postgresql.org/pg/commitdiff/3165426e54df02a6199c0a216546e50= 95e875a0a](https://git.postgresql.org/pg/commitdiff/3165426e54df02a6199c0a2= 16546e5095e875a0a) - Remove deprecated containment operators for built-in types. Remove old containment operators @ and ~ for built-in geometry data types. These ha= ve been deprecated; use `<@` and `@>` instead. (Some contrib modules = still contain the same deprecated operators. That will be dealt with separately.) Auth= or: Justin Pryzby pryzby [AT] telsasoft.com Discussion: [https://www.postgresql.org/message-id/flat/20201027032511.GF9241@telsaso= ft.com](https://www.postgresql.org/message-id/flat/20201027032511.GF9241@te= lsasoft.com) [https://git.postgresql.org/pg/commitdiff/2f70fdb0644c32c4154236c2b5c241b= ec92eac5e](https://git.postgresql.org/pg/commitdiff/2f70fdb0644c32c4154236c= 2b5c241bec92eac5e) - Disallow ALTER TABLE ONLY / DROP EXPRESSION. The current implementation c= annot handle this correctly, so just forbid it for now. GENERATED clauses must= be attached to the column definition and cannot be added later like DEFAULT,= so if a child table has a generation expression that the parent does not hav= e, the child column will necessarily be an attlocal column. So to implement ALTER TABLE ONLY / DROP EXPRESSION, we'd need extra code to update attisl= ocal of the direct child tables, somewhat similar to how DROP COLUMN does it, = so that the resulting state can be properly dumped and restored. Discussion: [https://www.postgresql.org/message-id/flat/15830.1575468847%40sss.pgh.pa= .us](https://www.postgresql.org/message-id/flat/15830.1575468847%40sss.pgh.= pa.us) [https://git.postgresql.org/pg/commitdiff/bf797a8d9768239f5e3204b01304427= 4b2c7c24a](https://git.postgresql.org/pg/commitdiff/bf797a8d9768239f5e3204b= 013044274b2c7c24a) - Enable hash partitioning of text arrays. hash\_array\_extended() needs to= pass PG\_GET\_COLLATION() to the hash function of the element type. Otherwise= , the hash function of a collation-aware data type such as text will error out, since the introduction of nondeterministic collation made hash functions require a collation, too. The consequence of this is that before this ch= ange, hash partitioning using an array over text in the partition key would not work. Reviewed-by: Heikki Linnakangas hlinnaka [AT] iki.fi Reviewed-by: = Tom Lane tgl [AT] sss.pgh.pa.us Reviewed-by: Michael Paquier michael [AT] paquier.= xyz Discussion: [https://www.postgresql.org/message-id/flat/32c1fdae-95c6-5dc6-058a-a9033= 0a3b621%40enterprisedb.com](https://www.postgresql.org/message-id/flat/32c1= fdae-95c6-5dc6-058a-a90330a3b621%40enterprisedb.com) [https://git.postgresql.org/pg/commitdiff/560564d3addcb6c54e13c1ca8bd11af= afbb7ba11](https://git.postgresql.org/pg/commitdiff/560564d3addcb6c54e13c1c= a8bd11afafbb7ba11) - Move catalog toast table declarations. Move the system catalog toast table declarations from catalog/toasting.h to the respective parent tables' catalog/pg\_\*.h files. The original reason for having it split was that= the old genbki system produced the output in the order of the catalog files it read, so all the toasting stuff needed to come separately. But this is no longer the case, and keeping it together makes more sense. Reviewed-by: = John Naylor john.naylor [AT] enterprisedb.com Discussion: [https://www.postgresql.org/message-id/flat/c7cc82d6-f976-75d6-2e3e-b03d2= cab26bb@2ndquadrant.com](https://www.postgresql.org/message-id/flat/c7cc82d= 6-f976-75d6-2e3e-b03d2cab26bb@2ndquadrant.com) [https://git.postgresql.org/pg/commitdiff/b4c9695e79f79d39d55853acac4c149= 3ac70a529](https://git.postgresql.org/pg/commitdiff/b4c9695e79f79d39d55853a= cac4c1493ac70a529) - Move catalog index declarations. Move the system catalog index declaratio= ns from catalog/indexing.h to the respective parent tables' catalog/pg\_\*.h= files. The original reason for having it split was that the old genbki system produced the output in the order of the catalog files it read, so all the indexing stuff needed to come separately. But this is no longer the case= , and keeping it together makes more sense. Reviewed-by: John Naylor john.naylor [AT] enterprisedb.com Discussion: [https://www.postgresql.org/message-id/flat/c7cc82d6-f976-75d6-2e3e-b03d2= cab26bb@2ndquadrant.com](https://www.postgresql.org/message-id/flat/c7cc82d= 6-f976-75d6-2e3e-b03d2cab26bb@2ndquadrant.com) [https://git.postgresql.org/pg/commitdiff/bdc4edbea6fc847f806e1e7118d730e= 159512bfc](https://git.postgresql.org/pg/commitdiff/bdc4edbea6fc847f806e1e7= 118d730e159512bfc) - Fix redundant error messages in client tools. A few client tools duplicate error messages already provided by libpq. Discussion: [https://www.postgresql.org/message-id/flat/3e937641-88a1-e697-612e-99bba= 4b8e5e4%40enterprisedb.com](https://www.postgresql.org/message-id/flat/3e93= 7641-88a1-e697-612e-99bba4b8e5e4%40enterprisedb.com) [https://git.postgresql.org/pg/commitdiff/6be725e701611660b36642de9ff1d66= 5a1eb24f5](https://git.postgresql.org/pg/commitdiff/6be725e701611660b36642d= e9ff1d665a1eb24f5) - Fix test for error message change. fix for 6be725e701611660b36642de9ff1d665a1eb24f5 [https://git.postgresql.org/pg/commitdiff/8cff66d309b90e03f1e76494375960f= 35eff6424](https://git.postgresql.org/pg/commitdiff/8cff66d309b90e03f1e7649= 4375960f35eff6424) Tom=C3=A1=C5=A1 Vondra pushed: - Fix get\_useful\_pathkeys\_for\_relation for volatile expressions. When considering Incremental Sort below a Gather Merge, we need to be a bit mo= re careful when matching pathkeys to EC members. It's not enough to find a m= ember whose Vars are all in the current relation's target; volatile expressions= in particular need to be contained in the target, otherwise it's too early t= o use the pathkey. Reported-by: Jaime Casanova Author: James Coleman Reviewed-= by: Tomas Vondra Backpatch-through: 13, where the incremental sort code was a= dded Discussion: [https://postgr.es/m/CAJGNTeNaxpXgBVcRhJX%2B2vSbq%2BF2kJqGBcvompmpvXb7pq%= 2BoFA%40mail.gmail.com](https://postgr.es/m/CAJGNTeNaxpXgBVcRhJX%2B2vSbq%2B= F2kJqGBcvompmpvXb7pq%2BoFA%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/ebb7ae839d033d0f279670e249f5464= 6a08b8c48](https://git.postgresql.org/pg/commitdiff/ebb7ae839d033d0f279670e= 249f54646a08b8c48) - Use INT64\_FORMAT to print int64 variables in sort debug. Commit 6ee3b5fb= 99 cleaned up most of the long/int64 confusion related to incremental sort, = but the sort debug messages were still using %ld for int64 variables. So fix = that. Author: Haiying Tang Backpatch-through: 13, where the incremental sort co= de was added Discussion: [https://postgr.es/m/4250be9d350c4992abb722a76e288aef%40G08CNEXMBPEKD05.g= 08.fujitsu.local](https://postgr.es/m/4250be9d350c4992abb722a76e288aef%40G0= 8CNEXMBPEKD05.g08.fujitsu.local) [https://git.postgresql.org/pg/commitdiff/90851d1d26f54ccb4d7b1bc49449138= 113d6ec83](https://git.postgresql.org/pg/commitdiff/90851d1d26f54ccb4d7b1bc= 49449138113d6ec83) - Properly detoast data in brin\_form\_tuple. brin\_form\_tuple failed to c= onsider the values may be toasted, inserting the toast pointer into the index. Th= is may easily result in index corruption, as the toast data may be deleted a= nd cleaned up by vacuum. The cleanup however does not care about indexes, le= aving invalid toast pointers behind, which triggers errors like this: ERROR: missing chunk number 0 for toast value 16433 in pg\_toast\_16426 A less = severe consequence are inconsistent failures due to the index row being too larg= e, depending on whether brin\_form\_tuple operated on plain or toasted versi= on of the row. For example CREATE TABLE t (val TEXT); INSERT INTO t VA= LUES ('... long value ...') CREATE INDEX idx ON t USING brin (val); would likely succeed, as the row would likely include toast pointer. Switching = the order of INSERT and CREATE INDEX would likely fail: ERROR: index row size 8712 exceeds maximum 8152 for index "idx" because this happens befo= re the row values are toasted. The bug exists since PostgreSQL 9.5 where BR= IN indexes were introduced. So backpatch all the way back. Author: Tomas Vo= ndra Reviewed-by: Alvaro Herrera Backpatch-through: 9.5 Discussion: [https://postgr.es/m/20201001184133.oq5uq75sb45pu3aw@development](https:/= /postgr.es/m/20201001184133.oq5uq75sb45pu3aw@development) Discussion: [https://postgr.es/m/20201104010544.zexj52mlldagzowv%40development](https= ://postgr.es/m/20201104010544.zexj52mlldagzowv%40development) [https://git.postgresql.org/pg/commitdiff/7577dd84807a808f295dbfb01915407= 50ff98002](https://git.postgresql.org/pg/commitdiff/7577dd84807a808f295dbfb= 0191540750ff98002) Fujii Masao pushed: - Use standard SIGHUP handler in syslogger. Commit 1e53fe0e70 changed backg= round processes so that they use standard SIGHUP handler. Like that, this commit makes syslogger use standard SIGHUP handler to simplify the code. Author: Bharath Rupireddy Reviewed-by: Fujii Masao Discussion: [https://postgr.es/m/CALj2ACXPorUqePswDtOeM\_s82v9RW32E1fYmOPZ5NuE+TWKj\_= A@mail.gmail.com](https://postgr.es/m/CALj2ACXPorUqePswDtOeM\_s82v9RW32E1fY= mOPZ5NuE+TWKj\_A@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/02d332297f9bfe63476d53a439cc8f3= b05bb5e67](https://git.postgresql.org/pg/commitdiff/02d332297f9bfe63476d53a= 439cc8f3b05bb5e67) - Get rid of the dedicated latch for signaling the startup process. This co= mmit gets rid of the dedicated latch for signaling the startup process in favo= r of using its procLatch, since that comports better with possible generic si= gnal handlers using that latch. Commit 1e53fe0e70 changed background processe= s so that they use standard SIGHUP handler. Like that, this commit also makes = the startup process use standard SIGHUP handler to simplify the code. Author: Fujii Masao Reviewed-by: Bharath Rupireddy, Michael Paquier Discussion: [https://postgr.es/m/CALj2ACXPorUqePswDtOeM\_s82v9RW32E1fYmOPZ5NuE+TWKj\_= A@mail.gmail.com](https://postgr.es/m/CALj2ACXPorUqePswDtOeM\_s82v9RW32E1fY= mOPZ5NuE+TWKj\_A@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/ac22929a2613e122708bd0172508ac8= 63c51c1cc](https://git.postgresql.org/pg/commitdiff/ac22929a2613e122708bd01= 72508ac863c51c1cc) - Fix segmentation fault that commit ac22929a26 caused. Commit ac22929a26 changed recoveryWakeupLatch so that it's reset to NULL at the end of reco= very. This change could cause a segmentation fault in the buildfarm member 'elv= er'. Previously the latch was reset to NULL after calling ShutdownWalRcv(). But there could be a window between ShutdownWalRcv() and the actual exit of walreceiver. If walreceiver set the latch during that window, the segment= ation fault could happen. To fix the issue, this commit changes walreceiver so= that it sets the latch only when the latch has not been reset to NULL yet. Au= thor: Fujii Masao Discussion: [https://postgr.es/m/5c1f8a85-747c-7bf9-241e-dd467d8a3586@iki.fi](https:/= /postgr.es/m/5c1f8a85-747c-7bf9-241e-dd467d8a3586@iki.fi) [https://git.postgresql.org/pg/commitdiff/113d3591b859fb8dc191bc0599d1ad6= 2d91f1aa4](https://git.postgresql.org/pg/commitdiff/113d3591b859fb8dc191bc0= 599d1ad62d91f1aa4) - pg\_prewarm: make autoprewarm leader use standard SIGHUP and SIGTERM hand= lers. Commit 1e53fe0e70 changed background processes so that they use standard SIGHUP handler. Like that, this commit makes autoprewarm leader process a= lso use standard SIGHUP and SIGTERM handlers, to simplify the code. Author: Bharath Rupireddy Reviewed-by: Kyotaro Horiguchi, Fujii Masao Discussion: [https://postgr.es/m/CALj2ACXPorUqePswDtOeM\_s82v9RW32E1fYmOPZ5NuE+TWKj\_= A@mail.gmail.com](https://postgr.es/m/CALj2ACXPorUqePswDtOeM\_s82v9RW32E1fY= mOPZ5NuE+TWKj\_A@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/53f614f1302d56e5fbb98826c7eee3c= 715411184](https://git.postgresql.org/pg/commitdiff/53f614f1302d56e5fbb9882= 6c7eee3c715411184) Peter Geoghegan pushed: - Fix nbtree cleanup-only VACUUM stats inaccuracies. Logic for counting heap TIDs from posting list tuples (added by commit 0d861bbb) was faulty. It didn't count any TIDs/index tuples in the event of no callback being set. This meant that we incorrectly counted no index tuples in clean-up only VACUUMs, which could lead to pg\_class.reltuples being spuriously set to = 0 in affected indexes. To fix, go back to counting items from the page in cas= es where there is no callback. This approach isn't very accurate, but it wo= rks well enough in practice while avoiding the expense of accessing every ind= ex tuple during cleanup-only VACUUMs. Author: Peter Geoghegan pg [AT] bowt.= ie Reported-By: Jehan-Guillaume de Rorthais jgdr [AT] dalibo.com [https://postgr.es/m/20201023174451.69e358f1@firost](https://postgr.es/m/= 20201023174451.69e358f1@firost) Backpatch: 13-, where nbtree deduplication was introduced [https://git.postgresql.org/pg/commitdiff/48e1291342dd7771cf8c67aa1d7ec1f= 394b95dd8](https://git.postgresql.org/pg/commitdiff/48e1291342dd7771cf8c67a= a1d7ec1f394b95dd8) - Fix wal\_consistency\_checking nbtree bug. wal\_consistency\_checking ind= icated an inconsistency in certain cases involving nbtree page deletion. The under= lying issue is that there was a minor difference between the page image produced after a REDO routine ran and the corresponding page image following origi= nal execution. This harmless inconsistency has been around forever. We more= or less expect total consistency among even deleted nbtree pages these days, though, so this won't do anymore. To fix, tweak the REDO routine to match original execution. Oversight in commit f47b5e13. [https://git.postgresql.org/pg/commitdiff/efc5dcfd8ad4e1df633025d8a91b64c= d44d93f42](https://git.postgresql.org/pg/commitdiff/efc5dcfd8ad4e1df633025d= 8a91b64cd44d93f42) - Improve nbtree README's LP\_DEAD section. The description of how LP\_DEAD= bit setting by index scans works following commit 2ed5b87f was rather unclear. Clean that up a bit. Also refer to LP\_DEAD bit setting within \_bt\_check\_unique() at the start of the same section. This mechanism m= ay actually be more important than the generic kill\_prior\_tuple mechanism = that the section focuses on, so it at least deserves to be mentioned in passin= g. [https://git.postgresql.org/pg/commitdiff/5a2f154a2ecaf545000a3ff3cdbadc7= 6ae1df30a](https://git.postgresql.org/pg/commitdiff/5a2f154a2ecaf545000a3ff= 3cdbadc76ae1df30a) =C3=81lvaro Herrera pushed: - Plug memory leak in index\_get\_partition. The list of indexes was being = leaked when asked for an index that doesn't have an index partition in the table partition. Not a common case admittedly --and in most cases where it occ= urs, caller throws an error anyway-- but worth fixing for cleanliness and in c= ase any third-party code is calling this function. While at it, remove use of lfirst\_oid() to obtain a value we already have. Author: Justin Pryzby pryzby [AT] telsasoft.com Reviewed-by: Michael Paquier michael [AT] paqui= er.xyz Discussion: [https://postgr.es/m/20201105203606.GF22691@telsasoft.com](ht= tps://postgr.es/m/20201105203606.GF22691@telsasoft.com) [https://git.postgresql.org/pg/commitdiff/623644f02cbde7ad3812b201bd36213= a206c3341](https://git.postgresql.org/pg/commitdiff/623644f02cbde7ad3812b20= 1bd36213a206c3341) - Message style improvements. \* Avoid pointlessly highlighting that an ind= ex vacuum was executed by a parallel worker; user doesn't care. \* Don't = give the impression that a non-concurrent reindex of an invalid index on a T= OAST table would work, because it wouldn't. \* Add a "translator:" comment fo= r a mysterious message. Discussion: [https://postgr.es/m/20201107034943.GA16596@alvherre.pgsql](https://postg= r.es/m/20201107034943.GA16596@alvherre.pgsql) Reviewed-by: Michael Paquier michael [AT] paquier.xyz [https://git.postgresql.org/pg/commitdiff/52eec1c53aa6a7df1683fba79078793= f1d0eba42](https://git.postgresql.org/pg/commitdiff/52eec1c53aa6a7df1683fba= 79078793f1d0eba42) # Pending Patches Nikhil Benesch sent in a patch to support negative indexes in the split\_pa= rt() function, those counting from the end of the array instead of the start. Justin Pryzby sent in another revision of a patch to refactor CIC to rely on REINDEX CONCURRENTLY, refactor same to allow reindexing all index partition= s at once, and make ReindexPartitions() set indisvalid so things that come by la= ter can see they're ready to go. Magnus Hagander sent in another revision of a patch to remove the obsolete analyze\_new\_cluster.sh script and things that know about it from pg\_upgr= ade. Anastasia Lubennikova sent in another revision of a patch to teach COPY FRE= EZE to set PD\_ALL\_VISIBLE and visibility map bits. David G. Johnston sent in another revision of a patch to clarify the fact t= hat signal functions have no feedback. Heikki Linnakangas sent in four revisions of a patch to split copy.c into copyto.c and copyfrom.c, and further split copyfrom.c into copyfrom.c and copyfromparse.c. This will make working on the usually independent functionalities of the split files more convenient and easier to read. =C3=81lvaro Herrera sent in another revision of a patch to add batch/pipeli= ning support to libpq. Pavel St=C4=9Bhule sent in a patch to reduce overhead of execution of CALL = statement in no atomic mode from PL/pgSQL. Magnus Hagander sent in two revisions of a patch to remove the obsolete -O switch for postgres, which once allowed passing options to each server proc= ess. Kyotaro HORIGUCHI sent in two more revisions of a patch to fix a dereference before NULL check in src/backend/storage/ipc/latch.c. David Rowley sent in two revisions of a patch to reduce the number of speci= al cases to build contrib modules on windows. Konstantin Knizhnik sent in three more revisions of a patch to add custom compression to libpq. Fabien COELHO sent in another revision of a patch to pgbench to add an opti= on which delays queries until connections are established. Thomas Munro and David Rowley traded patches to implement collation version= ing. Jinbao Chen sent in a patch to add a new table am 'tid\_visible' to test the visibility of a tid. Peter Geoghegan sent in another revision of a patch to add delete deduplica= tion to nbtree. Stephen Frost sent in two more revisions of a patch to use pre-fetching for ANALYZE. Tom=C3=A1=C5=A1 Vondra sent in another revision of a patch to use INT64\_FO= RMAT to print int64 variables in sort debug. Bharath Rupireddy sent in another revision of a patch to use multi Inserts = in Create Table As. Amit Langote sent in another revision of a patch to call BeginDirectModify = from ExecInitModifyTable, and initialize result relation information lazily. This work builds infrastructure that will later be used to make writes on foreign tables more efficient. Vigneshwaran C sent in two more revisions of a patch to improve the connect= ion authorization message for GSS authenticated/encrypted connections by adding= a log message to include GSS authentication, encryption, and principal information. This message will help the user to know whether GSS authentica= tion or encryption was used and which GSS principal was used. Tom=C3=A1=C5=A1 Vondra sent in three more revisions of a patch to implement= BRIN multi-range indexes. =C3=81lvaro Herrera sent in another revision of a patch to implement ALTER = TABLE ... DETACH CONCURRENTLY. Tsutomu Yamada sent in another revision of a patch to add \\dX, which lists extended statistics, to psql. Pavel Borisov sent in two more revisions of a patch to deprecate and replac= e `<^` and `>^` operators for points. Melanie Plageman sent in another revision of a patch to support parallel FU= LL JOIN and RIGHT JOIN. Kyotaro HORIGUCHI sent in two more revisions of a patch to use shared memory instead of files for storage in the stats collector. Ajin Cherian and Peter Smith traded patches to add logical decoding of two-= phase transactions. Kirk Jamison sent in another revision of a patch to make DropRelFileNodeBuffers() more efficient during recovery by avoiding scannin= g the whole buffer pool when the relation is small enough, or the the total numbe= r of blocks to be invalidated is below the threshold of full scanning. Daniel Gustafsson sent in two more revisions of a patch to support NSS as a= TLS backend for libpq. Takamichi Osumi sent in three more revisions of a patch to implement CREATE= OR REPLACE TRIGGER. Fujii Masao sent in another revision of a patch to use standard SIGHUP and SIGTERM handlers in the autoprewarm process. Justin Pryzby sent in another revision of a patch to Implement CLUSTER of partitioned table. This requires either specification of a partitioned ind= ex on which to cluster, or that an partitioned index was previously set clustered. Kyotaro HORIGUCHI sent in another revision of a patch to fix NaN handling in some geometric operators and functions. Micha=C3=ABl Paquier sent in another revision of a patch to rework the SHA2= APIs, switch sha2\_openssl.c to use EVP, and make pgcrypto use the in-core resown= er facility for EVP. Yuzuko Hosoya sent in another revision of a patch to fix some infelicities between autovacuum and partitioned tables. Justin Pryzby sent in another revision of a patch to make pg\_ls\_\* show directories and shared filesets. Seino Yuki sent in another revision of a patch to enable pg\_stat\_statemen= ts to track rows processed by REFRESH MATERIALIZED VIEW. Kyotaro HORIGUCHI sent in two more revisions of a patch to implement CatCac= he expiration. David Pirotte sent in another revision of a patch to add logical decoding messages to pgoutput. Masahiko Sawada sent in two more revisions of a patch to implement a transa= ction manager for foreign transactions. Masahiro Ikeda sent in another revision of a patch to add statistics to the pg\_stat\_wal view. Justin Pryzby sent in a patch atop the one for incremental view maintenance patch which fixes some documentation. Micha=C3=ABl Paquier sent in a patch to refactor the MD5 implementations to= be just one, and switch to EVP for OpenSSL. Justin Pryzby sent in another revision of a patch to clarify the computatio= n of min/max IO and specifically the double use and effect of correlation, avoid re-using the "pages\_fetched" variable, and use the correlation statistic in costing bitmap scans as for an index scan. Sergei Kornilov sent in another revision of a patch to allow some recovery parameters to be changed with reload. Marina Polyakova sent in two revisions of a patch to fix a bug that manifes= ted as pgbench no longer supporting a large number of client connections on Win= dows. Andrey Borodin sent in another revision of a patch to add Sortsupport for sorting GiST build for gist\_btree types. J=C3=BCrgen Purtz and Erik Rijkers traded patches to add an architecture ch= apter to the tutorial. Dilip Kumar sent in another revision of a patch to implement custom table compression methods. Tom=C3=A1=C5=A1 Vondra sent in a patch to remove some duplicate code from brin\_memtuple\_initialize. --===============7828189117301818021== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable PostgreSQL Weekly News - November 8, 2020
 

PostgreSQL Weekly News - November 8, 2020

PostgreSQL Weekly News - November 8, 2020

Congratulations to new core team members An= dres Freund and Jonathan Katz! https://www.postgresql.org/developer/core/=

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

PostgreSQL Product News

phpPgAdmin 7.13.1, a web-based administrati= on tool for PostgreSQL, released. https://xzilla.net/= /blog/2020/Nov/phpPgAdmin-7-13-1-released.html

Ajqvue Version 3.3, a java-based UI which s= upports PostgreSQL, released. http://ajqvue.com

pg_statement_rollback, an extension that ad= ds server side transaction with rollback at statement level, released. https://github.com/lzlabs/p= g_statement_rollback/releases/

PostgreSQL Jobs for November

ht= tp://archives.postgresql.org/pgsql-jobs/2020-11/

PostgreSQL in the News

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

PostgreSQL Weekly News is brought to you th= is week by David Fetter

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

Applied Patches

Tom Lane pushed:

  • Fix two issues in TOAST decompression. pglz= _maximum_compressed_size() potentially underestimated the amount of compressed data required to prod= uce N bytes of decompressed data; this is a fault in commit 11a078cf8. Separat= ely from that, pglz_decompress() failed to protect itself against corrupt compressed data, particularly off =3D=3D 0 in a match tag. Commit c60e52= 0f6 turned such a situation into an infinite loop, where before it'd just have resulted in garbage output. The combination of these two bugs seems like= it may explain bug #16694 from Tom Vijlbrief, though it's impossible to be q= uite sure without direct inspection of the failing session. (One needs to ass= ume that the pglz_maximum_compressed_size() bug caused us to fail to fetch the second byte of a match tag, and what happened to be there instead was a z= ero. The reported infinite loop is hard to explain without off =3D=3D 0, thoug= h.) Aside from fixing the bugs, rewrite associated comments for more clarity. Back-patch to v13 where both these commits landed. Discussion: https://postgr.es/m/16694= -f107871e499ec114@postgresql.org htt= ps://git.postgresql.org/pg/commitdiff/dfc797730fc7a07c0e6bd636ad1a564aecab3= 161

  • Second thoughts on TOAST decompression. On = detecting a corrupted match tag, pglz_decompress() should just summarily return -1. Breaking out of the l= oop, as I did in dfc797730, doesn't quite guarantee that will happen. Also, w= e can use unlikely() on that check, just in case it helps. Backpatch to v13, l= ike the previous patch. h= ttps://git.postgresql.org/pg/commitdiff/fd2997565c6f66837440dd57f5e52b56aa9= 64d14

  • Rethink the generation rule for fmgroids.h = macros. Traditionally, the names of fmgroids.h macros for pg_proc OIDs have been constructed from the prosrc field. But sometimes the same C function underlies multiple pg_proc entr= ies, forcing us to make an arbitrary choice of which OID to reference; the oth= er entries are then not namable via fmgroids.h. Moreover, we could not have macros at all for pg_proc entries that aren't for C-coded functions. Ins= tead, use the proname field, and append the proargtypes field (replacing inter-argument spaces with underscores) if proname is not unique. Special-casing unique entries such as F_OIDEQ removes the need to change = a lot of code. Indeed, I can only find two places in the tree that need to be adjusted; while this changes quite a few existing entries in fmgroids.h, = few of them are referenced from C code. With this patch, all entries in pg_proc.dat have macros in fmgroids.h. Discussion: https://postgr.es/m/472274.1604= 258384@sss.pgh.pa.us htt= ps://git.postgresql.org/pg/commitdiff/8e1f37c07aafd4bb7aa6e1e1982010af11f8b= 5c7

  • Remove special checks for pg_rewrite.ev_qua= l and ev_action being NULL. make_ruledef() and make_viewdef() were coded to cope with possible null-n= ess of these columns, but they've been marked BKI_FORCE_NOT_NULL for some tim= e. So there's not really any need to do more than what we do for the other columns of pg_rewrite, i.e. just Assert that we got non-null results. (T= here is a school of thought that says Asserts aren't the thing to do to check = for corrupt data, but surely here is not the place to start if we want such a policy.) Also, remove long-dead-if-indeed-it-ever-wasn't-dead handling o= f an empty actions list in make_ruledef(). That's an error case and should be treated as such. (DO INSTEAD NOTHING is represented by a CMD_NOTHING Que= ry, not an empty list; cf transformRuleStmt.) Kyotaro Horiguchi, some change= s by me Discussion: https://postgr.es/m/CAEudQApoA=3DtMTic6xEPYP_hsNZ8XtToVThK_0x7D_aFQYo= wq3w@mail.gmail.com htt= ps://git.postgresql.org/pg/commitdiff/e1339bfc7a2fd4629e1c3f8f919ddd05b4745= e13

  • Fix unportable use of getnameinfo() in pg_h= ba_file_rules view. fill_hba_line() thought it could get away with passing sizeof(struct sockaddr_storage) ra= ther than the actual addrlen previously returned by getaddrinfo(). While that appears to work on many platforms, it does not work on FreeBSD 11: you get back a failure, which leads to the view showing NULL for the address and netmask columns in all rows. The POSIX spec for getnameinfo() is pretty clearly on FreeBSD's side here: you should pass the actual address length= . So it seems plausible that there are other platforms where this coding also fails, and we just hadn't noticed. Also, IMO the fact that getnameinfo() failure leads to a NULL output is pretty bogus in itself. Our pg_getnameinfo_all() wrapper is careful to emit "???" on failure, and we should use that in such cases. NULL should only be emitted in rows that = don't have IP addresses. Per bug #16695 from Peter Vandivier. Back-patch to v= 10 where this code was added. Discussion: https://postgr.es/m/16695= -a665558e2f630be7@postgresql.org htt= ps://git.postgresql.org/pg/commitdiff/0a4b34031279d938c2e59df8df7159d6c11e3= 9b5

  • Allow users with BYPASSRLS to alter their o= wn passwords. The intention in commit 491c029db was to require superuserness to change the BYPASSRLS property, but the actual effect of the coding in AlterRole() was to requi= re superuserness to change anything at all about a BYPASSRLS role. Other properties of a BYPASSRLS role should be changeable under the same rules = as for a normal role, though. Fix that, and also take care of some document= ation omissions related to BYPASSRLS and REPLICATION role properties. Tom Lane= and Stephen Frost, per bug report from Wolfgang Walther. Back-patch to all supported branches. Discussion: https://po= stgr.es/m/a5548a9f-89ee-3167-129d-162b5985fcf8@technowledgy.de htt= ps://git.postgresql.org/pg/commitdiff/d907bd0543aa63e59653d7345840bed0f8b3a= 83b

  • Improve error messages around REPLICATION a= nd BYPASSRLS properties. Clarify wording as per suggestion from Wolfgang Walther. No back-patch; this does= n't seem worth thrashing translatable strings in the back branches. Tom Lane= and Stephen Frost Discussion: https://po= stgr.es/m/a5548a9f-89ee-3167-129d-162b5985fcf8@technowledgy.de htt= ps://git.postgresql.org/pg/commitdiff/17fb60387ce3fdc2bbb13d9b67bed0e4da77e= 173

  • Guard against core dump from uninitialized = subplan. If the planner erroneously puts a non-parallel-safe SubPlan into a parallelized portion of the query tree, nodeSubplan.c will fail in the worker processes because it finds a = null in es_subplanstates, which it's unable to cope with. It seems worth a test-and-elog to make that an error case rather than a core dump case. T= his probably should have been included in commit 16ebab688, which was respons= ible for allowing nulls to appear in es_subplanstates to begin with. So, back-patch to v10 where that came in. Discussion: https://postgr.es/m/924226.1604= 422326@sss.pgh.pa.us htt= ps://git.postgresql.org/pg/commitdiff/92f87182f2c617fd420832972b6d0ae452730= 1c8

  • Remove useless entries for aggregate functi= ons from fmgrtab.c. Gen_fmgrtab.pl treated aggregate functions the same as other built-in functions, which is wasteful because there is no real need to have entries for them in the fmgr_builtins[] table. Suppressing those entries saves about 3KB in the compiled table on my machine; which is not a lot but it's not nothing eit= her, considering that that table is pretty "hot". The only outside code change needed is that ExecInitWindowAgg() can't be allowed to call fmgr_info_cxt= () on a plain aggregate function. But that saves a few cycles anyway. Having = done that, the aggregate_dummy() function is unreferenced and might as well be dropped. Using "aggregate_dummy" as the prosrc value for an aggregate is= now just a documentation convention not something that matters. There was so= me discussion of using NULL instead to save a few bytes in pg_proc, but we'd= have to remove prosrc's BKI_FORCE_NOT_NULL marking which doesn't seem a great = idea. Anyway, it's possible there's client-side code that expects to see "aggregate_dummy" there, so I'm loath to change it without a strong reaso= n. Discussion: https://postgr.es/m= /533989.1604263665@sss.pgh.pa.us htt= ps://git.postgresql.org/pg/commitdiff/f21636e5d5b8394ed076e18ddc5f4ba710c69= c99

  • Improve our ability to regurgitate SQL-synt= ax function calls. The SQL spec calls out nonstandard syntax for certain function calls, for example substring() with numeric position info is supposed to be spelled "SUBSTRING(string FROM start FOR count)". We accept many of these things= , but up to now would not print them in the same format, instead simplifying do= wn to "substring"(string, start, count). That's long annoyed me because it crea= tes an interoperability problem: we're gratuitously injecting Postgres-specif= ic syntax into what might otherwise be a perfectly spec-compliant view definition. However, the real reason for addressing it right now is to su= pport a planned change in the semantics of EXTRACT() a/k/a date_part(). When we switch that to returning numeric, we'll have the parser translate EXTRACT= () to some new function name (might as well be "extract" if you ask me) and then teach ruleutils.c to reverse-list that per SQL spec. In this way existing calls to date_part() will continue to have the old semantics. To impleme= nt this, invent a new CoercionForm value COERCE_SQL_SYNTAX, and make the par= ser insert that rather than COERCE_EXPLICIT_CALL when the input has SQL-spec decoration. (But if the input has the form of a plain function call, con= tinue to mark it COERCE_EXPLICIT_CALL, even if it's calling one of these functi= ons.) Then ruleutils.c recognizes COERCE_SQL_SYNTAX as a cue to emit SQL call syntax. It can know which decoration to emit using hard-wired knowledge = about the functions that could be called this way. (While this solution isn't extensible without manual additions, neither is the grammar, so this does= n't seem unmaintainable.) Notice that this solution will reverse-list a func= tion call with SQL decoration only if it was entered that way; so dump-and-rel= oad will not by itself produce any changes in the appearance of views. This requires adding a CoercionForm field to struct FuncCall. (I couldn't resi= st the temptation to rearrange that struct's field order a tad while I was at it.) FuncCall doesn't appear in stored rules, so that change isn't a rea= son for a catversion bump, but I did one anyway because the new enum value for CoercionForm fields could confuse old backend code. Possible future work= : * Perhaps CoercionForm should now be renamed to DisplayForm, or something l= ike that, to reflect its more general meaning. This'd require touching a coup= le hundred places, so it's not clear it's worth the code churn. * The SQLValueFunction node type, which was invented partly for the same goal of improving SQL-compatibility of view output, could perhaps be replaced with regular function calls marked with COERCE_SQL_SYNTAX. It's unclear if th= is would be a net code savings, however. Discussion: https://postg= r.es/m/42b73d2d-da12-ba9f-570a-420e0cce19d9@phystech.edu htt= ps://git.postgresql.org/pg/commitdiff/40c24bfef92530bd846e111c1742c2a54441c= 62c

  • Declare lead() and lag() using anycompatibl= e not anyelement. This allows use of a "default" expression that doesn't slavishly match the data column's = type. Formerly you got something like "function lag(numeric, integer, integer) = does not exist", which is not just unhelpful but actively misleading. The SQL= spec suggests that the default should be coerced to the data column's type, but this implementation instead chooses the common supertype, which seems at = least as reasonable. (Note: I took the opportunity to run "make reformat-dat-f= iles" on pg_proc.dat, so this commit includes some cosmetic changes to recently-added entries that aren't related to lead/lag.) Vik Fearing Discussion: https:= //postgr.es/m/77675130-89da-dab1-51dd-492c93dcf5d1@postgresfriends.org htt= ps://git.postgresql.org/pg/commitdiff/5c292e6b90433c760a3e15027646c7b94afd0= cdd

  • Declare assorted array functions using anyc= ompatible not anyelement. Convert array_append, array_prepend, array_cat, array_position, array_positions, array_remove, array_replace, and width_bucket to use anycompatiblearray. = This is a simple extension of commit 5c292e6b9 to hit some other places where there's a pretty obvious gain in usability from doing so. Ideally we'd a= lso modify other functions taking multiple old-style polymorphic arguments. = But most of the remainder are tied into one or more operator classes, making = any such change a much larger can of worms than I desire to open right now. Discussion: https:= //postgr.es/m/77675130-89da-dab1-51dd-492c93dcf5d1@postgresfriends.org htt= ps://git.postgresql.org/pg/commitdiff/9e38c2bb5093ceb0c04d6315ccd8975bd17ad= d66

  • Remove underflow error in float division wi= th infinite divisor. float4_div and float8_div correctly produced zero for zero divided by infinity, but thre= w an underflow error for nonzero finite values divided by infinity. This seems wrong; at the very least it's inconsistent with the behavior recently implemented for numeric infinities. Remove the error and allow zero to be returned. This patch also removes a useless isinf() test from the overfl= ow checks in these functions (non-Inf divided by Inf can't produce Inf). Extracted from a larger patch; this seems significant outside the context= of geometric operators, so it deserves its own commit. Kyotaro Horiguchi Discussion: https://postgr.es/m/CAGf+fX70rWFOk5cd00uMfa__0yP+vtQg5ck7c2Onb-Yczp0URA= @mail.gmail.com htt= ps://git.postgresql.org/pg/commitdiff/fac83dbd6fe1ac3d4125bfa39f287f95bffe6= cda

  • Don't throw an error for LOCK TABLE on a se= lf-referential view. LOCK TABLE has complained about "infinite recursion" when applied to a self-referential = view, ever since we made it recurse into views in v11. However, that breaks pg_dump's new assumption that it's okay to lock every relation. There do= esn't seem to be any good reason to throw an error: if we just abandon the recursion, we've still satisfied the requirement of locking every referen= ced relation. Per bug #16703 from Andrew Bille (via Alexander Lakhin). Discussion: https://postg= r.es/m/16703-e348f58aab3cf6cc@postgresql.org htt= ps://git.postgresql.org/pg/commitdiff/5b7bfc39726ff9f6c52dd73e337c34e74e0d1= f39

  • Revert "pg_dump: Lock all relations, not ju= st plain tables". Revert 403a3d91c, as well as the followup fix 7f4235032, in all branches. We need to think= a bit harder about what the behavior of LOCK TABLE on views should be, and there's no time for that before next week's releases. We'll take another crack at this later. Discussion: https://postgr.es/m/16703= -e348f58aab3cf6cc@postgresql.org htt= ps://git.postgresql.org/pg/commitdiff/d3adaabaf7d555ec8bb1d83c43f72e79f1bf0= b7d

  • Revert "Accept relations of any kind in LOC= K TABLE". Revert 59ab4ac32, as well as the followup fix 33862cb9c, in all branches. We need to think a bit h= arder about what the behavior of LOCK TABLE on views should be, and there's no = time for that before next week's releases. We'll take another crack at this l= ater. Discussion: https://postg= r.es/m/16703-e348f58aab3cf6cc@postgresql.org htt= ps://git.postgresql.org/pg/commitdiff/eeda7f6338095701cfe1ba3da37070508efe0= 19e

  • Fix ecpg's mishandling of B'...' and X'...'= literals. These were broken in multiple ways: * The xbstart and xhstart lexer actions neglected to set "state_before_str_start" before transitioning to the xb/xh states, thus possibly resulting in "internal error: unreachable state" later. * The t= est for valid string contents at the end of xb state was flat out wrong, as it accounted incorrectly for the "b" prefix that the xbstart action had inje= cted. Meanwhile, the xh state had no such check at all. * The generated literal value failed to include any quote marks. * The grammar did the wrong thi= ng anyway, typically ignoring the literal value and emitting something else, since BCONST and XCONST tokens were handled randomly differently from SCO= NST tokens. The first of these problems is evidently an oversight in commit 7f380c59f, but the others seem to be very ancient. The lack of complaints shows that ECPG users aren't using these syntaxes much (although I do vag= uely remember one previous complaint). As written, this patch is dependent on 7f380c59f, so it can't go back further than v13. Given the shortage of complaints, I'm not excited about adapting the patch to prior branches. Report and patch by Shenhao Wang (test case adjusted by me) Discussion: https://postgr.es/m/d6402f1bacb74ecba22ef715dbba17fd@G08CNEXMBPEKD06.g0= 8.fujitsu.local htt= ps://git.postgresql.org/pg/commitdiff/1e3868ab3bef5cfa0f4d44a6937a880be7a3a= 482

  • Avoid re-using output variables in new ecpg= test case. The buildfarm thinks this leads to memory stomps, though annoyingly I can't duplicate that her= e. The existing code in strings.pgc is doing something that doesn't seem to = be sanctioned at all really by the documentation, but I'm disinclined to try= to make that nicer right now. Let's just declare some more output variables= in hopes of working around it. h= ttps://git.postgresql.org/pg/commitdiff/eed4356fad84b0fd6e3caa49c7006f40115= 9ac9a

David Rowley pushed:

  • Allow run-time pruning on nested Append/Mer= geAppend nodes. Previously we only tagged on the required information to allow the executor to perform run-t= ime partition pruning for Append/MergeAppend nodes belonging to base relation= s. It was thought that nested Append/MergeAppend nodes were just about always pulled up into the top-level Append/MergeAppend and that making the run-t= ime pruning info for any sub Append/MergeAppend nodes was a waste of time. However, that was likely badly thought through. Some examples of cases w= e're unable to pullup nested Append/MergeAppends are: 1) Parallel Append nodes= with a mix of parallel and non-parallel paths into a Parallel Append. 2) When planning an ordered Append scan a sub-partition which is unordered may re= quire a nested MergeAppend path to ensure sub-partitions don't mix up the order= of tuples being fed into the top-level Append. Unfortunately, it was not ju= st as simple as removing the lines in createplan.c which were purposefully not building the run-time pruning info for anything but RELOPT_BASEREL relati= ons. The code in add_paths_to_append_rel() was far too sloppy about which partitioned_rels it included for the Append/MergeAppend paths. The origi= nal code there would always assume accumulate_append_subpath() would pull each sub-Append and sub-MergeAppend path into the top-level path. While it do= es not appear that there were any actual bugs caused by having the additional partitioned table RT indexes recorded, what it did mean is that later in planning, when we built the run-time pruning info that we wasted effort a= nd built PartitionedRelPruneInfos for partitioned tables that we had no subp= aths for the executor to run-time prune. Here we tighten that up so that partitioned_rels only ever contains the RT index for partitioned tables w= hich actually have subpaths in the given Append/MergeAppend. We can now Assert that every PartitionedRelPruneInfo has a non-empty present_parts. That s= hould allow us to catch any weird corner cases that have been missed. In passi= ng, it seems there is no longer a good reason to have the AppendPath and MergeAppendPath's partitioned_rel fields a List of IntList. We can simply= have a List of Relids instead. This is more compact in memory and faster to a= dd new members to. We still know which is the root level partition as these always have a lower relid than their children. Previously this field was = used for more things, but run-time partition pruning now remains the only user= of it and it has no need for a List of IntLists. Here we also get rid of the RelOptInfo partitioned_child_rels field. This is what was previously used= to (sometimes incorrectly) set the Append/MergeAppend path's partitioned_rels field. That was the only usage of that field, so we can happily just rem= ove it. I also couldn't resist changing some nearby code to make use of the = newly added for_each_from macro so we can skip the first element in the list wi= thout checking if the current item was the first one on each iteration. A bug report from Andreas Kretschmer prompted all this work, however, after some consideration, I'm not personally classing this as a bug fix. So no backp= atch. In Andreas' test case, it just wasn't that clear that there was a nested Append since the top-level Append just had a single sub-path which was pu= lled up a level, per 8edd0e794. Author: David Rowley Reviewed-by: Amit Langote Discussion: https://postgr.es/m/flat/CAApHDvqSchs%2BubdybcfFaSPB%2B%2B= EA7kqMaoqajtP0GtZvzOOR3g%40mail.gmail.com htt= ps://git.postgresql.org/pg/commitdiff/a929e17e5a8c9b751b66002c8a89fdebdacfe= 194

  • Fix unstable partition_prune regression tes= ts. This was broken recently by a929e17e5. I'd failed to remember that parallel tests should have their EXPLAIN output run through the explain_parallel_append function so that t= he output is stable when parallel workers fail to start. fairywren was firs= t to notice. Reported-by: Michael Paquier Discussion: https://postgr.es/m/2020110= 2062951.GB15770@paquier.xyz htt= ps://git.postgresql.org/pg/commitdiff/90d8f1b1826ce076a502a43fe7c88423b46c6= 349

Amit Kapila pushed:

Micha=C3=ABl Paquier pushed:

Heikki Linnakangas pushed:

Thomas Munro pushed:

Magnus Hagander pushed:

Peter Eisentraut pushed:

Tom=C3=A1=C5=A1 Vondra pushed:

Fujii Masao pushed:

Peter Geoghegan pushed:

  • Fix nbtree cleanup-only VACUUM stats inaccu= racies. Logic for counting heap TIDs from posting list tuples (added by commit 0d861bbb) was faulty. It didn't count any TIDs/index tuples in the event of no callback being set. This meant that we incorrectly counted no index tuples in clean-up only VACUUMs, which could lead to pg_class.reltuples being spuriously set to 0= in affected indexes. To fix, go back to counting items from the page in cas= es where there is no callback. This approach isn't very accurate, but it wo= rks well enough in practice while avoiding the expense of accessing every ind= ex tuple during cleanup-only VACUUMs. Author: Peter Geoghegan pg [AT] bowt.= ie Reported-By: Jehan-Guillaume de Rorthais jgdr [AT] dalibo.com https://postgr.es/m/202010231744= 51.69e358f1@firost Backpatch: 13-, where nbtree deduplication was introduced h= ttps://git.postgresql.org/pg/commitdiff/48e1291342dd7771cf8c67aa1d7ec1f394b= 95dd8

  • Fix wal_consistency_checking nbtree bug. wa= l_consistency_checking indicated an inconsistency in certain cases involving nbtree page deletion. The under= lying issue is that there was a minor difference between the page image produced after a REDO routine ran and the corresponding page image following origi= nal execution. This harmless inconsistency has been around forever. We more= or less expect total consistency among even deleted nbtree pages these days, though, so this won't do anymore. To fix, tweak the REDO routine to match original execution. Oversight in commit f47b5e13. h= ttps://git.postgresql.org/pg/commitdiff/efc5dcfd8ad4e1df633025d8a91b64cd44d= 93f42

  • Improve nbtree README's LP_DEAD section. Th= e description of how LP_DEAD bit setting by index scans works following commit 2ed5b87f was rather unclear. Clean that up a bit. Also refer to LP_DEAD bit setting within _bt_check_unique() at the start of the same section. This mechanism may actually be more important than the generic kill_prior_tuple mechanism th= at the section focuses on, so it at least deserves to be mentioned in passin= g. h= ttps://git.postgresql.org/pg/commitdiff/5a2f154a2ecaf545000a3ff3cdbadc76ae1= df30a

=C3=81lvaro Herrera pushed:

Pending Patches

Nikhil Benesch sent in a patch to support n= egative indexes in the split_part() function, those counting from the end of the array instead of the start.

Justin Pryzby sent in another revision of a= patch to refactor CIC to rely on REINDEX CONCURRENTLY, refactor same to allow reindexing all index partition= s at once, and make ReindexPartitions() set indisvalid so things that come by la= ter can see they're ready to go.

Magnus Hagander sent in another revision of= a patch to remove the obsolete analyze_new_cluster.sh script and things that know about it from pg_upgrade= .

Anastasia Lubennikova sent in another revis= ion of a patch to teach COPY FREEZE to set PD_ALL_VISIBLE and visibility map bits.

David G. Johnston sent in another revision = of a patch to clarify the fact that signal functions have no feedback.

Heikki Linnakangas sent in four revisions o= f a patch to split copy.c into copyto.c and copyfrom.c, and further split copyfrom.c into copyfrom.c and copyfromparse.c. This will make working on the usually independent functionalities of the split files more convenient and easier to read.

=C3=81lvaro Herrera sent in another revisio= n of a patch to add batch/pipelining support to libpq.

Pavel St=C4=9Bhule sent in a patch to reduc= e overhead of execution of CALL statement in no atomic mode from PL/pgSQL.

Magnus Hagander sent in two revisions of a = patch to remove the obsolete -O switch for postgres, which once allowed passing options to each server proc= ess.

Kyotaro HORIGUCHI sent in two more revision= s of a patch to fix a dereference before NULL check in src/backend/storage/ipc/latch.c.

David Rowley sent in two revisions of a pat= ch to reduce the number of special cases to build contrib modules on windows.

Konstantin Knizhnik sent in three more revi= sions of a patch to add custom compression to libpq.

Fabien COELHO sent in another revision of a= patch to pgbench to add an option which delays queries until connections are established.

Thomas Munro and David Rowley traded patche= s to implement collation versioning.

Jinbao Chen sent in a patch to add a new ta= ble am 'tid_visible' to test the visibility of a tid.

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

Stephen Frost sent in two more revisions of= a patch to use pre-fetching for ANALYZE.

Tom=C3=A1=C5=A1 Vondra sent in another revi= sion of a patch to use INT64_FORMAT to print int64 variables in sort debug.

Bharath Rupireddy sent in another revision = of a patch to use multi Inserts in Create Table As.

Amit Langote sent in another revision of a = patch to call BeginDirectModify from ExecInitModifyTable, and initialize result relation information lazily. This work builds infrastructure that will later be used to make writes on foreign tables more efficient.

Vigneshwaran C sent in two more revisions o= f a patch to improve the connection authorization message for GSS authenticated/encrypted connections by adding= a log message to include GSS authentication, encryption, and principal information. This message will help the user to know whether GSS authentica= tion or encryption was used and which GSS principal was used.

Tom=C3=A1=C5=A1 Vondra sent in three more r= evisions of a patch to implement BRIN multi-range indexes.

=C3=81lvaro Herrera sent in another revisio= n of a patch to implement ALTER TABLE ... DETACH CONCURRENTLY.

Tsutomu Yamada sent in another revision of = a patch to add \dX, which lists extended statistics, to psql.

Pavel Borisov sent in two more revisions of= a patch to deprecate and replace &lt;^ and &gt;^ operators for points.

Melanie Plageman sent in another revision o= f a patch to support parallel FULL JOIN and RIGHT JOIN.

Kyotaro HORIGUCHI sent in two more revision= s of a patch to use shared memory instead of files for storage in the stats collector.

Ajin Cherian and Peter Smith traded patches= to add logical decoding of two-phase transactions.

Kirk Jamison sent in another revision of a = patch to make DropRelFileNodeBuffers() more efficient during recovery by avoiding scannin= g the whole buffer pool when the relation is small enough, or the the total numbe= r of blocks to be invalidated is below the threshold of full scanning.

Daniel Gustafsson sent in two more revision= s of a patch to support NSS as a TLS backend for libpq.

Takamichi Osumi sent in three more revision= s of a patch to implement CREATE OR REPLACE TRIGGER.

Fujii Masao sent in another revision of a p= atch to use standard SIGHUP and SIGTERM handlers in the autoprewarm process.

Justin Pryzby sent in another revision of a= patch to Implement CLUSTER of partitioned table. This requires either specification of a partitioned ind= ex on which to cluster, or that an partitioned index was previously set clustered= .

Kyotaro HORIGUCHI sent in another revision = of a patch to fix NaN handling in some geometric operators and functions.

Micha=C3=ABl Paquier sent in another revisi= on of a patch to rework the SHA2 APIs, switch sha2_openssl.c to use EVP, and make pgcrypto use the in-core resowner facility for EVP.

Yuzuko Hosoya sent in another revision of a= patch to fix some infelicities between autovacuum and partitioned tables.

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

Seino Yuki sent in another revision of a pa= tch to enable pg_stat_statements to track rows processed by REFRESH MATERIALIZED VIEW.

Kyotaro HORIGUCHI sent in two more revision= s of a patch to implement CatCache expiration.

David Pirotte sent in another revision of a= patch to add logical decoding messages to pgoutput.

Masahiko Sawada sent in two more revisions = of a patch to implement a transaction manager for foreign transactions.

Masahiro Ikeda sent in another revision of = a patch to add statistics to the pg_stat_wal view.

Justin Pryzby sent in a patch atop the one = for incremental view maintenance patch which fixes some documentation.

Micha=C3=ABl Paquier sent in a patch to ref= actor the MD5 implementations to be just one, and switch to EVP for OpenSSL.

Justin Pryzby sent in another revision of a= patch to clarify the computation of min/max IO and specifically the double use and effect of correlation, avoid re-using the "pages_fetched" variable, and use the correlation statistic in costing bitmap scans as for an index scan.

Sergei Kornilov sent in another revision of= a patch to allow some recovery parameters to be changed with reload.

Marina Polyakova sent in two revisions of a= patch to fix a bug that manifested as pgbench no longer supporting a large number of client connections on Win= dows.

Andrey Borodin sent in another revision of = a patch to add Sortsupport for sorting GiST build for gist_btree types.

J=C3=BCrgen Purtz and Erik Rijkers traded p= atches to add an architecture chapter to the tutorial.

Dilip Kumar sent in another revision of a p= atch to implement custom table compression methods.

Tom=C3=A1=C5=A1 Vondra sent in a patch to r= emove some duplicate code from brin_memtuple_initialize.

This email was sent to you from PWN. It was delivered on their behalf by the PostgreSQL project. Any questions about the content of the message shou= ld be sent to PWN.

You were sent this email as a subscriber of the pgsql-announce mai= linglist, for the content tag PWN. To unsubscribe from further emails, or change which emails you want to receive, please click th= e personal unsubscribe link that you can find in the headers of this email, or visit https://lists.postgresql.org/unsubscribe/.
 
--===============7828189117301818021==-- --===============3863432263182160421==--