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 1lJCNe-0003BP-Hu for pgsql-announce@arkaria.postgresql.org; Mon, 08 Mar 2021 09:40:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lJCN5-00086H-W1 for pgsql-announce@arkaria.postgresql.org; Mon, 08 Mar 2021 09:40:16 +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 1lJCN5-000869-7f for pgsql-announce@lists.postgresql.org; Mon, 08 Mar 2021 09:40:15 +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 1lJCMy-00060R-8L for pgsql-announce@lists.postgresql.org; Mon, 08 Mar 2021 09:40:14 +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=xyHgPQM1fta6bHg3IV73EVr/VUPtA/1EA0laUkGg7aI=; b=tx0uCA42euguWEBrkRL5pfwsOg PXmdVbIRRk0Iw/2yXgHeiLM3AmOhNx0FMDVbZxS7U/ER7swl9UrePLnA3Sa2jlgx2ukCdZ6FhaUIk 2UrqJlcSy0s2SFTAYICRm8kp3w/e+PyJdVBV5WxTn7r6/CS8KXV68ybVE4DHR4PtSDL05UKdjIbAf VsO2pbu+nAsdm2X3f2VVjVxoXELr5Opq85vpC53ZAUkuNcLhgmL7ryg6qoBudWkZQtHKgudqYRZ/q pxDOYChY8ev9N1GLAtPoorkmnrh3ObC5egzfk0g0bIMcnW/4ky1x4M9gOlDx5ugk0WFN3NVGUalkI yq5Fw6Jw==; 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 1lJCMv-00052x-IN for pgsql-announce@lists.postgresql.org; Mon, 08 Mar 2021 09:40:06 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lJCMs-0002EB-F6 for pgsql-announce@lists.postgresql.org; Mon, 08 Mar 2021 09:40:02 +0000 Content-Type: multipart/mixed; boundary="===============0656089356888391194==" MIME-Version: 1.0 Subject: PostgreSQL Weekly News - March 7, 2021 To: PostgreSQL Announce From: PWN via PostgreSQL Announce Reply-To: david@fetter.org Date: Mon, 08 Mar 2021 09:39:44 +0000 Message-ID: <161519638443.1044.4022373599851404076@wrigleys.postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-pglister-tags: pwn X-pglister-tagsig: 3c6e89a3ff9329c5aacadcd46d68e1203e832adc5e55ebdeb77ef80b185088eb List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --===============0656089356888391194== Content-Type: multipart/alternative; boundary="===============4996775892645763269==" MIME-Version: 1.0 --===============4996775892645763269== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable # PostgreSQL Weekly News - March 7, 2021 # PostgreSQL Product News parquet_s3_fdw 0.1, a foreign data wrapper for parquet files on S3, release= d. [https://github.com/pgspider/parquet_s3_fdw/releases/tag/v0.1](https://gith= ub.com/pgspider/parquet_s3_fdw/releases/tag/v0.1) # PostgreSQL Jobs for March [https://archives.postgresql.org/pgsql-jobs/2021-03/](https://archives.post= gresql.org/pgsql-jobs/2021-03/) # PostgreSQL in the News Planet PostgreSQL: [https://planet.postgresql.org/](https://planet.postgres= ql.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 Thomas Munro pushed: - Remove latch.c workaround for Linux < 2.6.27. Commit 82ebbeb0 added a workaround for systems with no epoll_create1() and EPOLL_CLOEXEC. Linux < 2.6.27 and glibc < 2.9 are long gone. Now seems like a good time to drop= the extra code, because otherwise we'd have to add similar already-dead worka= round code to new patches using XXX_CLOEXEC flags that arrived in the same kern= el release. Reviewed-by: Tom Lane Discussion: [https://postgr.es/m/CA%2BhUKGKL_%3DaO%3Dr30N%3Ds9VoDgTqHpRSzePRbA9dkYO7s= nc7HsxA%40mail.gmail.com](https://postgr.es/m/CA%2BhUKGKL_%3DaO%3Dr30N%3Ds9= VoDgTqHpRSzePRbA9dkYO7snc7HsxA%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/d1b90995e8d41df7e59efe48e98f26c= d66baba9b](https://git.postgresql.org/pg/commitdiff/d1b90995e8d41df7e59efe4= 8e98f26cd66baba9b) - Optimize latches to send fewer signals. Don't send signals to processes t= hat aren't sleeping. Author: Andres Freund Discussion: [https://postgr.es/m/CA+hUKGJjxPDpzBE0a3hyUywBvaZuC89yx3jK9RFZgfv_KHU7gg@= mail.gmail.com](https://postgr.es/m/CA+hUKGJjxPDpzBE0a3hyUywBvaZuC89yx3jK9R= FZgfv_KHU7gg@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/c8f3bc2401e7df7b79bae39dd3511c9= 1f825b6a4](https://git.postgresql.org/pg/commitdiff/c8f3bc2401e7df7b79bae39= dd3511c91f825b6a4) - Use SIGURG rather than SIGUSR1 for latches. Traditionally, SIGUSR1 has be= en overloaded for ad-hoc signals, procsignal.c signals and latch.c wakeups. = Move that last use over to a new dedicated signal. SIGURG is normally used to report out-of-band socket data, but PostgreSQL doesn't use that facility.= The signal handler is now installed in all postmaster children by InitializeLatchSupport(). Those wishing to disconnect from it should call ShutdownLatchSupport(). Future patches will use this separation of signa= ls to avoid the need for a signal handler on some operating systems. Discussio= n: [https://postgr.es/m/CA+hUKGJjxPDpzBE0a3hyUywBvaZuC89yx3jK9RFZgfv_KHU7gg@= mail.gmail.com](https://postgr.es/m/CA+hUKGJjxPDpzBE0a3hyUywBvaZuC89yx3jK9R= FZgfv_KHU7gg@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/83709a0d5a46559db016c50ded1a95f= d3b0d3be6](https://git.postgresql.org/pg/commitdiff/83709a0d5a46559db016c50= ded1a95fd3b0d3be6) - Use signalfd(2) for epoll latches. Cut down on system calls and other overheads by reading from a signalfd instead of using a signal handler and self-pipe. Affects Linux sytems, and possibly others including illumos t= hat implement the Linux epoll and signalfd interfaces. Reviewed-by: Andres F= reund Discussion: [https://postgr.es/m/CA+hUKGJjxPDpzBE0a3hyUywBvaZuC89yx3jK9RFZgfv_KHU7gg@= mail.gmail.com](https://postgr.es/m/CA+hUKGJjxPDpzBE0a3hyUywBvaZuC89yx3jK9R= FZgfv_KHU7gg@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/6a2a70a02018d6362f9841cc2f499cc= 45405e86b](https://git.postgresql.org/pg/commitdiff/6a2a70a02018d6362f9841c= c2f499cc45405e86b) - Use EVFILT_SIGNAL for kqueue latches. Cut down on system calls and other overheads by waiting for SIGURG explicitly with kqueue instead of using a signal handler and self-pipe. Affects `*BSD` and macOS systems. This lea= ves only the poll implementation with a signal handler and the traditional self-pipe trick. Discussion: [https://postgr.es/m/CA+hUKGJjxPDpzBE0a3hyUywBvaZuC89yx3jK9RFZgfv_KHU7gg@= mail.gmail.com](https://postgr.es/m/CA+hUKGJjxPDpzBE0a3hyUywBvaZuC89yx3jK9R= FZgfv_KHU7gg@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/6148656a0be1c6245fbcfcbbeb87541= f1b173162](https://git.postgresql.org/pg/commitdiff/6148656a0be1c6245fbcfcb= beb87541f1b173162) - Introduce symbolic names for FeBeWaitSet positions. Previously we used 0 = and 1 to refer to the socket and latch in far flung parts of the tree, without = any explanation. Also use PGINVALID_SOCKET rather than -1 in a couple of pla= ces that didn't already do that. Reviewed-by: Kyotaro Horiguchi Discussion: [https://postgr.es/m/CA%2BhUKGJAC4Oqao%3DqforhNey20J8CiG2R%3DoBPqvfR0vOJr= FysGw%40mail.gmail.com](https://postgr.es/m/CA%2BhUKGJAC4Oqao%3DqforhNey20J= 8CiG2R%3DoBPqvfR0vOJrFysGw%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/a042ba2ba7bb44f191f6f9398da27f0= 4a958a0db](https://git.postgresql.org/pg/commitdiff/a042ba2ba7bb44f191f6f93= 98da27f04a958a0db) - Use FeBeWaitSet for walsender.c. This avoids the need to set up and tear = down a fresh WaitEventSet every time we need need to wait. We have to add an explicit exit on postmaster exit (FeBeWaitSet isn't set up to do that automatically), so move the code to do that into a new function to avoid repetition. Reviewed-by: Kyotaro Horiguchi (ea= rlier version) Discussion: [https://postgr.es/m/CA%2BhUKGJAC4Oqao%3DqforhNey20J8CiG2R%3DoBPqvfR0vOJr= FysGw%40mail.gmail.com](https://postgr.es/m/CA%2BhUKGJAC4Oqao%3DqforhNey20J= 8CiG2R%3DoBPqvfR0vOJrFysGw%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/6230912f23904aa6cb2a1f948ca9b08= 235b4f54a](https://git.postgresql.org/pg/commitdiff/6230912f23904aa6cb2a1f9= 48ca9b08235b4f54a) - Use condition variables for ProcSignalBarriers. Instead of a poll/sleep l= oop, use a condition variable for precise wake-up whenever a backend's pss_barrierGeneration advances. Discussion: [https://postgr.es/m/CA+hUKGLdemy2gBm80kz20GTe6hNVwoErE8KwcJk6-U56oStjtg@= mail.gmail.com](https://postgr.es/m/CA+hUKGLdemy2gBm80kz20GTe6hNVwoErE8KwcJ= k6-U56oStjtg@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/814f1d8bc395bb9b4c0ae090ceea60a= dfbeb8e49](https://git.postgresql.org/pg/commitdiff/814f1d8bc395bb9b4c0ae09= 0ceea60adfbeb8e49) - Allow condition variables to be used in interrupt code. Adjust the condit= ion variable sleep loop to work correctly when code reached by its internal CHECK_FOR_INTERRUPTS() call interacts with another condition variable. T= here are no such cases currently, but a proposed patch would do this. Discuss= ion: [https://postgr.es/m/CA+hUKGLdemy2gBm80kz20GTe6hNVwoErE8KwcJk6-U56oStjtg@= mail.gmail.com](https://postgr.es/m/CA+hUKGLdemy2gBm80kz20GTe6hNVwoErE8KwcJ= k6-U56oStjtg@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/f5a5773a9dc4185414fe538525e20d8= 512c2ba35](https://git.postgresql.org/pg/commitdiff/f5a5773a9dc4185414fe538= 525e20d8512c2ba35) - Remove obsolete comment for WaitForProcSignalBarrier(). Commit 814f1d8b removed the behavior described. Reported-by: Amit Kapila [https://git.postgresql.org/pg/commitdiff/bd69ddfcdbf650f11af4317f3f6686c= 012cf66d0](https://git.postgresql.org/pg/commitdiff/bd69ddfcdbf650f11af4317= f3f6686c012cf66d0) - Add sort_template.h for making sort functions. Move our qsort implementat= ion into a header that can be used to define specialized functions for better performance and reduced duplication. Reviewed-by: Daniel Gustafsson Discussion: [https://postgr.es/m/CA%2BhUKGJ2-eaDqAum5bxhpMNhvuJmRDZxB_Tow0n-gse%2BHG0= Yig%40mail.gmail.com](https://postgr.es/m/CA%2BhUKGJ2-eaDqAum5bxhpMNhvuJmRD= ZxB_Tow0n-gse%2BHG0Yig%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/0a1f1d3cac6baaa3744b89336673cab= a702f7628](https://git.postgresql.org/pg/commitdiff/0a1f1d3cac6baaa3744b893= 36673caba702f7628) - Use sort_template.h for qsort() and qsort_arg(). Reduce duplication by us= ing the new template. Reviewed-by: Daniel Gustafsson Discussion: [https://postgr.es/m/CA%2BhUKGJ2-eaDqAum5bxhpMNhvuJmRDZxB_Tow0n-gse%2BHG0= Yig%40mail.gmail.com](https://postgr.es/m/CA%2BhUKGJ2-eaDqAum5bxhpMNhvuJmRD= ZxB_Tow0n-gse%2BHG0Yig%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/f374f4d66425060158d3c743dc6fb16= cc0a2756a](https://git.postgresql.org/pg/commitdiff/f374f4d66425060158d3c74= 3dc6fb16cc0a2756a) - Use sort_template.h for qsort_tuple() and qsort_ssup(). Replace the Perl = code previously used to generate specialized sort functions with sort_template= .h. Reviewed-by: Daniel Gustafsson Discussion: [https://postgr.es/m/CA%2BhUKGJ2-eaDqAum5bxhpMNhvuJmRDZxB_Tow0n-gse%2BHG0= Yig%40mail.gmail.com](https://postgr.es/m/CA%2BhUKGJ2-eaDqAum5bxhpMNhvuJmRD= ZxB_Tow0n-gse%2BHG0Yig%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/8eda3eba3063d619214b59f7bc7ecfc= 09c21b93a](https://git.postgresql.org/pg/commitdiff/8eda3eba3063d619214b59f= 7bc7ecfc09c21b93a) Amit Kapila pushed: - Update the docs and comments for decoding of prepared xacts. Commit a271a= 1b50e introduced decoding at prepare time in ReorderBuffer. This can lead to deadlock for out-of-core logical replication solutions that uses this fea= ture to build distributed 2PC in case such transactions lock [user] catalog ta= bles exclusively. They need to inform users to not have locks on catalog tables (via explicit LOCK command) in such transactions. Reported-by: Andres Fr= eund Discussion: [https://postgr.es/m/20210222222847.tpnb6eg3yiykzpky@alap3.anarazel.de](h= ttps://postgr.es/m/20210222222847.tpnb6eg3yiykzpky@alap3.anarazel.de) [https://git.postgresql.org/pg/commitdiff/b4e3dc7fd420cdc2287f30a638c4aff= d071f01b2](https://git.postgresql.org/pg/commitdiff/b4e3dc7fd420cdc2287f30a= 638c4affd071f01b2) - Update docs of logical replication for commit ce0fdbfe97. Forgot to updat= e the logical replication configuration settings page. After commit ce0fdbfe97, table synchronization workers also started using replication origins to t= rack the progress and the same should be reflected in docs. Author: Amit Kapi= la Discussion: [https://postgr.es/m/CAA4eK1KkbppndxxRKbaT2sXrLkdPwy44F4pjEZ0EDrVjD9MPjQ@= mail.gmail.com](https://postgr.es/m/CAA4eK1KkbppndxxRKbaT2sXrLkdPwy44F4pjEZ= 0EDrVjD9MPjQ@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/cf54e04b9e29a13c5e7c2386c5e2ff7= 85e830414](https://git.postgresql.org/pg/commitdiff/cf54e04b9e29a13c5e7c238= 6c5e2ff785e830414) - Avoid repeated decoding of prepared transactions after a restart. In comm= it a271a1b50e, we allowed decoding at prepare time and the prepare was decod= ed again if there is a restart after decoding it. It was done that way becau= se we can't distinguish between the cases where we have not decoded the prepare because it was prior to consistent snapshot or we have decoded it earlier= but restarted. To distinguish between these two cases, we have introduced an initial_consistent_point at the slot level which is an LSN at which we fo= und a consistent point at the time of slot creation. This is also the point whe= re we have exported a snapshot for the initial copy. So, prepare transaction pr= ior to this point are sent along with commit prepared. This commit bumps SNAPBUILD_VERSION because of change in SnapBuild. It will break existing = slots which is fine in a major release. Author: Ajin Cherian, based on idea by Andres Freund Reviewed-by: Amit Kapila and Vignesh C Discussion: [https://postgr.es/m/d0f60d60-133d-bf8d-bd70-47784d8fabf3@enterprisedb.co= m](https://postgr.es/m/d0f60d60-133d-bf8d-bd70-47784d8fabf3@enterprisedb.co= m) [https://git.postgresql.org/pg/commitdiff/8bdb1332eb51837c15a10a972c179b8= 4f654279e](https://git.postgresql.org/pg/commitdiff/8bdb1332eb51837c15a10a9= 72c179b84f654279e) - Add option to enable two_phase commits via pg_create_logical_replication_= slot. Commit 0aa8a01d04 extends the output plugin API to allow decoding of prep= ared xacts and allowed the user to enable/disable the two-phase option via pg_logical_slot_get_changes(). This can lead to a problem such that the f= irst time when it gets changes via pg_logical_slot_get_changes() without two_p= hase option enabled it will not get the prepared even though prepare is after consistent snapshot. Now next time during getting changes, if the two_pha= se option is enabled it can skip prepare because by that time start decoding point has been moved. So the user will only get commit prepared. Allow to enable/disable this option at the create slot time and default will be fa= lse. It will break the existing slots which is fine in a major release. Autho= r: Ajin Cherian Reviewed-by: Amit Kapila and Vignesh C Discussion: [https://postgr.es/m/d0f60d60-133d-bf8d-bd70-47784d8fabf3@enterprisedb.co= m](https://postgr.es/m/d0f60d60-133d-bf8d-bd70-47784d8fabf3@enterprisedb.co= m) [https://git.postgresql.org/pg/commitdiff/19890a064ebf53dedcefed0d8339ed3= d449b06e6](https://git.postgresql.org/pg/commitdiff/19890a064ebf53dedcefed0= d8339ed3d449b06e6) - Clarify the usage of max_replication_slots on the subscriber side. It was= not clear in the docs that the max_replication_slots is also used to track replication origins on the subscriber side. Author: Paul Martinez Reviewed-by: Amit Kapila Backpatch-through: 10 where logical replication = was introduced Discussion: [https://postgr.es/m/CACqFVBZgwCN_pHnW6dMNCrOS7tiHCw6Retf_=3DU2Vvj3aUSeAT= w@mail.gmail.com](https://postgr.es/m/CACqFVBZgwCN_pHnW6dMNCrOS7tiHCw6Retf_= =3DU2Vvj3aUSeATw@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/8af3c233e423e106a5121000ecd92ab= f57c11704](https://git.postgresql.org/pg/commitdiff/8af3c233e423e106a512100= 0ecd92abf57c11704) Andres Freund pushed: - Fix recovery test hang in 021_row_visibility.pl on windows. The psql proc= esses were not explicitly killed (but would eventually exit due postgres shutti= ng down). For some reason windows perl doesn't like that, resulting in errors like Warning: unable to close filehandle GEN20 properly: Bad file descrip= tor during global destruction. The test was introduced in d6734a897e3, so no backpatching necessary. [https://git.postgresql.org/pg/commitdiff/1e6e40447115ca7b4749d7d117b81b0= 16ee5e2c2](https://git.postgresql.org/pg/commitdiff/1e6e40447115ca7b4749d7d= 117b81b016ee5e2c2) Tom Lane pushed: - Improve reporting for syntax errors in multi-line JSON data. Point to the specific line where the error was detected; the previous code tended to include several preceding lines as well. Avoid re-scanning the entire inp= ut to recompute which line that was. Simplify the logic a bit. Add test cases. Simon Riggs and Hamid Akhtar, reviewed by Daniel Gustafsson and myself Discussion: [`https://postgr.es/m/CANbhV-EPBnXm3MF_TTWBwwqgn1a1Ghmep9VHfqmNBQ8BT0f+_g= @mail.gmail.com`](https://postgr.es/m/CANbhV-EPBnXm3MF_TTWBwwqgn1a1Ghmep9VH= fqmNBQ8BT0f+_g@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/ffd3944ab9d481906137bc7d20f5325= a2bd68acc](https://git.postgresql.org/pg/commitdiff/ffd3944ab9d481906137bc7= d20f5325a2bd68acc) - Fix semantics of regular expression back-references. POSIX defines the behavior of back-references thus: The back-reference expression '\n' shall match the same (possibly empty) string of characters as was mat= ched by a subexpression enclosed between "\(" and "\)" preceding the '\n'.= As far as I can see, the back-reference is supposed to consider only the data characters matched by the referenced subexpression. However, because our engine copies the NFA constructed from the referenced subexpression, it effectively enforces any constraints therein, too. As an example, '(^.)\1' ought to match 'xx', or any other string starting with two occurrences of= the same character; but in our code it does not, and indeed can't match anyth= ing, because the '^' anchor constraint is included in the backref's copied NFA= . If POSIX intended that, you'd think they'd mention it. Perl for one doesn't= act that way, so it's hard to conclude that this isn't a bug. Fix by modifyi= ng the backref's NFA immediately after it's copied from the reference, repla= cing all constraint arcs by EMPTY arcs so that the constraints are treated as automatically satisfied. This still allows us to enforce matching rules = that depend only on the data characters; for example, in `'(^\d+).*\1'` the NFA matching step will still know that the backref can only match strings of digits. Perhaps surprisingly, this change does not affect the results of= any of a rather large corpus of real-world regexes. Nonetheless, I would not consider back-patching it, since it's a clear compatibility break. Patch= by me, reviewed by Joel Jacobson Discussion: [https://postgr.es/m/661609.1614560029@sss.pgh.pa.us](https://postgr.es/m= /661609.1614560029@sss.pgh.pa.us) [https://git.postgresql.org/pg/commitdiff/4aea704a5bfd4b5894a268499369cca= b89940c9c](https://git.postgresql.org/pg/commitdiff/4aea704a5bfd4b5894a2684= 99369ccab89940c9c) - Improve performance of regular expression back-references. In some cases,= at the time that we're doing an NFA-based precheck of whether a backref subexpression can match at a particular place in the string, we already k= now which substring the referenced subexpression matched. If so, we might as= well forget about the NFA and just compare the substring; this is faster and it gives an exact rather than approximate answer. In general, this optimiza= tion can help while we are prechecking within the second child expression of a concat node, while the capture was within the first child expression; the= n the substring was saved during cdissect() of the first child and will be avai= lable to NFA checks done while cdissect() recurses into the second child. It c= an help quite a lot if the tree looks like concat = / \ capture concat / \ expensive stuff backref as we will be able to avoid recursively dissecting = the "expensive stuff" before discovering that the backref isn't satisfied wit= h a particular midpoint that the lower concat node is testing. This doesn't = help if the concat tree is left-deep, as the capture node won't get set soon e= nough (and it's hard to fix that without changing the engine's match behavior). Fortunately, right-deep concat trees are the common case. Patch by me, reviewed by Joel Jacobson Discussion: [https://postgr.es/m/661609.1614560029@sss.pgh.pa.us](https://postgr.es/m= /661609.1614560029@sss.pgh.pa.us) [https://git.postgresql.org/pg/commitdiff/0c3405cf11a12da1a4278c6833f4d97= 9fe06c866](https://git.postgresql.org/pg/commitdiff/0c3405cf11a12da1a4278c6= 833f4d979fe06c866) - Suppress unnecessary regex subre nodes in a couple more cases. This exten= ds the changes made in commit cebc1d34e, teaching parseqatom() to generate f= ewer or cheaper subre nodes in some edge cases. The case of interest here is a quantified atom that is "messy" only because it has greediness opposite to what preceded it (whereas captures and backrefs are intrinsically messy).= In this case we don't need an iteration node, since we don't care where the sub-matches of the quantifier are; and we might also not need a second concatenation node. This seems of only marginal real-world use according= to my testing, but I wanted to get it in before wrapping up this series of r= egex performance fixes. Discussion: [https://postgr.es/m/1340281.1613018383@sss.pgh.pa.us](https://postgr.es/= m/1340281.1613018383@sss.pgh.pa.us) [https://git.postgresql.org/pg/commitdiff/4604f83fdfe030a2f1984159ede5270= c1d825310](https://git.postgresql.org/pg/commitdiff/4604f83fdfe030a2f198415= 9ede5270c1d825310) - Mark default_transaction_read_only as GUC_REPORT. This allows clients to = find out the setting at connection time without having to expend a query round= trip to do so; which is helpful when trying to identify read/write servers. (= One must also look at in_hot_standby, but that's already GUC_REPORT, cf bf8a662c9.) Modifying libpq to make use of this will come soon, but I fel= t it cleaner to push the server change separately. Haribabu Kommi, Greg Nanca= rrow, Vignesh C; reviewed at various times by Laurenz Albe, Takayuki Tsunakawa, Peter Smith. Discussion: [https://postgr.es/m/CAF3+xM+8-ztOkaV9gHiJ3wfgENTq97QcjXQt+rbFQ6F7oNzt9A@= mail.gmail.com](https://postgr.es/m/CAF3+xM+8-ztOkaV9gHiJ3wfgENTq97QcjXQt+r= bFQ6F7oNzt9A@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/d16f8c8e416d288bd4734ed5f14076b= 62ec8d153](https://git.postgresql.org/pg/commitdiff/d16f8c8e416d288bd4734ed= 5f14076b62ec8d153) - Extend the abilities of libpq's target_session_attrs parameter. In additi= on to the existing options of "any" and "read-write", we now support "read-only= ", "primary", "standby", and "prefer-standby". "read-write" retains its prev= ious meaning of "transactions are read-write by default", and "read-only" inve= rts that. The other three modes test specifically for hot-standby status, wh= ich is not quite the same thing. (Setting default_transaction_read_only on a primary server renders it read-only to this logic, but not a standby.) Furthermore, if talking to a v14 or later server, no extra network round = trip is needed to detect the session's status; the GUC_REPORT variables delive= red by the server are enough. When talking to an older server, a SHOW or SEL= ECT query is issued to detect session read-only-ness or server hot-standby st= ate, as needed. Haribabu Kommi, Greg Nancarrow, Vignesh C, Tom Lane; reviewed= at various times by Laurenz Albe, Takayuki Tsunakawa, Peter Smith. Discussi= on: [https://postgr.es/m/CAF3+xM+8-ztOkaV9gHiJ3wfgENTq97QcjXQt+rbFQ6F7oNzt9A@= mail.gmail.com](https://postgr.es/m/CAF3+xM+8-ztOkaV9gHiJ3wfgENTq97QcjXQt+r= bFQ6F7oNzt9A@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/ee28cacf619f4d9c23af5a80e1171a5= adae97381](https://git.postgresql.org/pg/commitdiff/ee28cacf619f4d9c23af5a8= 0e1171a5adae97381) - Silence perlcritic warning in commit ee28cacf6. Per buildfarm; this fix is from Michael Paquier (vignesh C proposed nearly the same). Discussion: [https://postgr.es/m/YD8IZ9OKfUf9X1eF@paquier.xyz](https://postgr.es/m/YD= 8IZ9OKfUf9X1eF@paquier.xyz) [https://git.postgresql.org/pg/commitdiff/d422a2a94b1e7a7bb25da9d5511ffff= f750c3f21](https://git.postgresql.org/pg/commitdiff/d422a2a94b1e7a7bb25da9d= 5511fffff750c3f21) - Make test_target_session_attrs more robust against connection failure. Fe= ed the desired command to psql via "-c" not stdin, else Perl may complain th= at it can't push stdin to an already-failed psql process, as seen in intermitte= nt buildfarm failures. Make some minor cosmetic improvements while at it. Before commit ee28cacf6 we had no tests here that expected failure to con= nect, so there seems no need for a back-patch. Discussion: [https://postgr.es/m/CALDaNm2mo8YED=3DM2ZJKGf1U3F3mw6SaQuLXWCK8rZP6sECYcr= A@mail.gmail.com](https://postgr.es/m/CALDaNm2mo8YED=3DM2ZJKGf1U3F3mw6SaQuL= XWCK8rZP6sECYcrA@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/3769e11a31831fc2f3bd4c4a24b4f45= c352fb8fb](https://git.postgresql.org/pg/commitdiff/3769e11a31831fc2f3bd4c4= a24b4f45c352fb8fb) - Add trim_array() function. This has been in the SQL spec since 2008. It'= s a pretty thin wrapper around the array slice functionality, but the spec sa= ys we should have it, so here it is. Vik Fearing, reviewed by Dian Fay Discus= sion: [https://postgr.es/m/fc92ce17-9655-8ff1-c62a-4dc4c8ccd815@postgresfriends= .org](https://postgr.es/m/fc92ce17-9655-8ff1-c62a-4dc4c8ccd815@postgresfrie= nds.org) [https://git.postgresql.org/pg/commitdiff/0a687c8f103d217ff1ca8c34a644b38= 0d89bb0ad](https://git.postgresql.org/pg/commitdiff/0a687c8f103d217ff1ca8c3= 4a644b380d89bb0ad) - Remove deprecated containment operators for contrib types. Since PG 8.2, = @ and ~ have been deprecated aliases for the containment operators @> and <@. = It seems like enough time has passed to actually remove them, so do so. This completes the project begun in commit 2f70fdb06. Note that in the core t= ypes, the relation to the preferred operator names was reversed from what it is= in these contrib modules. The confusion that induced was a large part of the reason for deprecation. Justin Pryzby Discussion: [https://postgr.es/m/20201027032511.GF9241@telsasoft.com](https://postgr.= es/m/20201027032511.GF9241@telsasoft.com) [https://git.postgresql.org/pg/commitdiff/112d411fbeb56afd18c117e20b524a8= 6afc9aba5](https://git.postgresql.org/pg/commitdiff/112d411fbeb56afd18c117e= 20b524a86afc9aba5) - Doc: remove obsolete entries in table of BRIN strategy numbers. See commit 591d282e8. Noted by Justin Pryzby Discussion: [https://postgr.es/m/20201027032511.GF9241@telsasoft.com](https://postgr.= es/m/20201027032511.GF9241@telsasoft.com) [https://git.postgresql.org/pg/commitdiff/0ce4cd04da558178b0186057b721c50= a00b7a945](https://git.postgresql.org/pg/commitdiff/0ce4cd04da558178b018605= 7b721c50a00b7a945) - Add binary I/O capability for cube datatype. We can adjust the not-yet-released cube--1.4--1.5.sql upgrade rather than making a whole new version. KaiGai Kohei Discussion: [https://postgr.es/m/CAOP8fzZO4y60QPTK=3DRGDXeVeVHV9tLHKOsh7voUOoUouVCPV8= A@mail.gmail.com](https://postgr.es/m/CAOP8fzZO4y60QPTK=3DRGDXeVeVHV9tLHKOs= h7voUOoUouVCPV8A@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/1265a9c8f871cfa5aea4d607b1ab72b= 45b96dbb7](https://git.postgresql.org/pg/commitdiff/1265a9c8f871cfa5aea4d60= 7b1ab72b45b96dbb7) Micha=C3=ABl Paquier pushed: - doc: Mention archive_command failure handling on signals. The behavior is similar to restore_command, which was already documented for the restore = part, but not the archive part. Author: Benoit Lobr=C3=A9au Reviewed-by: Julie= n Rouhaud Discussion: [https://postgr.es/m/CAPE8EZ7akCzc1hWohA4AcbmKtHh9rcWAB5MStOeZD2+9jC+hLQ@= mail.gmail.com](https://postgr.es/m/CAPE8EZ7akCzc1hWohA4AcbmKtHh9rcWAB5MStO= eZD2+9jC+hLQ@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/8c1b6a186d420de863d1334c8917dcd= 047a7845a](https://git.postgresql.org/pg/commitdiff/8c1b6a186d420de863d1334= c8917dcd047a7845a) - doc: Improve description of data checksums. This partially reverts bcf2667 that got incorrectly merged, and this improves the wording of the documentation that existed before that. Per discussion with Justin Pryzb= y. Discussion: [https://postgr.es/m/20210301004647.GF20769@telsasoft.com](https://postgr= .es/m/20210301004647.GF20769@telsasoft.com) [https://git.postgresql.org/pg/commitdiff/bd1b8d0ef2eb5f2a8765fbb3b74e026= 2c9983942](https://git.postgresql.org/pg/commitdiff/bd1b8d0ef2eb5f2a8765fbb= 3b74e0262c9983942) - Simplify code to switch pg_class.relrowsecurity in tablecmds.c. The same = code pattern was repeated twice to enable or disable ROW LEVEL SECURITY with an ALTER TABLE command. This makes the code slightly cleaner. Author: Just= in Pryzby Reviewed-by: Zhihong Yu Discussion: [https://postgr.es/m/20210228211854.GC20769@telsasoft.com](https://postgr= .es/m/20210228211854.GC20769@telsasoft.com) [https://git.postgresql.org/pg/commitdiff/fabde52fab976ff782d77c80b8e2614= f94f9dce1](https://git.postgresql.org/pg/commitdiff/fabde52fab976ff782d77c8= 0b8e2614f94f9dce1) - Fix duplicated test case in TAP tests of reindexdb. The same test for REI= NDEX (VERBOSE) was done twice, while it is clear that the second test should u= se --concurrently. Issue introduced in 5dc92b8, for what looks like a copy-= paste mistake. Reviewed-by: Mark Dilger Discussion: [https://postgr.es/m/A7AE97EA-F4B0-4CAB-8FFF-3FECD31F9D63@enterprisedb.co= m](https://postgr.es/m/A7AE97EA-F4B0-4CAB-8FFF-3FECD31F9D63@enterprisedb.co= m) Backpatch-through: 12 [https://git.postgresql.org/pg/commitdiff/c5530d8474a482d32c0d9bb099707d9= a8e117f96](https://git.postgresql.org/pg/commitdiff/c5530d8474a482d32c0d9bb= 099707d9a8e117f96) - Add --tablespace option to reindexdb. This option provides REINDEX (TABLESPACE) for reindexdb, applying the tablespace value given by the ca= ller to all the REINDEX queries generated. While on it, this commit adds some tests for REINDEX TABLESPACE, with and without CONCURRENTLY, when run on = toast indexes and tables. Such operations are not allowed, and toast relation = names are not stable enough to be part of the main regression test suite (even = if using a PL function with a TRY/CATCH logic, as CONCURRENTLY could not be tested). Author: Michael Paquier Reviewed-by: Mark Dilger, Daniel Gustaf= sson Discussion: [https://postgr.es/m/YDiaDMnzLICqeukl@paquier.xyz](https://postgr.es/m/YD= iaDMnzLICqeukl@paquier.xyz) [https://git.postgresql.org/pg/commitdiff/57e6db706e81fd2609fa385677e6ae7= 2471822fe](https://git.postgresql.org/pg/commitdiff/57e6db706e81fd2609fa385= 677e6ae72471822fe) - Add support for PROVE_TESTS and PROVE_FLAGS in MSVC scripts. These can be= set in buildenv.pl or a "set" command within a Windows terminal. The MSVC sc= ript vcregress.pl parses the values available in the environment to build the resulting prove commands, and the parsing of PROVE_TESTS is able to handle name patterns in the same way as other platforms. Not specifying those environment values makes vcregress.pl fall back to the previous default, = with no extra flags for the prove command, and all the tests run within t/. Author: Michael Paquier Reviewed-by: Juan Jos=C3=A9 Santamar=C3=ADa Flech= a, Julien Rouhaud Discussion: [https://postgr.es/m/YD9GigwHoL6lFY2y@paquier.xyz](https://postgr.es/m/YD= 9GigwHoL6lFY2y@paquier.xyz) [https://git.postgresql.org/pg/commitdiff/5bca69a76b3046a85c60c48271c1831= fd5affa51](https://git.postgresql.org/pg/commitdiff/5bca69a76b3046a85c60c48= 271c1831fd5affa51) - doc: Add backlinks to progress reporting documentation. Previously, the o= nly place where progress reports were mentioned is in the section for monitor= ing dedicated to its catalogs. This makes the progress reporting more discoverable, by adding links from the pages of the commands supporting progress reports to their related catalog views. Author: Matthias van de Meent Reviewed-by: Justin Pryzby, Bharath Rupireddy, Josef =C5=A0im=C3=A1= nek, Tomas Vondra Discussion: [https://postgr.es/m/CAEze2WiOcgdH4aQA8NtZq-4dgvnJzp8PohdeKchPkhMY-jWZXA@= mail.gmail.com](https://postgr.es/m/CAEze2WiOcgdH4aQA8NtZq-4dgvnJzp8PohdeKc= hPkhMY-jWZXA@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/8a8f4d8ede288c2a29105f4708e22ce= 7f3526149](https://git.postgresql.org/pg/commitdiff/8a8f4d8ede288c2a29105f4= 708e22ce7f3526149) - pgbench: Simplify some port, host, user and dbname assignments. Using pgb= ench in an environment with both PGPORT and PGUSER set would have caused the generation of a debug log with an incorrect database name due to an overs= ight in 412893b. Not specifying user, port and/or database using the option switches, without their respective environment variables, generated a log entry with empty strings, which was rather useless. This commit fixes th= is set of issues by simplifying the logic grabbing the connection informatio= n, removing a set of getenv() calls that emulated what libpq already does. = The faulty debug log now directly uses the information from the libpq connect= ion, and it gets generated after the connection to the backend is completed, n= ot before it (in the event of a failure libpq would complain with more information about the connection attempt so the log is not really useful before anyway). Author: Kota Miyake Reviewed-by: Fujii Masao, Michael Pa= quier Discussion: [https://postgr.es/m/026b3ae6fc339a18394d053c32a4463d@oss.nttdata.com](ht= tps://postgr.es/m/026b3ae6fc339a18394d053c32a4463d@oss.nttdata.com) [https://git.postgresql.org/pg/commitdiff/f1516ad7b3a9645a316846fa7b22291= 63bc55907](https://git.postgresql.org/pg/commitdiff/f1516ad7b3a9645a316846f= a7b2229163bc55907) =C3=81lvaro Herrera pushed: - Use native path separators to pg_ctl in initdb. On Windows, CMD.EXE alleg= edly does not run a command that uses forward slashes, so let's convert the pa= th to use backslashes instead. Backpatch to 10. Author: Nitin Jadhav Reviewed-by: Juan Jos=C3=A9 Santamar=C3= =ADa Flecha Discussion: [https://postgr.es/m/CAMm1aWaNDuaPYFYMAqDeJrZmPtNvLcJRS++CcZWY8LT6KcoBZw@= mail.gmail.com](https://postgr.es/m/CAMm1aWaNDuaPYFYMAqDeJrZmPtNvLcJRS++CcZ= WY8LT6KcoBZw@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/75dbfe4ca70d5b7a83f61b0a66a0a14= ad0b739ed](https://git.postgresql.org/pg/commitdiff/75dbfe4ca70d5b7a83f61b0= a66a0a14ad0b739ed) Peter Geoghegan pushed: - Fix nbtree page deletion error messages. Adjust some "can't happen" error messages that assumed that the page deletion target page must be a half-d= ead page. This assumption was wrong in the case of an internal target page. Simply refer to these pages as the target page instead. Internal pages a= re never marked half-dead. There is exactly one half-dead page for each sub= tree undergoing deletion. The half-dead page is also the target subtree's leaf-level page. This has been the case since commit efada2b8, which tot= ally overhauled nbtree page deletion. [https://git.postgresql.org/pg/commitdiff/3d8d5787a358156edaa7782f0c88e23= 1af974a01](https://git.postgresql.org/pg/commitdiff/3d8d5787a358156edaa7782= f0c88e231af974a01) - nbtree page deletion: Add leaftopparent assertion. Add documenting assert= ion. This makes it easier to follow how we maintain the top parent link in tar= get subtree's half-dead/leaf level page. [https://git.postgresql.org/pg/commitdiff/5b2f2af3d9d57626b9052a05337e32a= d1399093d](https://git.postgresql.org/pg/commitdiff/5b2f2af3d9d57626b9052a0= 5337e32ad1399093d) Peter Eisentraut pushed: - Some copy-editing of GUC descriptions. [https://git.postgresql.org/pg/commitdiff/e527a99055154bb7fe6ed67f0417a67= cf11fa056](https://git.postgresql.org/pg/commitdiff/e527a99055154bb7fe6ed67= f0417a67cf11fa056) - pg_upgrade: Check version of target cluster binaries. This expands the bi= nary validation in pg_upgrade with a version check per binary to ensure that t= he target cluster installation only contains binaries from the target versio= n. In order to reduce duplication, validate_exec is exported from port.h and= the local copy in pg_upgrade is removed. Author: Daniel Gustafsson Discussion: [https://www.postgresql.org/message-id/flat/9328.1552952117@sss.pgh.pa.us= ](https://www.postgresql.org/message-id/flat/9328.1552952117@sss.pgh.pa.us) [https://git.postgresql.org/pg/commitdiff/f06b1c598254f8adb2b7f51d6a76856= 18a7fb121](https://git.postgresql.org/pg/commitdiff/f06b1c598254f8adb2b7f51= d6a7685618a7fb121) - pg_upgrade: Fix oversight in version checking. Mistake in f06b1c598254f8adb2b7f51d6a7685618a7fb121: We should only check the versio= n of the binaries in the target installation. The source installation can of course be of a different version. Reviewed-by: Daniel Gustafsson Discussion: [https://www.postgresql.org/message-id/flat/E1lHNKN-0005IC-V6%40gemulon.p= ostgresql.org](https://www.postgresql.org/message-id/flat/E1lHNKN-0005IC-V6= %40gemulon.postgresql.org) [https://git.postgresql.org/pg/commitdiff/040af779382e8e4797242c49b93a5a8= f9b79c370](https://git.postgresql.org/pg/commitdiff/040af779382e8e4797242c4= 9b93a5a8f9b79c370) - Add bit_xor aggregate function. This can be used as a checksum for unorde= red sets. bit_and and bit_or already exist. Author: Alexey Bashtanov Reviewed-by: Ibrar Ahmed Discussion: [https://www.postgresql.org/message-id/flat/9d4582ae-ecfc-3a13-2238-6ab5a= 37c1f41@imap.cc](https://www.postgresql.org/message-id/flat/9d4582ae-ecfc-3= a13-2238-6ab5a37c1f41@imap.cc) [https://git.postgresql.org/pg/commitdiff/f9a0392e1cf36179c984f655a658973= 4b8dd7468](https://git.postgresql.org/pg/commitdiff/f9a0392e1cf36179c984f65= 5a6589734b8dd7468) Heikki Linnakangas pushed: - Remove server and libpq support for old FE/BE protocol version 2. Protocol version 3 was introduced in PostgreSQL 7.4. There shouldn't be many clien= ts or servers left out there without version 3 support. But as a courtesy, I ke= pt just enough of the old protocol support that we can still send the "unsupported protocol version" error in v2 format, so that old clients can display the message properly. Likewise, libpq still understands v2 ErrorResponse messages when establishing a connection. The impetus to do= this now is that I'm working on a patch to COPY FROM, to always prefetch some = data. We cannot do that safely with the old protocol, because it requires parsi= ng the input one byte at a time to detect the end-of-copy marker. Reviewed-= by: Tom Lane, Alvaro Herrera, John Naylor Discussion: [https://www.postgresql.org/message-id/9ec25819-0a8a-d51a-17dc-4150bb3cca= 3b%40iki.fi](https://www.postgresql.org/message-id/9ec25819-0a8a-d51a-17dc-= 4150bb3cca3b%40iki.fi) [https://git.postgresql.org/pg/commitdiff/3174d69fb96a66173224e60ec7053b9= 88d5ed4d9](https://git.postgresql.org/pg/commitdiff/3174d69fb96a66173224e60= ec7053b988d5ed4d9) - Avoid extra newline in errors received in FE protocol version 2. Contrary= to what the comment said, the postmaster does in fact end all its messages i= n a newline, since server version 7.2. Be tidy and don't add an extra newline= if the error message already has one. Discussion: [https://www.postgresql.org/message-id/CAFBsxsEdgMXc%2BtGfEy9Y41i%3D5pMMj= KeH8t8vSAypR3ZnAoQnHg%40mail.gmail.com](https://www.postgresql.org/message-= id/CAFBsxsEdgMXc%2BtGfEy9Y41i%3D5pMMjKeH8t8vSAypR3ZnAoQnHg%40mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/85d94c575302644e7ddb4392c3bda57= 2f981ec34](https://git.postgresql.org/pg/commitdiff/85d94c575302644e7ddb439= 2c3bda572f981ec34) Fujii Masao pushed: - Remove redundant getenv() for PGUSER, in psql help. Previously psql obtai= ned the value of PGUSER twice to display a default user in its help message. Author: Kota Miyake Reviewed-by: Nitin Jadhav, Fujii Masao Discussion: [https://postgr.es/m/2a3c612babdd6ed63a9d877bb575d793@oss.nttdata.com](ht= tps://postgr.es/m/2a3c612babdd6ed63a9d877bb575d793@oss.nttdata.com) [https://git.postgresql.org/pg/commitdiff/4a4241e15b246663fc44b5e5355bc6d= 19c6d2aa6](https://git.postgresql.org/pg/commitdiff/4a4241e15b246663fc44b5e= 5355bc6d19c6d2aa6) Andrew Dunstan pushed: - Close psql processes gracefully in recovery tests. Under windows, psql processes need to be ended explicitly, or the TAP tests hang. However, the recovery tests were doing this via IPC::Run::kill_kill(), which causes ot= her major problems on Windows. We solve this by instead sending '\q' to psql= so it quits of its own accord, and then simply waiting for it. This means we= can now run almost all the recovery tests on all Windows platforms. Discussi= on: [https://postgr.es/m/20210301200715.tdjpuesfzebpffgn@alap3.anarazel.de](h= ttps://postgr.es/m/20210301200715.tdjpuesfzebpffgn@alap3.anarazel.de) [https://git.postgresql.org/pg/commitdiff/d3676a2e9f10a0972c6d6649235c1c7= 492cd6dea](https://git.postgresql.org/pg/commitdiff/d3676a2e9f10a0972c6d664= 9235c1c7492cd6dea) Magnus Hagander pushed: - Improve docs on updatable views. Introduce the options before going into details, and add a link to the CREATE TRIGGER documentation. Author: Dav= id Johnston Reviewed-By: Anastasia Lubennikova Discussion: [https://postgr.es/m/CAKFQuwYLLRhheo0_Y4Jp=3DvJ_YDsz1KoRuTpX1A_bUxmHTmLe-= A@mail.gmail.com](https://postgr.es/m/CAKFQuwYLLRhheo0_Y4Jp=3DvJ_YDsz1KoRuT= pX1A_bUxmHTmLe-A@mail.gmail.com) [https://git.postgresql.org/pg/commitdiff/e045565dae4b2368ba812d60ef0fb7f= 927fe2646](https://git.postgresql.org/pg/commitdiff/e045565dae4b2368ba812d6= 0ef0fb7f927fe2646) - Clarify that CREATEROLE roles are considered Administrators. Author: Mich= ael Banck Reviewed-By: Robert Treat Discussion: [https://postgr.es/m/2160a5071a7bb5339055b04a8cad81a822be9d8d.camel@creda= tiv.de](https://postgr.es/m/2160a5071a7bb5339055b04a8cad81a822be9d8d.camel@= credativ.de) [https://git.postgresql.org/pg/commitdiff/30b26dfac7db2fc76dafaa8a6c45987= 1bfcd100e](https://git.postgresql.org/pg/commitdiff/30b26dfac7db2fc76dafaa8= a6c459871bfcd100e) # Pending Patches Pavel St=C4=9Bhule sent in another revision of a patch to implement schema = variables. Maxim Orlov sent in a patch to fix an infelicity between TLS and multiple h= osts in libpq connect strings. Thomas Munro sent in two more revisions of a patch to add a condition varia= ble for walreceiver state, another for for recovery pause/resume, and poll the postmaster less frequently in recovery. Ajin Cherian and Amit Kapila traded patches to add an option to enable two_= phase commits via pg_create_logical_replication_slot. Michael Banck sent in a patch to add a --create-only option to pg_dump/pg_dumpall. Micha=C3=ABl Paquier sent in another revision of a patch to clarify the doc= umentation of signal handling in the archiver. Etsuro Fujita sent in another revision of a patch to implement asynchronous append on postgres_fdw nodes. Peter Eisentraut sent in another revision of a patch to deal with macOS SIP= in builds. Laurenz Albe and Amit Langote traded patches to allow setting parallel_work= ers on partitioned tables. Joel Jacobson sent in three revisions of a patch to implement regexp_positions(), which returns the starting and ending positions of each match. Thomas Munro sent in two more revisions of a patch to provide a new optiona= l GUC that can be used to check whether the client connection has gone away periodically while running very long queries. Paul F=C3=B6rster sent in another revision of a patch to mention URIs and s= ervices in psql --help's output. Peter Smith and Ajin Cherian traded patches to implement logical decoding of two-phase transactions. Greg Nancarrow and Amit Kapila traded patches to enable parallel SELECT for "INSERT INTO ... SELECT ...", add a new boolean GUC, enable_parallel_dml, a= nd a similar table option, parallel_dml_enabled. Dian M Fay sent in two revisions of a patch to suppress explicit casts of t= ext constants in postgres_fdw when the other side of a binary OpExpr is also te= xt. Dilip Kumar sent in three more revisions of a patch to add a compression me= thod option for tables. Julien Rouhaud sent in another revision of a patch to move query jumbling f= rom pg_stat_statements into core, expose queryid in pg_stat_activity and log_line_prefix, and expose query identifier in EXPLAIN ... VERBOSE. Bruce Momjian sent in a patch to fix up some GiST code comments. Vik Fearing sent in another revision of a patch to implement GROUP BY DISTI= NCT, which elides duplicated GROUPING SETs. Mark Dilger sent in another revision of a patch to add a contrib extension, pg_amcheck. Pavel Borisov sent in another revision of a patch to make amcheck checking a UNIQUE constraint for btree indexes. Jacob Champion sent in another revision of a patch to add an API to the tab= le AM to accept a column projection list. Joel Jacobson sent in two revisions of a patch to support empty ranges with bounds information. Tom=C3=A1=C5=A1 Vondra sent in three more revisions of a patch to implement= BRIN multi-range indexes. Peter Eisentraut sent in another revision of a patch to implement SQL-stand= ard function body. Thomas Munro sent in two more revisions of a patch to implement parallel fu= ll hash join. Magnus Hagander sent in five revisions of a patch to add PROXY protocol sup= port. Vigneshwaran C sent in a patch to fix a Buildfarm failure in crake by separ= ating a declaration from an assignment in Perl code. Micha=C3=ABl Paquier sent in another revision of a patch to enable the libc= rypto callbacks before checking whether SSL needs to be done. Daniel Gustafsson sent in another revision of a patch to support NSS as a l= ibpq TLS backend. Gilles Darold sent in a patch to implement regexp_count, regexp_instr, regexp_substr and regexp_replace. David Rowley sent in another revision of a patch to reduce the number of sp= ecial cases to build contrib modules on Windows. Amit Langote sent in another revision of a patch to make UPDATE and DELETE = scale better on inheritance trees. John Naylor sent in a patch to review some alternatives to the current popc= ount implementations. Mark Rofail sent in another revision of a patch to implement foreign key ar= rays. Pavel St=C4=9Bhule sent in three more revisions of a patch to make psql abl= e to use a pager for \watch. Tom Lane sent in another revision of a patch to remove support for COPY FROM STDIN in protocol version 2. Mark Dilger sent in two revisions of a patch to add a pg_amcheck contrib application. Soumyadeep Chakraborty and Kyotaro HORIGUCHI traded patches to prevent the checkpointer from writing to older timeline. Amit Kapila sent in another revision of a patch to track replication origin progress for rollbacks. Masahiro Ikeda and Fujii Masao traded patches to add WAL write/fsync statis= tics to pg_stat_wal. Justin Pryzby and Takayuki Tsunakawa traded patches to speed up COPY FROM on tables with foreign partitions. =C3=81lvaro Herrera and Justin Pryzby traded patches to add batch/pipelinin= g support for libpq. Daniel Gustafsson sent in three more revisions of a patch to disallow SSL compression. Andrey V. Lepikhov and Tom Lane traded patches to remove the 64K rangetable limit. Robins Tharakan sent in a patch to fix pg_upgrade for large numbers of large objects. Jacob Champion sent in a patch to rework the sslfiles Makefile target. Kyotaro HORIGUCHI sent in another revision of a patch to move the callback = call from ReadPageInternal to XLogReadRecord, move the page reader out of XLogReadRecord, remove globals readOff, readLen and readSegNo, and allow xlogreader to use different xlog blocksizes. Andy Fan sent in a patch to adjust the cost model for the partition pruning case. Kyotaro HORIGUCHI sent in another revision of a patch to make the End-Of-Recovery error less scary. Heikki Linnakangas sent in another revision of a patch to force lookahead in COPY FROM parsing. Daniel Gustafsson sent in another revision of a patch to remove deprecated parameters authtype and pqtty from libpq. Amul Sul sent in another revision of a patch to implement wal prohibit state using a global barrier, and error or Assert before START_CRIT_SECTION for W= AL writes. Thomas Munro sent in a patch to make relfile tombstone files conditional on= WAL level. Amit Langote sent in another revision of a patch to make some cosmetic improvements to the partition pruning step generation code. Thomas Munro sent in another revision of a patch to replace buffer I/O locks with condition variables. Thomas Munro sent in two more revisions of a patch to add missing pthread_barrier_t, refactor the way thread portability is done in pgbench, improve pgbench's time measurement code, and synchronize its client threads. Julien Rouhaud sent in another revision of a patch to fix various shared me= mory estimates. Laurenz Albe sent in two more revisions of a patch to improve \e, \ef and \= ev if the editor is quit without saving by retaining the current query buffer rat= her than executing the previous query. Masahiko Sawada sent in two revisions of a patch to ensure that pg_stat_xxx_tables.n_mod_since_analyze is reset on TRUNCATE. Tom=C3=A1=C5=A1 Vondra sent in two more revisions of a patch to make it pos= sible to collect extended statistics on expressions. Hayato Kuroda sent in another revision of a patch to refactor ECPGconnect a= nd allow IPv6 connections in same. Kyotaro HORIGUCHI sent in another revision of a patch to delay checkpoint completion after truncate success. Kota Miyake sent in a patch to remove some warts from pgbench's \sleep metacommand. Hou Zhijie sent in a patch to avoid CCI in RI trigger when INSERTing an FK relation. Ibrar Ahmed sent in another revision of a patch to fix tests broken by an earlier patch to make GROUP BY work more efficiently. Kirk Jamison sent in another revision of a patch to implement tracing in li= bpq. Kyotaro HORIGUCHI sent in another revision of a patch to change the stats collector from using files for temporary storage to shared memory. Andres Freund sent in another revision of a patch to ensure that on Windows, PostgreSQL is only considered to be running as a service if stderr is inval= id. Thomas Munro sent in another revision of a patch to inject fault timing, an= d fix a race condition in parallel hash join batch cleanup. Andrew Dunstan sent in a patch to allow matching the whole DN from a client certificate. KaiGai Kohei and Tom Lane traded patches to add binary input/output handler= s to contrib/cube. Bharath Rupireddy sent in two more revisions of a patch to refactor the cod= e for refreshing materialized views into a group of functions, and implement EXPLAIN/EXPLAIN ANALYZE REFRESH MATERIALIZED VIEW. Justin Pryzby sent in a patch to bootstrap that makes it possible to conver= t a `Typ` to a `List*`, and use that to allow composite types in bootstrap. Kyotaro HORIGUCHI sent in a patch to fix an intermittent failure in 011_crash_recovery.pl by adding a CHECKPOINT. Joel Jacobson sent in a patch to create a pg_permissions view. Joel Jacobson sent in a patch to create a pg_ownerships view. Justin Pryzby sent in another revision of a patch to make it possible to run CLUSTER on partitioned indexes. Bharath Rupireddy sent in another revision of a patch to add another flavor= of pg_terminate_backend that allows people to specify wait and timeout. Bharath Rupireddy sent in another revision of a patch to improve the "PID X= XXX is not a PostgreSQL server process" message by splitting out the case where sending a signal is not allowed. Li Japin sent in another revision of a patch to implement ALTER SUBSCRIPTIO= N ... ADD/DROP PUBLICATION. Joe Conway sent in a patch to fix a bug in has_column_privilege()" that got attnums and non-existent columns wrong. Justin Pryzby sent in another revision of a patch to implement ALTER TABLE = SET ACCESS METHOD, allow specifying the table acccess method of partitioned tab= les to be inherited by partitions, and implement lsyscache get_rel_relam() beca= use a table's AM is now in play. --===============4996775892645763269== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable PostgreSQL Weekly News - March 7, 2021
 

