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 1kh28L-0000eb-Nn for pgsql-announce@arkaria.postgresql.org; Mon, 23 Nov 2020 03:03:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kh28I-00063h-UC for pgsql-announce@arkaria.postgresql.org; Mon, 23 Nov 2020 03:03:14 +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 1kh28I-00062p-3Z for pgsql-announce@lists.postgresql.org; Mon, 23 Nov 2020 03:03:14 +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 1kh28C-0002Sp-Gq for pgsql-announce@lists.postgresql.org; Mon, 23 Nov 2020 03:03:13 +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=awME29Hyc1HG2fpmp1e9aYXudKYY4c3YqyZbwndRVrM=; b=Uy0HhniPsAhy+woGiHkibrofei G5PDIOC0DOO/L+2jbqIErXxYGNWRpDVTf8PWQ/huY8CEl6uSmahOH43qkPF8UWVEJ7v6H4bxMG5/V i9T1KqH1UHP/vX9EQHYdv3lqNXdN83+HInaOdZkPIib1itZYEsnoa6hELJ7u1k5uxLEF+vRE8T/tc ilvztKtKWmFpz7DGMj5XwsRDPgrSKXD41noO7RezPc/RzGznIENBZYqiWIhgLvqU2DVShvGxm35Sg m8bvt7bIaPbuedo6gtp5tnno6ZhyOPnrPAZeUtT0mlGrDShRTpilIf//v4vJ42xLrOLJcVXD9hKoR ULqRGA7g==; 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 1kh28A-0001Sc-3b for pgsql-announce@lists.postgresql.org; Mon, 23 Nov 2020 03:03:07 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kh286-0002OR-6G for pgsql-announce@lists.postgresql.org; Mon, 23 Nov 2020 03:03:02 +0000 Content-Type: multipart/mixed; boundary="===============7425140197419591123==" MIME-Version: 1.0 Subject: PostgreSQL Weekly News - November 22, 2020 To: PostgreSQL Announce From: PWN via PostgreSQL Announce Reply-To: david@fetter.org Date: Mon, 23 Nov 2020 03:02:10 +0000 Message-ID: <160610053083.15802.9372726651496774249@wrigleys.postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-pglister-tags: pwn X-pglister-tagsig: eab28aac6367e565123f30c61913d383042a00eb2653ade80d6b7e966a7ef5d4 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --===============7425140197419591123== Content-Type: multipart/alternative; boundary="===============1404372334935203491==" MIME-Version: 1.0 --===============1404372334935203491== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable # PostgreSQL Weekly News - November 22, 2020 Person of the week: [https://postgresql.life/post/markus_wanner/](https://p= ostgresql.life/post/markus_wanner/) # PostgreSQL Product News PGroonga 2.2.7 a full text search platform for all languages, released. [https://pgroonga.github.io/](https://pgroonga.github.io/) PostGIS 3.0.3, the industry standard geographic information system package = for PostgreSQL, released. [http://postgis.net/2020/11/20/postgis-3.0.3/](http://postgis.net/2020/11/2= 0/postgis-3.0.3/) pgtt 2.2, an extension to implement global temporary tables, released. [https://github.com/darold/pgtt/releases/tag/v2.2](https://github.com/darol= d/pgtt/releases/tag/v2.2) pgAdmin4 4.28, a web- and native GUI control center for PostgreSQL, release= d. [https://www.pgadmin.org/docs/pgadmin4/dev/release_notes_4_28.html](https:/= /www.pgadmin.org/docs/pgadmin4/dev/release_notes_4_28.html) pgbouncer 1.15.0, a connection pooler and more for PostgreSQL, released. [https://www.pgbouncer.org/2020/11/pgbouncer-1-15-0](https://www.pgbouncer.= org/2020/11/pgbouncer-1-15-0) pitrery 3.2, a set of Bash scripts to manage PITR backups for PostgreSQL, r= eleased. [http://dalibo.github.io/pitrery/](http://dalibo.github.io/pitrery/) pg_statement_rollback v1.1, an extension that adds server side transaction with rollback at statement level, released. [https://github.com/lzlabs/pg_statement_rollback/releases/tag/v1.1](https:/= /github.com/lzlabs/pg_statement_rollback/releases/tag/v1.1) # 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 fuzzy thinking about amcanmulticol versus amcaninclude. These flags s= hould be independent: in particular an index AM should be able to say that it supports include columns without necessarily supporting multiple key colu= mns. The included-columns patch got this wrong, possibly aided by the fact tha= t it didn't bother to update the documentation. While here, clarify some text about amcanreturn, which was a little vague about what should happen when amcanreturn reports that only some of the index columns are returnable. = Noted while reviewing the SP-GiST included-columns patch, which quite incorrect= ly (and unsafely) changed SP-GiST to claim amcanmulticol =3D true as a worka= round for this bug. Backpatch to v11 where included columns were introduced. [https://git.postgresql.org/pg/commitdiff/29d29d652f0be47dc42fa9d667dee5b= 8e1baa18a](https://git.postgresql.org/pg/commitdiff/29d29d652f0be47dc42fa9d= 667dee5b8e1baa18a) - Use "true" not "TRUE" in one ICU function call. This was evidently missed= in commit 6337865f3, which generally did s/TRUE/true/ everywhere. It escaped notice up to now because ICU versions before ICU 68 provided definitions = of "TRUE" and "FALSE" regardless. With ICU 68, it fails to compile. Per re= port from Condor. Back-patch to v11 where 6337865f3 came in. (I've not tested= v10, where this call originated, but I imagine it's fine since we defined TRUE= in c.h back then.) Discussion: [https://postgr.es/m/7a6f3336165bfe3ca66abcda7966f9d0@stz-bg.com](https:/= /postgr.es/m/7a6f3336165bfe3ca66abcda7966f9d0@stz-bg.com) [https://git.postgresql.org/pg/commitdiff/ad84ecc98d7e2ad81567094b8a6910b= 5078927a7](https://git.postgresql.org/pg/commitdiff/ad84ecc98d7e2ad81567094= b8a6910b5078927a7) - Do not return NULL for error cases in satisfies_hash_partition(). Since t= his function is used as a CHECK constraint condition, returning NULL is tanta= mount to returning TRUE, which would have the effect of letting in a row that doesn't satisfy the hash condition. Admittedly, the cases for which this = is done should be unreachable in practice, but that doesn't make it any less= a bad idea. It also seems like a dartboard was used to decide which error = cases should throw errors as opposed to returning NULL. For the checks for NULL input values, I just switched it to returning false. There's some argume= nt that an error would be better; but the case really should be can't-happen= in a generated hash constraint, so it's likely not worth more code for. For t= he parent-relation-open-failure case, it seems like we might as well let relation_open throw an error, instead of having an impossible-to-diagnose constraint failure. Back-patch to v11 where this code came in. Discussi= on: [https://postgr.es/m/24067.1605134819@sss.pgh.pa.us](https://postgr.es/m/= 24067.1605134819@sss.pgh.pa.us) [https://git.postgresql.org/pg/commitdiff/4025e6c46620048804467d2ad29d31a= a9ba50387](https://git.postgresql.org/pg/commitdiff/4025e6c46620048804467d2= ad29d31aa9ba50387) - Don't Insert() a VFD entry until it's fully built. Otherwise, if FDDEBUG = is enabled, the debugging output fails because it tries to read the fileName, which isn't set up yet (and should in fact always be NULL). AFAICT, this= has been wrong since Berkeley. Before 96bf88d52, it would accidentally fail = to crash on platforms where snprintf() is forgiving about being passed a NULL pointer for %s; but the file name intended to be included in the debug ou= tput wouldn't ever have shown up. Report and fix by Greg Nancarrow. Although= this is only visibly broken in custom-made builds, it still seems worth back-patching to all supported branches, as the FDDEBUG code is pretty us= eless as it stands. Discussion: [https://postgr.es/m/CAJcOf-cUDgm9qYtC_B6XrC6MktMPNRby2p61EtSGZKnfotMArw@= mail.gmail.com](https://postgr.es/m/CAJcOf-cUDgm9qYtC_B6XrC6MktMPNRby2p61Et= SGZKnfotMArw@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/2bd49b493a52f0a21bc3fc51c355963= f99ac1a4e](https://git.postgresql.org/pg/commitdiff/2bd49b493a52f0a21bc3fc5= 1c355963f99ac1a4e) - Further fixes for CREATE TABLE LIKE: cope with self-referential FKs. Comm= it 502898192 was too careless about the order of execution of the additional ALTER TABLE operations generated by expandTableLikeClause. It just stuck = them all at the end, which seems okay for most purposes. But it falls down in = the case where LIKE is importing a primary key or unique index and the outer CREATE TABLE includes a FOREIGN KEY constraint that needs to depend on th= at index. Weird as that is, it used to work, so we ought to keep it working= . To fix, make parse_utilcmd.c insert LIKE clauses between index-creation and FK-creation commands in the transformed list of commands, and change util= ity.c so that the commands generated by expandTableLikeClause are executed immediately not at the end. One could imagine scenarios where this would= n't work either; but currently expandTableLikeClause only makes column default expressions, CHECK constraints, and indexes, and this ordering seems fine= for those. Per bug #16730 from Sofoklis Papasofokli. Like the previous patc= h, back-patch to all supported branches. Discussion: [https://postgr.es/m/16730-b902f7e6e0276b30@postgresql.org](https://postg= r.es/m/16730-b902f7e6e0276b30@postgresql.org) [https://git.postgresql.org/pg/commitdiff/97390fe8a6e96a153e59b0180f4303a= caeb75b84](https://git.postgresql.org/pg/commitdiff/97390fe8a6e96a153e59b01= 80f4303acaeb75b84) - Remove undocumented IS [NOT] OF syntax. This feature was added a long time ago, in 7c1e67bd5 and eb121ba2c, but never documented in any user-facing = way. (Documentation added in 6126d3e70 was commented out almost immediately, in 8272fc3f7.) That's because, while this syntax is defined by SQL:99, our implementation is only vaguely related to the standard's semantics. The standard appears to intend a run-time not parse-time test, and it definit= ely intends that the test should understand subtype relationships. No one has stepped up to fix that in the intervening years, but people keep coming a= cross the code and asking why it's not documented. Let's just get rid of it: if anyone ever wants to make it work per spec, they can easily recover whate= ver parts of this code are still of value from our git history. If there's a= nyone out there who's actually using this despite its undocumented status, they= can switch to using pg_typeof() instead, eg. "pg_typeof(something) =3D 'mytype'::regtype". That gives essentially the same semantics as what ou= r IS OF code did. (We didn't have that function last time this was discussed, = or we would have ripped out IS OF then.) Discussion: [https://postgr.es/m/CAKFQuwZ2pTc-DSkOiTfjauqLYkNREeNZvWmeg12Q-_69D+sYZA@= mail.gmail.com](https://postgr.es/m/CAKFQuwZ2pTc-DSkOiTfjauqLYkNREeNZvWmeg1= 2Q-_69D+sYZA@mail.gmail.com) Discussion: [https://postgr.es/m/BAY20-F23E9F2B4DAB3E4E88D3623F99B0@phx.g= bl](https://postgr.es/m/BAY20-F23E9F2B4DAB3E4E88D3623F99B0@phx.gbl) Discussion: [https://postgr.es/m/3E7CF81D.1000203@joeconway.com](https://= postgr.es/m/3E7CF81D.1000203@joeconway.com) [https://git.postgresql.org/pg/commitdiff/926fa801ac9eb54c5275472271ec63a= 059904698](https://git.postgresql.org/pg/commitdiff/926fa801ac9eb54c5275472= 271ec63a059904698) - On macOS, use -isysroot in link steps as well as compile steps. We previo= usly put the -isysroot switch only into CPPFLAGS, theorizing that it was only needed to find the right copies of include files. However, it seems that = we also need to use it while linking programs, to find the right stub ".tbd" files for libraries. We got away without that up to now, but apparently = that was mostly luck. It may also be that failures are only observed when the Xcode version is noticeably out of sync with the host macOS version; the = case that's prompting action right now is that builds fail when using latest X= code (12.2) on macOS Catalina, even though it's fine on Big Sur. Hence, add -isysroot to LDFLAGS as well. (It seems that the more common practice is= to put it in CFLAGS, whence it'd be included at both compile and link steps. However, we can't mess with CFLAGS in the platform template file without confusing configure's logic for choosing default CFLAGS.) This should be back-patched, but first let's see if the buildfarm likes it on HEAD. Rep= ort and patch by James Hilliard (some cosmetic mods by me) Discussion: [https://postgr.es/m/20201120003314.20560-1-james.hilliard1@gmail.com](ht= tps://postgr.es/m/20201120003314.20560-1-james.hilliard1@gmail.com) [https://git.postgresql.org/pg/commitdiff/49407dc32a2931550e4ff1dea314b6a= 25afdfc35](https://git.postgresql.org/pg/commitdiff/49407dc32a2931550e4ff1d= ea314b6a25afdfc35) - Extend the geometric regression test cases a little. Add another edge-case value to "point_tbl", and add a test for the line(point, point) function. Some of the behaviors exposed here are wrong, but the idea of committing = this separately is to memorialize what we were getting, and to allow easier inspection of the behavior changes caused by upcoming patches. Kyotaro Horiguchi (line() test added by me) Discussion: [https://postgr.es/m/CAGf+fX70rWFOk5cd00uMfa__0yP+vtQg5ck7c2Onb-Yczp0URA@= mail.gmail.com](https://postgr.es/m/CAGf+fX70rWFOk5cd00uMfa__0yP+vtQg5ck7c2= Onb-Yczp0URA@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/a45272b25d6fc8f96793623545fc1f8= 36ac39d94](https://git.postgresql.org/pg/commitdiff/a45272b25d6fc8f96793623= 545fc1f836ac39d94) - Fix FPeq() and friends to get the right answers for infinities. "FPeq(infinity, infinity)" returned false, on account of getting NaN when= it subtracts the two inputs. Fix that by adding a separate check for exact equality. FPle() and FPge() similarly got the wrong answer for two like-signed infinities. In those cases, we can just rearrange the compar= isons to avoid potentially subtracting infinities. While the sibling functions FPne() etc accidentally gave the right answers even with the internal NaN results, it seems best to make similar adjustments to them to avoid depen= ding on this. FPeq() has to be converted to an inline function to avoid double evaluations of its arguments, and I did the same for the others just for consistency. In passing, make the handling of NaN cases in line_eq() and point_eq_point() simpler and easier to reason about, and perhaps faster. = This results in just one visible regression test change: slope() now gives DBL= _MAX for two inputs of (inf,1e300), which is consistent with what it does for (1e300,inf), so that seems like a bug fix. Discussion: [https://postgr.es/m/CAGf+fX70rWFOk5cd00uMfa__0yP+vtQg5ck7c2Onb-Yczp0URA@= mail.gmail.com](https://postgr.es/m/CAGf+fX70rWFOk5cd00uMfa__0yP+vtQg5ck7c2= Onb-Yczp0URA@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/8597a48d01b6cc0b09ff626253ac93c= 67e5516d5](https://git.postgresql.org/pg/commitdiff/8597a48d01b6cc0b09ff626= 253ac93c67e5516d5) - In geo_ops.c, represent infinite slope as Infinity, not DBL_MAX. Since we= 're assuming IEEE floats these days, there seems little reason not to do this= . It has the advantage that when the slope is computed as infinite due to the presence of Inf coordinates, we get saner behavior than before from line_construct(), and thence also in some dependent operations such as fi= nding the closest point. Also fix line_construct() to special-case slope zero.= The previous coding got the right answer in most cases, but it could compute = C as NaN when the point has Inf coordinates. Discussion: [https://postgr.es/m/CAGf+fX70rWFOk5cd00uMfa__0yP+vtQg5ck7c2Onb-Yczp0URA@= mail.gmail.com](https://postgr.es/m/CAGf+fX70rWFOk5cd00uMfa__0yP+vtQg5ck7c2= Onb-Yczp0URA@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/9fe649ea295f00baf6d0f0c1f9b0cb1= 298f64fb9](https://git.postgresql.org/pg/commitdiff/9fe649ea295f00baf6d0f0c= 1f9b0cb1298f64fb9) Micha=C3=ABl Paquier pushed: - Relax INSERT privilege requirement for CTAS and matviews WITH NO DATA. Wh= en specified, WITH NO DATA does not insert any data into the relation create= d, so skip checking for the insert permissions. With WITH DATA or WITH NO DATA= , it is always required for the user to have CREATE privileges on the schema targeted for the relation. Note that plain CREATE TABLE AS or CREATE MATERIALIZED VIEW queries have begun to work accidentally without INSERT privilege checks as of 874fe3ae, while using EXECUTE or EXPLAIN ANALYZE w= ould fail with the ACL check, so this makes the behavior for all the command flavors consistent with each other. This is arguably a bug fix, but there have been no complaints about the current behavior either so stable branc= hes are not changed. While on it, document properly the privileges requireme= nts for each commands with more tests for all the scenarios possible, and avo= id a useless bulk-insert allocation when using WITH NO DATA. Author: Bharath Rupireddy Reviewed-by: Anastasia Lubennikova, Michael Paquier Discussion: [https://postgr.es/m/CALj2ACWc3N8j0_9nMPz9wcAUnVcdKHzFdDZJ3hVFNEbqtcyG9w@= mail.gmail.com](https://postgr.es/m/CALj2ACWc3N8j0_9nMPz9wcAUnVcdKHzFdDZJ3h= VFNEbqtcyG9w@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/846005e4f3829c3eafe1f8441b80ff9= 0657d0a29](https://git.postgresql.org/pg/commitdiff/846005e4f3829c3eafe1f84= 41b80ff90657d0a29) - Add tab completion for CREATE [OR REPLACE] TRIGGER in psql. 92bf7e2 has a= dded support for this grammar. Author: Noriyoshi Shinoda Discussion: [https://postgr.es/m/TU4PR8401MB115244623CF4724DCA0D507FEEE30@TU4PR8401MB= 1152.NAMPRD84.PROD.OUTLOOK.COM](https://postgr.es/m/TU4PR8401MB115244623CF4= 724DCA0D507FEEE30@TU4PR8401MB1152.NAMPRD84.PROD.OUTLOOK.COM) [https://git.postgresql.org/pg/commitdiff/bf0aa7c4b83bcf3116c5a3c191bbc67= 7ab3beb59](https://git.postgresql.org/pg/commitdiff/bf0aa7c4b83bcf3116c5a3c= 191bbc677ab3beb59) - Improve failure detection with array parsing in pg_dump. Similarly to 363= 6efa, the checks done in pg_dump when parsing array values from catalogs have b= een too lax. Under memory pressure, it could be possible, though very unlike= ly, to finish with dumps that miss some data like: - Statistics for indexes - Run-time configuration of functions - Configuration of extensions - Publication list for a subscription No backpatch is done as this is not = going to be a problem in practice. For example, if an OOM causes an array parsi= ng to fail, a follow-up code path of pg_dump would most likely complain with an allocation failure due to the memory pressure. Author: Michael Paquier Reviewed-by: Daniel Gustafsson Discussion: [https://postgr.es/m/20201111061319.GE2276@paquier.xyz](https://postgr.es= /m/20201111061319.GE2276@paquier.xyz) [https://git.postgresql.org/pg/commitdiff/13b58f8934e6252868231c3493d49b8= c2b363e5d](https://git.postgresql.org/pg/commitdiff/13b58f8934e6252868231c3= 493d49b8c2b363e5d) - Remove INSERT privilege check at table creation of CTAS and matview. As p= er discussion with Peter Eisentraunt, the SQL standard specifies that any tu= ple insertion done as part of CREATE TABLE AS happens without any extra ACL c= heck, so it makes little sense to keep a check for INSERT privileges when using= WITH DATA. Materialized views are not part of the standard, but similarly, th= is check can be confusing as this refers to an access check on a table creat= ed within the same command as the one that would insert data into this table. This commit removes the INSERT privilege check for WITH DATA, the default, that 846005e removed partially, but only for WITH NO DATA. Author: Bhara= th Rupireddy Discussion: [https://postgr.es/m/d049c272-9a47-d783-46b0-46665b011598@enterprisedb.co= m](https://postgr.es/m/d049c272-9a47-d783-46b0-46665b011598@enterprisedb.co= m) [https://git.postgresql.org/pg/commitdiff/878f3a19c6c8ff197e4a33f51d921a4= abafcc494](https://git.postgresql.org/pg/commitdiff/878f3a19c6c8ff197e4a33f= 51d921a4abafcc494) Alexander Korotkov pushed: - Reword 'simple comparison' =3D> 'inequality' in pgtrgm.sgml. Discussion: [https://postgr.es/m/CAMkU%3D1zxfA8_MGBW6sJMj54p8nPoe4bMb5LoG-rMYZVPq4j08= Q%40mail.gmail.com](https://postgr.es/m/CAMkU%3D1zxfA8_MGBW6sJMj54p8nPoe4bM= b5LoG-rMYZVPq4j08Q%40mail.gmail.com) Author: Jeff Janes [https://git.postgresql.org/pg/commitdiff/7adb8feb0f69fd9c79078c6cea984bb= 4bff1c841](https://git.postgresql.org/pg/commitdiff/7adb8feb0f69fd9c79078c6= cea984bb4bff1c841) Fujii Masao pushed: - Make the standby server promptly handle interrupt signals. This commit ch= anges the startup process in the standby server so that it handles the interrupt signals after waiting for wal_retrieve_retry_interval on the latch and resetting it, before entering another wait on the latch. This change caus= es the standby server to promptly handle interrupt signals. Otherwise, previously, there was the case where the standby needs to wait extra five seconds to shutdown when the shutdown request arrived while the startup process was waiting for wal_retrieve_retry_interval on the latch. Author: Fujii Masao, but implementation idea is from Soumyadeep Chakraborty Reviewed-by: Soumyadeep Chakraborty Discussion: [https://postgr.es/m/9d7e6ab0-8a53-ddb9-63cd-289bcb25fe0e@oss.nttdata.com= ](https://postgr.es/m/9d7e6ab0-8a53-ddb9-63cd-289bcb25fe0e@oss.nttdata.com) [https://git.postgresql.org/pg/commitdiff/2945a488a3426838223a637cd326ec7= 1fff61954](https://git.postgresql.org/pg/commitdiff/2945a488a3426838223a637= cd326ec71fff61954) - Emit log when restore_command succeeds but archived file faills to be restored. Previously, when restore_command claimed to succeed but failed = to restore the file with the right name, for example, due to mis-configurati= on of restore_command, no log message was reported. Then the recovery failed la= ter with an error message not directly related to the issue. This commit cha= nges the recovery so that a log message is emitted in this error case. This wo= uld enable us to investigate what happened in this case more easily. Author:= Jeff Janes, Fujii Masao Reviewed-by: Pavel Borisov, Kyotaro Horiguchi Discussi= on: [https://postgr.es/m/CAMkU=3D1xkFs3Omp4JR4wMYWdam_KLuj6LXnTYfU8u3T0h=3DPL= LMQ@mail.gmail.com](https://postgr.es/m/CAMkU=3D1xkFs3Omp4JR4wMYWdam_KLuj6L= XnTYfU8u3T0h=3DPLLMQ@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/a4ef0329c27156dca81714854599e7d= 82becb17f](https://git.postgresql.org/pg/commitdiff/a4ef0329c27156dca817148= 54599e7d82becb17f) Peter Eisentraut pushed: - Remove code handling removed deprecated containment operators. This remov= es the code that was there for handling the operators removed by 2f70fdb0644c32c4154236c2b5c241bec92eac5e. 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/591d282e8d3e0448ec1339c6b066e10= 953f040a2](https://git.postgresql.org/pg/commitdiff/591d282e8d3e0448ec1339c= 6b066e10953f040a2) - Normalize comment in empty grammar rules. Change lower case /* empty */ t= o /* EMPTY */ for consistency with the majority. Discussion: [https://www.postgresql.org/message-id/flat/e9eed669-e32d-6919-fed4-acc0d= aea857b%40enterprisedb.com](https://www.postgresql.org/message-id/flat/e9ee= d669-e32d-6919-fed4-acc0daea857b%40enterprisedb.com) [https://git.postgresql.org/pg/commitdiff/5664b7be5b2c2e756372e7dde7c187a= 11a5ab701](https://git.postgresql.org/pg/commitdiff/5664b7be5b2c2e756372e7d= de7c187a11a5ab701) - Remove unused and deprecated strategy numbers from BRIN code. These were = dead code. 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/d93ccdea1d447ab7e8c48797153ce58= b051f1a37](https://git.postgresql.org/pg/commitdiff/d93ccdea1d447ab7e8c4879= 7153ce58b051f1a37) - Add more tests for hashing and hash-based plans. - Test hashing of an arr= ay of a non-hashable element type. - Test UNION [DISTINCT] with hash- and sort-based plans. (Previously, only INTERSECT and EXCEPT where tested there.) - Test UNION [DISTINCT] with a non-hashable column type. This currently reverts to a sort-based plan even if enable_hashagg is on. - T= est UNION/INTERSECT/EXCEPT hash- and sort-based plans with arrays as column types. Also test an array with a non-hashable element type. - Test UNION/INTERSECT/EXCEPT similarly with row types as column types. Curre= ntly, this uses only sort-based plans because there is no hashing support for= row types. - Add a test case that shows that recursive queries using UNION [DISTINCT] require hashable column types. - Add a currently failing test= that uses UNION DISTINCT in a cycle-detection use case using row types as co= lumn types. Discussion: [https://www.postgresql.org/message-id/flat/38eccd35-4e2d-6767-1b3c-dada1= eac3124%402ndquadrant.com](https://www.postgresql.org/message-id/flat/38ecc= d35-4e2d-6767-1b3c-dada1eac3124%402ndquadrant.com) [https://git.postgresql.org/pg/commitdiff/6dd8b00807871bfd0c3ce8e18fd1f6b= a1a71fbf9](https://git.postgresql.org/pg/commitdiff/6dd8b00807871bfd0c3ce8e= 18fd1f6ba1a71fbf9) - Hash support for row types. Add hash functions for the record type as wel= l as a hash operator family and operator class for the record type. This enab= les all the hash functionality for the record type such as hash-based plans f= or UNION/INTERSECT/EXCEPT DISTINCT, recursive queries using UNION DISTINCT, = hash joins, and hash partitioning. Reviewed-by: Tom Lane Discussion: [https://www.postgresql.org/message-id/flat/38eccd35-4e2d-6767-1b3c-dada1= eac3124%402ndquadrant.com](https://www.postgresql.org/message-id/flat/38ecc= d35-4e2d-6767-1b3c-dada1eac3124%402ndquadrant.com) [https://git.postgresql.org/pg/commitdiff/01e658fa74cb7e3292448f6663b5491= 35958003b](https://git.postgresql.org/pg/commitdiff/01e658fa74cb7e3292448f6= 663b549135958003b) - Rename object in test to avoid conflict. In 01e658fa74cb7e3292448f6663b549135958003b, the hash_func test creates a ty= pe t1, but apparently a test running in parallel might also use that name, depending on timing. Rename the type to avoid the issue. [https://git.postgresql.org/pg/commitdiff/afaccbba787d5f1470c44ddd61c9dda= aad19e27e](https://git.postgresql.org/pg/commitdiff/afaccbba787d5f1470c44dd= d61c9ddaaad19e27e) - Replace a macro by a function. Using a macro is ugly and not justified he= re. Discussion: [https://www.postgresql.org/message-id/flat/4ad69a4c-cc9b-0dfe-0352-8b1b0= cd36c7b@2ndquadrant.com](https://www.postgresql.org/message-id/flat/4ad69a4= c-cc9b-0dfe-0352-8b1b0cd36c7b@2ndquadrant.com) [https://git.postgresql.org/pg/commitdiff/b5acf10cfc63ed1e0bc4eef466c0f46= 70a725ef3](https://git.postgresql.org/pg/commitdiff/b5acf10cfc63ed1e0bc4eef= 466c0f4670a725ef3) - doc: Improve tableoid description. Mention that it's useful for determini= ng table names for partitioned tables as well as for those in inheritance hierarchies. Author: Ian Lawrence Barwick Reviewed-b= y: Ashutosh Bapat Discussion: [https://www.postgresql.org/message-id/flat/CAB8KJ=3DgFmBXP=3DP9htziOj+WM= 5PDAK4qc7iGQta+8kUh306kQnw@mail.gmail.com](https://www.postgresql.org/messa= ge-id/flat/CAB8KJ=3DgFmBXP=3DP9htziOj+WM5PDAK4qc7iGQta+8kUh306kQnw@mail.gma= il.com) [https://git.postgresql.org/pg/commitdiff/a47834db0fb70256e676862f1d96374= a9e114d82](https://git.postgresql.org/pg/commitdiff/a47834db0fb70256e676862= f1d96374a9e114d82) =C3=81lvaro Herrera pushed: - Fix typo. Introduced in 90fdc259866e; backpatch to 12. Author: Erik Rijk= ers Discussion: [https://postgr.es/m/e92b3fba98a0c0f7afc0a2a37e765954@xs4all.nl](https://= postgr.es/m/e92b3fba98a0c0f7afc0a2a37e765954@xs4all.nl) [https://git.postgresql.org/pg/commitdiff/bcbd7713324798d5a74ca640c6cf6c4= 39bda22e4](https://git.postgresql.org/pg/commitdiff/bcbd7713324798d5a74ca64= 0c6cf6c439bda22e4) - Rename PGPROC->vacuumFlags to statusFlags. With more flags associated to a PGPROC entry that are not related to vacuum (currently existing or planne= d), the name "statusFlags" describes its purpose better. (The same is done t= o the mirroring PROC_HDR->vacuumFlags.) No functional changes in this commit. = This was suggested first by Hari Babu Kommi in [1] and then by Michael Paquier= at [2]. [1] [https://postgr.es/m/CAJrrPGcsDC-oy1AhqH0JkXYa0Z2AgbuXzHPpByLoBGMxfOZMEQ@= mail.gmail.com](https://postgr.es/m/CAJrrPGcsDC-oy1AhqH0JkXYa0Z2AgbuXzHPpBy= LoBGMxfOZMEQ@mail.gmail.com) [2] [https://postgr.es/m/20200820060929.GB3730@paquier.xyz](https://postg= r.es/m/20200820060929.GB3730@paquier.xyz) Author: Dmitry Dolgov <9erthalion6@gmail.com> Reviewed-by: =C3=81lvaro Herrera Discussion: [https://postgr.es/m/20201116182446.qcg3o6szo2zookyr@localhost](https://p= ostgr.es/m/20201116182446.qcg3o6szo2zookyr@localhost) [https://git.postgresql.org/pg/commitdiff/cd9c1b3e197a9b53b840dcc87eb41b0= 4d601a5f9](https://git.postgresql.org/pg/commitdiff/cd9c1b3e197a9b53b840dcc= 87eb41b04d601a5f9) - indexcmds.c: reorder function prototypes. ... out of an overabundance of neatnikism, perhaps. [https://git.postgresql.org/pg/commitdiff/7684b6fbed3a0770a0d8fdcbb5cf8b6= 1394de691](https://git.postgresql.org/pg/commitdiff/7684b6fbed3a0770a0d8fdc= bb5cf8b61394de691) - Relax lock level for setting PGPROC->statusFlags. We don't actually need a lock to set PGPROC->statusFlags itself; what we do need is a shared lock = on either XidGenLock or ProcArrayLock in order to ensure MyProc->pgxactoff k= eeps still while we modify the mirror array in ProcGlobal->statusFlags. Some places were using an exclusive lock for that, which is excessive. Relax = those to use shared lock only. procarray.c has a couple of places with somewhat brittle assumptions about PGPROC changes: ProcArrayEndTransaction uses on= ly shared lock, so it's permissible to change MyProc only. On the other han= d, ProcArrayEndTransactionInternal also changes other procs, so it must hold exclusive lock. Add asserts to ensure those assumptions continue to hold. Author: =C3=81lvaro Herrera Reviewed-by: Michae= l Paquier Discussion: [https://postgr.es/m/20201117155501.GA13805@alvherre.pgsql](https://postg= r.es/m/20201117155501.GA13805@alvherre.pgsql) [https://git.postgresql.org/pg/commitdiff/27838981be9de35d54ffcdc6cc06b5d= 5ea9e0cee](https://git.postgresql.org/pg/commitdiff/27838981be9de35d54ffcdc= 6cc06b5d5ea9e0cee) Bruce Momjian pushed: - doc: improve wording of the need for analyze of exp. indexes. This is a followup commit on 3370207986. Reported-by: Justin Pryzby Discussion: [https://postgr.es/m/20201112211143.GL30691@telsasoft.com](https://postgr= .es/m/20201112211143.GL30691@telsasoft.com) Backpatch-through: 9.5 [https://git.postgresql.org/pg/commitdiff/481f9dc3dc2fc779af3ab2d58216a1c= 2b970b20f](https://git.postgresql.org/pg/commitdiff/481f9dc3dc2fc779af3ab2d= 58216a1c2b970b20f) - doc: clarify how to find pg_type_d.h in the install tree. Followup to pa= tch 152ed04799. Reported-by: Alvaro Herrera Discussion: [https://postgr.es/m/20201112202900.GA28098@alvherre.pgsql](https://postg= r.es/m/20201112202900.GA28098@alvherre.pgsql) Backpatch-through: 9.5 [https://git.postgresql.org/pg/commitdiff/8ad06bcbe136360296a804da7d7631a= 78fd15e70](https://git.postgresql.org/pg/commitdiff/8ad06bcbe136360296a804d= a7d7631a78fd15e70) - doc: update bgwriter description. This clarifies exactly what the bgwrit= er does, which should help with tuning. Reported-by: Chris Wilson Discussi= on: [https://postgr.es/m/160399562040.7809.7335281028960123489@wrigleys.postg= resql.org](https://postgr.es/m/160399562040.7809.7335281028960123489@wrigle= ys.postgresql.org) Backpatch-through: 9.5 [https://git.postgresql.org/pg/commitdiff/62b50ad698f8a789f92177ad72639f9= 9d94d7d78](https://git.postgresql.org/pg/commitdiff/62b50ad698f8a789f92177a= d72639f99d94d7d78) Amit Kapila pushed: - Fix 'skip-empty-xacts' option in test_decoding for streaming mode. In streaming mode, the transaction can be decoded in multiple streams and th= ose streams can be interleaved with streams of other transactions. So, we can= 't remember the transaction's write status in the logical decoding context because that might get changed due to some other transactions and lead to wrong answers for 'skip-empty-xacts' option. We decided to keep each transaction's write status in the ReorderBufferTxn to avoid interleaved streams changing the status of some unrelated transactions. Diagnosed-by: Amit Kapila Author: Dilip Kumar Reviewed-by: Amit Kapila Discussion: [https://postgr.es/m/CAA4eK1LR7=3DXNM_TLmpZMFuV8ZQpoxkem--NZJYf8YXmesbvwL= A@mail.gmail.com](https://postgr.es/m/CAA4eK1LR7=3DXNM_TLmpZMFuV8ZQpoxkem--= NZJYf8YXmesbvwLA@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/9653f24ad8307f393de51e0a64d9b10= a49efa6e3](https://git.postgresql.org/pg/commitdiff/9653f24ad8307f393de51e0= a64d9b10a49efa6e3) Peter Geoghegan pushed: - nbtree: Rename nbtinsert.c variables for consistency. Stop naming special area/opaque pointer variables 'lpageop' in contexts where it doesn't make sense. This is a holdover from a time when logic that performs tasks tha= t are now spread across _bt_insertonpg(), _bt_findinsertloc(), and _bt_split() = was more centralized. 'lpageop' denotes "left page", which doesn't make sense outside of contexts in which there isn't also a right page. Also acquire= page flag variables up front within _bt_insertonpg(). This makes it closer to _bt_split() following refactoring commit bc3087b626d. This allows the page split and retail insert paths to both make use of the same variables. [https://git.postgresql.org/pg/commitdiff/a034f8b60c6e9afd75f42dc420a76cb= 9d3875fcb](https://git.postgresql.org/pg/commitdiff/a034f8b60c6e9afd75f42dc= 420a76cb9d3875fcb) - Deprecate nbtree's BTP_HAS_GARBAGE flag. Streamline handling of the vario= us strategies that we have to avoid a page split in nbtinsert.c. When it lo= oks like a leaf page is about to overflow, we now perform deleting LP_DEAD it= ems and deduplication in one central place. This greatly simplifies _bt_findinsertloc(). This has an independently useful consequence: nbtre= e no longer relies on the BTP_HAS_GARBAGE page level flag/hint for anything important. We still set and unset the flag in the same way as before, but it's no longer treated as a gating condition when considering if we should check for already-set LP_DEAD bits. This happens at the point where the = page looks like it might have to be split anyway, so simply checking the LP_DE= AD bits in passing is practically free. This avoids missing LP_DEAD bits ju= st because the page-level hint is unset, which is probably reasonably common (e.g. it happens when VACUUM unsets the page-level flag without actually removing index tuples whose LP_DEAD-bit was set recently, after the VACUUM operation began but before it reached the leaf page in question). Note t= hat this isn't a big behavioral change compared to PostgreSQL 13. We were alr= eady checking for set LP_DEAD bits regardless of whether the BTP_HAS_GARBAGE p= age level flag was set before we considered doing a deduplication pass. This commit only goes slightly further by doing the same check for all indexes, even indexes where deduplication won't be performed. We don't completely remove the BTP_HAS_GARBAGE flag. We still rely on it as a gating conditi= on with pg_upgrade'd indexes from before B-tree version 4/PostgreSQL 12. Th= at makes sense because we sometimes have to make a choice among pages full of duplicates when inserting a tuple with pre version 4 indexes. It probably still pays to avoid accessing the line pointer array of a page there, sin= ce it won't yet be clear whether we'll insert on to the page in question at all= , let alone split it as a result. Author: Peter Geoghegan Reviewe= d-By: Victor Yegorov Discussion: [https://postgr.es/m/CAH2-Wz%3DYpc1PDdk8OVJDChGJBjT06%3DA0Mbv9HyTLCsOknGc= UFg%40mail.gmail.com](https://postgr.es/m/CAH2-Wz%3DYpc1PDdk8OVJDChGJBjT06%= 3DA0Mbv9HyTLCsOknGcUFg%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/cf2acaf4dcb5e20204dcec4d698cb44= 78af533e7](https://git.postgresql.org/pg/commitdiff/cf2acaf4dcb5e20204dcec4= d698cb4478af533e7) Heikki Linnakangas pushed: - docs: Clarify that signal functions have no feedback. Bug #16652 complains that pg_reload_conf() returned true, even though the configuration file contained errors. That's the way pg_reload_conf() works, by design, but t= he documentation wasn't very clear on it. Clarify that a 'true' return value= only means that the signal was sent successfully. Also add links to the system views that can be used to check the configuration files for errors. Davi= d G. Johnston, with some rewording by me. Discussion: [https://www.postgresql.org/message-id/CAKFQuwax6GxhUQEes0D045UtXG-fBraM3= 9_6UMd5JyR5K1HWCQ%40mail.gmail.com](https://www.postgresql.org/message-id/C= AKFQuwax6GxhUQEes0D045UtXG-fBraM39_6UMd5JyR5K1HWCQ%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/dfab7f2f94812c6c3a62cfde0ec7f9e= 447132e64](https://git.postgresql.org/pg/commitdiff/dfab7f2f94812c6c3a62cfd= e0ec7f9e447132e64) - Skip allocating hash table in EXPLAIN-only mode. Author: Alexey Bashtanov Discussion: [https://www.postgresql.org/message-id/36823f65-050d-ae24-aa4d-a377269982= 40%40imap.cc](https://www.postgresql.org/message-id/36823f65-050d-ae24-aa4d= -a37726998240%40imap.cc) [https://git.postgresql.org/pg/commitdiff/2cccb627f10d5dd4c21806fa251e4fb= 61eadd28c](https://git.postgresql.org/pg/commitdiff/2cccb627f10d5dd4c21806f= a251e4fb61eadd28c) - Make pg_rewind test case more stable. If replication is exceptionally slo= w for some reason, pg_rewind might run before the test row has been replicated.= Add an explicit wait for it. Reported-by: Andres Freund Discussion: [https://www.postgresql.org/message-id/20201120003811.iknhqwatitw2vvxf%40= alap3.anarazel.de](https://www.postgresql.org/message-id/20201120003811.ikn= hqwatitw2vvxf%40alap3.anarazel.de) [https://git.postgresql.org/pg/commitdiff/c71f9a094b32770dcd34b9ba4909435= e34583747](https://git.postgresql.org/pg/commitdiff/c71f9a094b32770dcd34b9b= a4909435e34583747) Thomas Munro pushed: - Add BarrierArriveAndDetachExceptLast(). Provide a way for one process to continue the remaining phases of a (previously) parallel computation alon= e. Later patches will use this to extend Parallel Hash Join. Author: Melanie Plageman Reviewed-by: Thomas Munro Discussion: [https://postgr.es/m/CA%2BhUKG%2BA6ftXPz4oe92%2Bx8Er%2BxpGZqto70-Q_ERwRaS= yA%3DafNg%40mail.gmail.com](https://postgr.es/m/CA%2BhUKG%2BA6ftXPz4oe92%2B= x8Er%2BxpGZqto70-Q_ERwRaSyA%3DafNg%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/7888b0999488511e4266f2134053fa3= a6505a155](https://git.postgresql.org/pg/commitdiff/7888b0999488511e4266f21= 34053fa3a6505a155) - Add collation versions for FreeBSD. On FreeBSD 13, use querylocale() to r= ead the current version of libc collations. Similar to commits 352f6f2d for Windows and d5ac14f9 for GNU/Linux. Discussion: [https://postgr.es/m/CAEepm%3D0uEQCpfq_%2BLYFBdArCe4Ot98t1aR4eYiYTe%3Dyav= QygiQ%40mail.gmail.com](https://postgr.es/m/CAEepm%3D0uEQCpfq_%2BLYFBdArCe4= Ot98t1aR4eYiYTe%3DyavQygiQ%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/ca051d8b101d3205f1c5faf0d1da8a5= 23ffc95a1](https://git.postgresql.org/pg/commitdiff/ca051d8b101d3205f1c5faf= 0d1da8a523ffc95a1) Magnus Hagander pushed: - Remove ability to independently select random number generator. Remove the ability to select random number generator independently from SSL library. Instead, use the random number generator from the SSL library (today only OpenSSL supported) if one is configured. If no SSL library is configured,= use the platform default (which means use CryptoAPI on Win32 and /dev/urandom= on Linux). This also restructures pg_strong_random.c to have three clearly separate sections, one for each implementation, with two functions in eac= h, instead of a scattered set of ifdefs throughout the whole file. Author: Daniel Gustafsson, Magnus Hagander, Michael Paquier Discussion: [https://postgr.es/m/632623.1605460616@sss.pgh.pa.us](https://postgr.es/m= /632623.1605460616@sss.pgh.pa.us) [https://git.postgresql.org/pg/commitdiff/16f96c74d48e65da23d28665103e2c4= c9d3414cc](https://git.postgresql.org/pg/commitdiff/16f96c74d48e65da23d2866= 5103e2c4c9d3414cc) # Pending Patches Atsushi Torikoshi sent in another revision of a patch to Enabled pg_get_backend_memory_contexts() to collect arbitrary backend process's mem= ory contexts. Previously, pg_get_backend_memory_contexts() could only get the = local memory contexts. This patch enables to get memory contexts of the arbitrary backend process which PID is specified by the argument. Tom=C3=A1=C5=A1 Vondra sent in two revisions of a patch to support extended= statistics on expressions. Seino Yuki and Fujii Masao traded patches to add a new pg_stat_statements_i= nfo view to the pg_stat_statements extension. Jacob Champion and Daniel Gustafsson traded patches to support NSS as a TLS backend for libpq. Alexandra Pervushina sent in two more revisions of a patch to make it possi= ble to make async replicas wait for lsn to be replayed. =C3=81lvaro Herrera and Dmitry Dolgov traded patches to remove a spurious w= ait from CREATE INDEX CONCURRENTLY. Thomas Munro sent in two revisions of a patch to track relation sizes in sh= ared memory, and provide a lock-free fast path for smgrnblocks(). Masahiro Ikeda sent in another revision of a patch to add a track_wal_io_ti= ming GUC and a matching pg_stat_wal view to back it. Li Japin sent in four more revisions of a patch to make it possible to term= inate idle sessions using a new GUC, idle_session_timeout, and in passing, call setitimer() less often. Masahiko Sawada and Bertrand Drouvot traded patches to add information duri= ng standby recovery conflicts, controlled with a new GUC, log_recovery_conflict_waits. Takamichi Osumi sent in two more revisions of a patch to make it possible to disallow WAL logging during data loads. Simon Riggs sent in five revisions of a patch to fix a situation where the documented behavior of DISABLE_PAGE_SKIPPING doesn't match the current beha= vior. Ajin Cherian and Amit Kapila traded patches to implement logical decoding of two-phase transactions. Tatsuro Yamada sent in two more revisions of a patch to add a psql command = for extended statistics, \dX. Daniel Gustafsson sent in another revision of a patch to support enabling a= nd disabling page checksums in a running cluster. Justin Pryzby sent in a patch to allow composite types in bootstrap and add= a column to pg_statistic_ext_data, stxdexpr. Peter Geoghegan sent in another revision of a patch to delete older version= s in unique indexes to avoid page splits. Heikki Linnakangas sent in another revision of a patch to split copy.c into= four files: copy.c, which now contains the functions that are common to COPY FRO= M and COPY TO, copyto.c, which contains code for COPY TO, copyfrom.c which contai= ns code for initilizing COPY FROM, and routing tuples to the correct table, and copyfromparse.c, which contains code for reading from the client/file/progr= am, and parsing the input text/CSV/binary format into tuples. David G. Johnston sent in another revision of a patch to clarify the fact t= hat signal functions have no feedback. Simon Riggs sent in a patch to add a wal_sessioninfo GUC which when turned = on adds information about the user's session onto every commit or abort record. David G. Johnston sent in a patch to clarify the documentation for batch/pipelining support in libpq. Dean Rasheed sent in another revision of a patch to improve estimation of OR clauses. Heikki Linnakangas sent in a patch to make the ResourceOwner implementation= more efficient and expose handier interfaces to it to external code. Aleksey Kondratov sent in a patch to add a custom GUC to the PostgreSQL FDW which controls whether it tries to keep connections, with the surprising na= me of keep_connections. Takayuki Tsunakawa and Tom=C3=A1=C5=A1 Vondra traded patches to implement I= NSERT batching for the PostgreSQL FDW. Justin Pryzby and Pavel St=C4=9Bhule traded patches to add a --filter optio= n to pg_dump, which draws from a file which specifies the filters to be used, and makes argument parsing available both to the command line and to files so described. Bharath Rupireddy sent in another revision of a patch to use standard SIGHU= P and SIGTERM handlers in the autoprewarm module. Etsuro Fujita sent in another revision of a patch to enable Asynchronous Ap= pend on postgres_fdw nodes. Tom=C3=A1=C5=A1 Vondra sent in a patch to fix a bug that manifested as incr= emental sort changing query behavior by adding a check for is_parallel_safe to get_useful_pathkeys_for_relation(). David Pirotte sent in another revision of a patch to add xid to messages wh= en streaming, and add a "messages" option to the pgoutput output plugin. When "messages" is true, logical decoding messages (i.e. generated via pg_logical_emit_message) are sent to the slot consumer. Junfeng (Jerome) Yang sent in another revision of a patch to fix vacuum fre= eze with pg_database toast attribute by changing vac_update_datfrozenxid()'s so= urce for the pg_database tuple for current database from the disk heap table ins= tead of system cache. Dmitry Dolgov sent in a patch to prevent jumbling of every element in Array= Expr. The motivation for this is that pg_stat_statements produces multiple entrie= s for queries like SELECT something FROM table WHERE col IN (1, 2, 3, ...) depending on number of parameters, because every element of ArrayExpr is jumbled. Make Consts contribute nothing to the jumble hash if they're part = of a series and at position further that specified threshold. Do the same for si= milar queries with VALUES as well. Thomas Munro sent in another revision of a patch to implement WAL prefetch. Andrew Dunstan sent in another revision of a patch to allow matching the wh= ole DN from a client certificate. Pavel St=C4=9Bhule sent in two revisions of a patch to add shorthand for ar= gument and local variable references to PL/pgsql. Atsushi Torikoshi sent in two revisions of a patch to document the fact that cached plans are invalidated when statistics used to create them are update= d. Atsushi Torikoshi sent in two revisions of a patch to update the PREPARE documentation to note that pg_prepared_statements now shows how many times = each prepared statement chose generic and custom plan cumulatively in the current session. Vigneshwaran C sent in another revision of a patch to parallelize COPY. Thomas Munro sent in another revision of a patch to minimize latch signals. Masahiro Ikeda sent in another revision of a patch to add statistics to pg_stat_wal view for wal related parameter tuning. Craig Ringer sent in a patch to detect and report when a LWLockAcquire() re= sults in a simple self-deadlock due to the caller already holding the LWLock.. Craig Ringer sent in a patch to Remove bogus lwlock__acquire tracepoint from LWLockWaitForVar, pass the target LWLock* and tranche ID to LWLock tracepoi= nt, and add to the tracepoints in LWLock routines. Heikki Linnakangas sent in another revision of a patch to move peragg and pertrans duplicate finding to prepagg.c. Craig Ringer sent in a patch atop the resource owner refactoring patch above which adds some systemtap/dtrace tracepoints and provides a demo systemtap script that shows some basic stats collection done using them. Surafel Temesgen sent in another revision of a patch to implement system versioned temporal tables. Justin Pryzby sent in two more revisions of a patch to avoid errors in brin summarization, which can happen if an index is reindexed concurrently. Li Japin sent in a patch to use macros for calculating LWLock offset. Kyotaro HORIGUCHI sent in another revision of a patch to implement CatCache expiration. Peter Eisentraut sent in another revision of a patch to add support for wri= ting CREATE FUNCTION and CREATE PROCEDURE statements for language SQL with a fun= ction body that conforms to the SQL standard. Greg Nancarrow sent in another revision of a patch to enable parallel SELEC= T for "INSERT INTO ... SELECT ..." along with parallel INSERT and/or SELECT for "INSERT INTO ... SELECT ...", where it is safe to do so. Amit Langote sent in a patch to create foreign key triggers in partitioned tables too in order to allow subsequent commit(s) to make the foreign key related events to be fired in some cases using the parent table triggers in= stead of those of partitions', and enforce foreign key correctly during cross-partition updates. Laurenz Albe sent in another revision of a patch to add session statistics = to pg_stat_database. Justin Pryzby sent in another revision of a patch to pg_restore so it parse= s and runs separately SQL commands, and allow child partitions to be independently restored even if the parent doesn't exist, or has missing/incompatible colu= mns. Peter Eisentraut sent in another revision of a patch to pause recovery for insufficient parameter settings. Peter Eisentraut sent in another revision of a patch to add support for abs= tract Unix-domain sockets, and make the error hint from bind() failure more accur= ate by showing that hint only when errno =3D=3D EADDRINUSE. Matthias van de Meent sent in a patch to Fix CLUSTER progress reporting of number of blocks scanned. Stephen Frost sent in a patch to replace the somewhat inaccurate "default r= ole" term with the more precise "predefined role." Erik Rijkers sent in a patch atop the patch to add a tutorial chapter on architecture to fix some typos and do other wordsmithing. Bharath Rupireddy sent in another revision of a patch to avoid checking INS= ERT privilege in CTAS and MatView in order to comply with the standard. Gilles Darold sent in two revisions of a patch to add a hook for plugins to= get control of at end of AbortCurrentTransaction, and an extension to enable statement-level rollback based on same. Krasiyan Andreev sent in another revision of a patch to implement for window functions. =C3=81lvaro Herrera sent in a patch to fix a bug in pageinspect which manif= ests as messages along the lines of ERROR: invalid memory alloc request size 18446744073709551451 when pages are sufficiently broken. The fix is not to attempt to print the = data rather than dying. Justin Pryzby sent in another revision of a patch to retire pg_standby. Micha=C3=ABl Paquier sent in two more revisions of a patch to remove currti= d() and currtid2(), cleaning up some table AMs in the process. James Coleman sent in a patch to enforce parallel safety of pathkeys in generate_useful_gather_paths, and ensure that generate_useful_gather_paths doesn't skip unsorted subpaths. Vigneshwaran C sent in a PoC patch to which would make it possible to get t= he call stack of a PostgreSQL process by connecting to the server. Tom Lane sent in a patch to make the "cannot insert" message be more precise about the fact that the reason is that non-default values can never be inse= rted. --===============1404372334935203491== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable PostgreSQL Weekly News - November 22, 2020
 

