== PostgreSQL Weekly News - July 19, 2020 ==
От | David Fetter |
---|---|
Тема | == PostgreSQL Weekly News - July 19, 2020 == |
Дата | |
Msg-id | 20200719201939.GA25751@fetter.org обсуждение исходный текст |
Список | pgsql-announce |
== PostgreSQL Weekly News - July 19, 2020 == Person of the week: https://postgresql.life/post/stacey_haysler/ == PostgreSQL Product News == PostgresDAC 3.8, a direct access component suite for PostgreSQL, released. http://microolap.com/products/connectivity/postgresdac/download/ == PostgreSQL Jobs for July == http://archives.postgresql.org/pgsql-jobs/2020-07/ == PostgreSQL Local == PGDay Ukraine will take place September 5th, 2020 in Lviv at the Bank Hotel. https://pgday.org.ua/ pgDay Israel 2020 will take place on September 10, 2020 in Tel Aviv. http://pgday.org.il/ PGDay Austria will take place September 18, 2020 at Schloss Schoenbrunn (Apothekertrakt) in Vienna. https://pgday.at/en/ PG Day Russia will take place in Saint Petersburg on July 9, 2021. https://pgday.ru/en/2020/ == PostgreSQL in the News == Planet PostgreSQL: http://planet.postgresql.org/ PostgreSQL Weekly News is brought to you this week by David Fetter Submit news and announcements by Sunday at 3:00pm PST8PDT to david@fetter.org. == Applied Patches == Michaël Paquier pushed: - Fix timestamp range handling in regression tests of modules/commit_ts/. Switching the regression tests to use tstzrange() has proved to not be a good idea for environments where the timestamp precision is low, as internal range checks exclude the upper bound. So, if the commit timestamp of a transaction matched with now() from the next query, the test would fail. This changes to use two bound checks instead of the range function, where the upper bound is inclusive. Per buildfarm member jacana. Discussion: https://postgr.es/m/20200712122507.GD21680@paquier.xyz https://git.postgresql.org/pg/commitdiff/5bfe6a3c485d3259f59fa2d2e1d34dea1a3baeba - Fix comments related to table AMs. Incorrect function names were referenced. As this fixes some portions of tableam.h, that is mentioned in the docs as something to look at when implementing a table AM, backpatch down to 12 where this has been introduced. Author: Hironobu Suzuki Discussion: https://postgr.es/m/8fe6d672-28dd-3f1d-7aed-ac2f6d599d3f@interdb.jp Backpatch-through: 12 https://git.postgresql.org/pg/commitdiff/9168793d7275b4b318c153d607fba55d14098c19 - Fix some header identifications. The following header files missed the shot: - jsonfuncs.h, as of ce0425b. - jsonapi.h, as of beb4699. - llvmjit_emit.h as of 7ec0d80. - partdesc.h, as of 1bb5e78. Author: Jesse Zhang Discussion: https://postgr.es/m/CAGf+fX4-8xULEOz09DE2dZGjT+q8VJ--rqfTpvcFwc+A4fc-3Q@mail.gmail.com https://git.postgresql.org/pg/commitdiff/b8401c32bacd0869bd00bc71fd64f1d6071bcd6a - Eliminate cache lookup errors in SQL functions for object addresses. When using the following functions, users could see various types of errors of the type "cache lookup failed for OID XXX" with elog(), that can only be used for internal errors: * pg_describe_object() * pg_identify_object() * pg_identify_object_as_address() The set of APIs managing object addresses for all object types are made smarter by gaining a new argument "missing_ok" that allows any caller to control if an error is raised or not on an undefined object. The SQL functions listed above are changed to handle the case where an object is missing. Regression tests are added for all object types for the cases where these are undefined. Before this commit, these cases failed with cache lookup errors, and now they basically return NULL (minus the name of the object type requested). Author: Michael Paquier Reviewed-by: Aleksander Alekseev, Dmitry Dolgov, Daniel Gustafsson, Álvaro Herrera, Kyotaro Horiguchi Discussion: https://postgr.es/m/CAB7nPqSZxrSmdHK-rny7z8mi=EAFXJ5J-0RbzDw6aus=wB5azQ@mail.gmail.com https://git.postgresql.org/pg/commitdiff/2a10fdc4307a667883f7a3369cb93a721ade9680 - Fix compilation failure with sepgsql. One change for getObjectIdentity() has been missed in 2a10fdc, causing the module to not compile properly. This was actually the only problem, and it happens that it is easy enough to check the compilation of the module on Debian after installing libselinux1-dev. Per buildfarm member rhinoceros. https://git.postgresql.org/pg/commitdiff/e949137397383de58f0c566f5a92b017343c5269 - Fix handling of missing files when using pg_rewind with online source. When working with an online source cluster, pg_rewind gets a list of all the files in the source data directory using a WITH RECURSIVE query, returning a NULL result for a file's metadata if it gets removed between the moment it is listed in a directory and the moment its metadata is obtained with pg_stat_file() (say a recycled WAL segment). The query result was processed in such a way that for each tuple we checked only that the first file's metadata was NULL. This could have two consequences, both resulting in a failure of the rewind: - If the first tuple referred to a removed file, all files from the source would be ignored. - Any file actually missing would not be considered as such. While on it, rework slightly the code so as no values are saved if we know that a file is going to be skipped. Issue introduced by b36805f, so backpatch down to 9.5. Author: Justin Pryzby, Michael Paquier Reviewed-by: Daniel Gustafsson, Masahiko Sawada Discussion: https://postgr.es/m/20200713061010.GC23581@telsasoft.com Backpatch-through: 9.5 https://git.postgresql.org/pg/commitdiff/1d09fb1f0a9c7edc3298104fc4350e49169f6f2a - Switch pg_test_fsync to use binary mode on Windows. pg_test_fsync has always opened files using the text mode on Windows, as this is the default mode used if not enforced by _setmode(). This fixes a failure when running pg_test_fsync down to 12 because O_DSYNC and the text mode are not able to work together nicely. We fixed the handling of O_DSYNC in 12~ for the tool by switching to the concurrent-safe version of fopen() in src/port/ with 0ba06e0. And 40cfe86, by enforcing the text mode for compatibility reasons if O_TEXT or O_BINARY are not specified by the caller, broke pg_test_fsync. For all versions, this avoids any translation overhead, and pg_test_fsync should test binary writes, so it is a gain in all cases. Note that O_DSYNC is still not handled correctly in ~11, leading to pg_test_fsync to show insanely high numbers for open_datasync() (using this property it is easy to notice that the binary mode is much faster). This would require a backpatch of 0ba06e0 and 40cfe86, which could potentially break existing applications, so this is left out. There are no TAP tests for this tool yet, so I have checked all builds manually using MSVC. We could invent a new option to run a single transaction instead of using a duration of 1s to make the tests a maximum short, but this is left as future work. Thanks to Bruce Momjian for the discussion. Reported-by: Jeff Janes Author: Michael Paquier Discussion: https://postgr.es/m/16526-279ded30a230d275@postgresql.org Backpatch-through: 9.5 https://git.postgresql.org/pg/commitdiff/932f9fb504a57f296cf698d15bd93462ddfe2776 - doc: Fix description of \copy for psql. The WHERE clause introduced by 31f3817 was not described. While on it, split the grammar of \copy FROM and TO into two distinct parts for clarity as they support different set of options. Author: Vignesh C Discussion: https://postgr.es/m/CALDaNm3zWr=OmxeNqOqfT=uZTSdam_j-gkX94CL8eTNfgUtf6A@mail.gmail.com Backpatch-through: 12 https://git.postgresql.org/pg/commitdiff/b74d449a02b3c972051b1847f3915128da8775dc - doc: Refresh more URLs in the docs. This updates some URLs that are redirections, mostly to an equivalent using https. One URL referring to generalized partial indexes was outdated. Author: Kyotaro Horiguchi Discussion: https://postgr.es/m/20200717.121308.1369606287593685396.horikyota.ntt@gmail.com Backpatch-through: 9.5 https://git.postgresql.org/pg/commitdiff/9add405014f8e47e038af7124528b7601249a2ac Amit Kapila pushed: - Revert "Track statistics for spilling of changes from ReorderBuffer". The stats with this commit was available only for WALSenders, however, users might want to see for backends doing logical decoding via SQL API. Then, users might want to reset and access these stats across server restart which was not possible with the current patch. List of commits reverted: caa3c4242c Don't call elog() while holding spinlock. e641b2a995 Doc: Update the documentation for spilled transaction statistics. 5883f5fe27 Fix unportable printf format introduced in commit 9290ad198. 9290ad198b Track statistics for spilling of changes from ReorderBuffer. Additionaly, remove the release notes entry for this feature. Backpatch-through: 13, where it was introduced Discussion: https://postgr.es/m/CA+fd4k5_pPAYRTDrO2PbtTOe0eHQpBvuqmCr8ic39uTNmR49Eg@mail.gmail.com https://git.postgresql.org/pg/commitdiff/d973747281caece520236e93d255c654cc613ec9 - Fix signal handler setup for SIGHUP in the apply launcher process. Commit 1e53fe0e70 has unified the usage of the config-file reload flag by using the same signal handler function for the SIGHUP signal at many places in the code. By mistake, it used the wrong SIGNAL in apply launcher process for the SIGHUP signal handler function. Author: Bharath Rupireddy Reviewed-by: Dilip Kumar Backpatch-through: 13, where it was introduced Discussion: https://postgr.es/m/CALj2ACVzHCRnS20bOiEHaLtP5PVBENZQn4khdsSJQgOv_GM-LA@mail.gmail.com https://git.postgresql.org/pg/commitdiff/01160a3de3d89346c9597414ff85416b77f5391f - Fix comments in reorderbuffer.c. Author: Dave Cramer Reviewed-by: David G. Johnston Discussion: https://postgr.es/m/CADK3HHL8do4Fp1bsymgNasx375njV3AR7zY3UgYwzbL_Dx-n2Q@mail.gmail.com https://git.postgresql.org/pg/commitdiff/df7c5cb16e8fcf960e3302355fa6547fba428f5e - Adjust minor comment in reorderbuffer.c. Author: Dave Cramer Reviewed-by: David G. Johnston Discussion: https://postgr.es/m/CADK3HHL8do4Fp1bsymgNasx375njV3AR7zY3UgYwzbL_Dx-n2Q@mail.gmail.com https://git.postgresql.org/pg/commitdiff/f41fbee7e704947fd1d2241f35bc8d0e37705919 Jeff Davis pushed: - HashAgg: before spilling tuples, set unneeded columns to NULL. This is a replacement for 4cad2534. Instead of projecting all tuples going into a HashAgg, only remove unnecessary attributes when actually spilling. This avoids the regression for the in-memory case. Discussion: https://postgr.es/m/a2fb7dfeb4f50aa0a123e42151ee3013933cb802.camel%40j-davis.com Backpatch-through: 13 https://git.postgresql.org/pg/commitdiff/2302302236a0c7aeba3377d78dd9d80ba53247df - Revert "Use CP_SMALL_TLIST for hash aggregate". This reverts commit 4cad2534da6d17067d98cf04be2dfc1bda8f2cd0 due to a performance regression. It will be replaced by a new approach in an upcoming commit. Reported-by: Andres Freund Discussion: https://postgr.es/m/20200614181418.mx4bvljmfkkhoqzl@alap3.anarazel.de Backpatch-through: 13 https://git.postgresql.org/pg/commitdiff/0babd109801e5ecd90df29589c23c6daf3ae69f7 Alexander Korotkov pushed: - Improvements to psql \dAo and \dAp commands. * Strategy number and purpose are essential information for opfamily operator. So, show those columns in non-verbose output. * "Left/right arg type" \dAp column names are confusing, because those type don't necessary match to function arguments. Rename them to "Registered left/right type". * Replace manual assembling of operator/procedure names with casts to regoperator/regprocedure. * Add schema-qualification for pg_catalog functions and tables. Reported-by: Peter Eisentraut, Tom Lane Reviewed-by: Tom Lane Discussion: https://postgr.es/m/2edc7b27-031f-b2b6-0db2-864241c91cb9%402ndquadrant.com Backpatch-through: 13 https://git.postgresql.org/pg/commitdiff/8d2ed66e4107ef27d05aef682c68af5952af7690 Tom Lane pushed: - Fix bugs in libpq's management of GSS encryption state. GSS-related resources should be cleaned up in pqDropConnection, not freePGconn, else the wrong things happen when resetting a connection or trying to switch to a different server. It's also critical to reset conn->gssenc there. During connection setup, initialize conn->try_gss at the correct place, else switching to a different server won't work right. Remove now-redundant cleanup of GSS resources around one (and, for some reason, only one) pqDropConnection call in connectDBStart. Per report from Kyotaro Horiguchi that psql would freeze up, rather than successfully resetting a GSS-encrypted connection after a server restart. This is YA oversight in commit b0b39f72b, so back-patch to v12. Discussion: https://postgr.es/m/20200710.173803.435804731896516388.horikyota.ntt@gmail.com https://git.postgresql.org/pg/commitdiff/25fe5ac45a736e50d2b85280a3cb0ce169f583f3 - Cope with lateral references in the quals of a subquery RTE. The qual pushdown logic assumed that all Vars in a restriction clause must be Vars referencing subquery outputs; but since we introduced LATERAL, it's possible for such a Var to be a lateral reference instead. This led to an assertion failure in debug builds. In a non-debug build, there might be no ill effects (if qual_is_pushdown_safe decided the qual was unsafe anyway), or we could get failures later due to construction of an invalid plan. I've not gone to much length to characterize the possible failures, but at least segfaults in the executor have been observed. Given that this has been busted since 9.3 and it took this long for anybody to notice, I judge that the case isn't worth going to great lengths to optimize. Hence, fix by just teaching qual_is_pushdown_safe that such quals are unsafe to push down, matching the previous behavior when it accidentally didn't fail. Per report from Tom Ellis. Back-patch to all supported branches. Discussion: https://postgr.es/m/20200713175124.GQ8220@cloudinit-builder https://git.postgresql.org/pg/commitdiff/a742ecf9c63d454ccb107a357288c8ec1444ca12 - Fix bitmap AND/OR scans on the inside of a nestloop partition-wise join. reparameterize_path_by_child() failed to reparameterize BitmapAnd and BitmapOr paths. This matters only if such a path is chosen as the inside of a nestloop partition-wise join, where we have to pass in parameters from the outside of the nestloop. If that did happen, we generated a bad plan that would likely lead to crashes at execution. This is not entirely reparameterize_path_by_child()'s fault though; it's the victim of an ancient decision (my ancient decision, I think) to not bother filling in param_info in BitmapAnd/Or path nodes. That caused the function to believe that such nodes and their children contain no parameter references and so need not be processed. In hindsight that decision looks pretty penny-wise and pound-foolish: while it saves a few cycles during path node setup, we do commonly need the information later. In particular, by reversing the decision and requiring valid param_info data in all nodes of a bitmap path tree, we can get rid of indxpath.c's get_bitmap_tree_required_outer() function, which computed the data on-demand. It's not unlikely that that nets out as a savings of cycles in many scenarios. A couple of other things in indxpath.c can be simplified as well. While here, get rid of some cases in reparameterize_path_by_child() that are visibly dead or useless, given that we only care about reparameterizing paths that can be on the inside of a parameterized nestloop. This case reminds one of the maxim that untested code probably does not work, so I'm unwilling to leave unreachable code in this function. (I did leave the T_Gather case in place even though it's not reached in the regression tests. It's not very clear to me when the planner might prefer to put Gather below rather than above a nestloop, but at least in principle the case might be interesting.) Per bug #16536, originally from Arne Roland but with a test case by Andrew Gierth. Back-patch to v11 where this code came in. Discussion: https://postgr.es/m/16536-2213ee0b3aad41fd@postgresql.org https://git.postgresql.org/pg/commitdiff/689696c7110f148ede8004aae50d7543d05b5587 - Ensure that distributed timezone abbreviation files are plain ASCII. We had two occurrences of "Mitteleuropäische Zeit" in Europe.txt, though the corresponding entries in Default were spelled "Mitteleuropaeische Zeit". Standardize on the latter spelling to avoid questions of which encoding to use. While here, correct a couple of other trivial inconsistencies between the Default file and the supposedly-matching entries in the *.txt files, as exposed by some checking with comm(1). Also, add BDST to the Europe.txt file; it previously was only listed in Default. None of this has any direct functional effect. Per complaint from Christoph Berg. As usual for timezone data patches, apply to all branches. Discussion: https://postgr.es/m/20200716100743.GE3534683@msg.df7cb.de https://git.postgresql.org/pg/commitdiff/7fe3083f4cc9cb213f99deecf1bf775a9270b3b2 - Cope with data-offset-less archive files during out-of-order restores. pg_dump produces custom-format archive files that lack data offsets when it is unable to seek its output. Up to now that's been a hazard for pg_restore. But if pg_restore is able to seek in the archive file, there is no reason to throw up our hands when asked to restore data blocks out of order. Instead, whenever we are searching for a data block, record the locations of the blocks we passed over (that is, fill in the missing data-offset fields in our in-memory copy of the TOC data). Then, when we hit a case that requires going backwards, we can just seek back. Also track the furthest point that we've searched to, and seek back to there when beginning a search for a new data block. This avoids possible O(N^2) time consumption, by ensuring that each data block is examined at most twice. (On Unix systems, that's at most twice per parallel-restore job; but since Windows uses threads here, the threads can share block location knowledge, reducing the amount of duplicated work.) We can also improve the code a bit by using fseeko() to skip over data blocks during the search. This is all of some use even in simple restores, but it's really significant for parallel pg_restore. In that case, we require seekability of the input already, and we will very probably need to do out-of-order restores. Back-patch to v12, as this fixes a regression introduced by commit 548e50976. Before that, parallel restore avoided requesting out-of-order restores, so it would work on a data-offset-less archive. Now it will again. Ideally this patch would include some test coverage, but there are other open bugs that need to be fixed before we can extend our coverage of parallel restore very much. Plan to revisit that later. David Gilman and Tom Lane; reviewed by Justin Pryzby Discussion: https://postgr.es/m/CALBH9DDuJ+scZc4MEvw5uO-=vRyR2=QF9+Yh=3hPEnKHWfS81A@mail.gmail.com https://git.postgresql.org/pg/commitdiff/f009591d6eddbeece955aab70c35e7002fd01aec - Remove manual tracking of file position in pg_dump/pg_backup_custom.c. We do not really need to track the file position by hand. We were already relying on ftello() whenever the archive file is seekable, while if it's not seekable we don't need the file position info anyway because we're not going to be able to re-write the TOC. Moreover, that tracking was buggy since it failed to account for the effects of fseeko(). Somewhat remarkably, that seems not to have made for any live bugs up to now. We could fix the oversights, but it seems better to just get rid of the whole error-prone mess. In itself this is merely code cleanup. However, it's necessary infrastructure for an upcoming bug-fix patch (because that code *does* need valid file position after fseeko). The bug fix needs to go back as far as v12; hence, back-patch that far. Discussion: https://postgr.es/m/CALBH9DDuJ+scZc4MEvw5uO-=vRyR2=QF9+Yh=3hPEnKHWfS81A@mail.gmail.com https://git.postgresql.org/pg/commitdiff/a8d0732ac2b5527ce47cce5b325f8df93f4d19cc - Allow logical replication to transfer data in binary format. This patch adds a "binary" option to CREATE/ALTER SUBSCRIPTION. When that's set, the publisher will send data using the data type's typsend function if any, rather than typoutput. This is generally faster, if slightly less robust. As committed, we won't try to transfer user-defined array or composite types in binary, for fear that type OIDs won't match at the subscriber. This might be changed later, but it seems like fit material for a follow-on patch. Dave Cramer, reviewed by Daniel Gustafsson, Petr Jelinek, and others; adjusted some by me Discussion: https://postgr.es/m/CADK3HH+R3xMn=8t3Ct+uD+qJ1KD=Hbif5NFMJ+d5DkoCzp6Vgw@mail.gmail.com https://git.postgresql.org/pg/commitdiff/9de77b5453130242654ff0b30a551c9c862ed661 - Fix replication/worker_internal.h to compile without other headers. This header hasn't changed recently, so the fact that it now fails headerscheck/cpluspluscheck testing must be due to changes in what it includes. Probably f21916791 is to blame, but I didn't try to verify that. Discussion: https://postgr.es/m/3699703.1595016554@sss.pgh.pa.us https://git.postgresql.org/pg/commitdiff/9b14280b207053f8b09e20b5719785ec4413b9d2 - Correctly mark pg_subscription.subslotname as nullable. Due to the layout of this catalog, subslotname has to be explicitly marked BKI_FORCE_NULL, else initdb will default to the assumption that it's non-nullable. Since, in fact, CREATE/ALTER SUBSCRIPTION will store null values there, the existing marking is just wrong, and has been since this catalog was invented. We haven't noticed because not much in the system actually depends on attnotnull being truthful. However, JIT'ed tuple deconstruction does depend on that in some cases, allowing crashes or wrong answers in queries that inspect pg_subscription. Commit 9de77b545 quite accidentally exposed this on the buildfarm members that force JIT activation. Back-patch to v13. The problem goes further back, but we cannot force initdb in released branches, so some klugier solution will be needed there. Before working on that, push this simple fix to try to get the buildfarm back to green. Discussion: https://postgr.es/m/4118109.1595096139@sss.pgh.pa.us https://git.postgresql.org/pg/commitdiff/72eab84a565cbc0677bf8907cd4bfaddf064bd64 Álvaro Herrera pushed: - Fix uninitialized value in segno calculation. Remove previous hack in KeepLogSeg that added a case to deal with a (badly represented) invalid segment number. This was added for the sake of GetWALAvailability. But it's not needed if in that function we initialize the segment number to be retreated to the currently being written segment, so do that instead. Per valgrind-running buildfarm member skink, and some sparc64 animals. Discussion: https://postgr.es/m/1724648.1594230917@sss.pgh.pa.us https://git.postgresql.org/pg/commitdiff/b5b4c0fef9fb905d98f93c1f455397449c6e63a8 David Rowley pushed: - Fix timing issue with ALTER TABLE's validate constraint. An ALTER TABLE to validate a foreign key in which another subcommand already caused a pending table rewrite could fail due to ALTER TABLE attempting to validate the foreign key before the actual table rewrite takes place. This situation could result in an error such as: ERROR: could not read block 0 in file "base/nnnnn/nnnnn": read only 0 of 8192 bytes The failure here was due to the SPI call which validates the foreign key trying to access an index which is yet to be rebuilt. Similarly, we also incorrectly tried to validate CHECK constraints before the heap had been rewritten. The fix for both is to delay constraint validation until phase 3, after the table has been rewritten. For CHECK constraints this means a slight behavioral change. Previously ALTER TABLE VALIDATE CONSTRAINT on inheritance tables would be validated from the bottom up. This was different from the order of evaluation when a new CHECK constraint was added. The changes made here aligns the VALIDATE CONSTRAINT evaluation order for inheritance tables to be the same as ADD CONSTRAINT, which is generally top-down. Reported-by: Nazli Ugur Koyluoglu, using SQLancer Discussion: https://postgr.es/m/CAApHDvp%3DZXv8wiRyk_0rWr00skhGkt8vXDrHJYXRMft3TjkxCA%40mail.gmail.com Backpatch-through: 9.5 (all supported versions) https://git.postgresql.org/pg/commitdiff/f1fcf2d3b2e00b3d7ad3e0d2b1d26b77f5a48413 - Add comment to explain an unused function parameter. Removing the unused 'miinfo' parameter has been raised a couple of times now. It was decided in the 2nd discussion below that we're going to leave it alone. It seems like it might be useful to add a comment to mention this fact so that nobody wastes any time in the future proposing its removal again. Discussion: https://postgr.es/m/CAApHDvpCf-qR5HC1rXskUM4ToV+3YDb4-n1meY=vpAHsRS_1PA@mail.gmail.com Discussion: https://postgr.es/m/CAE9k0P%3DFvcDswnSVtRpSyZMpcAWC%3DGp%3DifZ0HdfPaRQ%3D__LBtw%40mail.gmail.com https://git.postgresql.org/pg/commitdiff/101f903e51f52bf595cd8177d2e0bc6fe9000762 Peter Eisentraut pushed: - Fix -Wcast-function-type warnings. Three groups of issues needed to be addressed: load_external_function() and related functions returned PGFunction, even though not necessarily all callers are looking for a function of type PGFunction. Since these functions are really just wrappers around dlsym(), change to return void * just like dlsym(). In dynahash.c, we are using strlcpy() where a function with a signature like memcpy() is expected. This should be safe, as the new comment there explains, but the cast needs to be augmented to avoid the warning. In PL/Python, methods all need to be cast to PyCFunction, per Python API, but this now runs afoul of these warnings. (This issue also exists in core CPython.) To fix the second and third case, we add a new type pg_funcptr_t that is defined specifically so that gcc accepts it as a special function pointer that can be cast to any other function pointer without the warning. Also add -Wcast-function-type to the standard warning flags, subject to configure check. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/1e97628e-6447-b4fd-e230-d109cec2d584%402ndquadrant.com https://git.postgresql.org/pg/commitdiff/de8feb1f3a23465b5737e8a8c160e8ca62f61339 - pg_dump: Reorganize dumpFunc() and dumpAgg(). Similar to daa9fe8a5264a3f192efa5ddee8fb011ad9da365, instead of repeating the almost same large query in each version branch, use one query and add a few columns to the SELECT list depending on the version. This saves a lot of duplication. Reviewed-by: Fabien COELHO <coelho@cri.ensmp.fr> Discussion: https://www.postgresql.org/message-id/flat/6594334b-40fd-14f1-6bc5-877afa3feed5@2ndquadrant.com https://git.postgresql.org/pg/commitdiff/ed2c7f65bd9f15f8f7cd21ad61602f983b1e72e9 - Resolve gratuitous tabs in SQL file. https://git.postgresql.org/pg/commitdiff/44f34365b81fd1be575d212593c2bd9c47060aa6 - Fix whitespace. https://git.postgresql.org/pg/commitdiff/20ef35516328350a244d22b590e37f24ea958526 - Define OPENSSL_API_COMPAT. This avoids deprecation warnings from newer OpenSSL versions (3.0.0 in particular). Discussion: https://www.postgresql.org/message-id/flat/FEF81714-D479-4512-839B-C769D2605F8A%40yesql.se https://git.postgresql.org/pg/commitdiff/4d3db13621be64fbac2faf7c01c4879d20885c1b Andrew Dunstan pushed: - Enable almost all TAP tests involving symlinks on Windows. Windows has junction points which function as symbolic links for directories. This patch introduces a new function TestLib::dir_symlink() which creates a junction point on Windows and a standard Unix type symbolic link elsewhere. The function TestLib::perl2host is also modified, first to use cygpath where it's available (e.g. msys2) and second to allow it to succeed if the gandparent directory exists but the parent does not. Given these changes the only symlink tests that need to be skipped on Windows are those related to permissions or to use of readlink. The relevant tests for pg_basebackup and pg_rewind are therefore adjusted accordingly. Andrew Dunstan, reviewed by Peter Eisentraut and Michael Paquier. Discussion: https://postgr.es/m/c50a646c-d9bb-7c62-a4bf-8256ff6ff338@2ndquadrant.com https://git.postgresql.org/pg/commitdiff/d66b23b032d75614e1be47ca182020960d89206d Thomas Munro pushed: - Add huge_page_size setting for use on Linux. This allows the huge page size to be set explicitly. The default is 0, meaning it will use the system default, as before. Author: Odin Ugedal <odin@ugedal.com> Discussion: https://postgr.es/m/20200608154639.20254-1-odin%40ugedal.com https://git.postgresql.org/pg/commitdiff/d2bddc2500fb74d56e5bc53a1cfa269e2e846510 - Use MinimalTuple for tuple queues. This representation saves 8 bytes per tuple compared to HeapTuple, and avoids the need to allocate, copy and free on the receiving side. Gather can emit the returned MinimalTuple directly, but GatherMerge now needs to make an explicit copy because it buffers multiple tuples at a time. That should be no worse than before. Reviewed-by: Soumyadeep Chakraborty <soumyadeep2007@gmail.com> Discussion: https://postgr.es/m/CA%2BhUKG%2B8T_ggoUTAE-U%3DA%2BOcPc4%3DB0nPPHcSfffuQhvXXjML6w%40mail.gmail.com https://git.postgresql.org/pg/commitdiff/cdc7169509113018cc389da740e950c587b5751f Peter Geoghegan pushed: - Avoid CREATE INDEX unique index deduplication. There is no advantage to attempting deduplication for a unique index during CREATE INDEX, since there cannot possibly be any duplicates. Doing so wastes cycles due to unnecessary copying. Make sure that we avoid it consistently. We already avoided unique index deduplication in the case where there were some spool2 tuples to merge. That didn't account for the fact that spool2 is removed early/unset in the common case where it has no tuples that need to be merged (i.e. it failed to account for the "spool2 turns out to be unnecessary" optimization in _bt_spools_heapscan()). Oversight in commit 0d861bbb, which added nbtree deduplication Backpatch: 13-, where nbtree deduplication was introduced. https://git.postgresql.org/pg/commitdiff/5da8bf8bbb5c119d4bd767dbdfaf10efd348c0fd - Add Valgrind buffer access instrumentation. Teach Valgrind memcheck to maintain the "defined-ness" of each shared buffer based on whether the backend holds at least one pin at the point it is accessed by access method code. Bugs like the one fixed by commit b0229f26 can be detected using this new instrumentation. Note that backends running with Valgrind naturally have their own independent ideas about whether any given byte in shared memory is safe or unsafe to access. There is no risk that concurrent access by multiple backends to the same shared memory will confuse Valgrind's instrumentation, because everything already works at the process level (or at the memory mapping level, if you prefer). Author: Álvaro Herrera, Peter Geoghegan Reviewed-By: Anastasia Lubennikova Discussion: https://postgr.es/m/20150723195349.GW5596@postgresql.org Discussion: https://postgr.es/m/CAH2-WzkLgyN3zBvRZ1pkNJThC=xi_0gpWRUb_45eexLH1+k2_Q@mail.gmail.com https://git.postgresql.org/pg/commitdiff/1e0dfd166b3fa7fc79e4fad73b6fae056bab598a - Rename "hash_mem" local variable. The term "hash_mem" will take on new significance when pending work to add a new hash_mem_multiplier GUC is committed. Rename a local variable that happens to have been called hash_mem now to avoid confusion. https://git.postgresql.org/pg/commitdiff/564ce62164cd57c0311752ae07ec10439c78d599 - Mark buffers as defined to Valgrind consistently. Make PinBuffer() mark buffers as defined to Valgrind unconditionally, including when the buffer header spinlock must be acquired. Failure to handle that case could lead to false positive reports from Valgrind. This theoretically creates a risk that we'll mark buffers defined even when external callers don't end up with a buffer pin. That seems perfectly acceptable, though, since in general we make no guarantees about buffers that are unsafe to access being reliably marked as unsafe. Oversight in commit 1e0dfd16, which added valgrind buffer access instrumentation. https://git.postgresql.org/pg/commitdiff/46ef520b9566d9eccb095ceafa53e5c305cf80b9 == Pending Patches == Justin Pryzby sent in another revision of a patch to allow INSERT SELECT to use a BulkInsertState. Amit Langote sent in another revision of a patch to remove the dependency on estate->es_result_relation_info from FDW APIs, remove es_result_relation_info, rearrange the partition update row movement code, and refactor transition tuple capture code a bit. Alexandra Wang sent in another revision of a patch to improve the check new partition bound error position report. Fabrízio de Royes Mello sent in three more revisions of a patch to fix a bug in pg_dump that caused it to segfault for extension owned tables. Justin Pryzby and Nathan Bossart traded patches to add MAIN_RELATION_CLEANUP and TOAST_TABLE_CLEANUP options to VACUUM. Pavel Stěhule and Justin Pryzby traded patches to make it possible to add a --filter option to pg_dump. Floris Van Nee sent in another revision of a patch to implement index skip scans. Jehan-Guillaume de Rorthais sent in another revision of a patch to implement DEMOTE. Fujii Masao sent in two more revisions of a patch to change the keep_wal_segments GUC to wal_keep_size. Bharath Rupireddy and Amit Langote traded patches to improve the performance of binary COPY FROM with buffering. Thomas Munro sent in another revision of a patch to reduce WaitEventSet syscall churn. Julien Rouhaud sent in another revision of a patch to add a pg_check_relation() function. Julien Rouhaud sent in another revision of a patch to expose queryid in pg_stat_activity and log_line_prefix. Vigneshwaran C sent in another revision of a patch to make COPY FROM more efficient by reducing the number of calls to GetCopyData and avoiding clearing EOL and avoiding converting the header line to server encoding, as it is not used. David G. Johnston and Pavel Stěhule traded patches to add DROP ... IF EXISTS ... docs and tests. Anastasia Lubennikova sent in another revision of a patch to make COPY FREEZE freeze correctly. Amit Kapila and Dilip Kumar traded patches to fix an infelicity between logical_work_mem and logical streaming of large in-progress transactions. Amul Sul sent in another revision of a patch to implement ALTER SYSTEM READ ONLY. Álvaro Herrera sent in another revision of a patch to avoid testing for xact commit if tuple is hinted. Atsushi Torikoshi and Fujii Masao traded patches to expose the counters of plancache to pg_prepared_statement. Bharath Rupireddy sent in another revision of a patch to retry cached remote connections for the PostgreSQL FDW. Andrew Dunstan and Nikita Glukhov traded patches to implement the SQL standard SQL/JSON functions. Mark Dilger sent in another revision of a patch to refactor relkind handling by cleaning up the #define RELKIND_XXX stuff using a new RelKind enum and special macros while keeping the relkind fields as type 'char' Justin Pryzby sent in another revision of a patch to do some secondary index access optimizations, and avoid index scans that are inconsistent with partition constraints. Kyotaro HORIGUCHI sent in a patch to explain pqPacketSend more precisely. Andrey V. Lepikhov sent in another revision of a patch to fix another patch that implements CSN snapshots. Alexander Korotkov sent in a patch to Update btree_gist extension for parallel query by marking all functions provided by this extension PARALLEL SAFE. Peter Eisentraut sent in another revision of a patch to pause recovery for insufficient parameter settings. Jehan-Guillaume de Rorthais sent in another revision of a patch to replace buggy ucol_strcoll* funcs with ucol_strcollIter. David G. Johnston sent in a patch to document BC date construction behaviors. Konstantin Knizhnik sent in another revision of a patch to avoid doing autovacuum when not needed. Floris Van Nee sent in another revision of a patch to implement generic index skip scans. Bharath Rupireddy sent in a patch to have SIGHUP for config reload in logical replication launcher. Tom Lane sent in a patch to remember fseek positions with a custom dump. Justin Pryzby sent in two more revisions of a patch to make pg_ls_* functions show directories and shared filesets. Peter Geoghegan sent in another revision of a patch to rename the hash_mem local variable and add a hash_mem_multiplier GUC. Daniel Gustafsson sent in another revision of a patch to support libnss for as TLS backend. Kyotaro HORIGUCHI sent in a patch to fix behavior for "cert"+"verify-ca" in pg_hba.conf. The "cert" method in a line in pg_hba.conf is assumed as clientcert="verify_full" and if we set it to "verify-ca", it is just ignored. Since we explicitly reject "no-verify" in that case so we should reject verify-ca as well. Andres Freund sent in another revision of a patch to make snapshots more scalable. Amit Langote sent in another revision of a patch to make COPY FROM work faster when loading tables with foreign partitions. Amit Kapila sent in a patch to add a view to monitor replication slots. Grigory Kryachko sent in another revision of a patch to include the access method in listTables output. Pavel Stěhule sent in another revision of a patch to allow CachedPlans for CALL statements. David G. Johnston sent in a patch to improve the "managing databases overview" doc page. Amit Kapila sent in a patch to Fix comments in heapam.c. After commits 85f6b49c2c and 3ba59ccc89, we can allow parallel inserts which was earlier not possible as parallel group members won't conflict for relation extension and page lock. In those commits, we forgot to update comments at few places. Vigneshwaran C sent in two more revisions of a patch to implement COPY in parallel. Tom Lane sent in a patch to ensure that NaN divided by zero yields NaN. Tom Lane sent in two revisions of a patch to fix a problem that manifested as wrong results from in_range() tests with infinite offset. Peter Eisentraut sent in another revision of a patch to define OPENSSL_API_COMPAT. Joe Wildish sent in a patch to support queries in the WHEN expression of statement triggers. Michaël Paquier and Vigneshwaran C traded patches to add tab completion for the missing options in copy statement. Rémi Lapeyre sent in four more revisions of a patch to add header support to "COPY TO" text format. Surafel Temesgen sent in another revision of a patch to implement system-versioned temporal tables. Peter Eisentraut sent in a patch to rename configure.in to configure.ac. Dilip Kumar sent in a patch to provide a GUC to allow vacuum to continue on corrupted tuple. Bharah Rupireddy sent in a patch to avoid useless buffer allocations during binary COPY FROM. Vigneshwaran C sent in a patch to Adjust minor comment in nodeIncrementalSort.c. Andy Fan sent in another revision of a patch to track uniqueness with UniqueKey. Tom Lane sent in a patch to fix initdb's unsafe not-null-marking rule. Justin Pryzby sent in a patch to fix the patch that implements generic type subscripting.
В списке pgsql-announce по дате отправления:
Следующее
От: "Jonathan S. Katz"Дата:
Сообщение: Crunchy PostgreSQL Operator 4.4: Clone from pgBackRest Repo, S3 Improvements, Certificate Auth for Replication, Helm Chart