PostgreSQL Weekly News - March 7, 2021

PostgreSQL Weekly News - March 7, 2021

PostgreSQL Product News

parquet_s3_fdw 0.1, a foreign data wrapper = for parquet files on S3, released. https://github.com/pgspi= der/parquet_s3_fdw/releases/tag/v0.1

PostgreSQL Jobs for March

h= ttps://archives.postgresql.org/pgsql-jobs/2021-03/

PostgreSQL in the News

Planet PostgreSQL: htt= ps://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

Thomas Munro pushed:

Amit Kapila pushed:

Andres Freund pushed:

  • Fix recovery te= st hang in 021_row_visibility.pl on windows. The psql processes were not explicitly killed (but would eventually exit due postgres shutti= ng down). For some reason windows perl doesn't like that, resulting in errors like Warning: unable to close filehandle GEN20 properly: Bad file descrip= tor during global destruction. The test was introduced in d6734a897e3, so no backpatching necessary. h= ttps://git.postgresql.org/pg/commitdiff/1e6e40447115ca7b4749d7d117b81b016ee= 5e2c2

Tom Lane pushed:

Micha=C3=ABl Paquier pushed:

=C3=81lvaro Herrera pushed:

Peter Geoghegan pushed:

  • Fix nbtree page deletion error messages. Ad= just some "can't happen" error messages that assumed that the page deletion target page must be a half-d= ead page. This assumption was wrong in the case of an internal target page. Simply refer to these pages as the target page instead. Internal pages a= re never marked half-dead. There is exactly one half-dead page for each sub= tree undergoing deletion. The half-dead page is also the target subtree's leaf-level page. This has been the case since commit efada2b8, which tot= ally overhauled nbtree page deletion. h= ttps://git.postgresql.org/pg/commitdiff/3d8d5787a358156edaa7782f0c88e231af9= 74a01

  • nbtree page deletion: Add leaftopparent ass= ertion. Add documenting assertion. This makes it easier to follow how we maintain the top parent link in tar= get subtree's half-dead/leaf level page. h= ttps://git.postgresql.org/pg/commitdiff/5b2f2af3d9d57626b9052a05337e32ad139= 9093d