PostgreSQL Weekly News - November 22, 2020

PostgreSQL Weekly News - November 22, 2020

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

PostgreSQL Product News

PGroonga 2.2.7 a full text search platform = for all languages, released. https://pgroonga.github.io/

PostGIS 3.0.3, the industry standard geogra= phic information system package for PostgreSQL, released. http://postgis.net/2020/11/20/postgis-3.= 0.3/

pgtt 2.2, an extension to implement global = temporary tables, released. https://github.com/darold/pgtt/relea= ses/tag/v2.2

pgAdmin4 4.28, a web- and native GUI contro= l center for PostgreSQL, released. https://www.pgadmin= .org/docs/pgadmin4/dev/release_notes_4_28.html

pgbouncer 1.15.0, a connection pooler and m= ore for PostgreSQL, released. https://www.pgbouncer.org/2020/11/= pgbouncer-1-15-0

pitrery 3.2, a set of Bash scripts to manag= e PITR backups for PostgreSQL, released. http://dalibo.github.io/pitrery/

pg_statement_rollback v1.1, an extension th= at adds server side transaction with rollback at statement level, released. https://github.com/= lzlabs/pg_statement_rollback/releases/tag/v1.1

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 fuzzy thinking about amcanmulticol vers= us amcaninclude. These flags should be independent: in particular an index AM should be able to say that it supports include columns without necessarily supporting multiple key colu= mns. The included-columns patch got this wrong, possibly aided by the fact tha= t it didn't bother to update the documentation. While here, clarify some text about amcanreturn, which was a little vague about what should happen when amcanreturn reports that only some of the index columns are returnable. = Noted while reviewing the SP-GiST included-columns patch, which quite incorrect= ly (and unsafely) changed SP-GiST to claim amcanmulticol =3D true as a worka= round for this bug. Backpatch to v11 where included columns were introduced. h= ttps://git.postgresql.org/pg/commitdiff/29d29d652f0be47dc42fa9d667dee5b8e1b= aa18a

  • Use "true" not "TRUE" in one ICU function c= all. This was evidently missed in commit 6337865f3, which generally did s/TRUE/true/ everywhere. It escaped notice up to now because ICU versions before ICU 68 provided definitions = of "TRUE" and "FALSE" regardless. With ICU 68, it fails to compile. Per re= port from Condor. Back-patch to v11 where 6337865f3 came in. (I've not tested= v10, where this call originated, but I imagine it's fine since we defined TRUE= in c.h back then.) Discussion: https://postgr.es/m= /7a6f3336165bfe3ca66abcda7966f9d0@stz-bg.com htt= ps://git.postgresql.org/pg/commitdiff/ad84ecc98d7e2ad81567094b8a6910b507892= 7a7

  • Do not return NULL for error cases in satis= fies_hash_partition(). Since this function is used as a CHECK constraint condition, returning NULL is tanta= mount to returning TRUE, which would have the effect of letting in a row that doesn't satisfy the hash condition. Admittedly, the cases for which this = is done should be unreachable in practice, but that doesn't make it any less= a bad idea. It also seems like a dartboard was used to decide which error = cases should throw errors as opposed to returning NULL. For the checks for NULL input values, I just switched it to returning false. There's some argume= nt that an error would be better; but the case really should be can't-happen= in a generated hash constraint, so it's likely not worth more code for. For t= he parent-relation-open-failure case, it seems like we might as well let relation_open throw an error, instead of having an impossible-to-diagnose constraint failure. Back-patch to v11 where this code came in. Discussi= on: https://postgr.es/m/24067.160513= 4819@sss.pgh.pa.us htt= ps://git.postgresql.org/pg/commitdiff/4025e6c46620048804467d2ad29d31aa9ba50= 387

  • Don't Insert() a VFD entry until it's fully= built. Otherwise, if FDDEBUG is enabled, the debugging output fails because it tries to read the fileName, which isn't set up yet (and should in fact always be NULL). AFAICT, this= has been wrong since Berkeley. Before 96bf88d52, it would accidentally fail = to crash on platforms where snprintf() is forgiving about being passed a NULL pointer for %s; but the file name intended to be included in the debug ou= tput wouldn't ever have shown up. Report and fix by Greg Nancarrow. Although= this is only visibly broken in custom-made builds, it still seems worth back-patching to all supported branches, as the FDDEBUG code is pretty us= eless as it stands. Discussion: https://postgr.es/m/CAJcOf-cUDgm9qYtC_B6XrC6MktMPNRby2p61EtSGZKnfotMArw= @mail.gmail.com htt= ps://git.postgresql.org/pg/commitdiff/2bd49b493a52f0a21bc3fc51c355963f99ac1= a4e

  • Further fixes for CREATE TABLE LIKE: cope w= ith self-referential FKs. Commit 502898192 was too careless about the order of execution of the additional ALTER TABLE operations generated by expandTableLikeClause. It just stuck = them all at the end, which seems okay for most purposes. But it falls down in = the case where LIKE is importing a primary key or unique index and the outer CREATE TABLE includes a FOREIGN KEY constraint that needs to depend on th= at index. Weird as that is, it used to work, so we ought to keep it working= . To fix, make parse_utilcmd.c insert LIKE clauses between index-creation and FK-creation commands in the transformed list of commands, and change util= ity.c so that the commands generated by expandTableLikeClause are executed immediately not at the end. One could imagine scenarios where this would= n't work either; but currently expandTableLikeClause only makes column default expressions, CHECK constraints, and indexes, and this ordering seems fine= for those. Per bug #16730 from Sofoklis Papasofokli. Like the previous patc= h, back-patch to all supported branches. Discussion: https://postgr.es/m/16730= -b902f7e6e0276b30@postgresql.org htt= ps://git.postgresql.org/pg/commitdiff/97390fe8a6e96a153e59b0180f4303acaeb75= b84

  • Remove undocumented IS [NOT] OF syntax. Thi= s feature was added a long time ago, in 7c1e67bd5 and eb121ba2c, but never documented in any user-facing = way. (Documentation added in 6126d3e70 was commented out almost immediately, in 8272fc3f7.) That's because, while this syntax is defined by SQL:99, our implementation is only vaguely related to the standard's semantics. The standard appears to intend a run-time not parse-time test, and it definit= ely intends that the test should understand subtype relationships. No one has stepped up to fix that in the intervening years, but people keep coming a= cross the code and asking why it's not documented. Let's just get rid of it: if anyone ever wants to make it work per spec, they can easily recover whate= ver parts of this code are still of value from our git history. If there's a= nyone out there who's actually using this despite its undocumented status, they= can switch to using pg_typeof() instead, eg. "pg_typeof(something) =3D 'mytype'::regtype". That gives essentially the same semantics as what ou= r IS OF code did. (We didn't have that function last time this was discussed, = or we would have ripped out IS OF then.) Discussion: https://postgr.es/m/CAKFQuwZ2pTc-DSkOiTfjauqLYkNREeNZvWmeg12Q-_69D+sYZA= @mail.gmail.com Discussion: https://= postgr.es/m/BAY20-F23E9F2B4DAB3E4E88D3623F99B0@phx.gbl Discussion: https://postgr.es/m/= 3E7CF81D.1000203@joeconway.com htt= ps://git.postgresql.org/pg/commitdiff/926fa801ac9eb54c5275472271ec63a059904= 698

  • On macOS, use -isysroot in link steps as we= ll as compile steps. We previously put the -isysroot switch only into CPPFLAGS, theorizing that it was only needed to find the right copies of include files. However, it seems that = we also need to use it while linking programs, to find the right stub ".tbd" files for libraries. We got away without that up to now, but apparently = that was mostly luck. It may also be that failures are only observed when the Xcode version is noticeably out of sync with the host macOS version; the = case that's prompting action right now is that builds fail when using latest X= code (12.2) on macOS Catalina, even though it's fine on Big Sur. Hence, add -isysroot to LDFLAGS as well. (It seems that the more common practice is= to put it in CFLAGS, whence it'd be included at both compile and link steps. However, we can't mess with CFLAGS in the platform template file without confusing configure's logic for choosing default CFLAGS.) This should be back-patched, but first let's see if the buildfarm likes it on HEAD. Rep= ort and patch by James Hilliard (some cosmetic mods by me) Discussion: https://postgr= .es/m/20201120003314.20560-1-james.hilliard1@gmail.com htt= ps://git.postgresql.org/pg/commitdiff/49407dc32a2931550e4ff1dea314b6a25afdf= c35

  • Extend the geometric regression test cases = a little. Add another edge-case value to "point_tbl", and add a test for the line(point, point) function. Some of the behaviors exposed here are wrong, but the idea of committing = this separately is to memorialize what we were getting, and to allow easier inspection of the behavior changes caused by upcoming patches. Kyotaro Horiguchi (line() test added by me) Discussion: https://postgr.es/m/CAGf+fX70rWFOk5cd00uMfa__0yP+vtQg5ck7c2Onb-Yczp0URA= @mail.gmail.com htt= ps://git.postgresql.org/pg/commitdiff/a45272b25d6fc8f96793623545fc1f836ac39= d94

  • Fix FPeq() and friends to get the right ans= wers for infinities. "FPeq(infinity, infinity)" returned false, on account of getting NaN when= it subtracts the two inputs. Fix that by adding a separate check for exact equality. FPle() and FPge() similarly got the wrong answer for two like-signed infinities. In those cases, we can just rearrange the compar= isons to avoid potentially subtracting infinities. While the sibling functions FPne() etc accidentally gave the right answers even with the internal NaN results, it seems best to make similar adjustments to them to avoid depen= ding on this. FPeq() has to be converted to an inline function to avoid double evaluations of its arguments, and I did the same for the others just for consistency. In passing, make the handling of NaN cases in line_eq() and point_eq_point() simpler and easier to reason about, and perhaps faster. = This results in just one visible regression test change: slope() now gives DBL= _MAX for two inputs of (inf,1e300), which is consistent with what it does for (1e300,inf), so that seems like a bug fix. Discussion: https://postgr.es/m/CAGf+fX70rWFOk5cd00uMfa__0yP+vtQg5ck7c2Onb-Yczp0URA= @mail.gmail.com htt= ps://git.postgresql.org/pg/commitdiff/8597a48d01b6cc0b09ff626253ac93c67e551= 6d5

  • In geo_ops.c, represent infinite slope as I= nfinity, not DBL_MAX. Since we're assuming IEEE floats these days, there seems little reason not to do this= . It has the advantage that when the slope is computed as infinite due to the presence of Inf coordinates, we get saner behavior than before from line_construct(), and thence also in some dependent operations such as fi= nding the closest point. Also fix line_construct() to special-case slope zero.= The previous coding got the right answer in most cases, but it could compute = C as NaN when the point has Inf coordinates. Discussion: https://postgr.es/m/CAGf+fX70rWFOk5cd00uMfa__0yP+vtQg5ck7c2Onb-Yczp0URA= @mail.gmail.com htt= ps://git.postgresql.org/pg/commitdiff/9fe649ea295f00baf6d0f0c1f9b0cb1298f64= fb9

Micha=C3=ABl Paquier pushed:

  • Relax INSERT privilege requirement for CTAS= and matviews WITH NO DATA. When specified, WITH NO DATA does not insert any data into the relation create= d, so skip checking for the insert permissions. With WITH DATA or WITH NO DATA= , it is always required for the user to have CREATE privileges on the schema targeted for the relation. Note that plain CREATE TABLE AS or CREATE MATERIALIZED VIEW queries have begun to work accidentally without INSERT privilege checks as of 874fe3ae, while using EXECUTE or EXPLAIN ANALYZE w= ould fail with the ACL check, so this makes the behavior for all the command flavors consistent with each other. This is arguably a bug fix, but there have been no complaints about the current behavior either so stable branc= hes are not changed. While on it, document properly the privileges requireme= nts for each commands with more tests for all the scenarios possible, and avo= id a useless bulk-insert allocation when using WITH NO DATA. Author: Bharath Rupireddy Reviewed-by: Anastasia Lubennikova, Michael Paquier Discussion: https://postgr.es/m/CALj2ACWc3N8j0_9nMPz9wcAUnVcdKHzFdDZJ3hVFNEbqtcyG9w= @mail.gmail.com htt= ps://git.postgresql.org/pg/commitdiff/846005e4f3829c3eafe1f8441b80ff90657d0= a29

  • Add tab completion for CREATE [OR REPLACE] = TRIGGER in psql. 92bf7e2 has added support for this grammar. Author: Noriyoshi Shinoda Discussion: https://postgr.es/m/TU4PR8401MB115244623CF4724DCA0D507F= EEE30@TU4PR8401MB1152.NAMPRD84.PROD.OUTLOOK.COM htt= ps://git.postgresql.org/pg/commitdiff/bf0aa7c4b83bcf3116c5a3c191bbc677ab3be= b59

  • Improve failure detection with array parsin= g in pg_dump. Similarly to 3636efa, the checks done in pg_dump when parsing array values from catalogs have b= een too lax. Under memory pressure, it could be possible, though very unlike= ly, to finish with dumps that miss some data like: - Statistics for indexes - Run-time configuration of functions - Configuration of extensions - Publication list for a subscription No backpatch is done as this is not = going to be a problem in practice. For example, if an OOM causes an array parsi= ng to fail, a follow-up code path of pg_dump would most likely complain with an allocation failure due to the memory pressure. Author: Michael Paquier Reviewed-by: Daniel Gustafsson Discussion: https://postgr.es/m/2020111= 1061319.GE2276@paquier.xyz htt= ps://git.postgresql.org/pg/commitdiff/13b58f8934e6252868231c3493d49b8c2b363= e5d

  • Remove INSERT privilege check at table crea= tion of CTAS and matview. As per discussion with Peter Eisentraunt, the SQL standard specifies that any tu= ple insertion done as part of CREATE TABLE AS happens without any extra ACL c= heck, so it makes little sense to keep a check for INSERT privileges when using= WITH DATA. Materialized views are not part of the standard, but similarly, th= is check can be confusing as this refers to an access check on a table creat= ed within the same command as the one that would insert data into this table. This commit removes the INSERT privilege check for WITH DATA, the default, that 846005e removed partially, but only for WITH NO DATA. Author: Bhara= th Rupireddy Discussion: https://p= ostgr.es/m/d049c272-9a47-d783-46b0-46665b011598@enterprisedb.com htt= ps://git.postgresql.org/pg/commitdiff/878f3a19c6c8ff197e4a33f51d921a4abafcc= 494

Alexander Korotkov pushed:

Fujii Masao pushed:

Peter Eisentraut pushed:

=C3=81lvaro Herrera pushed:

Bruce Momjian pushed:

Amit Kapila pushed:

Peter Geoghegan pushed:

  • nbtree: Rename nbtinsert.c variables for co= nsistency. Stop naming special area/opaque pointer variables 'lpageop' in contexts where it doesn't make sense. This is a holdover from a time when logic that performs tasks tha= t are now spread across _bt_insertonpg(), _bt_findinsertloc(), and _bt_split() = was more centralized. 'lpageop' denotes "left page", which doesn't make sense outside of contexts in which there isn't also a right page. Also acquire= page flag variables up front within _bt_insertonpg(). This makes it closer to _bt_split() following refactoring commit bc3087b626d. This allows the page split and retail insert paths to both make use of the same variables. h= ttps://git.postgresql.org/pg/commitdiff/a034f8b60c6e9afd75f42dc420a76cb9d38= 75fcb

  • Deprecate nbtree's BTP_HAS_GARBAGE flag. St= reamline handling of the various strategies that we have to avoid a page split in nbtinsert.c. When it lo= oks like a leaf page is about to overflow, we now perform deleting LP_DEAD it= ems and deduplication in one central place. This greatly simplifies _bt_findinsertloc(). This has an independently useful consequence: nbtre= e no longer relies on the BTP_HAS_GARBAGE page level flag/hint for anything important. We still set and unset the flag in the same way as before, but it's no longer treated as a gating condition when considering if we should check for already-set LP_DEAD bits. This happens at the point where the = page looks like it might have to be split anyway, so simply checking the LP_DE= AD bits in passing is practically free. This avoids missing LP_DEAD bits ju= st because the page-level hint is unset, which is probably reasonably common (e.g. it happens when VACUUM unsets the page-level flag without actually removing index tuples whose LP_DEAD-bit was set recently, after the VACUUM operation began but before it reached the leaf page in question). Note t= hat this isn't a big behavioral change compared to PostgreSQL 13. We were alr= eady checking for set LP_DEAD bits regardless of whether the BTP_HAS_GARBAGE p= age level flag was set before we considered doing a deduplication pass. This commit only goes slightly further by doing the same check for all indexes, even indexes where deduplication won't be performed. We don't completely remove the BTP_HAS_GARBAGE flag. We still rely on it as a gating conditi= on with pg_upgrade'd indexes from before B-tree version 4/PostgreSQL 12. Th= at makes sense because we sometimes have to make a choice among pages full of duplicates when inserting a tuple with pre version 4 indexes. It probably still pays to avoid accessing the line pointer array of a page there, sin= ce it won't yet be clear whether we'll insert on to the page in question at all= , let alone split it as a result. Author: Peter Geoghegan pg@bowt= ;.ie Reviewed-By: Victor Yegorov &#= 118;yegorov@gmai&= #108;.com Discussion: https://postgr.es/m/CAH2-Wz%3DYpc1PDdk8OVJDChGJBjT06%3DA0Mbv9HyTL= CsOknGcUFg%40mail.gmail.com htt= ps://git.postgresql.org/pg/commitdiff/cf2acaf4dcb5e20204dcec4d698cb4478af53= 3e7

Heikki Linnakangas pushed:

Thomas Munro pushed:

Magnus Hagander pushed:

  • Remove ability = to independently select random number generator. Remove the ability to select random number generator independently from SSL library. Instead, use the random number generator from the SSL library (today only OpenSSL supported) if one is configured. If no SSL library is configured,= use the platform default (which means use CryptoAPI on Win32 and /dev/urandom= on Linux). This also restructures pg_strong_random.c to have three clearly separate sections, one for each implementation, with two functions in eac= h, instead of a scattered set of ifdefs throughout the whole file. Author: Daniel Gustafsson, Magnus Hagander, Michael Paquier Discussion: https://postgr.es/m/632623.1605= 460616@sss.pgh.pa.us htt= ps://git.postgresql.org/pg/commitdiff/16f96c74d48e65da23d28665103e2c4c9d341= 4cc

Pending Patches

Atsushi Torikoshi sent in another revision = of a patch to Enabled pg_get_backend_memory_contexts() to collect arbitrary backend process's mem= ory contexts. Previously, pg_get_backend_memory_contexts() could only get the = local memory contexts. This patch enables to get memory contexts of the arbitrary backend process which PID is specified by the argument.

Tom=C3=A1=C5=A1 Vondra sent in two revision= s of a patch to support extended statistics on expressions.

Seino Yuki and Fujii Masao traded patches t= o add a new pg_stat_statements_info view to the pg_stat_statements extension.

Jacob Champion and Daniel Gustafsson traded= patches to support NSS as a TLS backend for libpq.

Alexandra Pervushina sent in two more revis= ions of a patch to make it possible to make async replicas wait for lsn to be replayed.

=C3=81lvaro Herrera and Dmitry Dolgov trade= d patches to remove a spurious wait from CREATE INDEX CONCURRENTLY.

Thomas Munro sent in two revisions of a pat= ch to track relation sizes in shared memory, and provide a lock-free fast path for smgrnblocks().

Masahiro Ikeda sent in another revision of = a patch to add a track_wal_io_timing GUC and a matching pg_stat_wal view to back it.

Li Japin sent in four more revisions of a p= atch to make it possible to terminate idle sessions using a new GUC, idle_session_timeout, and in passing, call setitimer() less often.

Masahiko Sawada and Bertrand Drouvot traded= patches to add information during standby recovery conflicts, controlled with a new GUC, log_recovery_conflict_waits.

Takamichi Osumi sent in two more revisions = of a patch to make it possible to disallow WAL logging during data loads.

Simon Riggs sent in five revisions of a pat= ch to fix a situation where the documented behavior of DISABLE_PAGE_SKIPPING doesn't match the current beha= vior.

Ajin Cherian and Amit Kapila traded patches= to implement logical decoding of two-phase transactions.

Tatsuro Yamada sent in two more revisions o= f a patch to add a psql command for extended statistics, \dX.

Daniel Gustafsson sent in another revision = of a patch to support enabling and disabling page checksums in a running cluster.

Justin Pryzby sent in a patch to allow comp= osite types in bootstrap and add a column to pg_statistic_ext_data, stxdexpr.

Peter Geoghegan sent in another revision of= a patch to delete older versions in unique indexes to avoid page splits.

Heikki Linnakangas sent in another revision= of a patch to split copy.c into four files: copy.c, which now contains the functions that are common to COPY FRO= M and COPY TO, copyto.c, which contains code for COPY TO, copyfrom.c which contai= ns code for initilizing COPY FROM, and routing tuples to the correct table, and copyfromparse.c, which contains code for reading from the client/file/progr= am, and parsing the input text/CSV/binary format into tuples.

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

Simon Riggs sent in a patch to add a wal_se= ssioninfo GUC which when turned on adds information about the user's session onto every commit or abort record= .

David G. Johnston sent in a patch to clarif= y the documentation for batch/pipelining support in libpq.

Dean Rasheed sent in another revision of a = patch to improve estimation of OR clauses.

Heikki Linnakangas sent in a patch to make = the ResourceOwner implementation more efficient and expose handier interfaces to it to external code.

Aleksey Kondratov sent in a patch to add a = custom GUC to the PostgreSQL FDW which controls whether it tries to keep connections, with the surprising na= me of keep_connections.

Takayuki Tsunakawa and Tom=C3=A1=C5=A1 Vond= ra traded patches to implement INSERT batching for the PostgreSQL FDW.

Justin Pryzby and Pavel St=C4=9Bhule traded= patches to add a --filter option to pg_dump, which draws from a file which specifies the filters to be used, and makes argument parsing available both to the command line and to files so described.

Bharath Rupireddy sent in another revision = of a patch to use standard SIGHUP and SIGTERM handlers in the autoprewarm module.

Etsuro Fujita sent in another revision of a= patch to enable Asynchronous Append on postgres_fdw nodes.

Tom=C3=A1=C5=A1 Vondra sent in a patch to f= ix a bug that manifested as incremental sort changing query behavior by adding a check for is_parallel_safe to get_useful_pathkeys_for_relation().

David Pirotte sent in another revision of a= patch to add xid to messages when streaming, and add a "messages" option to the pgoutput output plugin. When "messages" is true, logical decoding messages (i.e. generated via pg_logical_emit_message) are sent to the slot consumer.

Junfeng (Jerome) Yang sent in another revis= ion of a patch to fix vacuum freeze with pg_database toast attribute by changing vac_update_datfrozenxid()'s so= urce for the pg_database tuple for current database from the disk heap table ins= tead of system cache.

Dmitry Dolgov sent in a patch to prevent ju= mbling of every element in ArrayExpr. The motivation for this is that pg_stat_statements produces multiple entrie= s for queries like SELECT something FROM table WHERE col IN (1, 2, 3, ...) depending on number of parameters, because every element of ArrayExpr is jumbled. Make Consts contribute nothing to the jumble hash if they're part = of a series and at position further that specified threshold. Do the same for si= milar queries with VALUES as well.

Thomas Munro sent in another revision of a = patch to implement WAL prefetch.

Andrew Dunstan sent in another revision of = a patch to allow matching the whole DN from a client certificate.

Pavel St=C4=9Bhule sent in two revisions of= a patch to add shorthand for argument and local variable references to PL/pgsql.

Atsushi Torikoshi sent in two revisions of = a patch to document the fact that cached plans are invalidated when statistics used to create them are update= d.

Atsushi Torikoshi sent in two revisions of = a patch to update the PREPARE documentation to note that pg_prepared_statements now shows how many times = each prepared statement chose generic and custom plan cumulatively in the current session.

Vigneshwaran C sent in another revision of = a patch to parallelize COPY.

Thomas Munro sent in another revision of a = patch to minimize latch signals.

Masahiro Ikeda sent in another revision of = a patch to add statistics to pg_stat_wal view for wal related parameter tuning.

Craig Ringer sent in a patch to detect and = report when a LWLockAcquire() results in a simple self-deadlock due to the caller already holding the LWLock..

Craig Ringer sent in a patch to Remove bogu= s lwlock__acquire tracepoint from LWLockWaitForVar, pass the target LWLock* and tranche ID to LWLock tracepoi= nt, and add to the tracepoints in LWLock routines.

Heikki Linnakangas sent in another revision= of a patch to move peragg and pertrans duplicate finding to prepagg.c.

Craig Ringer sent in a patch atop the resou= rce owner refactoring patch above which adds some systemtap/dtrace tracepoints and provides a demo systemtap script that shows some basic stats collection done using them.

Surafel Temesgen sent in another revision o= f a patch to implement system versioned temporal tables.

Justin Pryzby sent in two more revisions of= a patch to avoid errors in brin summarization, which can happen if an index is reindexed concurrently.

Li Japin sent in a patch to use macros for = calculating LWLock offset.

Kyotaro HORIGUCHI sent in another revision = of a patch to implement CatCache expiration.

Peter Eisentraut sent in another revision o= f a patch to add support for writing CREATE FUNCTION and CREATE PROCEDURE statements for language SQL with a fun= ction body that conforms to the SQL standard.

Greg Nancarrow sent in another revision of = a patch to enable parallel SELECT for "INSERT INTO ... SELECT ..." along with parallel INSERT and/or SELECT for "INSERT INTO ... SELECT ...", where it is safe to do so.

Amit Langote sent in a patch to create fore= ign key triggers in partitioned tables too in order to allow subsequent commit(s) to make the foreign key related events to be fired in some cases using the parent table triggers in= stead of those of partitions', and enforce foreign key correctly during cross-partition updates.

Laurenz Albe sent in another revision of a = patch to add session statistics to pg_stat_database.

Justin Pryzby sent in another revision of a= patch to pg_restore so it parses and runs separately SQL commands, and allow child partitions to be independently restored even if the parent doesn't exist, or has missing/incompatible colu= mns.

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

Peter Eisentraut sent in another revision o= f a patch to add support for abstract Unix-domain sockets, and make the error hint from bind() failure more accur= ate by showing that hint only when errno =3D=3D EADDRINUSE.

Matthias van de Meent sent in a patch to Fi= x CLUSTER progress reporting of number of blocks scanned.

Stephen Frost sent in a patch to replace th= e somewhat inaccurate "default role" term with the more precise "predefined role."

Erik Rijkers sent in a patch atop the patch= to add a tutorial chapter on architecture to fix some typos and do other wordsmithing.

Bharath Rupireddy sent in another revision = of a patch to avoid checking INSERT privilege in CTAS and MatView in order to comply with the standard.

Gilles Darold sent in two revisions of a pa= tch to add a hook for plugins to get control of at end of AbortCurrentTransaction, and an extension to enable statement-level rollback based on same.

Krasiyan Andreev sent in another revision o= f a patch to implement <null treatment> for window functions.

=C3=81lvaro Herrera sent in a patch to fix = a bug in pageinspect which manifests as messages along the lines of ERROR: invalid memory alloc request size 18446744073709551451 when pages are sufficiently broken. The fix is not to attempt to print the = data rather than dying.

Justin Pryzby sent in another revision of a= patch to retire pg_standby.

Micha=C3=ABl Paquier sent in two more revis= ions of a patch to remove currtid() and currtid2(), cleaning up some table AMs in the process.

James Coleman sent in a patch to enforce pa= rallel safety of pathkeys in generate_useful_gather_paths, and ensure that generate_useful_gather_paths doesn't skip unsorted subpaths.

Vigneshwaran C sent in a PoC patch to which= would make it possible to get the call stack of a PostgreSQL process by connecting to the server.

Tom Lane sent in a patch to make the "canno= t insert" message be more precise about the fact that the reason is that non-default values can never be inse= rted.

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/.
 
--===============1404372334935203491==-- --===============7425140197419591123==--