{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":423810080,"defaultBranch":"master","name":"IvorySQL","ownerLogin":"IvorySQL","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2021-11-02T11:04:59.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/93546772?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1712818457.0","currentOid":""},"activityList":{"items":[{"before":"fb2993b1992844580d804aa9617b9a250f50acd7","after":"464c70c26ac9eb6a9c3eaaa4cc29232ac9a177c7","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-05-22T07:00:26.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Merge pull request #667 from jiaoshuntian/backpatch_663\n\nFix: Support for SYSDATE & SYSTIMESTAMP (#663)","shortMessageHtmlLink":"Merge pull request #667 from jiaoshuntian/backpatch_663"}},{"before":"4d9b9f015c1a032419489533e968790808fa5f7f","after":"62f7c9174520e8bd2a4ec9c2467b5b710283d262","ref":"refs/heads/master","pushedAt":"2024-05-22T06:57:57.000Z","pushType":"pr_merge","commitsCount":4,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Merge pull request #666 from bigplaice/sequence_to_master\n\nOracle compatible sequence feature for IvorySQL","shortMessageHtmlLink":"Merge pull request #666 from bigplaice/sequence_to_master"}},{"before":"a4c6b5d31c46075763065bfb8aa921899cd465e9","after":"4d9b9f015c1a032419489533e968790808fa5f7f","ref":"refs/heads/master","pushedAt":"2024-05-17T00:48:03.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Merge pg master to 2023.12.31 (#664)\n\n* Doc: un-break PDF build.\r\n\r\nOversight in 5c4c7efad: gotta adjust the cell height for removal of\r\nan entry. Per buildfarm.\r\n\r\n* doc: improve ALTER TABLE \"offical constraint\" wording\r\n\r\nReported-by: Josh Kupershmidt\r\n\r\nDiscussion: https://postgr.es/m/CAK3UJRF=KY_nx_TRQq+t6jOrtS2rry79ktkzPiMDhFx_K=dZAg@mail.gmail.com\r\n\r\nAuthor: Josh Kupershmidt\r\n\r\nBackpatch-through: master\r\n\r\n* doc: gin_page_opaque_info() must be a _compressed_ GIN page\r\n\r\nReported-by: Jeff Janes\r\n\r\nDiscussion: https://postgr.es/m/CAMkU=1xvzQxTAiYNM2PWJ6snMTPh3u3Ammbwss7mvAShS2Ohww@mail.gmail.com\r\n\r\nAuthor: Jeff Janes\r\n\r\nBackpatch-through: master\r\n\r\n* Use SECS_PER_HOUR macro in tzparser.c, instead of constants\r\n\r\nReported-by: CharSyam\r\n\r\nDiscussion: https://postgr.es/m/CAMrLSE5j_aWfoBDMrSvk14oBKSy+-2cjzNNH_FciirA7Kwo9TA@mail.gmail.com\r\n\r\nAuthor: CharSyam\r\n\r\nBackpatch-through: master\r\n\r\n* C comment: clarify that WAL files can be _recycled_ or removed\r\n\r\nReported-by: Michael Paquier\r\n\r\nDiscussion: https://postgr.es/m/CAB7nPqSDdF0heotQU3gsepgqx+9c+6KjLd3R6aNYH7KKfDd2ig@mail.gmail.com\r\n\r\nAuthor: Michael Paquier\r\n\r\nBackpatch-through: master\r\n\r\n* C comment: add header to pg_test_fsync.c\r\n\r\nReported-by: Michael Paquier\r\n\r\nDiscussion: https://postgr.es/m/CAB7nPqT1c9WrUw4+eSGF_-ru7ERBOC50a4r3tS1s-yT4OaYsLg@mail.gmail.com\r\n\r\nAuthor: Michael Paquier\r\n\r\nBackpatch-through: master\r\n\r\n* Reuse BrinDesc and BrinRevmap in brininsert\r\n\r\nThe brininsert code used to initialize (and destroy) BrinDesc and\r\nBrinRevmap for each tuple, which is not free. This patch initializes\r\nthese structures only once, and reuses them for all inserts in the same\r\ncommand. The data is passed through indexInfo->ii_AmCache.\r\n\r\nThis also introduces an optional AM callback \"aminsertcleanup\" that\r\nallows performing custom cleanup in case simply pfree-ing ii_AmCache is\r\nnot sufficient (which is the case when the cache contains TupleDesc,\r\nBuffers, and so on).\r\n\r\nAuthor: Soumyadeep Chakraborty\r\nReviewed-by: Alvaro Herrera, Matthias van de Meent, Tomas Vondra\r\nDiscussion: https://postgr.es/m/CAE-ML%2B9r2%3DaO1wwji1sBN9gvPz2xRAtFUGfnffpd0ZqyuzjamA%40mail.gmail.com\r\n\r\n* Use fipshash in brin_multi test\r\n\r\nThis fixes some md5() calls that snuck in in 0457109344 after we had\r\nremoved them all in 208bf364a9.\r\n\r\nReviewed-by: Tomas Vondra \r\nDiscussion: https://www.postgresql.org/message-id/a35eaf0f-b19c-7797-e296-7b7e2adc473e@eisentraut.org\r\n\r\n* update IvorySQL regression test with pg commit 86b64ba\r\n\r\n* Fix brin.c indentation issues introduced by c1ec02be1d\r\n\r\nPer buildfarm member koel.\r\n\r\n* Doc: list AT TIME ZONE and COLLATE in operator precedence table.\r\n\r\nThese constructs have precedence, but we forgot to list them.\r\nIn HEAD, mention AT LOCAL as well as AT TIME ZONE.\r\n\r\nPer gripe from Shay Rojansky.\r\n\r\nDiscussion: https://postgr.es/m/CADT4RqBPdbsZW7HS1jJP319TMRHs1hzUiP=iRJYR6UqgHCrgNQ@mail.gmail.com\r\n\r\n* update ora_gram.y with pg commit 3558f12\r\n\r\n* Update comments for pg_statistic catalog table\r\n\r\nMake a reminder that pg_stats view needs to be modified whenever a new slot\r\nkind is added. To prevent situations like 918eee0c49 when pg_stats was\r\nforgotten to be updated.\r\n\r\nAlso, revise the comment that only non-null, non-empty rows are considered\r\nfor the range length histogram.\r\n\r\nDiscussion: https://postgr.es/m/flat/b67d8b57-9357-7e82-a2e7-f6ce6eaeec67@postgrespro.ru\r\nAuthor: Egor Rogov, Soumyadeep Chakraborty\r\nReviewed-by: Tomas Vondra, Justin Pryzby, Jian He\r\n\r\n* Display length and bounds histograms in pg_stats\r\n\r\nValues corresponding to STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM and\r\nSTATISTIC_KIND_BOUNDS_HISTOGRAM were not exposed to pg_stats when these\r\nslot kinds were introduced in 918eee0c49.\r\n\r\nThis commit adds the missing fields to pg_stats.\r\n\r\nCatversion is bumped.\r\n\r\nDiscussion: https://postgr.es/m/flat/b67d8b57-9357-7e82-a2e7-f6ce6eaeec67@postgrespro.ru\r\nAuthor: Egor Rogov, Soumyadeep Chakraborty\r\nReviewed-by: Tomas Vondra, Justin Pryzby, Jian He\r\n\r\n* update IvorySQL regression test with pg commit bc3c8db\r\n\r\n* Fix race condition with BIO methods initialization in libpq with threads\r\n\r\nThe libpq code in charge of creating per-connection SSL objects was\r\nprone to a race condition when loading the custom BIO methods needed by\r\nmy_SSL_set_fd(). As BIO methods are stored as a static variable, the\r\ninitialization of a connection could fail because it could be possible\r\nto have one thread refer to my_bio_methods while it is being manipulated\r\nby a second concurrent thread.\r\n\r\nThis error has been introduced by 8bb14cdd33de, that has removed\r\nssl_config_mutex around the call of my_SSL_set_fd(), that itself sets\r\nthe custom BIO methods used in libpq. Like previously, the BIO method\r\ninitialization is now protected by the existing ssl_config_mutex, itself\r\ninitialized earlier for WIN32.\r\n\r\nWhile on it, document that my_bio_methods is protected by\r\nssl_config_mutex, as this can be easy to miss.\r\n\r\nReported-by: Willi Mann\r\nAuthor: Willi Mann, Michael Paquier\r\nDiscussion: https://postgr.es/m/e77abc4c-4d03-4058-a9d7-ef0035657e04@celonis.com\r\nBackpatch-through: 12\r\n\r\n* Add NOT NULL checking of pg_stat_statements_reset() in tests\r\n\r\nThis is preliminary patch. It adds NOT NULL checking for the result of\r\npg_stat_statements_reset() function. It is needed for upcoming patch\r\n\"Track statement entry timestamp\" that will change the result type of\r\nthis function to the timestamp of a reset performed.\r\n\r\nDiscussion: https://postgr.es/m/flat/72e80e7b160a6eb189df9ef6f068cce3765d37f8.camel%40moonset.ru\r\nAuthor: Andrei Zubkov\r\nReviewed-by: Julien Rouhaud, Hayato Kuroda, Yuki Seino, Chengxi Sun\r\nReviewed-by: Anton Melnikov, Darren Rush, Michael Paquier, Sergei Kornilov\r\nReviewed-by: Alena Rybakina, Andrei Lepikhov\r\n\r\n* update IvorySQL regression test with pg commit 6ab1dbd\r\n\r\n* Track statement entry timestamp in contrib/pg_stat_statements\r\n\r\nThis patch adds 'stats_since' and 'minmax_stats_since' columns to the\r\npg_stat_statements view and pg_stat_statements() function. The new min/max\r\nreset mode for the pg_stat_stetments_reset() function is controlled by the\r\nparameter minmax_only.\r\n\r\n'stat_since' column is populated with the current timestamp when a new\r\nstatement is added to the pg_stat_statements hashtable. It provides clean\r\ninformation about statistics collection time intervals for each statement.\r\nBesides it can be used by sampling solutions to detect situations when a\r\nstatement was evicted and stored again between samples.\r\n\r\nSuch a sampling solution could derive any pg_stat_statements statistic values\r\nfor an interval between two samples with the exception of all min/max\r\nstatistics. To address this issue this patch adds the ability to reset\r\nmin/max statistics independently of the statement reset using the new\r\nminmax_only parameter of the pg_stat_statements_reset(userid oid, dbid oid,\r\nqueryid bigint, minmax_only boolean) function. The timestamp of such reset\r\nis stored in the minmax_stats_since field for each statement.\r\npg_stat_statements_reset() function now returns the timestamp of a reset as the\r\nresult.\r\n\r\nDiscussion: https://postgr.es/m/flat/72e80e7b160a6eb189df9ef6f068cce3765d37f8.camel%40moonset.ru\r\nAuthor: Andrei Zubkov\r\nReviewed-by: Julien Rouhaud, Hayato Kuroda, Yuki Seino, Chengxi Sun\r\nReviewed-by: Anton Melnikov, Darren Rush, Michael Paquier, Sergei Kornilov\r\nReviewed-by: Alena Rybakina, Andrei Lepikhov\r\n\r\nConflicts:\r\n\tcontrib/pg_stat_statements/Makefile\r\n\r\n* update IvorySQL regression test with pg commit dc9f8a7\r\n\r\n* Avoid unconditionally filling in missing values with NULL in pgoutput.\r\n\r\n52e4f0cd4 introduced a bug in pgoutput in which missing values in tuples\r\nwere incorrectly filled in with NULL. The problem was the use of\r\nCreateTupleDescCopy where CreateTupleDescCopyConstr was required, as the\r\nformer drops the constraints in the tuple description (specifically, the\r\ndefault value constraint) on the floor.\r\n\r\nThe bug could result in incorrectness when a table replicated via\r\n`REPLICA IDENTITY FULL` underwent a schema change that added a column\r\nwith a default value. The problem is that in such cases updates fill NULL\r\nvalues in old tuples for missing columns for default values. Then on the\r\nsubscriber, we failed to find a matching tuple and missed updating the\r\nrequired row.\r\n\r\nAuthor: Nikhil Benesch\r\nReviewed-by: Hou Zhijie, Amit Kapila\r\nBackpatch-through: 15\r\nDiscussion: http://postgr.es/m/CAPWqQZTEpZQamYsGMn6ZDRvVywwpVPiKH6OY4KSgA+NmeqFNzA@mail.gmail.com\r\n\r\n* update IvorySQL regression test with pg commit 360392f\r\n\r\n* Reduce rate of walwriter wakeups due to async commits.\r\n\r\nXLogSetAsyncXactLSN(), called at asynchronous commit, would wake up\r\nwalwriter every time the LSN advances, but walwriter doesn't actually\r\ndo anything unless it has at least 'wal_writer_flush_after' full\r\nblocks of WAL to write. Repeatedly waking up walwriter to do nothing\r\nis a waste of CPU cycles in both walwriter and the backends doing the\r\nwakeups. To fix, apply the same logic in XLogSetAsyncXactLSN() to\r\ndecide whether to wake up walwriter, as walwriter uses to determine if\r\nit has any work to do.\r\n\r\nIn the passing, rename misleadingly named 'flushbytes' local variable\r\nto 'flushblocks'.\r\n\r\nAuthor: Andres Freund, Heikki Linnakangas\r\nDiscussion: https://www.postgresql.org/message-id/20231024230929.vsc342baqs7kmbte@awork3.anarazel.de\r\n\r\n* Check if ii_AmCache is NULL in aminsertcleanup\r\n\r\nFix a bug introduced by c1ec02be1d79. It may happen that the executor\r\nopens indexes on the result relation, but no rows end up being inserted.\r\nThen the index_insert_cleanup still gets executed, but passes down NULL\r\nto the AM callback. The AM callback may not expect this, as is the case\r\nof brininsertcleanup, leading to a crash.\r\n\r\nFixed by only calling the cleanup callback if (ii_AmCache != NULL). This\r\nway the AM can simply assume to only see a valid cache.\r\n\r\nReported-by: Richard Guo\r\nDiscussion: https://postgr.es/m/CAMbWs4-w9qC-o9hQox9UHvdVZAYTp8OrPQOKtwbvzWaRejTT=Q@mail.gmail.com\r\n\r\n* update IvorySQL regression test with pg commit a82ee7e\r\n\r\n* Fix CREATE INDEX CONCURRENTLY example\r\n\r\nIt fails to use the CONCURRENTLY keyword where it was necessary, so add\r\nit. This text was added to pg11 in commit 5efd604ec0a3; backpatch to pg12.\r\n\r\nAuthor: Nikolay Samokhvalov \r\nDiscussion: https://postgr.es/m/CAM527d9iz6+=_c7EqSKaGzjqWvSeCeRVVvHZ1v3gDgjTtvgsbw@mail.gmail.com\r\n\r\n* Retire a few backwards compatibility macros.\r\n\r\nAs of commits dd04e958c8 and 1833f1a1c3, tuplestore_donestoring(),\r\nSPI_push(), SPI_pop(), SPI_push_conditional(),\r\nSPI_pop_conditional(), and SPI_restore_connection() are no-op\r\nmacros provided for backwards compatibility. This commit removes\r\nthese macros, so any uses in third-party code will need to be\r\nremoved, too. Since these macros have been no-ops for a while,\r\nsuch adjustments won't produce any behavior changes for all\r\ncurrently-supported versions of PostgreSQL.\r\n\r\nAuthor: Bharath Rupireddy\r\nDiscussion: https://postgr.es/m/CALj2ACVeO58JM5tK2Qa8QC-%3DkC8sdkJOTd4BFU%3DK8zs4gGYpjQ%40mail.gmail.com\r\n\r\n* Don't use bms_membership() in cases where we don't need to\r\n\r\n00b41463c adjusted Bitmapset so that an empty set is always represented\r\nas NULL. This makes checking for empty sets far cheaper than it used\r\nto be.\r\n\r\nThere were various places in the code where we'd call bms_membership()\r\nto handle the 3 possible BMS_Membership values. For the BMS_SINGLETON\r\ncase, we'd also call bms_singleton_member() to find the single set member.\r\nThis can now be done in a more optimal way by first checking if the set is\r\nNULL and then not bothering with bms_membership() and simply call\r\nbms_get_singleton_member() instead to find the single member. This\r\nfunction will return false if there are multiple members in the set.\r\n\r\nHere we also tidy up some logic in examine_variable() for the single\r\nmember case. There's now no need to call bms_is_member() as we've\r\nalready established that we're working with a singleton Bitmapset, so we\r\ncan just check if varRelid matches the singleton member.\r\n\r\nReviewed-by: Richard Guo\r\nDiscussion: https://postgr.es/m/CAApHDvqW+CxNPcY245GaWiuqkkqgTudtG2ncGvvSjGn2wdTZLA@mail.gmail.com\r\n\r\n* Add CHECK_FOR_INTERRUPTS() in scram_SaltedPassword() for the backend\r\n\r\nscram_SaltedPassword() could take a long time to compute when the number\r\nof iterations used is large enough, and this code uses a tight loop to\r\ncompute a salted password.\r\n\r\nNote that the same issue exists in libpq when using \\password and a\r\nlarge iteration number, but this cannot be interrupted. A CFI in the\r\nbackend is useful for server-side computations, at least.\r\n\r\nBackpatch down to 16, where the user-settable GUC scram_iterations has\r\nbeen added.\r\n\r\nAuthor: Bowen Shi\r\nReviewed-by: Aleksander Alekseev, Daniel Gustafsson\r\nDiscussion: https://postgr.es/m/CAM_vCueV6xfr08KczfaCEk5J_qeTZtgqN7+orkNLx=g+phE82Q@mail.gmail.com\r\nBackpatch-through: 16\r\n\r\n* Fix comment in tableam.h about GetHeapamTableAmRoutine()\r\n\r\nThis routine is located in heapam_handler.c, not tableamapi.c. Issue\r\nnoted while hacking the area for a different patch.\r\n\r\nReviewed-by: Richard Guo\r\nDiscussion: https://postgr.es/m/ZWQuHltp2KS_0Cct@paquier.xyz\r\n\r\n* Remove test for pg_stat_reset_shared() in stats.sql\r\n\r\nSome buildfarm members have been failing a test related to pg_stat_io,\r\nas an effect of 23c8c0c8f472 that has switched pg_stat_reset_shared()\r\nfrom being a no-op to reset all shared stats types.\r\n\r\nThis extra reset has the effect to make pg_stat_io's counters low enough\r\nthat little concurrent activity is enough to cause a failure. Another\r\nthing I have considered is to move this sequence at the end of\r\nstats.sql, but there are other instabilities, one being pg_stat_wal.\r\n\r\nKnowing that there are already tests for the reset of each individual\r\nshared stats target, this test has limited value, so let's remove it to\r\nminimize the number of resets done for each shared stats type. This\r\nshould hopefully improve the stability of the whole.\r\n\r\nDiscussion: https://postgr.es/m/3500949.1700935734@sss.pgh.pa.us\r\n\r\n* psql: Add tab completion for view options.\r\n\r\nAdd support for tab completion of WITH (...) options to CREATE VIEW,\r\nand for the corresponding SET/RESET (...) options in ALTER VIEW.\r\n\r\nChristoph Heiss, reviewed by Melih Mutlu, Vignesh C, Jim Jones,\r\nMikhail Gribkov, David Zhang, Shubham Khanna, and me.\r\n\r\nDiscussion: https://postgr.es/m/a2075c5a-66f9-a564-f038-9ac044b03117@c8h4.io\r\n\r\n* Fix assertions with RI triggers in heap_update and heap_delete.\r\n\r\nIf the tuple being updated is not visible to the crosscheck snapshot,\r\nwe return TM_Updated but the assertions would not hold in that case.\r\nMove them to before the cross-check.\r\n\r\nFixes bug #17893. Backpatch to all supported versions.\r\n\r\nAuthor: Alexander Lakhin\r\nBackpatch-through: 12\r\nDiscussion: https://www.postgresql.org/message-id/17893-35847009eec517b5%40postgresql.org\r\n\r\n* update IvorySQL regression test with pg commit 60f2273\r\n\r\n* Remove more statements from stats.sql\r\n\r\nSome of the statements capturing stats reset timestamps have become\r\nunnecessary after a9a8108411e4, so let's remove them.\r\n\r\nAuthor: Bharath Rupireddy\r\nDiscussion: https://postgr.es/m/CALj2ACUnvB_Yo=O1xApBa4CDqQpW-x=QM35GBN1MqVRAxAGXEg@mail.gmail.com\r\n\r\n* Fix comment about ressortgrouprefs being unique in setop plans.\r\n\r\nAuthor: Richard Guo, Tom Lane\r\nDiscussion: https://www.postgresql.org/message-id/CAMbWs49rAfFS-yd7=QxtDUrZDFfRBGy4rGBJNyGDH7=CLipFPg@mail.gmail.com\r\n\r\n* Use BIO_{get,set}_app_data instead of BIO_{get,set}_data.\r\n\r\nWe should have done it this way all along, but we accidentally got\r\naway with using the wrong BIO field up until OpenSSL 3.2. There,\r\nthe library's BIO routines that we rely on use the \"data\" field\r\nfor their own purposes, and our conflicting use causes assorted\r\nweird behaviors up to and including core dumps when SSL connections\r\nare attempted. Switch to using the approved field for the purpose,\r\ni.e. app_data.\r\n\r\nWhile at it, remove our configure probes for BIO_get_data as well\r\nas the fallback implementation. BIO_{get,set}_app_data have been\r\nthere since long before any OpenSSL version that we still support,\r\neven in the back branches.\r\n\r\nAlso, update src/test/ssl/t/001_ssltests.pl to allow for a minor\r\nchange in an error message spelling that evidently came in with 3.2.\r\n\r\nTristan Partin and Bo Andreson. Back-patch to all supported branches.\r\n\r\nDiscussion: https://postgr.es/m/CAN55FZ1eDDYsYaL7mv+oSLUij2h_u6hvD4Qmv-7PK7jkji0uyQ@mail.gmail.com\r\n\r\n* update IvorySQL regression test with pg commit c82207a\r\n\r\n* Clean up usage of bison precedence for non-operator keywords.\r\n\r\nAssigning a precedence to a keyword that isn't a kind of expression\r\noperator is rather dangerous, because it might mask grammar\r\nambiguities that we'd rather know about. It's much safer to attach\r\nexplicit precedences to individual rules, which will affect the\r\nbehavior of only that one rule. Moreover, when we do have to give\r\na precedence to a non-operator keyword, we should try to give it the\r\nsame precedence as IDENT, thereby reducing the risk of surprising\r\nside-effects.\r\n\r\nApply this hard-won knowledge to SET (which I misassigned ages ago\r\nin commit 2647ad658) and some SQL/JSON-related productions\r\n(from commits 6ee30209a, 71bfd1543).\r\n\r\nPatch HEAD only, since there's no evidence of actual bugs here.\r\n\r\nDiscussion: https://postgr.es/m/CADT4RqBPdbsZW7HS1jJP319TMRHs1hzUiP=iRJYR6UqgHCrgNQ@mail.gmail.com\r\n\r\n* update ora_gram.y with pg commit a916b47\r\n\r\n* Index SLRUs by 64-bit integers rather than by 32-bit integers\r\n\r\nWe've had repeated bugs in the area of handling SLRU wraparound in the past,\r\nsome of which have caused data loss. Switching to an indexing system for SLRUs\r\nthat does not wrap around should allow us to get rid of a whole bunch\r\nof problems and improve the overall reliability of the system.\r\n\r\nThis particular patch however only changes the indexing and doesn't address\r\nthe wraparound per se. This is going to be done in the following patches.\r\n\r\nAuthor: Maxim Orlov, Aleksander Alekseev, Alexander Korotkov, Teodor Sigaev\r\nAuthor: Nikita Glukhov, Pavel Borisov, Yura Sokolov\r\nReviewed-by: Jacob Champion, Heikki Linnakangas, Alexander Korotkov\r\nReviewed-by: Japin Li, Pavel Borisov, Tom Lane, Peter Eisentraut, Andres Freund\r\nReviewed-by: Andrey Borodin, Dilip Kumar, Aleksander Alekseev\r\nDiscussion: https://postgr.es/m/CACG%3DezZe1NQSCnfHOr78AtAZxJZeCvxrts0ygrxYwe%3DpyyjVWA%40mail.gmail.com\r\nDiscussion: https://postgr.es/m/CAJ7c6TPDOYBYrnCAeyndkBktO0WG2xSdYduTF0nxq%2BvfkmTF5Q%40mail.gmail.com\r\n\r\n* update IvorySQL regression test with pg commit 4ed8f09\r\n\r\n* Use larger segment file names for pg_notify\r\n\r\nThis avoids the wraparound in async.c and removes the corresponding code\r\ncomplexity. The maximum amount of allocated SLRU pages for NOTIFY / LISTEN\r\nqueue is now determined by the max_notify_queue_pages GUC. The default\r\nvalue is 1048576. It allows to consume up to 8 GB of disk space which is\r\nexactly the limit we had previously.\r\n\r\nAuthor: Maxim Orlov, Aleksander Alekseev, Alexander Korotkov, Teodor Sigaev\r\nAuthor: Nikita Glukhov, Pavel Borisov, Yura Sokolov\r\nReviewed-by: Jacob Champion, Heikki Linnakangas, Alexander Korotkov\r\nReviewed-by: Japin Li, Pavel Borisov, Tom Lane, Peter Eisentraut, Andres Freund\r\nReviewed-by: Andrey Borodin, Dilip Kumar, Aleksander Alekseev\r\nDiscussion: https://postgr.es/m/CACG%3DezZe1NQSCnfHOr78AtAZxJZeCvxrts0ygrxYwe%3DpyyjVWA%40mail.gmail.com\r\nDiscussion: https://postgr.es/m/CAJ7c6TPDOYBYrnCAeyndkBktO0WG2xSdYduTF0nxq%2BvfkmTF5Q%40mail.gmail.com\r\n\r\n* Make use FullTransactionId in 2PC filenames\r\n\r\nSwitch from using TransactionId to FullTransactionId in naming of 2PC files.\r\nTransaction state file in the pg_twophase directory now have extra 8 bytes in\r\nthe name to address an epoch of a given xid.\r\n\r\nAuthor: Maxim Orlov, Aleksander Alekseev, Alexander Korotkov, Teodor Sigaev\r\nAuthor: Nikita Glukhov, Pavel Borisov, Yura Sokolov\r\nReviewed-by: Jacob Champion, Heikki Linnakangas, Alexander Korotkov\r\nReviewed-by: Japin Li, Pavel Borisov, Tom Lane, Peter Eisentraut, Andres Freund\r\nReviewed-by: Andrey Borodin, Dilip Kumar, Aleksander Alekseev\r\nDiscussion: https://postgr.es/m/CACG%3DezZe1NQSCnfHOr78AtAZxJZeCvxrts0ygrxYwe%3DpyyjVWA%40mail.gmail.com\r\nDiscussion: https://postgr.es/m/CAJ7c6TPDOYBYrnCAeyndkBktO0WG2xSdYduTF0nxq%2BvfkmTF5Q%40mail.gmail.com\r\n\r\n* Add SLRU tests for 64-bit page case\r\n\r\n4ed8f0913b added 64-bit page numbering for SLRU. This commit adds tests for\r\npage numbers higher than 2^32.\r\n\r\nAuthor: Maxim Orlov\r\nReviewed-by: Aleksander Alekseev, Alexander Korotkov\r\nDiscussion: https://postgr.es/m/CACG%3DezZe1NQSCnfHOr78AtAZxJZeCvxrts0ygrxYwe%3DpyyjVWA%40mail.gmail.com\r\nDiscussion: https://postgr.es/m/CAJ7c6TPDOYBYrnCAeyndkBktO0WG2xSdYduTF0nxq%2BvfkmTF5Q%40mail.gmail.com\r\n\r\n* update IvorySQL regression test with pg commit a60b8a5\r\n\r\n* Optimize pg_readv/pg_pwritev single vector case.\r\n\r\nFor the trivial case of iovcnt == 1, kernels are measurably slower at\r\ndealing with the more complex arguments of preadv/pwritev than the\r\nequivalent plain old pread/pwrite. The overheads are worth it for\r\niovcnt > 1, but for 1 let's just redirect to the cheaper calls. While\r\nwe could leave it to callers to worry about that, we already have to\r\nhave our own pg_ wrappers for portability reasons so it seems\r\nreasonable to centralize this knowledge there (thanks to Heikki for this\r\nsuggestion). Try to avoid function call overheads by making them\r\ninlinable, which might also allow the compiler to avoid the branch in\r\nsome cases. For systems that don't have preadv and pwritev (currently:\r\nWindows and [closed] Solaris), we might as well pull the replacement\r\nfunctions up into the static inline functions too.\r\n\r\nReviewed-by: Heikki Linnakangas \r\nDiscussion: https://postgr.es/m/CA+hUKGJkOiOCa+mag4BF+zHo7qo=o9CFheB8=g6uT5TUm2gkvA@mail.gmail.com\r\n\r\n* Read include/exclude commands for dump/restore from file\r\n\r\nWhen there is a need to filter multiple tables with include and/or exclude\r\noptions it's quite possible to run into the limitations of the commandline.\r\nThis adds a --filter=FILENAME feature to pg_dump, pg_dumpall and pg_restore\r\nwhich is used to supply a file containing object exclude/include commands\r\nwhich work just like their commandline counterparts. The format of the file\r\nis one command per row like:\r\n\r\n \r\n\r\n can be \"include\" or \"exclude\", can be table_data, index\r\ntable_data_and_children, database, extension, foreign_data, function, table\r\nschema, table_and_children or trigger.\r\n\r\nThis patch has gone through many revisions and design changes over a long\r\nperiod of time, the list of reviewers reflect reviewers of some version of\r\nthe patch, not necessarily the final version.\r\n\r\nPatch by Pavel Stehule with some additional hacking by me.\r\n\r\nAuthor: Pavel Stehule \r\nReviewed-by: Justin Pryzby \r\nReviewed-by: vignesh C \r\nReviewed-by: Dean Rasheed \r\nReviewed-by: Tomas Vondra \r\nReviewed-by: Julien Rouhaud \r\nReviewed-by: Erik Rijkers \r\nDiscussion: https://postgr.es/m/CAFj8pRB10wvW0CC9Xq=1XDs=zCQxer3cbLcNZa+qiX4cUH-G_A@mail.gmail.com\r\n\r\nConflicts:\r\n\tsrc/bin/pg_dump/pg_dumpall.c\r\n\r\n* Fix typo in comment\r\n\r\nSpotted while looking over changes for another patch.\r\n\r\n* Fix BackgroundPsql's set_query_timer_restart() issue without argument.\r\n\r\nThe set_query_timer_restart() required an argument to define a value\r\nto query_timer_restart, but none of the existing callers passes an\r\nargument to this function.\r\n\r\nThis changes the function to set a value without an argument.\r\n\r\nBackpatch through 16 where the background psql TAP functions were\r\nrefactored by 664d757531e1.\r\n\r\nReviewed-by: Bharath Rupireddy, Tom Lane\r\nDiscussion: https://postgr.es/m/CAD21AoA0B6VKe_5A9nZi8i5umwSN-zJJuPVNht9DaOZ9SJumMA@mail.gmail.com\r\nBackpatch-through: 16\r\n\r\n* update IvorySQL regression test with pg commit f99dd98\r\n\r\n* Fix wrong description of BackgroundPsql's timeout.\r\n\r\nBackpatch through 16 where this was introduced by 664d757531e1.\r\n\r\nReviewed-by: Daniel Gustafsson\r\nBackpatch-through: 16\r\nDiscussion: http://postgr.es/m/CAD21AoBXMEqDBLoDuAWVWoTLYB4aNsxx4oYNmyJJbhfq_vGQBQ@mail.gmail.com\r\n\r\n* update IvorySQL regression test with pg commit 5abff2a\r\n\r\n* Fix a test in 003_logical_slots.\r\n\r\nWe allow to upgrade the slot iff there is no pending WAL to be processed.\r\nThe test first disables the subscription to avoid unnecessary LOGs on the\r\nsubscriber and then stops the publisher node. It is quite possible that\r\njust before the shutdown of the publisher, autovacuum generates some WAL\r\nrecord that needs to be processed, so just disable the autovacuum for this\r\ntest.\r\n\r\nPer buildfarm.\r\n\r\nAuthor: Hayato Kuroda\r\nReviewed-by: Amit Kapila\r\nDiscussion: http://postgr.es/m/OS3PR01MB9882FED1F0060468FB01B9DAF583A@OS3PR01MB9882.jpnprd01.prod.outlook.com\r\n\r\n* Improve \"user mapping not found\" error message\r\n\r\nDisplay the name of the foreign server for which the user mapping was\r\nnot found.\r\n\r\nAuthor: Ian Lawrence Barwick \r\nReviewed-by: Laurenz Albe \r\nReviewed-by: Peter Eisentraut \r\nDiscussion: https://www.postgresql.org/message-id/flat/CAB8KJ=jFzNaeyFtLcTZNOc6fd1+F93pGVLFa-wyt31wn7VNxqQ@mail.gmail.com\r\n\r\n* Remove unused macro\r\n\r\nUsage was removed in a33e17f210 but the definition was not removed.\r\n\r\n* Add option to specify timeout seconds to BackgroundPsql.pm.\r\n\r\nPreviously, a background psql session uses the default timeout and it\r\ncannot be overridden. This change adds a new option to set the timeout\r\nduring start.\r\n\r\nThere are no users of this new option. It is needed for an upcoming\r\npatch adding tests for XID wraparound.\r\n\r\nReviewed-by: Daniel Gustafsson, Noah Misch\r\nDiscussion: https://postgr.es/m/C9CF2F76-0D81-4C9D-9832-202BE8517056%40yesql.se\r\n\r\nConflicts:\r\n\tsrc/test/perl/PostgreSQL/Test/BackgroundPsql.pm\r\n\r\n* update IvorySQL regression test with pg commit 334f512\r\n\r\n* Apply quotes more consistently to GUC names in logs\r\n\r\nQuotes are applied to GUCs in a very inconsistent way across the code\r\nbase, with a mix of double quotes or no quotes used. This commit\r\nremoves double quotes around all the GUC names that are obviously\r\nreferred to as parameters with non-English words (use of underscore,\r\nmixed case, etc).\r\n\r\nThis is the result of a discussion with Álvaro Herrera, Nathan Bossart,\r\nLaurenz Albe, Peter Eisentraut, Tom Lane and Daniel Gustafsson.\r\n\r\nAuthor: Peter Smith\r\nDiscussion: https://postgr.es/m/CAHut+Pv-kSN8SkxSdoHano_wPubqcg5789ejhCDZAcLFceBR-w@mail.gmail.com\r\n\r\n* update IvorySQL regression test with pg commit 8d9978a\r\n\r\n* doc: Mention how to use quotes with GUC names in error messages\r\n\r\nQuotes should not be used except if a GUC name is a natural English\r\nword.\r\n\r\nAuthor: Álvaro Herrera\r\nDiscussion: https://postgr.es/m/CAHut+Pv-kSN8SkxSdoHano_wPubqcg5789ejhCDZAcLFceBR-w@mail.gmail.com\r\n\r\n* Add tests for XID wraparound.\r\n\r\nThe test module includes helper functions to quickly burn through lots\r\nof XIDs. They are used in the tests, and are also handy for manually\r\ntesting XID wraparound.\r\n\r\nSince these tests are very expensive the entire suite is disabled by\r\ndefault. It requires to set PG_TEST_EXTRA to run it.\r\n\r\nReviewed-by: Daniel Gustafsson, John Naylor, Michael Paquier\r\nReviewed-by: vignesh C\r\nAuthor: Heikki Linnakangas, Masahiko Sawada, Andres Freund\r\nDiscussion: https://www.postgresql.org/message-id/CAD21AoDVhkXp8HjpFO-gp3TgL6tCKcZQNxn04m01VAtcSi-5sA%40mail.gmail.com\r\n\r\n* update IvorySQL regression test with pg commit e255b64\r\n\r\n* meson: Improve/fix Python version selection\r\n\r\nWhen we look for the Python installation using the meson python\r\nmodule, we should make it use the python program previously determined\r\nby the 'PYTHON' option. Otherwise, it will just use its own search\r\nand the 'PYTHON' option won't affect it. We need this to be able to\r\nselect the Python installation to build PL/Python against.\r\n\r\nReviewed-by: Andres Freund \r\nDiscussion: https://www.postgresql.org/message-id/flat/3f5427e8-cef6-474d-ae88-13db1bfdc1a7%40eisentraut.org\r\n\r\n* Remove redundant setting of hashkey after insertion\r\n\r\nIt's not necessary to fill the key field in most cases, since\r\nhash_search has already done that. Some existing call sites have an\r\nassert or comment that this contract has been fulfilled, but those\r\nare quite old and that practice seems unnecessary here.\r\n\r\nWhile at it, remove a nearby redundant assignment that a smart compiler\r\nwill elide anyway.\r\n\r\nZhao Junwang, with some adjustments by me\r\n\r\nReviewed by Nathan Bossart, with additional feedback from Tom Lane\r\n\r\nDiscussion: http://postgr.es/m/CAEG8a3%2BUPF%3DR2QGPgJMF2mKh8xPd1H2TmfH77zPuVUFdBpiGUA%40mail.gmail.com\r\n\r\n* Fix warning due non-standard inline declaration in 4ed8f0913bfdb5f355\r\n\r\nReported-by: Alexander Lakhin, Tom Lane\r\nAuthor: Pavel Borisov\r\nDiscussion: https://postgr.es/m/55d8800f-4a80-5256-1e84-246fbe79acd0@gmail.com\r\n\r\n* Fix array subscript warnings\r\n\r\nCommit a5cf808be55 accidentally passed signed chars to isalpha and\r\nisspace in the parser code which leads to undefined behavior. Fix\r\nby casting the parameters to unsigned chars.\r\n\r\nAuthor: Pavel Stehule \r\nReported-by: Tom Lane \r\nReported-by: Michael Paquier \r\nDiscussion: https://postgr.es/m/388186.1701315586@sss.pgh.pa.us\r\nDiscussion: https://postgr.es/m/ZWgg5xim2CXQcfmh@paquier.xyz\r\n\r\n* Add missing file to nls Makefile\r\n\r\nAuthor: Kyotaro Horiguchi \r\nDiscussion: https://postgr.es/m/20231130.120009.1370713511317755874.horikyota.ntt@gmail.com\r\n\r\n* Fix spelling and punctuation\r\n\r\nRemove trailing periods from pg_log_error emitted strings as only\r\nhint and detail level error messages should be punctuated. Also\r\nreword the usage screen which was missing a word.\r\n\r\nAuthor: Kyotaro Horiguchi \r\nDiscussion: https://postgr.es/m/20231130.105223.554982964895179414.horikyota.ntt@gmail.com\r\nDiscussion: https://postgr.es/m/20231130.103900.2069212175914114279.horikyota.ntt@gmail.com\r\n\r\n* Fix typo in 5a1dfde8334b\r\n\r\nReported-by: Alexander Lakhin\r\nDiscussion: https://postgr.es/m/55d8800f-4a80-5256-1e84-246fbe79acd0@gmail.com\r\n\r\n* Print lwlock stats also for aux processes, when built with LWLOCK_STATS\r\n\r\nInitAuxiliaryProcess() closely resembles InitProcess(), but it didn't\r\ncall InitLWLockAccess(). But because InitLWLockAccess() is a no-op\r\nunless compiled with LWLOCK_STATS, and everything works even if it's\r\nnot called, the only consequence was that the stats were not printed\r\nfor aux processes.\r\n\r\nThis was an oversight in commit 1c6821be31f, in version 9.5, so it is\r\nmissing in all supported branches. But since it only affects\r\ndevelopers using LWLOCK_STATS and no one has complained, no\r\nbackpatching.\r\n\r\nDiscussion: https://www.postgresql.org/message-id/20231130202648.7k6agmuizdilufnv@awork3.anarazel.de\r\n\r\n* Adjust obsolete comment explaining set_stack_base().\r\n\r\nCommit 7389aad6 removed the notion of backends started from inside a\r\nsignal handler. A stray comment still referred to them, while\r\nexplaining the need for a call to set_stack_base(). That leads to the\r\nquestion of whether we still need the call in !EXEC_BACKEND builds.\r\nThere doesn't seem to be much point in suppressing it now, as it doesn't\r\nhurt and probably helps to measure the stack base from the exact same\r\nplace in EXEC_BACKEND and !EXEC_BACKEND builds.\r\n\r\nBack-patch to 16.\r\n\r\nReported-by: Heikki Linnakangas \r\nReported-by: Tristan Partin \r\nReported-by: Andres Freund \r\nDiscussion: https://postgr.es/m/CA%2BhUKG%2BEJHcevNGNOxVWxTNFbuB%3Dvjf4U68%2B85rAC_Sxvy2zEQ%40mail.gmail.com\r\n\r\n* meson: Stop using deprecated way getting path of files\r\n\r\nThe just released meson 1.3 strongly deprecated a hack we were using, emitting\r\na noisy warning (the hack basically depended on an implementation detail to\r\nwork). Turns out there has been a better way available for a while, I just\r\nhadn't found it. 1.4 added a more convenient approach, but we can't rely on\r\nthat.\r\n\r\nReviewed-by: Tristan Partin \r\nDiscussion: https://postgr.es/m/20231129185053.s6c7f73eg7b4ztfi@awork3.anarazel.de\r\nBackpatch: 16-, where the meson build was added.\r\n\r\n* Fix an uninitialized access in hash_xlog_squeeze_page().\r\n\r\nCommit 861f86beea changed hash_xlog_squeeze_page() to start reading\r\nthe write buffer conditionally but forgot to initialize it leading to an\r\nuninitialized access.\r\n\r\nReported-by: Alexander Lakhin\r\nAuthor: Hayato Kuroda\r\nReviewed-by: Alexander Lakhin, Amit Kapila\r\nDiscussion: http://postgr.es/m/62ed1a9f-746a-8e86-904b-51b9b806a1d9@gmail.com\r\n\r\n* update IvorySQL regression test with pg commit f66fcc5\r\n\r\n* doc: Update info on information schema usage tables\r\n\r\nCommit f40c6969d0 added the information schema usage tables but added\r\ndocumentation that they did not fully work yet. Commit e717a9a18b\r\nthen added SQL-standard function bodies, which made the information\r\nschema views fully functional, but it neglected to update the\r\ndocumentation. This is now done here.\r\n\r\nReported-by: Erki Eessaar \r\nReviewed-by: Erki Eessaar \r\nDiscussion: https://www.postgresql.org/message-id/flat/AM9PR01MB8268EC7B696F9FE346CA5B93FEB8A%40AM9PR01MB8268.eurprd01.prod.exchangelabs.com\r\n\r\n* Check collation when creating partitioned index\r\n\r\nWhen creating a partitioned index, the partition key must be a subset\r\nof the index's columns. But this currently doesn't check that the\r\ncollations between the partition key and the index definition match.\r\nSo you can construct a unique index that fails to enforce uniqueness.\r\n(This would most likely involve a nondeterministic collation, so it\r\nwould have to be crafted explicitly and is not something that would\r\njust happen by accident.)\r\n\r\nThis patch adds the required collation check. As a result, any\r\npreviously allowed unique index that has a collation mismatch would no\r\nlonger be allowed to be created.\r\n\r\nReviewed-by: Tom Lane \r\nDiscussion: https://www.postgresql.org/message-id/flat/3327cb54-f7f1-413b-8fdb-7a9dceebb938%40eisentraut.org\r\n\r\n* pgindent fix\r\n\r\nfor commit a11c9c42ea\r\n\r\n* Silence Valgrind complaint with EXEC_BACKEND\r\n\r\nThe padding bytes written to the backend params file were\r\nuninitialized. That's harmless because we don't access the padding\r\nbytes when we read the file back in, but Valgrind doesn't know\r\nthat. In any case, clear the padding bytes to make Valgrind happy.\r\n\r\nReported-by: Alexander Lakhin\r\nDiscussion: https://www.postgresql.org/message-id/014768ed-8b39-c44f-b07c-098c87b1644c@gmail.com\r\n\r\n* Refactor CreateSharedMemoryAndSemaphores\r\n\r\nFor clarity, have separate functions for *creating* the shared memory\r\nand semaphores at postmaster or single-user backend startup, and\r\nfor *attaching* to existing shared memory structures in EXEC_BACKEND\r\ncase. CreateSharedMemoryAndSemaphores() is now called only at\r\npostmaster startup, and a new AttachSharedMemoryStructs() function is\r\ncalled at backend startup in EXEC_BACKEND mode.\r\n\r\nReviewed-by: Tristan Partin, Andres Freund\r\nDiscussion: https://www.postgresql.org/message-id/7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi\r\n\r\n* Pass BackgroundWorker entry in the parameter file in EXEC_BACKEND mode\r\n\r\nThe BackgroundWorker struct is now passed the same way as the Port\r\nstruct. Seems more consistent.\r\n\r\nThis makes it possible to move InitProcess later in SubPostmasterMain\r\n(in next commit), as we no longer need to access shared memory to read\r\nbackground worker entry.\r\n\r\nReviewed-by: Tristan Partin, Andres Freund, Alexander Lakhin\r\nDiscussion: https://www.postgresql.org/message-id/7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi\r\n\r\n* Refactor how InitProcess is called\r\n\r\nThe order of process initialization steps is now more consistent\r\nbetween !EXEC_BACKEND and EXEC_BACKEND modes. InitProcess() is called\r\nat the same place in either mode. We can now also move the\r\nAttachSharedMemoryStructs() call into InitProcess() itself. This\r\nreduces the number of \"#ifdef EXEC_BACKEND\" blocks.\r\n\r\nReviewed-by: Tristan Partin, Andres Freund, Alexander Lakhin\r\nDiscussion: https://www.postgresql.org/message-id/7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi\r\n\r\n* doc: Remove reference to trigger file regarding promotion\r\n\r\nThe wording changed here comes from 991bfe11d28a, when the only way to\r\ntrigger a promotion was with a trigger file. There are more options to\r\nachieve this operation these days, like the SQL function pg_promote() or\r\nthe command `pg_ctl promote`, so it is confusing to assume that only a\r\ntrigger file is able to do the work.\r\n\r\nNote also that promote_trigger_file has been removed as of cd4329d9393f\r\nin 16~.\r\n\r\nAuthor: Shinya Kato\r\nDiscussion: https://postgr.es/m/201b08ea29aa61f96162080e75be503c@oss.nttdata.com\r\nBackpatch-through: 12\r\n\r\n* Add support for REINDEX in event triggers\r\n\r\nThis commit adds support for REINDEX in event triggers, making this\r\ncommand react for the events ddl_command_start and ddl_command_end. The\r\nindexes rebuilt are collected with the ReindexStmt emitted by the\r\ncaller, for the concurrent and non-concurrent paths.\r\n\r\nThanks to that, it is possible to know a full list of the indexes that a\r\nsingle REINDEX command has worked on.\r\n\r\nAuthor: Garrett Thornburg, Jian He\r\nReviewed-by: Jim Jones, Michael Paquier\r\nDiscussion: https://postgr.es/m/CAEEqfk5bm32G7sbhzHbES9WejD8O8DCEOaLkxoBP7HNWxjPpvg@mail.gmail.com\r\n\r\n* update IvorySQL regression test with pg commit f21848d\r\n\r\n* Remove unnecessary includes of \r\n\r\nThese were once needed for sig_atomic_t, but that no longer appears in\r\nthese headers, so the include is not needed.\r\n\r\nReviewed-by: Shubham Khanna \r\nReviewed-by: Tom Lane \r\nDiscussion: https://www.postgresql.org/message-id/flat/cff5475d-e0a9-4561-b094-794aa36bd031%40eisentraut.org\r\n\r\n* Remove unnecessary include of \r\n\r\nThis was put here as part of a mechanical replacement of the old\r\n\"getaddrinfo.h\" with plus (commit\r\n5579388d2d). But here, we only need netdb.h (for NI_MAXHOST), not\r\nsys/socket.h.\r\n\r\nReviewed-by: Shubham Khanna \r\nReviewed-by: Tom Lane \r\nDiscussion: https://www.postgresql.org/message-id/flat/cff5475d-e0a9-4561-b094-794aa36bd031%40eisentraut.org\r\n\r\n* Remove unnecessary include of \r\n\r\nThis was probably never necessary. (The header used to use random(),\r\nbut that shouldn't require either. In any case, that's gone,\r\ntoo.)\r\n\r\nReviewed-by: Shubham Khanna \r\nReviewed-by: Tom Lane \r\nDiscussion: https://www.postgresql.org/message-id/flat/cff5475d-e0a9-4561-b094-794aa36bd031%40eisentraut.org\r\n\r\n* Don't use pgbench -j in tests\r\n\r\nIt draws an unnecessary error in builds compiled without thread support.\r\n\r\nAdded by commit 038f586d5f1d, which was backpatched to 14; though in\r\nbranch master we no longer support such builds, there's no reason to\r\nhave this there, so remove it in all branches since 14.\r\n\r\nReported-by: Michael Paquier \r\nDiscussion: https://postgr.es/m/ZW2G9Ix4nBKLcSSO@paquier.xyz\r\n\r\n* Remove now-unnecessary Autovacuum[Launcher|Worker]IAm functions\r\n\r\nAfter commit fd5e8b440d, InitProcess() is called later in the\r\nEXEC_BACKEND startup sequence, so it's enough to set the\r\nam_autovacuum_[launcher|worker] variables at the same place as in the\r\n!EXEC_BACKEND case.\r\n\r\n* Teach convert() and friends to avoid copying when possible.\r\n\r\nPresently, pg_convert() allocates a new bytea and copies the result\r\nregardless of whether any conversion actually happened. This\r\ncommit adjusts this function to return the source pointer as-is if\r\nno conversion occurred. This optimization isn't expected to make a\r\ntremendous difference, but it still seems worthwhile to avoid\r\nunnecessary memory allocations.\r\n\r\nAuthor: Yurii Rashkovskii\r\nReviewed-by: Bertrand Drouvot\r\nDiscussion: https://postgr.es/m/CA%2BRLCQyknBPSWXRBQGOi6aYEcdQ9RpH9Kch4GjoeY8dQ3D%2Bvhw%40mail.gmail.com\r\n\r\n* Optimize SearchPathCache by saving the last entry.\r\n\r\nRepeated lookups are common, so it's worth it to check the last entry\r\nbefore doing another hash lookup.\r\n\r\nDiscussion: https://postgr.es/m/04c8592dbd694e4114a3ed87139a7a04e4363030.camel%40j-davis.com\r\n\r\n* Fix a random failure in 003_logical_slots.pl.\r\n\r\nThe failed test was trying to validate that the two_phase option for a\r\nslot is retained after the upgrade. The problem was that it didn't get\r\nenabled before the upgrade so expecting to be enabled after the upgrade\r\nwas not right in the first place. This is a timing issue because we enable\r\nthe two_phase once the initial sync for all the tables is finished.\r\nNormally, we wait for the two_phase state to be enabled but this test\r\nmissed that step.\r\n\r\nPer buildfarm.\r\n\r\nAuthor: Hayato Kuroda\r\nDiscussion: https://postgr.es/m/TY3PR01MB98892396D1071FC4320D6B31F586A@TY3PR01MB9889.jpnprd01.prod.outlook.com\r\n\r\n* Fix handling of errors in libpq pipelines\r\n\r\nThe logic to keep the libpq command queue in sync with queries that have\r\nbeen processed had a bug when errors were returned for reasons other\r\nthan problems in queries -- for example, when a connection is lost. We\r\nincorrectly consumed an element from the command queue every time, but\r\nthis is wrong and can lead to the queue becoming empty ahead of time,\r\nleading to later malfunction: PQgetResult would return nothing,\r\npotentially causing the calling application to enter a busy loop.\r\n\r\nFix by making the SYNC queue element a barrier that can only be consumed\r\nwhen a SYNC message is received.\r\n\r\nBackpatch to 14.\r\n\r\nReported by: Иван Трофимов (Ivan Trofimov) \r\nDiscussion: https://postgr.es/m/17948-fcace7557e449957@postgresql.org\r\n\r\n* Fix incorrect error message for IDENTIFY_SYSTEM\r\n\r\nCommit 5a991ef8692e accidentally reversed the order of the tuples\r\nand fields parameters, making the error message incorrectly refer\r\nto 3 tuples with 1 field when IDENTIFY_SYSTEM returns 1 tuple and\r\n3 or 4 fields. Fix by changing the order of the parameters. This\r\nalso adds a comment describing why we check for < 3 when postgres\r\nsince 9.4 has been sending 4 fields.\r\n\r\nBackpatch all the way since the bug is almost a decade old.\r\n\r\nAuthor: Tomonari Katsumata \r\nReviewed-by: Tom Lane \r\nBug: #18224\r\nBackpatch-through: v12\r\n\r\n* Fix indentation\r\n\r\nWhen preparing commit 98e675ed7af I accidentally forgot to run\r\npgindent, which did produce a diff. Fix by adding the required\r\nwhitespace per the koel buildfarm failure.\r\n\r\n* Rename JsonManifestParseContext callbacks.\r\n\r\nThere is no real reason to just run multiple words together when\r\nwe can instead punctuate them with marks intended for that purpose.\r\n\r\nPer suggestion from Álvaro Herrera.\r\n\r\nDiscussion: http://postgr.es/m/202311161021.nisg7imt7kyf@alvherre.pgsql\r\n\r\n* Rename pg_verifybackup's JsonManifestParseContext callback functions.\r\n\r\nThe old names were too generic, and would have applied to any binary\r\nthat made use of JsonManifestParseContext. Rename to make the names\r\nspecific to pg_verifybackup, since there are plans afoot to reuse\r\nthis infrastructure.\r\n\r\nPer suggestion from Álvaro Herrra.\r\n\r\nDiscussion: http://postgr.es/m/202311131625.o7hzq3oukuyd@alvherre.pgsql\r\n\r\n* Add support for deparsing semi-joins to contrib/postgres_fdw\r\n\r\nSEMI-JOIN is deparsed as the EXISTS subquery. It references outer and inner\r\nrelations, so it should be evaluated as the condition in the upper-level WHERE\r\nclause. The signatures of deparseFromExprForRel() and deparseRangeTblRef() are\r\nrevised so that they can add conditions to the upper level.\r\n\r\nPgFdwRelationInfo now has a hidden_subquery_rels field, referencing the relids\r\nused in the inner parts of semi-join. They can't be referred to from upper\r\nrelations and should be used internally for equivalence member searches.\r\n\r\nThe planner can create semi-join, which refers to inner rel vars in its target\r\nlist. However, we deparse semi-join as an exists() subquery. So we skip the\r\ncase when the target list references to inner rel of semi-join.\r\n\r\nAuthor: Alexander Pyhalov\r\nReviewed-by: Ashutosh Bapat, Ian Lawrence Barwick, Yuuki Fujii, Tomas Vondra\r\nDiscussion: https://postgr.es/m/c9e2a757cf3ac2333714eaf83a9cc184@postgrespro.ru\r\n\r\n* update IvorySQL regression test with pg commit 824dbea\r\n\r\n* Apply filters to dump files all the time in 002_pg_upgrade.pl\r\n\r\nThis commit removes the restriction that would not apply filters to the\r\ndumps used for comparison in the TAP test of pg_upgrade when using the\r\nsame base version for the old and new nodes.\r\n\r\nThe previous logic would fail on Windows if loading a dump while using\r\nthe same set of binaries for the old and new nodes, as the library\r\ndependencies updated in the old dump would append CRLFs to the dump\r\nfile as it is treated as a text file. The dump filtering logic replaces\r\nall CRLFs (\\r\\n) by LFs (\\n), which is able to prevent this issue.\r\n\r\nWhen the old and new versions of the binaries are the same,\r\nAdjustUpgrade removes all blank lines, removes version-based comments\r\ngenerated by pg_dump and replaces CRLFs by LFs.\r\n\r\nReported-by: Alexander Lakhin\r\nDiscussion: https://postgr.es/m/60d434b9-53d9-9ea1-819b-efebdcf44e41@gmail.com\r\nBackpatch-through: 15\r\n\r\n* Fix compilation on Windows with WAL_DEBUG\r\n\r\nThis has been broken since b060dbe0001a that has reworked the callback\r\nmechanism of XLogReader, most likely unnoticed because any form of\r\ndevelopment involving WAL happens on platforms where this compiles fine.\r\n\r\nAuthor: Bharath Rupireddy\r\nDiscussion: https://postgr.es/m/CALj2ACVF14WKQMFwcJ=3okVDhiXpuK5f7YdT+BdYXbbypMHqWA@mail.gmail.com\r\nBackpatch-through: 13\r\n\r\n* Use signal-safe functions in signal handler\r\n\r\nAccording to signal-safety(7), exit(3) and puts(3) are not safe to call\r\nin a signal handler.\r\n\r\nAuthor: Tristan Partin \r\nDiscussion: https://www.postgresql.org/message-id/flat/CTVDKVZCCVSY.1XQ87UL50KQRD%40gonk\r\n\r\n* Suppress -Wunused-result warning about write().\r\n\r\npg_test_fsync's signal_cleanup() intentionally ignores the write()\r\nresult since there's not much we could do about it, but certain\r\ncompilers make that harder than it ought to be.\r\n\r\nThis was missed in commit 52e98d4502.\r\n\r\nReviewed-by: Tristan Partin, Peter Eisentraut\r\nDiscussion: https://postgr.es/m/20231206161839.GA2828158%40nathanxps13\r\n\r\n* Fix assertion failure with REINDEX and event triggers\r\n\r\nA REINDEX CONCURRENTLY run on a table with no indexes would always pop\r\nthe topmost snapshot from the active snapshot stack, making the snapshot\r\nhandling inconsistent between the multiple-relation and single-relation\r\ncases. This commit slightly changes the snapshot stack handling so as a\r\nsnapshot is popped only ReindexMultipleInternal() in this case after a\r\nrelation has been reindexed, fixing a problem where an event trigger\r\nfunction may need a snapshot but does not have one. This also keeps the\r\nplaces where PopActiveSnapshot() is called closer to each other.\r\n\r\nWhile on it, this expands the existing tests to cover all the cases that\r\ncould be faced with REINDEX commands and such event triggers, for one or\r\nmore relations, with or without indexes.\r\n\r\nThis behavior is inconsistent since 5dc92b844e68, but we've never had a\r\nneed for an active snapshot at the end of a REINDEX until now.\r\n\r\nThanks also to Jian He for the input.\r\n\r\nReported-by: Alexander Lakhin\r\nDiscussion: https://postgr.es/m/cb538743-484c-eb6a-a8c5-359980cd3a17@gmail.com\r\n\r\n* update IvorySQL regression test with pg commit c426f7c\r\n\r\n* Fix issues in binary_upgrade_logical_slot_has_caught_up().\r\n\r\nThe commit 29d0a77fa6 labelled binary_upgrade_logical_slot_has_caught_up()\r\nas a non-strict function to allow providing a better error message to callers\r\nin case the passed slot_name is NULL. On further discussion, it seems that\r\nit is not helpful to have a different error message for NULL input in this\r\nfunction, so this patch marks the function as strict.\r\n\r\nThis patch also removes the explicit permission check to use replication\r\nslots as this function is invoked only by superusers and instead adds an\r\nAssert.\r\n\r\nReported-by: Masahiko Sawada\r\nAuthor: Hayato Kuroda\r\nReviewed-by: Vignesh C\r\nDiscussion: https://postgr.es/m/CAD21AoDSyiBKkMXBxN_gUayZZUCOgyHnG8Ge8rcPXNP3Tf6B4g@mail.gmail.com\r\n\r\n* Improve some error messages with invalid indexes for REINDEX CONCURRENTLY\r\n\r\nAn invalid index is skipped when doing REINDEX CONCURRENTLY at table\r\nlevel, with INDEX_CORRUPTED used as errcode. This is confusing,\r\nbecause an invalid index could exist after an interruption. The errcode\r\nis switched to OBJECT_NOT_IN_PREREQUISITE_STATE instead, as per a\r\nsuggestion from Andres Freund.\r\n\r\nWhile on it, the error messages are reworded, and a hint is added,\r\ntelling how to rebuild an invalid index in this case. This has been\r\nsuggested by Noah Misch.\r\n\r\nDiscussion: https://postgr.es/m/20231118230958.4fm3fhk4ypshxopa@awork3.anarazel.de\r\n\r\n* update IvorySQL regression test with pg commit d43bd09\r\n\r\n* Verify that attribute counts match in ExecCopySlot\r\n\r\ntts_virtual_copyslot() contained an Assert that checked that the srcslot\r\ncontained <= attributes than the dstslot. This seems to be backwards as\r\nif the srcslot contained fewer attributes then the dstslot could be left\r\nwith stale Datum values from the previously stored tuple. It might make\r\nmore sense to allow the source to contain additional attributes and only\r\ncopy the leading ones that also exist in the destination, however, that's\r\nnot what we're doing here.\r\n\r\nHere we just remove the Assert from tts_virtual_copyslot() and add an\r\nAssert to ExecCopySlot() to verify the attribute counts match. There\r\ndoes not seem to be any places where the destination contains fewer\r\nattributes, so instead of going to the trouble of making the code\r\nproperly handle this, let's just ensure the attribute counts match. If\r\nthis Assert fails then that will indicate that we do have cases that\r\nrequire us to handle the srcslot with more attributes than the dstslot.\r\nIt seems better to only write this code if there's a genuine requirement\r\nfor it rather than write it now only to leave it untested.\r\n\r\nThanks to Andres Freund for helping with the analysis of this.\r\n\r\nDiscussion: https://postgr.es/m/CAApHDvpMAvBL0T+TRORquyx1iqFQKMVTXtqNocOw0Pa2uh1heg@mail.gmail.com\r\n\r\n* Shrink Unicode category table.\r\n\r\nMissing entries can implicitly be considered \"unassigned\".\r\n\r\nDiscussion: https://postgr.es/m/ff4c2f2f9c8fc7ca27c1c24ae37ecaeaeaff6b53.camel@j-davis.com\r\n\r\n* doc, intagg: fix one-to-many mention to many-to-many\r\n\r\nReported-by: Christophe Courtois\r\n\r\nDiscussion: https://postgr.es/m/aa7cfd73-0d8d-596a-b684-39faa479afa5@dalibo.com\r\n\r\nAuthor: Christophe Courtois\r\n\r\nBackpatch-through: master\r\n\r\n* doc: FOR UPDATE / KEY / SHARE / KEY SHARE takes an table alias\r\n\r\nPreviously only a table name was documented for this SELECT clause.\r\n\r\nReported-by: robert \r\n\r\nDiscussion: https://postgr.es/m/152483686904.19805.3369061025704720797@wrigleys.postgresql.org\r\n\r\nBackpatch-through: master\r\n\r\n* doc, pg_upgrade: add vacuumdb w/ tips for generating quick stats\r\n\r\nReported-by: Magnus Hagander\r\n\r\nDiscussion: https://postgr.es/m/CABUevEwGBY-W7EkTbjMY1rC+mmRL3fMrnX6YaUkcr+7o9PSa3w@mail.gmail.com\r\n\r\nBackpatch-through: master\r\n\r\n* Fix path of regress shared library in pg_upgrade test\r\n\r\nDuring a pg_upgrade test using an old dump, all references to the old\r\nregress shared library path (so, dylib or dll) are updated to point to\r\nthe library path used by the new build, to ensure a consistent\r\ncomparison between the old and new dumps.\r\n\r\nThe test previously relied on a hardcoded value of \"src/test/regress/\"\r\nto build the new path value, which would point to an incorrect location\r\nfor the meson and vpath builds. This is replaced by REGRESS_SHLIB, able\r\nto point to the correct location of the regress shared library.\r\n\r\nAuthor: Alexander Lakhin\r\nDiscussion: https://postgr.es/m/a628d8ad-a08a-2eab-4ca9-641bc82d3193@gmail.com\r\nBackpatch-through: 15\r\n\r\n* doc: clarify handling of ON CONFLICT with triggers\r\n\r\nThe previous wording was confusing. Also move partitioning mention to a\r\nmore logical location.\r\n\r\nReported-by: neil@fairwindsoft.com\r\n\r\nDiscussion: https://postgr.es/m/20170703200710.27956.64565@wrigleys.postgresql.org\r\n\r\nBackpatch-through: master\r\n\r\n* Fix potential pointer overflow in xlogreader.c.\r\n\r\nWhile checking if a record could fit in the circular WAL decoding\r\nbuffer, the coding from commit 3f1ce973 used arithmetic that could\r\noverflow. 64 bit systems were unaffected for various technical reasons,\r\nwhich probably explains the lack of problem reports. Likewise for 32\r\nbit systems running known 32 bit kernels. The systems at risk of\r\nproblems appear to be 32 bit processes running on 64 bit kernels, with\r\nunlucky placement in memory.\r\n\r\nPer complaint from GCC -fsanitize=undefined -m32, while testing\r\nvariations of 039_end_of_wal.pl.\r\n\r\nBack-patch to 15.\r\n\r\nReviewed-by: Nathan Bossart \r\nReviewed-by: Robert Haas \r\nDiscussion: https://postgr.es/m/CA%2BhUKGKH0oRPOX7DhiQ_b51sM8HqcPp2J3WA-Oen%3DdXog%2BAGGQ%40mail.gmail.com\r\n\r\n* Don't try to open visibilitymap when analyzing a foreign table\r\n\r\nIt's harmless, visibilitymap_count() returns 0 if the file doesn't\r\nexist. But it's also very pointless. I noticed this when I added an\r\nassertion in smgropen() that the relnumber is valid.\r\n\r\nDiscussion: https://www.postgresql.org/message-id/621a52fd-3cd8-4f5d-a561-d510b853bbaf@iki.fi\r\n\r\n* Initialize ShmemVariableCache like other shmem areas\r\n\r\nFor sake of consistency.\r\n\r\nReviewed-by: Tristan Partin, Richard Guo\r\nDiscussion: https://www.postgresql.org/message-id/6537d63d-4bb5-46f8-9b5d-73a8ba4720ab@iki.fi\r\n\r\n* Rename ShmemVariableCache to TransamVariables\r\n\r\nThe old name was misleading: It's not a cache, the values kept in the\r\nstruct are the authoritative source.\r\n\r\nReviewed-by: Tristan Partin, Richard Guo\r\nDiscussion: https://www.postgresql.org/message-id/6537d63d-4bb5-46f8-9b5d-73a8ba4720ab@iki.fi\r\n\r\n* update IvorySQL regression test with pg commit b31ba53\r\n\r\n* Test that it works to RESET an invalid reloption\r\n\r\nThis works today, and it's valuable to ensure it doesn't get broken\r\nif/when we get around to refactoring the implementation.\r\n\r\nAuthor: Nikolay Shaplov \r\nDiscussion: https://postgr.es/m/4563991.km65PDbjlG@thinkpad-pgpro\r\n\r\n* update IvorySQL regression test with pg commit 7db01fb\r\n\r\n* Remove some unnecessary #includes of postmaster/interrupt.h\r\n\r\nCommit 44fc6e259b removed a bunch of references to\r\nSignalHandlerForCrashExit, leaving these #includes unneeded.\r\n\r\n* Don't clean initdb files on template creation failure\r\n\r\nCommit 252dcb32397f6 introduced initdb template caching to speed up\r\ntests by re-using initdb output. The initdb command didn't however\r\nuse the --no-clean option to preserve generated data in case initdb\r\ncrashes unlike pg_regress which does do this. This adds the option\r\nto initdb to aid debugging.\r\n\r\nWhile changing the commandline, switch to using long options for\r\ninitdb to make the code more self-documenting.\r\n\r\nAuthor: Matthias van de Meent \r\nDiscussion: https://postgr.es/m/CAEze2WhSTjfK_M+Ea4GSQp8odrEOaQS8HyORd1TJUEiyXaB+rw@mail.gmail.com\r\n\r\nConflicts:\r\n\tsrc/Makefile.global.in\r\n\r\n* Add empty BRIN ranges during CREATE INDEX\r\n\r\nWhen building BRIN indexes, the brinbuildCallback only advances to the\r\nnext page range when seeing a tuple that doesn't belong to the current\r\none. This means that the index may end up missing ranges at the end of\r\nthe table, if those pages do not contain any indexable tuples.\r\n\r\nWe tend not to have completely empty pages at the end of a relation, but\r\nthis also applies to partial indexes, where the tuples may simply not\r\nmatch the index predicate. This results in inefficient scans using the\r\naffected BRIN index - without the summaries, the page ranges have to be\r\nread and processed, which consumes I/O and possibly also CPU time.\r\n\r\nThe existing code already added empty ranges for earlier parts of the\r\ntable, this commit makes sure we add them for the ranges at the end of\r\nthe table too.\r\n\r\nPatch by Matthias van de Meent, with review/improvements by me.\r\n\r\nAuthor: Matthias van de Meent\r\nReviewed-by: Tomas Vondra\r\nDiscussion: https://postgr.es/m/CAEze2WiMsPZg%3DxkvSF_jt4%3D69k6K7gz5B8V2wY3gCGZ%2B1BzCbQ%40mail.gmail.com\r\n\r\n* Allow parallel CREATE INDEX for BRIN indexes\r\n\r\nAllow using multiple worker processes to build BRIN index, which until\r\nnow was supported only for BTREE indexes. For large tables this often\r\nresults in significant speedup when the build is CPU-bound.\r\n\r\nThe work is split in a simple way - each worker builds BRIN summaries on\r\na subset of the table, determined by the regular parallel scan used to\r\nread the data, and feeds them into a shared tuplesort which sorts them\r\nby blkno (start of the range). The leader then reads this sorted stream\r\nof ranges, merges duplicates (which may happen if the parallel scan does\r\nnot align with BRIN pages_per_range), and adds the resulting ranges into\r\nthe index.\r\n\r\nThe number of duplicate results produced by workers (requiring merging\r\nin the leader process) should be fairly small, thanks to how parallel\r\nscans assign chunks to workers. The likelihood of duplicate results may\r\nincrease for higher pages_per_range values, but then there are fewer\r\npage ranges in total. In any case, we expect the merging to be much\r\ncheaper than summarization, so this should be a win.\r\n\r\nMost of the parallelism infrastructure is a simplified copy of the code\r\nused by BTREE indexes, omitting the parts irrelevant for BRIN indexes\r\n(e.g. uniqueness checks).\r\n\r\nThis also introduces a new index AM flag amcanbuildparallel, determining\r\nwhether to attempt to start parallel workers for the index build.\r\n\r\nOriginal patch by me, with reviews and substantial reworks by Matthias\r\nvan de Meent, certainly enough to make him a co-author.\r\n\r\nAuthor: Tomas Vondra, Matthias van de Meent\r\nReviewed-by: Matthias van de Meent\r\nDiscussion: https://postgr.es/m/c2ee7d69-ce17-43f2-d1a0-9811edbda6e6%40enterprisedb.com\r\n\r\n* update IvorySQL regression test with pg commit b437571\r\n\r\n* Optimize nbtree backward scan boundary cases.\r\n\r\nTeach _bt_binsrch (and related helper routines like _bt_search and\r\n_bt_compare) about the initial positioning requirements of backward\r\nscans. Routines like _bt_binsrch already know all about \"nextkey\"\r\nsearches, so it seems natural to teach them about \"goback\"/backward\r\nsearches, too. These concepts are closely related, and are much easier\r\nto understand when discussed together.\r\n\r\nNow that certain implementation details are hidden from _bt_first, it's\r\nstraightforward to add a new optimization: backward scans using the <\r\nstrategy now avoid extra leaf page accesses in certain \"boundary cases\".\r\nConsider the following example, which uses the tenk1 table (and its\r\ntenk1_hundred index) from the standard regression tests:\r\n\r\nSELECT * FROM tenk1 WHERE hundred < 12 ORDER BY hundred DESC LIMIT 1;\r\n\r\nBefore this commit, nbtree would scan two leaf pages, even though it was\r\nonly really necessary to scan one leaf page. We'll now descend straight\r\nto the leaf page containing a (12, -inf) high key instead. The scan\r\nwill locate matching non-pivot tuples with \"hundred\" values starting\r\nfrom the value 11. The scan won't waste a page access on the right\r\nsibling leaf page, which cannot possibly contain any matching tuples.\r\n\r\nYou can think of the optimization added by this commit as disabling an\r\noptimization (the _bt_compare \"!pivotsearch\" behavior that was added to\r\nPostgres 12 in commit dd299df8) for a small subset of cases where it was\r\nalways counterproductive.\r\n\r\nEquivalently, you can think of the new optimization as extending the\r\n\"pivotsearch\" behavior that page deletion by VACUUM has long required\r\n(since the aforementioned Postgres 12 commit went in) to other, similar\r\ncases. Obviously, this isn't strictly necessary for these new cases\r\n(unlike VACUUM, _bt_first is prepared to move the scan to the left once\r\non the leaf level), but the underlying principle is the same.\r\n\r\nAuthor: Peter Geoghegan \r\nReviewed-By: Matthias van de Meent \r\nDiscussion: https://postgr.es/m/CAH2-Wz=XPzM8HzaLPq278Vms420mVSHfgs9wi5tjFKHcapZCEw@mail.gmail.com\r\n\r\n* update IvorySQL regression test with pg commit c9c0589\r\n\r\n* Cache opaque handle for GUC option to avoid repeasted lookups.\r\n\r\nWhen setting GUCs from proconfig, performance is important, and hash\r\nlookups in the GUC table are significant.\r\n\r\nPer suggestion from Robert Haas.\r\n\r\nDiscussion: https://postgr.es/m/CA+TgmoYpKxhR3HOD9syK2XwcAUVPa0+ba0XPnwWBcYxtKLkyxA@mail.gmail.com\r\nReviewed-by: John Naylor\r\n\r\n* Micro-optimize JSONTYPE_NUMERIC code path in json.c.\r\n\r\nThis commit does the following:\r\n\r\n* In datum_to_json_internal(), the call to IsValidJsonNumber() is\r\n replaced with simplified validation code. This avoids an extra\r\n call to strlen() in this path, and it avoids validating the\r\n entire string (which is okay since we know we're dealing with a\r\n numeric data type's output).\r\n\r\n* In datum_to_json_internal(), the call to escape_json() in the\r\n JSONTYPE_NUMERIC path is replaced with code that just surrounds\r\n the string with quotes. In passing, some other nearby calls to\r\n appendStringInfo() have been replaced with similar code to avoid\r\n unnecessary calls to vsnprintf().\r\n\r\n* In composite_to_json(), the length of the separator is now\r\n determined at compile time to avoid unnecessary calls to\r\n strlen().\r\n\r\nOn my machine, this speeds up a benchmark for the proposed COPY TO\r\n(FORMAT json) command with many integers by upwards of 20%. There\r\nare likely other code paths that could be given a similar\r\ntreatment, but that is left as a future exercise.\r\n\r\nReviewed-by: Jeff Davis, Tom Lane, David Rowley, John Naylor\r\nDiscussion: https://postgr.es/m/20231207231251.GB3359478%40nathanxps13\r\n\r\n* Fix nbtree backward scan race condition comments.\r\n\r\nRemove comments that supposed that holding a pin was a useful interlock\r\nfor _bt_walk_left(). There are times when _bt_walk_left() doesn't hold\r\neither a lock or a pin on any page, so clearly this can't be true.\r\n_bt_walk_left() is even prepared to deal with concurrent deletion of\r\nboth the original page and any pages to its left.\r\n\r\nOversight in commit 2ed5b87f96.\r\n\r\n* Remove some unnecessary includes of \"access/xlog_internal.h\"\r\n\r\nThere were a few places where access/xlog_internal.h was apparently\r\nincluded unnecessarily. In some of those places, a more specific\r\nheader file (that somehow came in via access/xlog_internal.h) can be\r\nused instead.\r\n\r\nReviewed-by: Heikki Linnakangas \r\nDiscussion: https://www.postgresql.org/message-id/flat/a56a6eec-eb14-471b-9570-3cac23603964%40eisentraut.org\r\n\r\n* Fix an undetected deadlock due to apply worker.\r\n\r\nThe apply worker needs to update the state of the subscription tables to\r\n'READY' during the synchronization phase which requires locking the\r\ncorresponding subscription. The apply worker also waits for the\r\nsubscription tables to reach the 'SYNCDONE' state after holding the locks\r\non the subscription and the wait is done using WaitLatch. The 'SYNCDONE'\r\nstate is changed by tablesync workers again by locking the corresponding\r\nsubscription. Both the state updates use AccessShareLock mode to lock the\r\nsubscription, so they can't block each other. However, a backend can\r\nsimultaneously try to acquire a lock on the same subscription using\r\nAccessExclusiveLock mode to alter the subscription. Now, the backend's\r\nwait on a lock can sneak in between the apply worker and table sync worker\r\ncausing deadlock.\r\n\r\nIn other words, apply_worker waits for tablesync worker which waits for\r\nbackend, and backend waits for apply worker. This is not detected by the\r\ndeadlock detector because apply worker uses WaitLatch.\r\n\r\nThe fix is to release existing locks in apply worker before it starts to\r\nwait for tablesync worker to change the state.\r\n\r\nReported-by: Tomas Vondra\r\nAuthor: Shlok Kyal\r\nReviewed-by: Amit Kapila, Peter Smith\r\nBackpatch-through: 12\r\nDiscussion: https://postgr.es/m/d291bb50-12c4-e8af-2af2-7bb9bb4d8e3e@enterprisedb.com\r\n\r\n* Remove trace_recovery_messages\r\n\r\nThis GUC was intended as a debugging help in the 9.0 area when hot\r\nstandby and streaming replication were being developped, able to offer\r\nmore information at LOG level rather than DEBUGn. There are more tools\r\navailable these days that are able to offer rather equivalent\r\ninformation, like pg_waldump introduced in 9.3. It is not obvious how\r\nthis facility is useful these days, so let's remove it.\r\n\r\nAuthor: Bharath Rupireddy\r\nDiscussion: https://postgr.es/m/ZXEXEAUVFrvpquSd@paquier.xyz\r\n\r\n* Simplify productions for FORMAT JSON [ ENCODING name ]\r\n\r\nThis removes the production json_encoding_clause_opt, instead merging\r\nit into json_format_clause. Also remove the auxiliary\r\nmakeJsonEncoding() function.\r\n\r\nReviewed-by: Amit Langote #664)"}},{"before":"69786b0799bb7a4dc67ff43e406f72dd0ee9e3f3","after":"a4c6b5d31c46075763065bfb8aa921899cd465e9","ref":"refs/heads/master","pushedAt":"2024-05-14T05:44:18.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Fix: Support for SYSDATE & SYSTIMESTAMP (#663)\n\n- Add SYSDATE & SYSTIMESTAMP in oracle_parser\r\n- Add test cases","shortMessageHtmlLink":"Fix: Support for SYSDATE & SYSTIMESTAMP (#663)"}},{"before":"5ed8dcaccb6a0cc113d1b10d3dde00b6a1fa6411","after":"69786b0799bb7a4dc67ff43e406f72dd0ee9e3f3","ref":"refs/heads/master","pushedAt":"2024-05-07T01:29:22.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Specify the version of OS in gitHub action as macos-12 to avoid action failure (#662)","shortMessageHtmlLink":"Specify the version of OS in gitHub action as macos-12 to avoid actio…"}},{"before":"3e2042e626d9f2b42fed272d1d91c33de7f638d4","after":"fb2993b1992844580d804aa9617b9a250f50acd7","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-04-26T01:07:23.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Date timestamp precision with nls mask (#656)\n\n* Fix bug#M247:\r\n 1) Fixed the problem of missing the time part when the Oracle-compatible\r\n oradate type uses PG's I/O function to process the input string.\r\n 2) Fixed an error in which the fractional seconds precision cannot\r\n exceed 6 digits when the Oracle-compatible timestamp type uses\r\n PG's I/O function to process input strings.\r\n\r\n* add datetime ignore nls mask regression test\r\n\r\n* bugfix for macos regression failed\r\n\r\n---------\r\n\r\nCo-authored-by: myzhen <601316152@qq.com>","shortMessageHtmlLink":"Date timestamp precision with nls mask (#656)"}},{"before":"f99105306f2e5a20f3ffa8fc195f0e981227e967","after":"3e2042e626d9f2b42fed272d1d91c33de7f638d4","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-04-11T08:00:28.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Update README.md","shortMessageHtmlLink":"Update README.md"}},{"before":"39f6ec26d55bcd1c43a687bc3cb914add6651c06","after":"5ed8dcaccb6a0cc113d1b10d3dde00b6a1fa6411","ref":"refs/heads/master","pushedAt":"2024-04-11T07:57:25.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Update README.md","shortMessageHtmlLink":"Update README.md"}},{"before":"f49893845f3802fee75ea1b62af4bab557b0d5c0","after":"39f6ec26d55bcd1c43a687bc3cb914add6651c06","ref":"refs/heads/master","pushedAt":"2024-04-11T02:20:17.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Merge pull request #654 from balinorLiang/readme_updating_doc_links\n\nRemove oracle extension & updating online docs link","shortMessageHtmlLink":"Merge pull request #654 from balinorLiang/readme_updating_doc_links"}},{"before":"3985b00d7a314b80a6bbff3082d6bb89d7c1df55","after":"f99105306f2e5a20f3ffa8fc195f0e981227e967","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-04-01T07:57:17.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Merge pull request #650 from bigplaice/modify_the_version_to_3.2\n\nModify the version number to be 3.2","shortMessageHtmlLink":"Merge pull request #650 from bigplaice/modify_the_version_to_3.2"}},{"before":"982db57273e3b195ae1ff4fdcb4e57a28fdbcfc7","after":"3985b00d7a314b80a6bbff3082d6bb89d7c1df55","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-03-28T07:43:13.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Merge pull request #646 from bigplaice/doc_build_fail\n\nfix the failure of doc build","shortMessageHtmlLink":"Merge pull request #646 from bigplaice/doc_build_fail"}},{"before":"ba82f0c0be41f830fddb5246526af76514e42302","after":"982db57273e3b195ae1ff4fdcb4e57a28fdbcfc7","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-03-28T07:42:44.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Merge pull request #647 from bigplaice/build_warning_clean\n\nClear warnings in build for IvorySQL 3.2","shortMessageHtmlLink":"Merge pull request #647 from bigplaice/build_warning_clean"}},{"before":"3fe37ba588ff41eff85406d355b1ab97243e287f","after":"ba82f0c0be41f830fddb5246526af76514e42302","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-03-28T07:42:00.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Merge pull request #648 from bigplaice/issue_592_fix\n\nfix issue 592","shortMessageHtmlLink":"Merge pull request #648 from bigplaice/issue_592_fix"}},{"before":"6cae76ea3c1c668858d11b84c13c4a595b79e21f","after":"3fe37ba588ff41eff85406d355b1ab97243e287f","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-03-22T01:44:13.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Merge pull request #644 from balinorLiang/ivorysql-3-readme-refactoring\n\nRefactoring Readme for ivorysql-3 stable branch","shortMessageHtmlLink":"Merge pull request #644 from balinorLiang/ivorysql-3-readme-refactoring"}},{"before":"78458829b75e5304c4e17d288fb71f3c19047322","after":"f49893845f3802fee75ea1b62af4bab557b0d5c0","ref":"refs/heads/master","pushedAt":"2024-03-21T10:02:51.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"refactoring Readme for IvorySQL installation (#643)","shortMessageHtmlLink":"refactoring Readme for IvorySQL installation (#643)"}},{"before":"8fc242b8ff200ee28b207f909929fb7fe36fab4f","after":"6cae76ea3c1c668858d11b84c13c4a595b79e21f","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-03-21T08:20:51.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Catch pg 16.2 for ivorysql rel 3 stable (#642)\n\n* Enlarge assertion in bloom_init() for false_positive_rate\r\n\r\nfalse_positive_rate is a parameter that can be set with the bloom\r\nopclass in BRIN, and setting it to a value of exactly 0.25 would trigger\r\nan assertion in the first INSERT done on the index with value set.\r\n\r\nThe assertion changed here relied on BLOOM_{MIN|MAX}_FALSE_POSITIVE_RATE\r\nthat are somewhat arbitrary values, and specifying an out-of-range value\r\nwould also trigger a failure when defining such an index. So, as-is,\r\nthe assertion was just doubling on the min-max check of the reloption.\r\nThis is now enlarged to check that it is a correct percentage value,\r\ninstead, based on a suggestion by Tom Lane.\r\n\r\nAuthor: Alexander Lakhin\r\nReviewed-by: Tom Lane, Shihao Zhong\r\nDiscussion: https://postgr.es/m/17969-a6c54de48026d694@postgresql.org\r\nBackpatch-through: 14\r\n\r\n* Fix use of OPENSSL in SSL tests if command is not found\r\n\r\n`openssl` is an optional dependency in the meson build as it may not be\r\ninstalled in an environment even if SSL libraries are around. The meson\r\nscripts assume that, but the SSL tests thought that it was a hard\r\ndependency, causing a meson installation to fail if `openssl` could not\r\nbe found. Like similar tests that depend on external commands, and to\r\nbe consistent with ./configure for the SSL tests, this commit makes the\r\ncommand existence optional in the tests.\r\n\r\nAuthor: Tristan Partin\r\nDiscussion: https://postgr.es/m/CWSX6P5OUUM5.N7B74KQ06ZP6@neon.tech\r\nBackpatch-through: 16\r\n\r\n* Don't install ldap_password_func in meson\r\n\r\nIt should be handled as a test module per commit b6a0d469ca.\r\n\r\n* Call pqPipelineFlush from PQsendFlushRequest\r\n\r\nWhen PQsendFlushRequest() was added by commit 69cf1d5429d4, we argued\r\nagainst adding a PQflush() call in it[1]. This is still the right\r\ndecision: if the user wants a flush to occur, they can just call that.\r\nHowever, we failed to realize that the message bytes could still be\r\ngiven to the kernel for transmitting when this can be made without\r\nblocking. That's what pqPipelineFlush() does, and it is done for every\r\nsingle other message type sent by libpq, so do that.\r\n\r\n(When the socket is in blocking mode this may indeed block, but that's\r\nwhat all the other libpq message-sending routines do, too.)\r\n\r\n[1] https://www.postgresql.org/message-id/202106252352.5ca4byasfun5%40alvherre.pgsql\r\n\r\nAuthor: Jelte Fennema-Nio \r\nDiscussion: https://postgr.es/m/CAGECzQTxZRevRWkKodE-SnJk1Yfm4eKT+8E4Cyq3MJ9YKTnNew@mail.gmail.com\r\n\r\n* pg_stat_statements: Remove duplicated tests for SET statements\r\n\r\nThis looks like a copy-paste mistake introduced in de2aca288569, that\r\nhas added checks for more patterns of SET statements while ignoring the\r\noriginal test block that existed.\r\n\r\nBackpatch down to where this has been introduced, as this shaves some\r\ncycles.\r\n\r\nAuthor: Sergei Kornilov\r\nDiscussion: https://postgr.es/m/5689421699428803@mail-sendbernar-production-main-46.myt.yp-c.yandex.net\r\nBackpatch-through: 16\r\n\r\n* Fix corner-case 64-bit integer subtraction bug on some platforms.\r\n\r\nWhen computing \"0 - INT64_MIN\", most platforms would report an\r\noverflow error, which is correct. However, platforms without integer\r\noverflow builtins or 128-bit integers would fail to spot the overflow,\r\nand incorrectly return INT64_MIN.\r\n\r\nBack-patch to all supported branches.\r\n\r\nPatch be me. Thanks to Jian He for initial investigation, and Laurenz\r\nAlbe and Tom Lane for review.\r\n\r\nDiscussion: https://postgr.es/m/CAEZATCUNK-AZSD0jVdgkk0N%3DNcAXBWeAEX-QU9AnJPensikmdQ%40mail.gmail.com\r\n\r\n* [IvorySQL] corresponding change of PG commit c396aca\r\n\r\n* Ensure we use the correct spelling of \"ensure\"\r\n\r\nWe seem to have accidentally used \"insure\" in a few places. Correct\r\nthat.\r\n\r\nAuthor: Peter Smith\r\nDiscussion: https://postgr.es/m/CAHut+Pv0biqrhA3pMhu40aDsj343mTsD75khKnHsLqR8P04f=Q@mail.gmail.com\r\nBackpatch-through: 12, oldest supported version\r\n\r\n* Fix AFTER ROW trigger execution in MERGE cross-partition update.\r\n\r\nWhen executing a MERGE UPDATE action, if the UPDATE is turned into a\r\ncross-partition DELETE then INSERT, do not attempt to invoke AFTER\r\nUPDATE ROW triggers, or any of the other post-update actions in\r\nExecUpdateEpilogue().\r\n\r\nFor consistency with a plain UPDATE command, such triggers should not\r\nbe fired (and typically fail anyway), and similarly, other post-update\r\nactions, such as WCO/RLS checks should not be executed, and might also\r\nlead to unexpected failures.\r\n\r\nTherefore, as with ExecUpdate(), make ExecMergeMatched() return\r\nimmediately if ExecUpdateAct() reports that a cross-partition update\r\nwas done, to be sure that no further processing is done for that\r\ntuple.\r\n\r\nBack-patch to v15, where MERGE was introduced.\r\n\r\nDiscussion: https://postgr.es/m/CAEZATCWjBgagyNZs02vgDF0DvASYj-iHTFtXG2-nP3orZhmtcw%40mail.gmail.com\r\n\r\n* Fix computation of varnullingrels when const-folding field selection.\r\n\r\nWe can simplify FieldSelect on a whole-row Var into a plain Var\r\nfor the selected field. However, we should copy the whole-row Var's\r\nvarnullingrels when we do so, because the new Var is clearly nullable\r\nby exactly the same rels as the original. Failure to do this led to\r\nerrors like \"wrong varnullingrels (b) (expected (b 3)) for Var 2/2\".\r\n\r\nRichard Guo, per bug #18184 from Marian Krucina. Back-patch to\r\nv16 where varnullingrels was introduced.\r\n\r\nDiscussion: https://postgr.es/m/18184-5868dd258782058e@postgresql.org\r\n\r\n* update IvorySQL regression test with pg commit 6bf2efb\r\n\r\n6bf2efb38285626a9de3004dd1c23d9a85453372 [6bf2efb]\r\n\r\nFix computation of varnullingrels when const-folding field selection.\r\n\r\nWe can simplify FieldSelect on a whole-row Var into a plain Var\r\nfor the selected field. However, we should copy the whole-row Var's\r\nvarnullingrels when we do so, because the new Var is clearly nullable\r\nby exactly the same rels as the original. Failure to do this led to\r\nerrors like \"wrong varnullingrels (b) (expected (b 3)) for Var 2/2\".\r\n\r\nRichard Guo, per bug #18184 from Marian Krucina. Back-patch to\r\nv16 where varnullingrels was introduced.\r\n\r\nDiscussion: https://postgr.es/m/18184-5868dd258782058e@postgresql.org\r\n\r\n* Remove incorrect file reference in comment.\r\n\r\nCommit b7eda3e0e moved XidInMVCCSnapshot() from tqual.c into snapmgr.c,\r\nbut follow-up commit c91560def incorrectly updated this reference. We\r\ncould fix it, but as pointed out by Daniel Gustafsson, 1) the reader can\r\neasily find the file that contains the definition of that function, e.g.\r\nby grepping, and 2) this kind of reference is prone to going stale; so\r\nlet's just remove it.\r\n\r\nBack-patch to all supported branches.\r\n\r\nReviewed by Daniel Gustafsson.\r\n\r\nDiscussion: https://postgr.es/m/CAPmGK145VdKkPBLWS2urwhgsfidbSexwY-9zCL6xSUJH%2BBTUUg%40mail.gmail.com\r\n\r\n* doc: Add missing semicolon in example\r\n\r\nOne of the examples on the SELECT page was missing a semicolon from\r\na listing which has the look and feel of being a psql session. This\r\nadds the missing semicolon and also removes the newline between the\r\nquery and results to match the other examples nearby.\r\n\r\nBackpatch to all supported branches to avoid backpatching issues on\r\nthis page.\r\n\r\nReported-by: tim.needham2@gmail.com\r\nDiscussion: https://postgr.es/m/169965004097.225187.12941375915673151540@wrigleys.postgresql.org\r\nBackpatch-through: v12\r\n\r\n* Don't release index root page pin in ginFindParents().\r\n\r\nIt's clearly stated in the comments that ginFindParents() must keep\r\nthe pin on the index's root page that's associated with the topmost\r\nGinBtreeStack item. However, the code path for the case that the\r\ndesired downlink has been pushed down to the next index level\r\nignored this proviso, and would release the pin anyway if we were\r\nstill examining the root level. That led to an assertion failure\r\nor \"buffer NNNN is not owned by resource owner\" error later, when\r\nwe try to release the pin again at the end of the insertion.\r\n\r\nThis is quite hard to reproduce, since it can only happen if an\r\nindex root page split occurs concurrently with our own insertion.\r\nThanks to Jeff Janes for finding a test case that triggers it\r\noften enough to allow investigation.\r\n\r\nThis has been there since the beginning of GIN, so back-patch\r\nto all supported branches.\r\n\r\nDiscussion: https://postgr.es/m/CAMkU=1yCAKtv86dMrD__Ja-7KzjE=uMeKX8y__cx5W-OEWy2ow@mail.gmail.com\r\n\r\n* doc: correct description of libpq's PQsetnonblocking() mode\r\n\r\nReported-by: Yugo NAGATA\r\n\r\nDiscussion: https://postgr.es/m/20210713115949.702986955f8ccf23fa81073c@sraoss.co.jp\r\n\r\nBackpatch-through: 12-16, master already done\r\n\r\n* doc: restructure ALTER DEFAULT PRIVILEGES\r\n\r\nClarify that default privileges are not inherited and reorder\r\nparagraphs. This is a follow up to a recent ALTER DEFAULT PRIVILEGES\r\ndoc patch.\r\n\r\nReported-by: Sanjay Minni\r\n\r\nDiagnosed-by: AMpxBo=M35hcH1g4Vg=KRJ0-77FOJcvdrdiVF5KSOAdOG-LvKQ@mail.gmail.com\r\n\r\nCo-authored-by: Laurenz Albe\r\n\r\nBackpatch-through: 16\r\n\r\n* doc: clarify handling of range upper/lower/upper_inf/lower_inf()\r\n\r\nClarify handling of infinite range bounds.\r\n\r\nReported-by: jani.rahkola@iki.fi\r\n\r\nDiscussion: https://postgr.es/m/160508672127.25505.8356390205508789564@wrigleys.postgresql.org\r\n\r\nCo-authored-by: Laurenz Albe\r\n\r\nBackpatch-through: 16\r\n\r\n* doc: clarify handling of ts_headline() operators & extra words\r\n\r\nReported-by: Ngigi Waithaka & Alex Malek\r\n\r\nBug: 15172\r\n\r\nDiscussion: https://postgr.es/m/152461454026.19805.6310947081647212894@wrigleys.postgresql.org\r\n\r\nBackpatch-through: 16\r\n\r\n* Don't try to dump RLS policies or security labels for extension objects.\r\n\r\ncheckExtensionMembership() set the DUMP_COMPONENT_SECLABEL and\r\nDUMP_COMPONENT_POLICY flags for extension member objects, even though\r\nwe lack any infrastructure for tracking extensions' initial settings\r\nof these properties. This is not OK. The result was that a dump\r\nwould always include commands to set these properties for extension\r\nobjects that have them, with at least three negative consequences:\r\n\r\n1. The restoring user might not have privilege to set these properties\r\non these objects.\r\n\r\n2. The properties might be incorrect/irrelevant for the version of the\r\nextension that's installed in the destination database.\r\n\r\n3. The dump itself might fail, in the case of RLS properties attached\r\nto extension tables that the dumping user lacks privilege to LOCK.\r\n(That's because we must get at least AccessShareLock to ensure that\r\nwe don't fail while trying to decompile the RLS expressions.)\r\n\r\nWhen and if somebody cares to invent initial-state infrastructure for\r\nextensions' RLS policies and security labels, we could think about\r\nfinding another way around problem #3. But in the absence of such\r\ninfrastructure, this whole thing is just wrong and we shouldn't do it.\r\n\r\n(Note: this applies only to ordinary dumps; binary-upgrade dumps\r\nstill dump and restore extension member objects separately, with\r\nall properties.)\r\n\r\nTom Lane and Jacob Champion. Back-patch to all supported branches.\r\n\r\nDiscussion: https://postgr.es/m/00d46a48-3324-d9a0-49bf-e7f0f11d1038@timescale.com\r\n\r\n* update IvorySQL regression test with pg commit 64d2467\r\n\r\nDon't try to dump RLS policies or security labels for extension objects.\r\n\r\ncheckExtensionMembership() set the DUMP_COMPONENT_SECLABEL and\r\nDUMP_COMPONENT_POLICY flags for extension member objects, even though\r\nwe lack any infrastructure for tracking extensions' initial settings\r\nof these properties. This is not OK. The result was that a dump\r\nwould always include commands to set these properties for extension\r\nobjects that have them, with at least three negative consequences:\r\n\r\n* Allow new role 'regress_dump_login_role' to log in under SSPI.\r\n\r\nSemi-blind attempt to fix a70f2a57f to work on Windows,\r\nalong the same lines as 5253519b2. Per buildfarm.\r\n\r\n* update IvorySQL regression test with pg commit f1674ac\r\n\r\nAllow new role 'regress_dump_login_role' to log in under SSPI.\r\n\r\nSemi-blind attempt to fix a70f2a57f to work on Windows,\r\nalong the same lines as 5253519b2. Per buildfarm.\r\n\r\n* Fix capitalization of \"Tcl\"\r\n\r\n* Fix fallback implementation for pg_atomic_test_set_flag().\r\n\r\nThe fallback implementation of pg_atomic_test_set_flag() that uses\r\natomic-exchange gives pg_atomic_exchange_u32_impl() an extra\r\nargument. This issue has been present since the introduction of\r\nthe atomics API in commit b64d92f1a5.\r\n\r\nReviewed-by: Andres Freund\r\nDiscussion: https://postgr.es/m/20231114035439.GA1809032%40nathanxps13\r\nBackpatch-through: 12\r\n\r\n* Ensure we preprocess expressions before checking their volatility.\r\n\r\ncontain_mutable_functions and contain_volatile_functions give\r\nreliable answers only after expression preprocessing (specifically\r\neval_const_expressions). Some places understand this, but some did\r\nnot get the memo --- which is not entirely their fault, because the\r\nproblem is documented only in places far away from those functions.\r\nIntroduce wrapper functions that allow doing the right thing easily,\r\nand add commentary in hopes of preventing future mistakes from\r\ncopy-and-paste of code that's only conditionally safe.\r\n\r\nTwo actual bugs of this ilk are fixed here. We failed to preprocess\r\ncolumn GENERATED expressions before checking mutability, so that the\r\ncode could fail to detect the use of a volatile function\r\ndefault-argument expression, or it could reject a polymorphic function\r\nthat is actually immutable on the datatype of interest. Likewise,\r\ncolumn DEFAULT expressions weren't preprocessed before determining if\r\nit's safe to apply the attmissingval mechanism. A false negative\r\nwould just result in an unnecessary table rewrite, but a false\r\npositive could allow the attmissingval mechanism to be used in a case\r\nwhere it should not be, resulting in unexpected initial values in a\r\nnew column.\r\n\r\nIn passing, re-order the steps in ComputePartitionAttrs so that its\r\nchecks for invalid column references are done before applying\r\nexpression_planner, rather than after. The previous coding would\r\nnot complain if a partition expression contains a disallowed column\r\nreference that gets optimized away by constant folding, which seems\r\nto me to be a behavior we do not want.\r\n\r\nPer bug #18097 from Jim Keener. Back-patch to all supported versions.\r\n\r\nDiscussion: https://postgr.es/m/18097-ebb179674f22932f@postgresql.org\r\n\r\n* update IvorySQL regression test with pg commit f07a303\r\n\r\nEnsure we preprocess expressions before checking their volatility.\r\n\r\ncontain_mutable_functions and contain_volatile_functions give\r\nreliable answers only after expression preprocessing (specifically\r\neval_const_expressions). Some places understand this, but some did\r\nnot get the memo --- which is not entirely their fault, because the\r\nproblem is documented only in places far away from those functions.\r\nIntroduce wrapper functions that allow doing the right thing easily,\r\nand add commentary in hopes of preventing future mistakes from\r\ncopy-and-paste of code that's only conditionally safe.\r\n\r\nTwo actual bugs of this ilk are fixed here. We failed to preprocess\r\ncolumn GENERATED expressions before checking mutability, so that the\r\ncode could fail to detect the use of a volatile function\r\ndefault-argument expression, or it could reject a polymorphic function\r\nthat is actually immutable on the datatype of interest. Likewise,\r\ncolumn DEFAULT expressions weren't preprocessed before determining if\r\nit's safe to apply the attmissingval mechanism. A false negative\r\nwould just result in an unnecessary table rewrite, but a false\r\npositive could allow the attmissingval mechanism to be used in a case\r\nwhere it should not be, resulting in unexpected initial values in a\r\nnew column.\r\n\r\nIn passing, re-order the steps in ComputePartitionAttrs so that its\r\nchecks for invalid column references are done before applying\r\nexpression_planner, rather than after. The previous coding would\r\nnot complain if a partition expression contains a disallowed column\r\nreference that gets optimized away by constant folding, which seems\r\nto me to be a behavior we do not want.\r\n\r\nPer bug #18097 from Jim Keener. Back-patch to all supported versions.\r\n\r\nDiscussion: https://postgr.es/m/18097-ebb179674f22932f@postgresql.org\r\n\r\n* llvmjit: Use explicit LLVMContextRef for inlining\r\n\r\nWhen performing inlining LLVM unfortunately \"leaks\" types (the\r\ntypes survive and are usable, but a new round of inlining will\r\nrecreate new structurally equivalent types). This accumulation\r\nwill over time amount to a memory leak which for some queries\r\ncan be large enough to trigger the OOM process killer.\r\n\r\nTo avoid accumulation of types, all IR related data is stored\r\nin an LLVMContextRef which is dropped and recreated in order\r\nto release all types. Dropping and recreating incurs overhead,\r\nso it will be done only after 100 queries. This is a heuristic\r\nwhich might be revisited, but until we can get the size of the\r\ncontext from LLVM we are flying a bit blind.\r\n\r\nThis issue has been reported several times, there may be more\r\nreferences to it in the archives on top of the threads linked\r\nbelow.\r\n\r\nThis is a backpatch of 9dce22033d5 to all supported branches.\r\n\r\nReported-By: Justin Pryzby \r\nReported-By: Kurt Roeckx \r\nReported-By: Jaime Casanova \r\nReported-By: Lauri Laanmets \r\nAuthor: Andres Freund and Daniel Gustafsson\r\nDiscussion: https://postgr.es/m/7acc8678-df5f-4923-9cf6-e843131ae89d@www.fastmail.com\r\nDiscussion: https://postgr.es/m/20201218235607.GC30237@telsasoft.com\r\nDiscussion: https://postgr.es/m/CAPH-tTxLf44s3CvUUtQpkDr1D8Hxqc2NGDzGXS1ODsfiJ6WSqA@mail.gmail.com\r\nBackpatch-through: v12\r\n\r\n* meson: Fix missing dependency from install-quiet to sepgsql.sql\r\n\r\nThis could lead to an error like\r\n\r\nERROR: File 'contrib/sepgsql/sepgsql.sql' could not be found\r\n\r\nBackpatch: 16-, where meson was added\r\n\r\n* doc: improve description of privileges for MERGE and update glossary.\r\n\r\nOn the MERGE page, the description of the privileges required could be\r\ntaken to imply that the SELECT privilege is required on all columns of\r\nthe data source, whereas actually it is only required on the columns\r\nreferred to by conditions or expressions in the MERGE command. Re-word\r\nit to make that a little clearer, and mention expressions as well as\r\nconditions.\r\n\r\nAlso, add a glossary entry for MERGE, and nearby on the glossary page,\r\nmention MERGE in the list of commands that cannot update a\r\nmaterialized view.\r\n\r\nNoted by Jian He. Patch by me, reviewed by Jian He.\r\n\r\nDiscussion: https://postgr.es/m/CACJufxHuSoRXKwr0MtSFLXuT2nFVWcVfEWhxg7qdP9h%2Bs3a%2BUw%40mail.gmail.com\r\n\r\n* Guard against overflow in interval_mul() and interval_div().\r\n\r\nCommits 146604ec43 and a898b409f6 added overflow checks to\r\ninterval_mul(), but not to interval_div(), which contains almost\r\nidentical code, and so is susceptible to the same kinds of\r\noverflows. In addition, those checks did not catch all possible\r\noverflow conditions.\r\n\r\nAdd additional checks to the \"cascade down\" code in interval_mul(),\r\nand copy all the overflow checks over to the corresponding code in\r\ninterval_div(), so that they both generate \"interval out of range\"\r\nerrors, rather than returning bogus results.\r\n\r\nGiven that these errors are relatively easy to hit, back-patch to all\r\nsupported branches.\r\n\r\nPer bug #18200 from Alexander Lakhin, and subsequent investigation.\r\n\r\nDiscussion: https://postgr.es/m/18200-5ea288c7b2d504b1%40postgresql.org\r\n\r\n* Fix typo in person's name.\r\n\r\nBack-patch v16..v12 (all supported versions); master is unaffected.\r\n\r\n* Lock table in DROP STATISTICS\r\n\r\nThe DROP STATISTICS code failed to properly lock the table, leading to\r\n\r\n ERROR: tuple concurrently deleted\r\n\r\nwhen executed concurrently with ANALYZE.\r\n\r\nFixed by modifying RemoveStatisticsById() to acquire the same lock as\r\nANALYZE. This function is called only by DROP STATISTICS, as ANALYZE\r\ncalls RemoveStatisticsDataById() directly.\r\n\r\nReported by Justin Pryzby, fix by me. Backpatch through 12. The code was\r\nlike this since it was introduced in 10, but older releases are EOL.\r\n\r\nReported-by: Justin Pryzby\r\nReviewed-by: Tom Lane\r\nBackpatch-through: 12\r\n\r\nDiscussion: https://postgr.es/m/ZUuk-8CfbYeq6g_u@pryzbyj2023\r\n\r\n* Fix query checking consistency of table amhandlers in opr_sanity.sql\r\n\r\nAs written, the query checked for an access method of type 's', which is\r\nnot an AM type supported in the core code.\r\n\r\nError introduced by 8586bf7ed888. As this query is not checking what it\r\nshould, backpatch all the way down.\r\n\r\nReviewed-by: Aleksander Alekseev\r\nDiscussion: https://postgr.es/m/ZVxJkAJrKbfHETiy@paquier.xyz\r\nBackpatch-through: 12\r\n\r\n* update IvorySQL regression test with pg commit 43bbaa8\r\n\r\nFix query checking consistency of table amhandlers in opr_sanity.sql\r\n\r\nAs written, the query checked for an access method of type 's', which is\r\nnot an AM type supported in the core code.\r\n\r\nError introduced by 8586bf7ed888. As this query is not checking what it\r\nshould, backpatch all the way down.\r\n\r\nReviewed-by: Aleksander Alekseev\r\nDiscussion: https://postgr.es/m/ZVxJkAJrKbfHETiy@paquier.xyz\r\nBackpatch-through: 12\r\n\r\n* doc: FreeBSD uses camcontrol identify, not atacontrol, for cache\r\n\r\nThis is for IDE drive cache control, same as SCSI (already documented\r\nproperly).\r\n\r\nReported-by: John Ekins\r\n\r\nDiscussion: https://postgr.es/m/20170808224017.8424.69170@wrigleys.postgresql.org\r\n\r\nAuthor: John Ekins\r\n\r\nBackpatch-through: 12\r\n\r\n* Fix the initial sync tables with no columns.\r\n\r\nThe copy command formed for initial sync was using parenthesis for tables\r\nwith no columns leading to syntax error. This patch avoids adding\r\nparenthesis for such tables.\r\n\r\nReported-by: Justin G\r\nAuthor: Vignesh C\r\nReviewed-by: Peter Smith, Amit Kapila\r\nBackpatch-through: 15\r\nDiscussion: http://postgr.es/m/18203-df37fe354b626670@postgresql.org\r\n\r\n* update IvorySQL regression test with pg commit 1b6da28\r\n\r\nFix the initial sync tables with no columns.\r\n\r\nThe copy command formed for initial sync was using parenthesis for tables\r\nwith no columns leading to syntax error. This patch avoids adding\r\nparenthesis for such tables.\r\n\r\nReported-by: Justin G\r\nAuthor: Vignesh C\r\nReviewed-by: Peter Smith, Amit Kapila\r\nBackpatch-through: 15\r\nDiscussion: http://postgr.es/m/18203-df37fe354b626670@postgresql.org\r\n\r\n* Fix resource leak when a FDW's ForeignAsyncRequest function fails\r\n\r\nIf an error is thrown after calling CreateWaitEventSet(), the memory\r\nof a WaitEventSet is free'd as it's allocated in the short-lived\r\nmemory context, but the file descriptor (on epoll- or kqueue-based\r\nsystems) or handles (on Windows) that it contains are leaked.\r\n\r\nUse PG_TRY-FINALLY to ensure it gets freed. (On master, I will apply a\r\nbetter fix, using ResourceOwners to track the WaitEventSet, but that's\r\nnot backpatchable.)\r\n\r\nThe added test doesn't check for leaking resources, so it passed even\r\nbefore this commit. But at least it covers the code path.\r\n\r\nIn the passing, fix misleading comment on what the 'nevents' argument\r\nto WaitEventSetWait means.\r\n\r\nReport by Alexander Lakhin, analysis and suggestion for the fix by Tom\r\nLane. Fixes bug #17828. Backpatch to v14 where async execution was\r\nintroduced, but master gets a different fix.\r\n\r\nDiscussion: https://www.postgresql.org/message-id/17828-122da8cba23236be@postgresql.org\r\nDiscussion: https://www.postgresql.org/message-id/472235.1678387869@sss.pgh.pa.us\r\n\r\n* Fix timing-dependent failure in GSSAPI data transmission.\r\n\r\nWhen using GSSAPI encryption in non-blocking mode, libpq sometimes\r\nfailed with \"GSSAPI caller failed to retransmit all data needing\r\nto be retried\". The cause is that pqPutMsgEnd rounds its transmit\r\nrequest down to an even multiple of 8K, and sometimes that can lead\r\nto not requesting a write of data that was requested to be written\r\n(but reported as not written) earlier. That can upset pg_GSS_write's\r\nlogic for dealing with not-yet-written data, since it's possible\r\nthe data in question had already been incorporated into an encrypted\r\npacket that we weren't able to send during the previous call.\r\n\r\nWe could fix this with a one-or-two-line hack to disable pqPutMsgEnd's\r\nround-down behavior, but that seems like making the caller work around\r\na behavior that pg_GSS_write shouldn't expose in this way. Instead,\r\nadjust pg_GSS_write to never report a partial write: it either\r\nreports a complete write, or reflects the failure of the lower-level\r\npqsecure_raw_write call. The requirement still exists for the caller\r\nto present at least as much data as on the previous call, but with\r\nthe caller-visible write start point not moving there is no temptation\r\nfor it to present less. We lose some ability to reclaim buffer space\r\nearly, but I doubt that that will make much difference in practice.\r\n\r\nThis also gets rid of a rather dubious assumption that \"any\r\ninteresting failure condition (from pqsecure_raw_write) will recur\r\non the next try\". We've not seen failure reports traceable to that,\r\nbut I've never trusted it particularly and am glad to remove it.\r\n\r\nMake the same adjustments to the equivalent backend routine\r\nbe_gssapi_write(). It is probable that there's no bug on the backend\r\nside, since we don't have a notion of nonblock mode there; but we\r\nshould keep the logic the same to ease future maintenance.\r\n\r\nPer bug #18210 from Lars Kanis. Back-patch to all supported branches.\r\n\r\nDiscussion: https://postgr.es/m/18210-4c6d0b14627f2eb8@postgresql.org\r\n\r\n* doc: add docs for age(xid) and mxid_age(xid)\r\n\r\nReported-by: David Rowley\r\n\r\nDiscussion: https://postgr.es/m/CAKJS1f_OQpz7rpe-KJmskVxbU06buiXbfonxG3JLB+nGCJ5E=g@mail.gmail.com\r\n\r\nBackpatch-through: 16\r\n\r\n* doc: mention vacuum's removal of commit timestamp information\r\n\r\nReported-by: Kyotaro HORIGUCHI\r\n\r\nDiscussion: https://postgr.es/m/20180622.172132.230342845.horiguchi.kyotaro@lab.ntt.co.jp\r\n\r\nCo-authored-by: Kyotaro HORIGUCHI\r\n\r\nBackpatch-through: 16\r\n\r\n* Doc: list AT TIME ZONE and COLLATE in operator precedence table.\r\n\r\nThese constructs have precedence, but we forgot to list them.\r\nIn HEAD, mention AT LOCAL as well as AT TIME ZONE.\r\n\r\nPer gripe from Shay Rojansky.\r\n\r\nDiscussion: https://postgr.es/m/CADT4RqBPdbsZW7HS1jJP319TMRHs1hzUiP=iRJYR6UqgHCrgNQ@mail.gmail.com\r\n\r\n* Fix race condition with BIO methods initialization in libpq with threads\r\n\r\nThe libpq code in charge of creating per-connection SSL objects was\r\nprone to a race condition when loading the custom BIO methods needed by\r\nmy_SSL_set_fd(). As BIO methods are stored as a static variable, the\r\ninitialization of a connection could fail because it could be possible\r\nto have one thread refer to my_bio_methods while it is being manipulated\r\nby a second concurrent thread.\r\n\r\nThis error has been introduced by 8bb14cdd33de, that has removed\r\nssl_config_mutex around the call of my_SSL_set_fd(), that itself sets\r\nthe custom BIO methods used in libpq. Like previously, the BIO method\r\ninitialization is now protected by the existing ssl_config_mutex, itself\r\ninitialized earlier for WIN32.\r\n\r\nWhile on it, document that my_bio_methods is protected by\r\nssl_config_mutex, as this can be easy to miss.\r\n\r\nReported-by: Willi Mann\r\nAuthor: Willi Mann, Michael Paquier\r\nDiscussion: https://postgr.es/m/e77abc4c-4d03-4058-a9d7-ef0035657e04@celonis.com\r\nBackpatch-through: 12\r\n\r\n* Avoid unconditionally filling in missing values with NULL in pgoutput.\r\n\r\n52e4f0cd4 introduced a bug in pgoutput in which missing values in tuples\r\nwere incorrectly filled in with NULL. The problem was the use of\r\nCreateTupleDescCopy where CreateTupleDescCopyConstr was required, as the\r\nformer drops the constraints in the tuple description (specifically, the\r\ndefault value constraint) on the floor.\r\n\r\nThe bug could result in incorrectness when a table replicated via\r\n`REPLICA IDENTITY FULL` underwent a schema change that added a column\r\nwith a default value. The problem is that in such cases updates fill NULL\r\nvalues in old tuples for missing columns for default values. Then on the\r\nsubscriber, we failed to find a matching tuple and missed updating the\r\nrequired row.\r\n\r\nAuthor: Nikhil Benesch\r\nReviewed-by: Hou Zhijie, Amit Kapila\r\nBackpatch-through: 15\r\nDiscussion: http://postgr.es/m/CAPWqQZTEpZQamYsGMn6ZDRvVywwpVPiKH6OY4KSgA+NmeqFNzA@mail.gmail.com\r\n\r\n* update IvorySQL regression test with pg commit d7ca920\r\n\r\nAvoid unconditionally filling in missing values with NULL in pgoutput.\r\n\r\n52e4f0cd4 introduced a bug in pgoutput in which missing values in tuples\r\nwere incorrectly filled in with NULL. The problem was the use of\r\nCreateTupleDescCopy where CreateTupleDescCopyConstr was required, as the\r\nformer drops the constraints in the tuple description (specifically, the\r\ndefault value constraint) on the floor.\r\n\r\nThe bug could result in incorrectness when a table replicated via\r\n`REPLICA IDENTITY FULL` underwent a schema change that added a column\r\nwith a default value. The problem is that in such cases updates fill NULL\r\nvalues in old tuples for missing columns for default values. Then on the\r\nsubscriber, we failed to find a matching tuple and missed updating the\r\nrequired row.\r\n\r\nAuthor: Nikhil Benesch\r\nReviewed-by: Hou Zhijie, Amit Kapila\r\nBackpatch-through: 15\r\nDiscussion: http://postgr.es/m/CAPWqQZTEpZQamYsGMn6ZDRvVywwpVPiKH6OY4KSgA+NmeqFNzA@mail.gmail.com\r\n\r\n* Fix CREATE INDEX CONCURRENTLY example\r\n\r\nIt fails to use the CONCURRENTLY keyword where it was necessary, so add\r\nit. This text was added to pg11 in commit 5efd604ec0a3; backpatch to pg12.\r\n\r\nAuthor: Nikolay Samokhvalov \r\nDiscussion: https://postgr.es/m/CAM527d9iz6+=_c7EqSKaGzjqWvSeCeRVVvHZ1v3gDgjTtvgsbw@mail.gmail.com\r\n\r\n* Add CHECK_FOR_INTERRUPTS() in scram_SaltedPassword() for the backend\r\n\r\nscram_SaltedPassword() could take a long time to compute when the number\r\nof iterations used is large enough, and this code uses a tight loop to\r\ncompute a salted password.\r\n\r\nNote that the same issue exists in libpq when using \\password and a\r\nlarge iteration number, but this cannot be interrupted. A CFI in the\r\nbackend is useful for server-side computations, at least.\r\n\r\nBackpatch down to 16, where the user-settable GUC scram_iterations has\r\nbeen added.\r\n\r\nAuthor: Bowen Shi\r\nReviewed-by: Aleksander Alekseev, Daniel Gustafsson\r\nDiscussion: https://postgr.es/m/CAM_vCueV6xfr08KczfaCEk5J_qeTZtgqN7+orkNLx=g+phE82Q@mail.gmail.com\r\nBackpatch-through: 16\r\n\r\n* Fix assertions with RI triggers in heap_update and heap_delete.\r\n\r\nIf the tuple being updated is not visible to the crosscheck snapshot,\r\nwe return TM_Updated but the assertions would not hold in that case.\r\nMove them to before the cross-check.\r\n\r\nFixes bug #17893. Backpatch to all supported versions.\r\n\r\nAuthor: Alexander Lakhin\r\nBackpatch-through: 12\r\nDiscussion: https://www.postgresql.org/message-id/17893-35847009eec517b5%40postgresql.org\r\n\r\n* update IvorySQL regression test with pg commit 9fee323\r\n\r\nFix assertions with RI triggers in heap_update and heap_delete.\r\n\r\nIf the tuple being updated is not visible to the crosscheck snapshot,\r\nwe return TM_Updated but the assertions would not hold in that case.\r\nMove them to before the cross-check.\r\n\r\nFixes bug #17893. Backpatch to all supported versions.\r\n\r\nAuthor: Alexander Lakhin\r\nBackpatch-through: 12\r\nDiscussion: https://www.postgresql.org/message-id/17893-35847009eec517b5%40postgresql.org\r\n\r\n* Use BIO_{get,set}_app_data instead of BIO_{get,set}_data.\r\n\r\nWe should have done it this way all along, but we accidentally got\r\naway with using the wrong BIO field up until OpenSSL 3.2. There,\r\nthe library's BIO routines that we rely on use the \"data\" field\r\nfor their own purposes, and our conflicting use causes assorted\r\nweird behaviors up to and including core dumps when SSL connections\r\nare attempted. Switch to using the approved field for the purpose,\r\ni.e. app_data.\r\n\r\nWhile at it, remove our configure probes for BIO_get_data as well\r\nas the fallback implementation. BIO_{get,set}_app_data have been\r\nthere since long before any OpenSSL version that we still support,\r\neven in the back branches.\r\n\r\nAlso, update src/test/ssl/t/001_ssltests.pl to allow for a minor\r\nchange in an error message spelling that evidently came in with 3.2.\r\n\r\nTristan Partin and Bo Andreson. Back-patch to all supported branches.\r\n\r\nDiscussion: https://postgr.es/m/CAN55FZ1eDDYsYaL7mv+oSLUij2h_u6hvD4Qmv-7PK7jkji0uyQ@mail.gmail.com\r\n\r\n* update IvorySQL regression test with pg commit efa8f60\r\n\r\nUse BIO_{get,set}_app_data instead of BIO_{get,set}_data.\r\n\r\nWe should have done it this way all along, but we accidentally got\r\naway with using the wrong BIO field up until OpenSSL 3.2. There,\r\nthe library's BIO routines that we rely on use the \"data\" field\r\nfor their own purposes, and our conflicting use causes assorted\r\nweird behaviors up to and including core dumps when SSL connections\r\nare attempted. Switch to using the approved field for the purpose,\r\ni.e. app_data.\r\n\r\nWhile at it, remove our configure probes for BIO_get_data as well\r\nas the fallback implementation. BIO_{get,set}_app_data have been\r\nthere since long before any OpenSSL version that we still support,\r\neven in the back branches.\r\n\r\nAlso, update src/test/ssl/t/001_ssltests.pl to allow for a minor\r\nchange in an error message spelling that evidently came in with 3.2.\r\n\r\nTristan Partin and Bo Andreson. Back-patch to all supported branches.\r\n\r\nDiscussion: https://postgr.es/m/CAN55FZ1eDDYsYaL7mv+oSLUij2h_u6hvD4Qmv-7PK7jkji0uyQ@mail.gmail.com\r\n\r\n* Fix BackgroundPsql's set_query_timer_restart() issue without argument.\r\n\r\nThe set_query_timer_restart() required an argument to define a value\r\nto query_timer_restart, but none of the existing callers passes an\r\nargument to this function.\r\n\r\nThis changes the function to set a value without an argument.\r\n\r\nBackpatch through 16 where the background psql TAP functions were\r\nrefactored by 664d757531e1.\r\n\r\nReviewed-by: Bharath Rupireddy, Tom Lane\r\nDiscussion: https://postgr.es/m/CAD21AoA0B6VKe_5A9nZi8i5umwSN-zJJuPVNht9DaOZ9SJumMA@mail.gmail.com\r\nBackpatch-through: 16\r\n\r\n* update IvorySQL regression test with pg commit c684d7c\r\n\r\nFix BackgroundPsql's set_query_timer_restart() issue without argument.\r\n\r\nThe set_query_timer_restart() required an argument to define a value\r\nto query_timer_restart, but none of the existing callers passes an\r\nargument to this function.\r\n\r\nThis changes the function to set a value without an argument.\r\n\r\nBackpatch through 16 where the background psql TAP functions were\r\nrefactored by 664d757531e1.\r\n\r\nReviewed-by: Bharath Rupireddy, Tom Lane\r\nDiscussion: https://postgr.es/m/CAD21AoA0B6VKe_5A9nZi8i5umwSN-zJJuPVNht9DaOZ9SJumMA@mail.gmail.com\r\nBackpatch-through: 16\r\n\r\n* update IvorySQL regression test with pg commit 43bbaa8 #2\r\n\r\n43bbaa83f95cd5f66e556ca521b7c22d80be571d [43bbaa8]\r\nFix query checking consistency of table amhandlers in opr_sanity.sql\r\n\r\nThis commit of pg touched src/test/regress/expected/opr_sanity.out\r\nHowever IvorySQL has one more file:\r\n src/oracle_test/regress/expected/opr_sanity_1.out\r\nNeed apply same change to opr_sanity_1.out\r\n\r\n* Fix wrong description of BackgroundPsql's timeout.\r\n\r\nBackpatch through 16 where this was introduced by 664d757531e1.\r\n\r\nReviewed-by: Daniel Gustafsson\r\nBackpatch-through: 16\r\nDiscussion: http://postgr.es/m/CAD21AoBXMEqDBLoDuAWVWoTLYB4aNsxx4oYNmyJJbhfq_vGQBQ@mail.gmail.com\r\n\r\n* update IvorySQL regression test with pg commit 2d758dc\r\n\r\nFix wrong description of BackgroundPsql's timeout.\r\n\r\nBackpatch through 16 where this was introduced by 664d757531e1.\r\n\r\nReviewed-by: Daniel Gustafsson\r\nBackpatch-through: 16\r\nDiscussion: http://postgr.es/m/CAD21AoBXMEqDBLoDuAWVWoTLYB4aNsxx4oYNmyJJbhfq_vGQBQ@mail.gmail.com\r\n\r\n* meson: Improve/fix Python version selection\r\n\r\nWhen we look for the Python installation using the meson python\r\nmodule, we should make it use the python program previously determined\r\nby the 'PYTHON' option. Otherwise, it will just use its own search\r\nand the 'PYTHON' option won't affect it. We need this to be able to\r\nselect the Python installation to build PL/Python against.\r\n\r\nReviewed-by: Andres Freund \r\nDiscussion: https://www.postgresql.org/message-id/flat/3f5427e8-cef6-474d-ae88-13db1bfdc1a7%40eisentraut.org\r\n\r\n* Adjust obsolete comment explaining set_stack_base().\r\n\r\nCommit 7389aad6 removed the notion of backends started from inside a\r\nsignal handler. A stray comment still referred to them, while\r\nexplaining the need for a call to set_stack_base(). That leads to the\r\nquestion of whether we still need the call in !EXEC_BACKEND builds.\r\nThere doesn't seem to be much point in suppressing it now, as it doesn't\r\nhurt and probably helps to measure the stack base from the exact same\r\nplace in EXEC_BACKEND and !EXEC_BACKEND builds.\r\n\r\nBack-patch to 16.\r\n\r\nReported-by: Heikki Linnakangas \r\nReported-by: Tristan Partin \r\nReported-by: Andres Freund \r\nDiscussion: https://postgr.es/m/CA%2BhUKG%2BEJHcevNGNOxVWxTNFbuB%3Dvjf4U68%2B85rAC_Sxvy2zEQ%40mail.gmail.com\r\n\r\n* meson: Stop using deprecated way getting path of files\r\n\r\nThe just released meson 1.3 strongly deprecated a hack we were using, emitting\r\na noisy warning (the hack basically depended on an implementation detail to\r\nwork). Turns out there has been a better way available for a while, I just\r\nhadn't found it. 1.4 added a more convenient approach, but we can't rely on\r\nthat.\r\n\r\nReviewed-by: Tristan Partin \r\nDiscussion: https://postgr.es/m/20231129185053.s6c7f73eg7b4ztfi@awork3.anarazel.de\r\nBackpatch: 16-, where the meson build was added.\r\n\r\n* doc: Update info on information schema usage tables\r\n\r\nCommit f40c6969d0 added the information schema usage tables but added\r\ndocumentation that they did not fully work yet. Commit e717a9a18b\r\nthen added SQL-standard function bodies, which made the information\r\nschema views fully functional, but it neglected to update the\r\ndocumentation. This is now done here.\r\n\r\nReported-by: Erki Eessaar \r\nReviewed-by: Erki Eessaar \r\nDiscussion: https://www.postgresql.org/message-id/flat/AM9PR01MB8268EC7B696F9FE346CA5B93FEB8A%40AM9PR01MB8268.eurprd01.prod.exchangelabs.com\r\n\r\n* Check collation when creating partitioned index\r\n\r\nWhen creating a partitioned index, the partition key must be a subset\r\nof the index's columns. But this currently doesn't check that the\r\ncollations between the partition key and the index definition match.\r\nSo you can construct a unique index that fails to enforce uniqueness.\r\n(This would most likely involve a nondeterministic collation, so it\r\nwould have to be crafted explicitly and is not something that would\r\njust happen by accident.)\r\n\r\nThis patch adds the required collation check. As a result, any\r\npreviously allowed unique index that has a collation mismatch would no\r\nlonger be allowed to be created.\r\n\r\nReviewed-by: Tom Lane \r\nDiscussion: https://www.postgresql.org/message-id/flat/3327cb54-f7f1-413b-8fdb-7a9dceebb938%40eisentraut.org\r\n\r\n* doc: Remove reference to trigger file regarding promotion\r\n\r\nThe wording changed here comes from 991bfe11d28a, when the only way to\r\ntrigger a promotion was with a trigger file. There are more options to\r\nachieve this operation these days, like the SQL function pg_promote() or\r\nthe command `pg_ctl promote`, so it is confusing to assume that only a\r\ntrigger file is able to do the work.\r\n\r\nNote also that promote_trigger_file has been removed as of cd4329d9393f\r\nin 16~.\r\n\r\nAuthor: Shinya Kato\r\nDiscussion: https://postgr.es/m/201b08ea29aa61f96162080e75be503c@oss.nttdata.com\r\nBackpatch-through: 12\r\n\r\n* Don't use pgbench -j in tests\r\n\r\nIt draws an unnecessary error in builds compiled without thread support.\r\n\r\nAdded by commit 038f586d5f1d, which was backpatched to 14; though in\r\nbranch master we no longer support such builds, there's no reason to\r\nhave this there, so remove it in all branches since 14.\r\n\r\nReported-by: Michael Paquier \r\nDiscussion: https://postgr.es/m/ZW2G9Ix4nBKLcSSO@paquier.xyz\r\n\r\n* Fix handling of errors in libpq pipelines\r\n\r\nThe logic to keep the libpq command queue in sync with queries that have\r\nbeen processed had a bug when errors were returned for reasons other\r\nthan problems in queries -- for example, when a connection is lost. We\r\nincorrectly consumed an element from the command queue every time, but\r\nthis is wrong and can lead to the queue becoming empty ahead of time,\r\nleading to later malfunction: PQgetResult would return nothing,\r\npotentially causing the calling application to enter a busy loop.\r\n\r\nFix by making the SYNC queue element a barrier that can only be consumed\r\nwhen a SYNC message is received.\r\n\r\nBackpatch to 14.\r\n\r\nReported by: Иван Трофимов (Ivan Trofimov) \r\nDiscussion: https://postgr.es/m/17948-fcace7557e449957@postgresql.org\r\n\r\n* Fix incorrect error message for IDENTIFY_SYSTEM\r\n\r\nCommit 5a991ef8692e accidentally reversed the order of the tuples\r\nand fields parameters, making the error message incorrectly refer\r\nto 3 tuples with 1 field when IDENTIFY_SYSTEM returns 1 tuple and\r\n3 or 4 fields. Fix by changing the order of the parameters. This\r\nalso adds a comment describing why we check for < 3 when postgres\r\nsince 9.4 has been sending 4 fields.\r\n\r\nBackpatch all the way since the bug is almost a decade old.\r\n\r\nAuthor: Tomonari Katsumata \r\nReviewed-by: Tom Lane \r\nBug: #18224\r\nBackpatch-through: v12\r\n\r\n* Apply filters to dump files all the time in 002_pg_upgrade.pl\r\n\r\nThis commit removes the restriction that would not apply filters to the\r\ndumps used for comparison in the TAP test of pg_upgrade when using the\r\nsame base version for the old and new nodes.\r\n\r\nThe previous logic would fail on Windows if loading a dump while using\r\nthe same set of binaries for the old and new nodes, as the library\r\ndependencies updated in the old dump would append CRLFs to the dump\r\nfile as it is treated as a text file. The dump filtering logic replaces\r\nall CRLFs (\\r\\n) by LFs (\\n), which is able to prevent this issue.\r\n\r\nWhen the old and new versions of the binaries are the same,\r\nAdjustUpgrade removes all blank lines, removes version-based comments\r\ngenerated by pg_dump and replaces CRLFs by LFs.\r\n\r\nReported-by: Alexander Lakhin\r\nDiscussion: https://postgr.es/m/60d434b9-53d9-9ea1-819b-efebdcf44e41@gmail.com\r\nBackpatch-through: 15\r\n\r\n* Fix compilation on Windows with WAL_DEBUG\r\n\r\nThis has been broken since b060dbe0001a that has reworked the callback\r\nmechanism of XLogReader, most likely unnoticed because any form of\r\ndevelopment involving WAL happens on platforms where this compiles fine.\r\n\r\nAuthor: Bharath Rupireddy\r\nDiscussion: https://postgr.es/m/CALj2ACVF14WKQMFwcJ=3okVDhiXpuK5f7YdT+BdYXbbypMHqWA@mail.gmail.com\r\nBackpatch-through: 13\r\n\r\n* Fix path of regress shared library in pg_upgrade test\r\n\r\nDuring a pg_upgrade test using an old dump, all references to the old\r\nregress shared library path (so, dylib or dll) are updated to point to\r\nthe library path used by the new build, to ensure a consistent\r\ncomparison between the old and new dumps.\r\n\r\nThe test previously relied on a hardcoded value of \"src/test/regress/\"\r\nto build the new path value, which would point to an incorrect location\r\nfor the meson and vpath builds. This is replaced by REGRESS_SHLIB, able\r\nto point to the correct location of the regress shared library.\r\n\r\nAuthor: Alexander Lakhin\r\nDiscussion: https://postgr.es/m/a628d8ad-a08a-2eab-4ca9-641bc82d3193@gmail.com\r\nBackpatch-through: 15\r\n\r\n* Fix potential pointer overflow in xlogreader.c.\r\n\r\nWhile checking if a record could fit in the circular WAL decoding\r\nbuffer, the coding from commit 3f1ce973 used arithmetic that could\r\noverflow. 64 bit systems were unaffected for various technical reasons,\r\nwhich probably explains the lack of problem reports. Likewise for 32\r\nbit systems running known 32 bit kernels. The systems at risk of\r\nproblems appear to be 32 bit processes running on 64 bit kernels, with\r\nunlucky placement in memory.\r\n\r\nPer complaint from GCC -fsanitize=undefined -m32, while testing\r\nvariations of 039_end_of_wal.pl.\r\n\r\nBack-patch to 15.\r\n\r\nReviewed-by: Nathan Bossart \r\nReviewed-by: Robert Haas \r\nDiscussion: https://postgr.es/m/CA%2BhUKGKH0oRPOX7DhiQ_b51sM8HqcPp2J3WA-Oen%3DdXog%2BAGGQ%40mail.gmail.com\r\n\r\n* Fix an undetected deadlock due to apply worker.\r\n\r\nThe apply worker needs to update the state of the subscription tables to\r\n'READY' during the synchronization phase which requires locking the\r\ncorresponding subscription. The apply worker also waits for the\r\nsubscription tables to reach the 'SYNCDONE' state after holding the locks\r\non the subscription and the wait is done using WaitLatch. The 'SYNCDONE'\r\nstate is changed by tablesync workers again by locking the corresponding\r\nsubscription. Both the state updates use AccessShareLock mode to lock the\r\nsubscription, so they can't block each other. However, a backend can\r\nsimultaneously try to acquire a lock on the same subscription using\r\nAccessExclusiveLock mode to alter the subscription. Now, the backend's\r\nwait on a lock can sneak in between the apply worker and table sync worker\r\ncausing deadlock.\r\n\r\nIn other words, apply_worker waits for tablesync worker which waits for\r\nbackend, and backend waits for apply worker. This is not detected by the\r\ndeadlock detector because apply worker uses WaitLatch.\r\n\r\nThe fix is to release existing locks in apply worker before it starts to\r\nwait for tablesync worker to change the state.\r\n\r\nReported-by: Tomas Vondra\r\nAuthor: Shlok Kyal\r\nReviewed-by: Amit Kapila, Peter Smith\r\nBackpatch-through: 12\r\nDiscussion: https://postgr.es/m/d291bb50-12c4-e8af-2af2-7bb9bb4d8e3e@enterprisedb.com\r\n\r\n* Be more wary about OpenSSL not setting errno on error.\r\n\r\nOpenSSL will sometimes return SSL_ERROR_SYSCALL without having set\r\nerrno; this is apparently a reflection of recv(2)'s habit of not\r\nsetting errno when reporting EOF. Ensure that we treat such cases\r\nthe same as read EOF. Previously, we'd frequently report them like\r\n\"could not accept SSL connection: Success\" which is confusing, or\r\nworse report them with an unrelated errno left over from some\r\nprevious syscall.\r\n\r\nTo fix, ensure that errno is zeroed immediately before the call,\r\nand report its value only when it's not zero afterwards; otherwise\r\nreport EOF.\r\n\r\nFor consistency, I've applied the same coding pattern in libpq's\r\npqsecure_raw_read(). Bare recv(2) shouldn't really return -1 without\r\nsetting errno, but in case it does we might as well cope.\r\n\r\nPer report from Andres Freund. Back-patch to all supported versions.\r\n\r\nDiscussion: https://postgr.es/m/20231208181451.deqnflwxqoehhxpe@awork3.anarazel.de\r\n\r\n* Fix typo in comment\r\n\r\nCommit 98e675ed7af accidentally mistyped IDENTIFY_SYSTEM as\r\nIDENTIFY_SERVER. Backpatch to all supported branches.\r\n\r\nReported-by: Alexander Lakhin \r\nDiscussion: https://postgr.es/m/68138521-5345-8780-4390-1474afdcba1f@gmail.com\r\n\r\n* Prevent tuples to be marked as dead in subtransactions on standbys\r\n\r\nDead tuples are ignored and are not marked as dead during recovery, as\r\nit can lead to MVCC issues on a standby because its xmin may not match\r\nwith the primary. This information is tracked by a field called\r\n\"xactStartedInRecovery\" in the transaction state data, switched on when\r\nstarting a transaction in recovery.\r\n\r\nUnfortunately, this information was not correctly tracked when starting\r\na subtransaction, because the transaction state used for the\r\nsubtransaction did not update \"xactStartedInRecovery\" based on the state\r\nof its parent. This would cause index scans done in subtransactions to\r\nreturn inconsistent data, depending on how the xmin of the primary\r\nand/or the standby evolved.\r\n\r\nThis is broken since the introduction of hot standby in efc16ea52067, so\r\nbackpatch all the way down.\r\n\r\nAuthor: Fei Changhong\r\nReviewed-by: Kyotaro Horiguchi\r\nDiscussion: https://postgr.es/m/tencent_C4D907A5093C071A029712E73B43C6512706@qq.com\r\nBackpatch-through: 12\r\n\r\n* Fix typo\r\n\r\nReported-by: Junwang Zhao \r\n\r\n* Fix description of I/O timing info for shared buffers in EXPLAIN (BUFFERS)\r\n\r\nThis fixes an error introduced by efb0ef909f60, that changed the\r\ndescription of this field to \"shared/local\" while these I/O timings\r\nrelate to shared buffers. This information is available when\r\ntrack_io_timing is enabled. Note that HEAD has added new counters for\r\nlocal buffers in 295c36c0c1fa, so there is no need to touch it. The\r\ndescription is updated to \"shared\" to be compatible with HEAD.\r\n\r\nPer discussion with Nazir Bilal Yavuz and Hubert Depesz Lubaczewski,\r\nwhose EXPLAIN analyzer tool was not actually able to parse the previous\r\nterm because of the slash character.\r\n\r\nDiscussion: https://postgr.es/m/ZTCTiUqm_H3iBihl@paquier.xyz\r\nBackpatch-through: 15\r\n\r\n* Fix bugs in manipulation of large objects.\r\n\r\nIn v16 and up (since commit afbfc0298), large object ownership\r\nchecking has been broken because object_ownercheck() didn't take care\r\nof the discrepancy between our object-address representation of large\r\nobjects (classId == LargeObjectRelationId) and the catalog where their\r\nownership info is actually stored (LargeObjectMetadataRelationId).\r\nThis resulted in failures such as \"unrecognized class ID: 2613\"\r\nwhen trying to update blob properties as a non-superuser.\r\n\r\nPoking around for related bugs, I found that AlterObjectOwner_internal\r\nwould pass the wrong classId to the PostAlterHook in the no-op code\r\npath where the large object already has the desired owner. Also,\r\nrecordExtObjInitPriv checked for the wrong classId; that bug is only\r\nlatent because the stanza is dead code anyway, but as long as we're\r\ncarrying it around it should be less wrong. These bugs are quite old.\r\n\r\nIn HEAD, we can reduce the scope for future bugs of this ilk by\r\nchanging AlterObjectOwner_internal's API to let the translation happen\r\ninside that function, rather than requiring callers to know about it.\r\n\r\nA more bulletproof fix, perhaps, would be to start using\r\nLargeObjectMetadataRelationId as the dependency and object-address\r\nclassId for blobs. However that has substantial risk of breaking\r\nthird-party code; even within our own code, it'd create hassles\r\nfor pg_dump which would have to cope with a version-dependent\r\nrepresentation. For now, keep the status quo.\r\n\r\nDiscussion: https://postgr.es/m/2650449.1702497209@sss.pgh.pa.us\r\n\r\n* update IvorySQL regression test with pg commit 152bfc0\r\n\r\nFix bugs in manipulation of large objects.\r\n\r\nIn v16 and up (since commit afbfc0298), large object ownership\r\nchecking has been broken because object_ownercheck() didn't take care\r\nof the discrepancy between our object-address representation of large\r\nobjects (classId == LargeObjectRelationId) and the catalog where their\r\nownership info is actually stored (LargeObjectMetadataRelationId).\r\nThis resulted in failures such as \"unrecognized class ID: 2613\"\r\nwhen trying to update blob properties as a non-superuser.\r\n\r\nPoking around for related bugs, I found that AlterObjectOwner_internal\r\nwould pass the wrong classId to the PostAlterHook in the no-op code\r\npath where the large object already has the desired owner. Also,\r\nrecordExtObjInitPriv checked for the wrong classId; that bug is only\r\nlatent because the stanza is dead code anyway, but as long as we're\r\ncarrying it around it should be less wrong. These bugs are quite old.\r\n\r\nIn HEAD, we can reduce the scope for future bugs of this ilk by\r\nchanging AlterObjectOwner_internal's API to let the translation happen\r\ninside that function, rather than requiring callers to know about it.\r\n\r\nA more bulletproof fix, perhaps, would be to start using\r\nLargeObjectMetadataRelationId as the dependency and object-address\r\nclassId for blobs. However that has substantial risk of breaking\r\nthird-party code; even within our own code, it'd create hassles\r\nfor pg_dump which would have to cope with a version-dependent\r\nrepresentation. For now, keep the status quo.\r\n\r\nDiscussion: https://postgr.es/m/2650449.1702497209@sss.pgh.pa.us\r\n\r\n* Doc: add a bit to indices.sgml about what is an indexable clause.\r\n\r\nWe didn't explain this clearly until somewhere deep in the\r\n\"Extending SQL\" chapter, but really it ought to be mentioned\r\nin the introductory material too.\r\n\r\nDiscussion: https://postgr.es/m/4097442.1694967650@sss.pgh.pa.us\r\n\r\n* pgstattuple: Fix failure with pgstathashindex() for partitioned indexes\r\n\r\nAs coded, the function relied on index_open() when opening an index\r\nrelation, allowing partitioned indexes to be processed by\r\npgstathashindex(). This was leading to a \"could not open file\" error\r\nbecause partitioned indexes have no physical files, or to a crash with\r\nan assertion failure (like on HEAD).\r\n\r\nThis issue is fixed by applying the same checks as the other stat\r\nfunctions for indexes, with a lookup at both RELKIND_INDEX and the index\r\nAM expected.\r\n\r\nAuthor: Alexander Lakhin\r\nDiscussion: https://postgr.es/m/18246-f4d9ff7cb3af77e6@postgresql.org\r\nBackpatch-through: 12\r\n\r\n* pageinspect: Fix failure with hash_bitmap_info() for partitioned indexes\r\n\r\nThis function reads directly a page from a relation, relying on\r\nindex_open() to open the index to read from. Unfortunately, this would\r\ncrash when using partitioned indexes, as these can be opened with\r\nindex_open() but they have no physical pages.\r\n\r\nAlexander has fixed the module, while I have written the test.\r\n\r\nAuthor: Alexander Lakhin, Michael Paquier\r\nDiscussion: https://postgr.es/m/18246-f4d9ff7cb3af77e6@postgresql.org\r\nBackpatch-through: 12\r\n\r\n* doc: Fix syntax in ALTER FOREIGN DATA WRAPPER example\r\n\r\nThe example for dropping an option was incorrectly quoting the\r\noption key thus making it a value turning the command into an\r\nunqualified ADD operation. The result of dropping became adding\r\na new key/value pair instead:\r\n\r\n d=# alter foreign data wrapper f options (drop 'b');\r\n ALTER FOREIGN DATA WRAPPER\r\n d=# select fdwoptions from pg_foreign_data_wrapper where fdwname='f';\r\n fdwoptions\r\n ------------\r\n {drop=b}\r\n (1 row)\r\n\r\nThis has been incorrect for a long time so backpatch to all\r\nsupported branches.\r\n\r\nAuthor: Tim \r\nDiscussion: https://postgr.es/m/170292280173.1876505.5204623074024041738@wrigleys.postgresql.org\r\n\r\n* Fix unchecked return value from strdup\r\n\r\nThe pg_dump compression was using strdup() instead of pg_strdup()\r\nand failed to check the returned pointer for out-of-memory before\r\ndereferencing it. Fix by using pg_strdup() instead which probably\r\nwas the intention here in the original patch.\r\n\r\nBackpatch to v16 where pg_dump compression was introduced.\r\n\r\nReviewed-by: Tristan Partin \r\nReviewed-by: Nathan Bossart \r\nDiscussion: https://postgr.es/m/CC661D60-6F4C-474D-B9CF-E789ACA3CEFC@yesql.se\r\nBackpatch-through: 16\r\n\r\n* Fix BEFORE ROW trigger handling in cross-partition MERGE update.\r\n\r\nFix a bug during MERGE if a cross-partition update is attempted on a\r\npartitioned table with a BEFORE DELETE ROW trigger that returns NULL,\r\nto prevent the update. This would cause an error to be thrown, or an\r\nassert failure in an assert-enabled build.\r\n\r\nThis was an oversight in 9321c79c86, which failed to properly\r\ndistinguish a DELETE prevented by a trigger from one prevented by a\r\nconcurrent update. Fix by having ExecDelete() return the TM_Result\r\nstatus to ExecCrossPartitionUpdate(), so that it can distinguish the\r\ntwo cases, and make ExecCrossPartitionUpdate() return the TM_Result\r\nstatus to ExecUpdateAct(), so that it can return the correct status\r\nfrom a concurrent update.\r\n\r\nIn addition, ensure that the command tag is correctly updated by\r\nhaving ExecMergeMatched() pass canSetTag to ExecUpdateAct(), rather\r\nthan passing false, so that it updates the command tag if it does a\r\ncross-partition update, making this code path in ExecMergeMatched()\r\nconsistent with ExecUpdate().\r\n\r\nPer bug #18238 from Alexander Lakhin. Back-patch to v15, where MERGE\r\nwas introduced.\r\n\r\nDean Rasheed, reviewed by Richard Guo and Jian He.\r\n\r\nDiscussion: https://postgr.es/m/18238-2f2bdc7f720180b9%40postgresql.org\r\n\r\n* Avoid trying to fetch metapage of an SPGist partitioned index.\r\n\r\nThis is necessary when spgcanreturn() is invoked on a partitioned\r\nindex, and the failure might be reachable in other scenarios as\r\nwell. The rest of what spgGetCache() does is perfectly sensible\r\nfor a partitioned index, so we should allow it to go through.\r\n\r\nI think the main takeaway from this is that we lack sufficient test\r\ncoverage for non-btree partitioned indexes. Therefore, I added\r\nsimple test cases for brin and gin as well as spgist (hash and\r\ngist AMs were covered already in indexing.sql).\r\n\r\nPer bug #18256 from Alexander Lakhin. Although the known test case\r\nonly fails since v16 (3c569049b), I've got no faith at all that there\r\naren't other ways to reach this problem; so back-patch to all\r\nsupported branches.\r\n\r\nDiscussion: https://postgr.es/m/18256-0b0e1b6e4a620f1b@postgresql.org\r\n\r\n* update IvorySQL regression test with pg commit 0977bd6\r\n\r\nAvoid trying to fetch metapage of an SPGist partitioned index.\r\n\r\nThis is necessary when spgcanreturn() is invoked on a partitioned\r\nindex, and the failure might be reachable in other scenarios as\r\nwell. The rest of what spgGetCache() does is perfectly sensible\r\nfor a partitioned index, so we should allow it to go through.\r\n\r\nI think the main takeaway from this is that we lack sufficient test\r\ncoverage for non-btree partitioned indexes. Therefore, I added\r\nsimple test cases for brin and gin as well as spgist (hash and\r\ngist AMs were covered already in indexing.sql).\r\n\r\nPer bug #18256 from Alexander Lakhin. Although the known test case\r\nonly fails since v16 (3c569049b), I've got no faith at all that there\r\naren't other ways to reach this problem; so back-patch to all\r\nsupported branches.\r\n\r\nDiscussion: https://postgr.es/m/18256-0b0e1b6e4a620f1b@postgresql.org\r\n\r\n* Set readline-relevant ENV vars in interactive_psql(), not caller.\r\n\r\nCommit 664d75753 pulled 010_tab_completion.pl's infrastructure for\r\ninvoking an interactive psql session out into a generally-useful test\r\nfunction, but it didn't move enough stuff. We need to set up various\r\nenvironment variables that readline will look at, both to ensure\r\nstability of test results and to prevent test actions from cluttering\r\nthe calling user's ~/.psql_history. Expecting calling scripts to\r\nremember to do that is too failure-prone: the other existing caller\r\n001_password.pl did not do it. Hence, remove those initialization\r\nsteps from 010_tab_completion.pl and put them into interactive_psql().\r\nSince interactive_psql was already making a local ENV hash, this has\r\nno effect on calling scripts.\r\n\r\nDiscussion: https://postgr.es/m/794610.1703182896@sss.pgh.pa.us\r\n\r\n* update IvorySQL regression test with pg commit 11652f9\r\n\r\nSet readline-relevant ENV vars in interactive_psql(), not caller.\r\n\r\nCommit 664d75753 pulled 010_tab_completion.pl's infrastructure for\r\ninvoking an interactive psql session out into a generally-useful test\r\nfunction, but it didn't move enough stuff. We need to set up various\r\nenvironment variables that readline will look at, both to ensure\r\nstability of test results and to prevent test actions from cluttering\r\nthe calling user's ~/.psql_history. Expecting calling scripts to\r\nremember to do that is too failure-prone: the other existing caller\r\n001_password.pl did not do it. Hence, remove those initialization\r\nsteps from 010_tab_completion.pl and put them into interactive_psql().\r\nSince interactive_psql was already making a local ENV hash, this has\r\nno effect on calling scripts.\r\n\r\nDiscussion: https://postgr.es/m/794610.1703182896@sss.pgh.pa.us\r\n\r\n* Doc: Add missing pgoutput options.\r\n\r\nWe forgot to update the docs while adding new options in pgoutput.\r\n\r\nAuthor: Emre Hasegeli\r\nReviewed-by: Peter Smith, Amit Kapila\r\nBackpatch-through: 12\r\nDiscussion: https://postgr.es/m/CAE2gYzwdwtUbs-tPSV-QBwgTubiyGD2ZGsSnAVsDfAGGLDrGOA%40mail.gmail.com\r\n\r\n* Hide warnings from Python headers when using gcc-compatible compiler.\r\n\r\nLike commit 388e80132, use \"#pragma GCC system_header\" to silence\r\nwarnings appearing within the Python headers, since newer Python\r\nversions no longer worry about some restrictions we still use like\r\n-Wdeclaration-after-statement.\r\n\r\nThis patch improves on 388e80132 by inventing a separate wrapper\r\nheader file, allowing the pragma to be tightly scoped to just\r\nthe Python headers and not other stuff we have laying about in\r\nplpython.h. I applied the same technique to plperl for the same\r\nreason: the original patch suppressed warnings for a good deal\r\nof our own code, not only the Perl headers.\r\n\r\nLike the previous commit, back-patch to supported branches.\r\n\r\nPeter Eisentraut and Tom Lane\r\n\r\nDiscussion: https://postgr.es/m/ae523163-6d2a-4b81-a875-832e48dec502@eisentraut.org\r\n\r\n* Fix mistaken file name in plpython's meson recipe.\r\n\r\nBrown-paper-bag bug in commit 58c3151bb. Per buildfarm.\r\n\r\n* Fix failure to verify PGC_[SU_]BACKEND GUCs in pg_file_settings view.\r\n\r\nset_config_option() bails out early if it detects that the option to\r\nbe set is PGC_BACKEND or PGC_SU_BACKEND class and we're reading the\r\nconfig file in a postmaster child; we don't want to apply any new\r\nvalue in such a case. That's fine as far as it goes, but it fails\r\nto consider the requirements of the pg_file_settings view: for that,\r\nwe need to check validity of the value even though we have no\r\nintention to apply it. Because we didn't, even very silly values\r\nfor affected GUCs would be reported as valid by the view. There\r\nare only half a dozen such GUCs, which perhaps explains why this\r\ngot overlooked for so long.\r\n\r\nFix by continuing when changeVal is false; this parallels the logic\r\nin some other early-exit paths.\r\n\r\nAlso, the check added by commit 924bcf4f1 to prevent GUC changes in\r\nparallel workers seems a few bricks shy of a load: it's evidently\r\nassuming that ereport(elevel, ...) won't return. Make sure we\r\nbail out if it does. The lack of trouble reports suggests that\r\nthis is only a latent bug, i.e. parallel workers don't actually\r\nreach here with elevel < ERROR. (Per the code coverage report,\r\nwe never reach here at all in the regression suite.) But we clearly\r\ndon't want to risk proceeding if that does happen.\r\n\r\nPer report from Rıdvan Korkmaz. These are ancient bugs, so back-patch\r\nto all supported branches.\r\n\r\nDiscussion: https://postgr.es/m/2089235.1703617353@sss.pgh.pa.us\r\n\r\n* Doc: specify aclitem syntax more clearly.\r\n\r\nThe previous wording here relied solely on an example to explain\r\naclitem output format. Add an actual syntax synopsis and\r\nexplanation of the elements to make it clearer.\r\n\r\nDavid Johnston and Tom Lane, per gripe from Eugen Konkov.\r\n\r\nDiscussion: https://postgr.es/m/170326116972.1876499.18357820037829248593@wrigleys.postgresql.org\r\n\r\n* doc: Mention AttributeRelationId in FDW validator function description\r\n\r\nThe documentation has been missing one value in the list of catalog OIDs\r\nthat can be given to the validator function of a FDW, as of\r\nAttributeRelationId, when changing the attribute options of a foreign\r\ntable.\r\n\r\nAuthor: Ian Lawrence Barwick\r\nDiscussion: https://postgr.es/m/CAB8KJ=i16t2yJU_Pq2Z+hnNGWFhagp_bJmzxHZu3ZkOjZm-+rQ@mail.gmail.com\r\nBackpatch-through: 12\r\n\r\n* In pg_dump, don't dump a stats object unless dumping underlying table.\r\n\r\nIf the underlying table isn't being dumped, it's useless to dump\r\nan extended statistics object; it'll just cause errors at restore.\r\nWe have always applied similar policies to, say, indexes.\r\n\r\n(When and if we get cross-table stats objects, it might be profitable\r\nto think a little harder about what to do with them. But for now\r\nthere seems no point in considering a stats object as anything but\r\nan appendage of its table.)\r\n\r\nRian McGuire and Tom Lane, per report from Rian McGuire.\r\nBack-patch to supported branches.\r\n\r\nDiscussion: https://postgr.es/m/7075d3aa-3f05-44a5-b68f-47dc6a8a0550@buildkite.com\r\n\r\n* Doc: Python's control flow construct is try/except not try/catch.\r\n\r\nVery ancient thinko, dating evidently to 22690719e.\r\nSpotted by gweatherby.\r\n\r\nDiscussion: https://postgr.es/m/170423637139.1288848.11840082988774620003@wrigleys.postgresql.org\r\n\r\n* Avoid masking EOF (no-password-supplied) conditions in auth.c.\r\n\r\nCheckPWChallengeAuth() would return STATUS_ERROR if the user does not\r\nexist or has no password assigned, even if the client disconnected\r\nwithout responding to the password challenge (as libpq often will,\r\nfor example). We should return STATUS_EOF in that case, and the\r\nlower-level functions do, but this code level got it wrong since the\r\nrefactoring done in 7ac955b34. This breaks the intent of not logging\r\nanything for EOF cases (cf. comments in auth_failed()) and might\r\nalso confuse users of ClientAuthentication_hook.\r\n\r\nPer report from Liu Lang. Back-patch to all supported versions.\r\n\r\nDiscussion: https://postgr.es/m/b725238c-539d-cb09-2bff-b5e6cb2c069c@esgyn.cn\r\n\r\n* Update copyright for 2024\r\n\r\nReported-by: Michael Paquier\r\n\r\nDiscussion: https://postgr.es/m/ZZKTDPxBBMt3C0J9@paquier.xyz\r\n\r\nBackpatch-through: 12\r\n\r\n* Fix use of incorrect TupleTableSlot in DISTINCT aggregates\r\n\r\n1349d2790 added code to allow DISTINCT and ORDER BY aggregates to work\r\nmor…","shortMessageHtmlLink":"Catch pg 16.2 for ivorysql rel 3 stable (#642)"}},{"before":"adea3e28bdbe384907e41bc9118397f16bb53782","after":"8fc242b8ff200ee28b207f909929fb7fe36fab4f","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-03-11T04:45:55.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Support xml functions with some bug fixes (#640)\n\n* Compatible with Oracle XML functions and fix BUG as following:\r\n1.xml: fix bug of ivy_xml_addchildnode().\r\n2.support updatexml function in update command.\r\n3.use correct variable type for cnode_copy.\r\n4.improve the CR test case.","shortMessageHtmlLink":"Support xml functions with some bug fixes (#640)"}},{"before":"48b01384d3512af5e032a6daebbf64f55395d42d","after":"adea3e28bdbe384907e41bc9118397f16bb53782","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-02-04T00:48:02.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Match END label with the function or procedure name (#629)\n\n* Match END label with the function or procedure name\r\n\r\n* add test case for Match END label with the function or procedure name","shortMessageHtmlLink":"Match END label with the function or procedure name (#629)"}},{"before":"16b895879fa4c6d0feede13f530ec34501aa531b","after":"48b01384d3512af5e032a6daebbf64f55395d42d","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-01-24T07:05:40.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"bigplaice","name":"Steven Niu","path":"/bigplaice","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20984605?s=80&v=4"},"commit":{"message":"Modify the version number to be 3.1","shortMessageHtmlLink":"Modify the version number to be 3.1"}},{"before":"42eb740f37b862eca5718de4cde29bb222787da1","after":"16b895879fa4c6d0feede13f530ec34501aa531b","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-01-24T00:55:08.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Merge pull request #625 from jiaoshuntian/IVORY_REL_3_STABLE\n\nIvorySQL: fix issue#575","shortMessageHtmlLink":"Merge pull request #625 from jiaoshuntian/IVORY_REL_3_STABLE"}},{"before":"8d902e922829ec2f3ac5370e79e874a2fb77e0e9","after":"42eb740f37b862eca5718de4cde29bb222787da1","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-01-23T09:10:12.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Merge pull request #623 from jiaoshuntian/IVORY_REL_3_STABLE\n\nFix ivy_postgres_fdw regression test failure caused by the order of r…","shortMessageHtmlLink":"Merge pull request #623 from jiaoshuntian/IVORY_REL_3_STABLE"}},{"before":"a8b99b9ca43f0e40cc64fea64e706e0f37686d84","after":"78458829b75e5304c4e17d288fb71f3c19047322","ref":"refs/heads/master","pushedAt":"2024-01-23T07:45:00.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Merge pull request #621 from jiaoshuntian/master\n\nIvorySQL: fix issue#575","shortMessageHtmlLink":"Merge pull request #621 from jiaoshuntian/master"}},{"before":"6d03fe52bf3cf6da447f927a9e62782feff50c84","after":"8d902e922829ec2f3ac5370e79e874a2fb77e0e9","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-01-18T08:41:57.000Z","pushType":"pr_merge","commitsCount":3,"pusher":{"login":"gaoxueyu","name":"gaoxueyu","path":"/gaoxueyu","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44825804?s=80&v=4"},"commit":{"message":"Merge pull request #619 from bigplaice/IVORY_REL_3_STABLE\n\nfix the malformed code in file llvmjit_expr.c","shortMessageHtmlLink":"Merge pull request #619 from bigplaice/IVORY_REL_3_STABLE"}},{"before":"62c2a734d73aa6275bc1f8a7c5e85767a727aafe","after":"a8b99b9ca43f0e40cc64fea64e706e0f37686d84","ref":"refs/heads/master","pushedAt":"2024-01-18T08:40:28.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"jiaoshuntian","name":"JiaoShuntian","path":"/jiaoshuntian","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/24285304?s=80&v=4"},"commit":{"message":"Fix ivy_postgres_fdw regression test failure caused by the order of returned data (#618)","shortMessageHtmlLink":"Fix ivy_postgres_fdw regression test failure caused by the order of r…"}},{"before":"b7af91918b680dc0eabb43a1b0b096b34573b117","after":"62c2a734d73aa6275bc1f8a7c5e85767a727aafe","ref":"refs/heads/master","pushedAt":"2024-01-17T05:09:07.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"jiaoshuntian","name":"JiaoShuntian","path":"/jiaoshuntian","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/24285304?s=80&v=4"},"commit":{"message":"fix regress","shortMessageHtmlLink":"fix regress"}},{"before":"fb0ba2d08f36d499a6a36130dbb1f8d6ef43c4ef","after":"6d03fe52bf3cf6da447f927a9e62782feff50c84","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2024-01-16T06:51:10.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"jiaoshuntian","name":"JiaoShuntian","path":"/jiaoshuntian","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/24285304?s=80&v=4"},"commit":{"message":"fix regress","shortMessageHtmlLink":"fix regress"}},{"before":"75bb3c865174096bf58bd2e12126dd152a8b5014","after":"fb0ba2d08f36d499a6a36130dbb1f8d6ef43c4ef","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2023-11-28T11:03:58.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"tanyang-star","name":null,"path":"/tanyang-star","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/92354960?s=80&v=4"},"commit":{"message":"Update branch 3.0 README.md","shortMessageHtmlLink":"Update branch 3.0 README.md"}},{"before":"3aefafa096dd20e70496ab4fb67a198634b01b2c","after":"b7af91918b680dc0eabb43a1b0b096b34573b117","ref":"refs/heads/master","pushedAt":"2023-11-28T11:03:37.000Z","pushType":"pr_merge","commitsCount":3,"pusher":{"login":"tanyang-star","name":null,"path":"/tanyang-star","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/92354960?s=80&v=4"},"commit":{"message":"Update README.md","shortMessageHtmlLink":"Update README.md"}},{"before":"e681802be90b8c9d4b9604193d234b05799905b9","after":"75bb3c865174096bf58bd2e12126dd152a8b5014","ref":"refs/heads/IVORY_REL_3_STABLE","pushedAt":"2023-11-28T11:03:17.000Z","pushType":"pr_merge","commitsCount":141,"pusher":{"login":"tanyang-star","name":null,"path":"/tanyang-star","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/92354960?s=80&v=4"},"commit":{"message":"Stamp 16.1.","shortMessageHtmlLink":"Stamp 16.1."}},{"before":"9f5c5b506df67d51925b2aaf95d925c23b59112c","after":"3aefafa096dd20e70496ab4fb67a198634b01b2c","ref":"refs/heads/master","pushedAt":"2023-11-24T01:54:22.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"tanyang-star","name":null,"path":"/tanyang-star","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/92354960?s=80&v=4"},"commit":{"message":"Update README.md","shortMessageHtmlLink":"Update README.md"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEUJk7YwA","startCursor":null,"endCursor":null}},"title":"Activity · IvorySQL/IvorySQL"}