Peter Eisentraut pushed:

Heikki Linnakangas pushed:

Fujii Masao pushed:

Andrew Dunstan pushed:

Magnus Hagander pushed:

Pending Patches

Pavel St=C4=9Bhule sent in another revision= of a patch to implement schema variables.

Maxim Orlov sent in a patch to fix an infel= icity between TLS and multiple hosts in libpq connect strings.

Thomas Munro sent in two more revisions of = a patch to add a condition variable for walreceiver state, another for for recovery pause/resume, and poll the postmaster less frequently in recovery.

Ajin Cherian and Amit Kapila traded patches= to add an option to enable two_phase commits via pg_create_logical_replication_slot.

Michael Banck sent in a patch to add a --cr= eate-only option to pg_dump/pg_dumpall.

Micha=C3=ABl Paquier sent in another revisi= on of a patch to clarify the documentation of signal handling in the archiver.

Etsuro Fujita sent in another revision of a= patch to implement asynchronous append on postgres_fdw nodes.

Peter Eisentraut sent in another revision o= f a patch to deal with macOS SIP in builds.

Laurenz Albe and Amit Langote traded patche= s to allow setting parallel_workers on partitioned tables.

Joel Jacobson sent in three revisions of a = patch to implement regexp_positions(), which returns the starting and ending positions of each match.

Thomas Munro sent in two more revisions of = a patch to provide a new optional GUC that can be used to check whether the client connection has gone away periodically while running very long queries.

Paul F=C3=B6rster sent in another revision = of a patch to mention URIs and services in psql --help's output.

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

Greg Nancarrow and Amit Kapila traded patch= es to enable parallel SELECT for "INSERT INTO ... SELECT ...", add a new boolean GUC, enable_parallel_dml, a= nd a similar table option, parallel_dml_enabled.

Dian M Fay sent in two revisions of a patch= to suppress explicit casts of text constants in postgres_fdw when the other side of a binary OpExpr is also te= xt.

Dilip Kumar sent in three more revisions of= a patch to add a compression method option for tables.

Julien Rouhaud sent in another revision of = a patch to move query jumbling from pg_stat_statements into core, expose queryid in pg_stat_activity and log_line_prefix, and expose query identifier in EXPLAIN ... VERBOSE.

Bruce Momjian sent in a patch to fix up som= e GiST code comments.

Vik Fearing sent in another revision of a p= atch to implement GROUP BY DISTINCT, which elides duplicated GROUPING SETs.

Mark Dilger sent in another revision of a p= atch to add a contrib extension, pg_amcheck.

Pavel Borisov sent in another revision of a= patch to make amcheck checking a UNIQUE constraint for btree indexes.

Jacob Champion sent in another revision of = a patch to add an API to the table AM to accept a column projection list.

Joel Jacobson sent in two revisions of a pa= tch to support empty ranges with bounds information.

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

Peter Eisentraut sent in another revision o= f a patch to implement SQL-standard function body.

Thomas Munro sent in two more revisions of = a patch to implement parallel full hash join.

Magnus Hagander sent in five revisions of a= patch to add PROXY protocol support.

Vigneshwaran C sent in a patch to fix a Bui= ldfarm failure in crake by separating a declaration from an assignment in Perl code.

Micha=C3=ABl Paquier sent in another revisi= on of a patch to enable the libcrypto callbacks before checking whether SSL needs to be done.

Daniel Gustafsson sent in another revision = of a patch to support NSS as a libpq TLS backend.

Gilles Darold sent in a patch to implement = regexp_count, regexp_instr, regexp_substr and regexp_replace.

David Rowley sent in another revision of a = patch to reduce the number of special cases to build contrib modules on Windows.

Amit Langote sent in another revision of a = patch to make UPDATE and DELETE scale better on inheritance trees.

John Naylor sent in a patch to review some = alternatives to the current popcount implementations.

Mark Rofail sent in another revision of a p= atch to implement foreign key arrays.

Pavel St=C4=9Bhule sent in three more revis= ions of a patch to make psql able to use a pager for \watch.

Tom Lane sent in another revision of a patc= h to remove support for COPY FROM STDIN in protocol version 2.

Mark Dilger sent in two revisions of a patc= h to add a pg_amcheck contrib application.

Soumyadeep Chakraborty and Kyotaro HORIGUCH= I traded patches to prevent the checkpointer from writing to older timeline.

Amit Kapila sent in another revision of a p= atch to track replication origin progress for rollbacks.

Masahiro Ikeda and Fujii Masao traded patch= es to add WAL write/fsync statistics to pg_stat_wal.

Justin Pryzby and Takayuki Tsunakawa traded= patches to speed up COPY FROM on tables with foreign partitions.

=C3=81lvaro Herrera and Justin Pryzby trade= d patches to add batch/pipelining support for libpq.

Daniel Gustafsson sent in three more revisi= ons of a patch to disallow SSL compression.

Andrey V. Lepikhov and Tom Lane traded patc= hes to remove the 64K rangetable limit.

Robins Tharakan sent in a patch to fix pg_u= pgrade for large numbers of large objects.

Jacob Champion sent in a patch to rework th= e sslfiles Makefile target.

Kyotaro HORIGUCHI sent in another revision = of a patch to move the callback call from ReadPageInternal to XLogReadRecord, move the page reader out of XLogReadRecord, remove globals readOff, readLen and readSegNo, and allow xlogreader to use different xlog blocksizes.

Andy Fan sent in a patch to adjust the cost= model for the partition pruning case.

Kyotaro HORIGUCHI sent in another revision = of a patch to make the End-Of-Recovery error less scary.

Heikki Linnakangas sent in another revision= of a patch to force lookahead in COPY FROM parsing.

Daniel Gustafsson sent in another revision = of a patch to remove deprecated parameters authtype and pqtty from libpq.

Amul Sul sent in another revision of a patc= h to implement wal prohibit state using a global barrier, and error or Assert before START_CRIT_SECTION for W= AL writes.

Thomas Munro sent in a patch to make relfil= e tombstone files conditional on WAL level.

Amit Langote sent in another revision of a = patch to make some cosmetic improvements to the partition pruning step generation code.

Thomas Munro sent in another revision of a = patch to replace buffer I/O locks with condition variables.

Thomas Munro sent in two more revisions of = a patch to add missing pthread_barrier_t, refactor the way thread portability is done in pgbench, improve pgbench's time measurement code, and synchronize its client threads= .

Julien Rouhaud sent in another revision of = a patch to fix various shared memory estimates.

Laurenz Albe sent in two more revisions of = a patch to improve \e, \ef and \ev if the editor is quit without saving by retaining the current query buffer rat= her than executing the previous query.

Masahiko Sawada sent in two revisions of a = patch to ensure that pg_stat_xxx_tables.n_mod_since_analyze is reset on TRUNCATE.

Tom=C3=A1=C5=A1 Vondra sent in two more rev= isions of a patch to make it possible to collect extended statistics on expressions.

Hayato Kuroda sent in another revision of a= patch to refactor ECPGconnect and allow IPv6 connections in same.

Kyotaro HORIGUCHI sent in another revision = of a patch to delay checkpoint completion after truncate success.

Kota Miyake sent in a patch to remove some = warts from pgbench's \sleep metacommand.

Hou Zhijie sent in a patch to avoid CCI in = RI trigger when INSERTing an FK relation.

Ibrar Ahmed sent in another revision of a p= atch to fix tests broken by an earlier patch to make GROUP BY work more efficiently.

Kirk Jamison sent in another revision of a = patch to implement tracing in libpq.

Kyotaro HORIGUCHI sent in another revision = of a patch to change the stats collector from using files for temporary storage to shared memory.

Andres Freund sent in another revision of a= patch to ensure that on Windows, PostgreSQL is only considered to be running as a service if stderr is inval= id.

Thomas Munro sent in another revision of a = patch to inject fault timing, and fix a race condition in parallel hash join batch cleanup.

Andrew Dunstan sent in a patch to allow mat= ching the whole DN from a client certificate.

KaiGai Kohei and Tom Lane traded patches to= add binary input/output handlers to contrib/cube.

Bharath Rupireddy sent in two more revision= s of a patch to refactor the code for refreshing materialized views into a group of functions, and implement EXPLAIN/EXPLAIN ANALYZE REFRESH MATERIALIZED VIEW.

Justin Pryzby sent in a patch to bootstrap = that makes it possible to convert a Typ to a List*, and use that to allow composite t= ypes in bootstrap.

Kyotaro HORIGUCHI sent in a patch to fix an= intermittent failure in 011_crash_recovery.pl by adding a CHECKPOINT.

Joel Jacobson sent in a patch to create a p= g_permissions view.

Joel Jacobson sent in a patch to create a p= g_ownerships view.

Justin Pryzby sent in another revision of a= patch to make it possible to run CLUSTER on partitioned indexes.

Bharath Rupireddy sent in another revision = of a patch to add another flavor of pg_terminate_backend that allows people to specify wait and timeout.

Bharath Rupireddy sent in another revision = of a patch to improve the "PID XXXX is not a PostgreSQL server process" message by splitting out the case where sending a signal is not allowed.

Li Japin sent in another revision of a patc= h to implement ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION.

Joe Conway sent in a patch to fix a bug in = has_column_privilege()" that got attnums and non-existent columns wrong.

Justin Pryzby sent in another revision of a= patch to implement ALTER TABLE SET ACCESS METHOD, allow specifying the table acccess method of partitioned tab= les to be inherited by partitions, and implement lsyscache get_rel_relam() beca= use a table's AM is now in play.

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/.
 
--===============4996775892645763269==-- --===============0656089356888391194==--