I Use This!
Very High Activity

News

Analyzed about 20 hours ago. based on code collected 2 days ago.
Posted over 2 years ago
The pgexporter community is happy to announce version 0.2.0. New Features Connection caching pg_locks pg_stat_bgwriter pg_stat_database pg_stat_database_conflicts Disk space usage (Extended) The extended metrics requires the pgexporter_ext ... [More] extension. Features Prometheus exporter Remote management Transport Layer Security (TLS) v1.2+ support Daemon mode User vault pgexporter is based on the pgmoneta and pgagroal architecture. pgexporter pgexporter is a Prometheus exporter for PostgreSQL. Read our getting started guide to setup pgexporter for your monitoring needs. Features Prometheus exporter Remote management Transport Layer Security (TLS) v1.2+ support Daemon mode User vault Learn more on our web site or GitHub. pgexporter is released under the 3-clause BSD license, and is sponsored by Red Hat. [Less]
Posted over 2 years ago
The pgAdmin Development Team is pleased to announce pgAdmin 4 version 6.1. This release of pgAdmin 4 includes 30 bug fixes and new features. For more details please see the release notes. pgAdmin is the leading Open Source graphical management tool ... [More] for PostgreSQL. For more information, please see the website. Notable changes in this release include: Features: Added support for indent guides in the browser tree. Added support for advanced table fields like the foreign key, the primary key in the ERD tool. Added support to allow tables to be dragged to the ERD Tool. Added index creation when generating SQL in the ERD tool. Added support for authentication via the webserver (REMOTE_USER). Added support to enable/disable rules. Bugs/Housekeeping: Fixed OAuth2 integration redirect issue. Ensure that the query highlighting color in the query tool should be less intensive. Fixed an issue where the browser tree doesn't show all contents on changing resolution. Ensure that columns should be displayed in the order of creation instead of alphabetical order in the browser tree. Fixed background color issue in the browser tree. Added support for composite foreign keys in the ERD tool. Fixed an issue where the users are unable to load the databases behind an HTTP reverse proxy. Fixed an issue where each click to refresh the collection node, the number of objects decreasing by tens or more. Fixed browser tree sort order regression issue. Fixed an issue where the blank string is stored instead of NULL in the server table of an SQLite database. Builds for Windows and macOS are available now, along with a Python Wheel, Docker Container, RPM, DEB Package, and source code tarball from the tarball area. [Less]
Posted over 2 years ago
The PostgreSQL JDBC team is proud to announce version 42.3.0 The major change here is that we have dropped support for JAVA 6 and JAVA 7 This allows us to move forward with further changes The following was also fixed Rework OSGi bundle activator ... [More] so it does not rely on exception message to check DataSourceFactory presence PR #507 Fix database metadata getFunctions() and getProcedures() to ignore search_path when no schema pattern is specified PR #2174 Fix refreshRow made the row readOnly. [PR #2195](https://github.com/pgjdbc/pgjdbc/pull/2195 Fixes Issue #2193 Fix do not add double quotes to identifiers already double quoted PR #2224 Fixes Issue #2223 Add a property QUOTE_RETURNING_IDENTIFIERS which determines if we put double quotes around identifiers that are provided in the returning array. Fix Provide useful error message for empty or missing passwords for SCRAM auth PR #2290 fixes Issue #2288 Thanks to everyone who contributed to this release. See Changelog for details [Less]
Posted over 2 years ago
Hello All, We're happy to announce the release of v1.12 of pgmetrics. Changes since the v1.11 release include: Support for PostgreSQL 14 (now supports v9.3 to v14) Support for PgBouncer 1.16 (now supports v1.8.1 to v1.16.0) Collect new v14 stats ... [More] (pg_stat_wal, new fields from pg_stat_database and more) Option to omit collection of index definitions Pre-built binaries for 6 platforms including M1 Mac OS and Linux ARMv8 Various bug fixes You can get the latest release from GitHub. Thanks to all the people who pitched in with bug reports, suggestions and patches! Keep it coming! About pgmetrics pgmetrics is an open-source, zero-dependency, single-binary tool that can collect 350+ metrics from a running PostgreSQL server and display it in easy-to-read text format or export it as JSON and CSV for scripting. It also supports collection from various managed PostgreSQL services (AWS, GCP, Azure, Heroku) as well as from PgBouncer, Odyssey and Citus. Learn more at pgmetrics.io, or see a sample report here. pgmetrics is an open-source project of RapidLoop. Best, -Mahadevan [Less]
Posted over 2 years ago
Our Postgres team at Microsoft is excited to announce PostgreSQL 14’s General Availability (GA) on Azure’s Hyperscale (Citus) option. To our knowledge, this is the first time a major cloud provider has made a new Postgres major version generally ... [More] available on their platform within one day of the official PG release. You can now deploy Postgres 14 in many of our Hyperscale (Citus) regions. In upcoming months, we will roll out Postgres 14 across more Azure regions and also release it with our new Flexible Server option in the Azure Database for PostgreSQL managed service. This announcement brings the latest in Postgres to those of you who run your workloads on Azure. Engineering “how we did it” blog post If you want to learn more about how made PostgreSQL 14 available on Azure within one day of the PG14 release, Ozgun Erdogan’s blog post is a good read: How We Shipped PostgreSQL 14 on Azure Within One Day of its Release, on Microsoft TechCommunity Ozgun’s blog post explores: Our favorite new features in PostgreSQL 14 Making Citus & other extensions compatible with PostgreSQL 14 How we released a new PostgreSQL version for Azure’s Hyperscale (Citus) option just one day after the PG14 release Useful links If you’re looking to get started with PostgreSQL 14 on Azure with the Hyperscale (Citus) option, these links should help: Try it out: Create a Hyperscale (Citus) server group on Azure to try it out—Basic or Standard tier. And if you don’t yet have an Azure subscription, just create a free Azure account first. Read the docs: Read the Hyperscale (Citus) docs And of course you can always reach our PM team for the PostgreSQL managed service on Azure via email at Ask AzureDB for PostgreSQL. About Hyperscale (Citus) The Hyperscale (Citus) option in the Azure Database for PostgreSQL managed service is based on the Citus extension. If not already familiar, Citus is an open source extension to Postgres that transforms Postgres into a distributed database. In our recent Citus 10 release, we added columnar tables to Citus, as well as the ability to shard Postgres on a single Citus node. [Less]
Posted over 2 years ago
PostgreSQL Weekly News - October 17, 2021 PostgreSQL Product News psycopg2 3.0.0, a Python connector for PostgreSQL, released pg_partman 4.6.0, a management system for partitioned tables, released. pgAdmin4 6.0, a web- and native GUI control center ... [More] for PostgreSQL, released. Percona Distribution for PostgreSQL Operator 1.0.0, a Kubernetes operator based on Crunchy Data's, for PostgreSQL, released. PostgreSQL Jobs for October https://archives.postgresql.org/pgsql-jobs/2021-10/ PostgreSQL in the News Planet PostgreSQL: https://planet.postgresql.org/ PostgreSQL Weekly News is brought to you this week by David Fetter Submit news and announcements by Sunday at 3:00pm PST8PDT to [email protected]. Applied Patches Tom Lane pushed: Doc: update testing recipe in src/test/perl/README. The previous text didn't provide any clear explanation of our policy around TAP test portability. The recipe for using perlbrew had some problems, too: it resulted in a non-shared libperl (preventing testing of plperl) and it caused some modules to be updated to current when the point of the recipe is to build an old environment. Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/3eb1f4d09745433c70ccac411cad24d0374b9c3b Fix EXPLAIN of SEARCH BREADTH FIRST queries some more. Commit 3f50b8263 had an oversight: formerly, to deparse expressions attached to a plan node, it was only necessary to update the deparse_namespace ancestors list alongside calling set_deparse_plan. Now it's necessary to update the ancestors list first, because set_deparse_plan consults it, and one call site got that wrong. This error was masked in most cases because explain.c uses just one List object for the ancestors list, updating it in-place as the plan is scanned, so that we accidentally had the right List assigned to dpns->ancestors before it was needed. It would fail only if a WorkTableScan node were the first one that we tried to deparse a subexpression of. Per report from Markus Winand. Like the previous patch, back-patch to v14. Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/39ae0ef8561362304ee512963aa51d5a705e5616 Make configure check for minimum required version of IPC::Run. Per the discussion around 3eb1f4d09, let's have configure verify that the available IPC::Run version is at least 0.79, the agreed-on minimum. It seems unlikely that this could bite anybody anymore, but it's useful as documentation. (Based on that, there's little need to back-patch.) For consistency, also supply a minimum version for the other Perl module we have an explicit check for, Time::HiRes. I used the version that ships with Perl 5.8.3. Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/4a235efddaa78ec78a47614ddc6161644e089290 Fix planner error with pulling up subquery expressions into function RTEs. If a function-in-FROM laterally references the output of some sub-SELECT earlier in the FROM clause, and we are able to flatten that sub-SELECT into the outer query, the expression(s) copied into the function RTE missed being processed by eval_const_expressions. This'd lead to trouble and probable crashes at execution if such expressions contained named-argument function call syntax or functions with defaulted arguments. The bug is masked if the query contains any explicit JOIN syntax, which may help explain why we'd not noticed. Per bug #17227 from Bernd Dorn. This is an oversight in commit 7266d0997, so back-patch to v13 where that came in. Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/4d5f651f1d651c6fa79f9188e7b9a04654c7125a Make pg_dump acquire lock on partitioned tables that are to be dumped. It was clearly the intent to do so all along, but the original coding fat-fingered this by checking the wrong array element. We fixed it in passing in 403a3d91c, but that later got reverted, and we forgot to keep this bug fix. Most of the time this'd be relatively harmless, since once we lock any of the partitioned table's leaf partitions, that would suffice to prevent major DDL on the partitioned table itself. However, a childless partitioned table would get dumped with no relevant lock whatsoever, possibly allowing dump failure or inconsistent output. Unlike 403a3d91c, there are no versioning concerns, since every server version that has partitioned tables will allow you to lock one. Back-patch to v10 where partitioned tables were introduced. Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/e2ff7d9a83d4b489806281dc6dfce88510b40ad7 Avoid core dump in pg_dump when dumping from pre-8.3 server. Commit f0e21f2f6 missed adding a tgisinternal output column to getTriggers' query for pre-8.3 servers. Back-patch to v11, like that commit. https://git.postgresql.org/pg/commitdiff/40dfac4fc4776213a02291f13046d36e318f2629 Michaël Paquier pushed: Clean up more code using "(expr) ? true : false". This is similar to fd0625c, taking care of any remaining code paths that are worth the cleanup. This also changes some cases using opposite expression patterns. Author: Justin Pryzby, Masahiko Sawada Discussion: https://postgr.es/m/CAD21AoCdF8dnUvr-BUWWGvA_XhKSoANacBMZb6jKyCk4TYfQ2Q@mail.gmail.com https://git.postgresql.org/pg/commitdiff/68f7c4b57a27dbcd3e93ba3ff7b0b49664b25e09 Add more $Test::Builder::Level in the TAP tests. Incrementing the level of the call stack reported is useful for debugging purposes as it allows to control which part of the test is exactly failing, especially if a test is structured with subroutines that call routines from Test::More. This adds more incrementations of $Test::Builder::Level where debugging gets improved (for example it does not make sense for some paths like pg_rewind where long subroutines are used). A note is added to src/test/perl/README about that, based on a suggestion from Andrew Dunstan and a wording coming from both of us. Usage of Test::Builder::Level has spread in 12, so a backpatch down to this version is done. Reviewed-by: Andrew Dunstan, Peter Eisentraut, Daniel Gustafsson Discussion: https://postgr.es/m/[email protected] Backpatch-through: 12 https://git.postgresql.org/pg/commitdiff/f9c4cb686800d46ef9e9e90ed5133493b23962af Fix tests of pg_upgrade across different major versions. This fixes a set of issues that cause different breakages or annoyances when using pg_upgrade's test.sh to do upgrades across different major versions: - test.sh is completely broken when using v14 as new version because of the removal of testtablespace/ as Makefile rule. Older versions of pg_regress don't support --make-tablespacedir, blocking the creation of the tablespace. In order to fix that, it is simple enough to create those directories in the script itself, but only do that when an old version is involved. This fix is needed on HEAD and REL_14_STABLE. - The script would fail when using PG <= v11 as old version because of WITH OIDS relations not supported in v12. In order to fix this, this steals a method from the buildfarm that uses a DO block to change all the relations marked as WITH OIDS, allowing pg_upgrade to pass. This is more portable than using ALTER TABLE queries on the relations causing issues. This is fixed down to v12, and authored originally by Andrew Dunstan. - Not using --extra-float-digits=0 with v11 as old version causes a lot of diffs in the dumps, making the whole unreadable. This gets only done when using v11 as old version. This is fixed down to v12. The buildfarm code uses that already. Note that the addition of --wal-segsize and --allow-group-access breaks the script when using v10 or older at initdb time as these got added in 11. 10 would be EOL'd next year and nobody has complained about those problems yet, so nothing is done about that. This means that this commit fixes upgrade tests using test.sh with v11 as minimum older version, up to HEAD, and that it is enough to apply this change down to 12. The old and new dumps still generate diffs, still require manual checks, and more could be done to reduce the noise, but this allows the tests to run with a rather minimal amount of them. I have tested this commit and test.sh with v11 as minimum across all the branches where this is applied. Note that this commit has no impact on the normal pg_upgrade test run with a simple "make check". Author: Justin Pryzby, Andrew Dunstan, Michael Paquier Discussion: https://postgr.es/m/[email protected] Backpatch-through: 12 https://git.postgresql.org/pg/commitdiff/fa66b6dee0843d2bca5bf9c9b8b7be32defbffae Fix use-after-free with multirange types in CREATE TYPE. The code was freeing the name of the multirange type function stored in the parse tree but it should not do that. Event triggers could for example look at such a corrupted parsed tree with a ddl_command_end event. Author: Alex Kozhemyakin, Sergey Shinderuk Reviewed-by: Peter Eisentraut, Michael Paquier Discussion: https://postgr.es/m/[email protected] Backpatch-through: 14 https://git.postgresql.org/pg/commitdiff/5b0e7fe1d67235a092be1132bc5c97f1d7f29aaf Peter Geoghegan pushed: amcheck: Skip unlogged relations in Hot Standby. Have verify_heapam.c treat unlogged relations as if they were simply empty when in Hot Standby mode. This brings it in line with verify_nbtree.c, which has handled unlogged relations in the same way since bugfix commit 6754fe65a4. This was an oversight in commit 866e24d47d, which extended contrib/amcheck to check heap relations. In passing, lower the verbosity used when reporting that a relation has been skipped like this, from NOTICE to DEBUG1. This is appropriate because the skipping behavior is only an implementation detail, needed to work around the fact that unlogged tables don't have smgr-level storage for their main fork when in Hot Standby mode. Affected unlogged relations should be considered "trivially verified", not skipped over. They are verified in the same sense that a totally empty relation can be verified. This behavior seems least surprising overall, since unlogged relations on a replica will initially be empty if and when the replica is promoted and Hot Standby ends. Author: Mark Dilger [email protected] Reviewed-By: Peter Geoghegan [email protected] Discussion: https://postgr.es/m/CAH2-Wzk_pukOFY7JmdiFLsrz+Pd3V8OwgC1TH2Vd5BH5ZgK4bA@mail.gmail.com Backpatch: 14-, where heapam verification was introduced. https://git.postgresql.org/pg/commitdiff/292698f158ddb3f9a88f536e6eecb9e55d9619c9 Doc: normalize vacuum_multixact_failsafe_age ID. Author: Pavel Luzanov [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch: 14-, where the failsafe was introduced. https://git.postgresql.org/pg/commitdiff/00c61a74bcdbc04a3db721d53c7aff62244da198 pg_amcheck: avoid unhelpful verification attempts. Avoid calling contrib/amcheck functions with relations that are unsuitable for checking. Specifically, don't attempt verification of temporary relations, or indexes whose pg_index entry indicates that the index is invalid, or not ready. These relations are not supported by any of the contrib/amcheck functions, for reasons that are pretty fundamental. For example, the implementation of REINDEX CONCURRENTLY can add its own "transient" pg_index entries, which has rather unclear implications for the B-Tree verification functions, at least in the general case -- so they just treat it as an error. It falls to the amcheck caller (in this case pg_amcheck) to deal with the situation at a higher level. pg_amcheck now simply treats these conditions as additional "visibility concerns" when it queries system catalogs. This is a little arbitrary. It seems to have the least problems among any of the available alternatives. Author: Mark Dilger [email protected] Reported-By: Alexander Lakhin [email protected] Reviewed-By: Peter Geoghegan [email protected] Reviewed-By: Robert Haas [email protected] Bug: #17212 Discussion: https://postgr.es/m/[email protected] Backpatch: 14-, where pg_amcheck was introduced. https://git.postgresql.org/pg/commitdiff/d2bf06db377967b0d671ae372d513806e2a28052 Remove unstable pg_amcheck tests. Recent pg_amcheck bugfix commit d2bf06db added a test case that the buildfarm has shown to be non-portable. It doesn't particularly seem worth keeping anyway. Remove it. Discussion: https://postgr.es/m/CAH2-Wz=7HKJ9WzAh7+M0JfwJ1yfT9qoE+KPa3P7iGToPOtGhXg@mail.gmail.com Backpatch: 14-, just like the original commit. https://git.postgresql.org/pg/commitdiff/cd3f429d9565b2e5caf0980ea7c707e37bc3b317 Remove obsolete nbtree deduplication comments. Follow up to commit 2903f140. https://git.postgresql.org/pg/commitdiff/b76c1d6e849779e4a5a6c24d159a42125e522154 Fujii Masao pushed: Make autovacuum launcher more responsive to pg_log_backend_memory_contexts(). Previously when pg_log_backend_memory_contexts() sent the request to the autovacuum launcher, it could take more than several seconds to log its memory contexts. Because the function (HandleAutoVacLauncherInterrupts) to process any new interrupts that autovacuum launcher received didn't handle the request for logging of memory contexts. This commit changes the function so that it handles the request, to make autovacuum launcher more responsitve to pg_log_backend_memory_contexts(). Back-patch to v14 where pg_log_backend_memory_contexts() was added. Author: Koyu Tanigawa Reviewed-by: Bharath Rupireddy, Atsushi Torikoshi Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/e3e29cec10d15bbcedc6b41887d8f4e138d719bd Peter Eisentraut pushed: psql: More tests. Add some basic tests for command-line option handling and help output, similar to what we have for other command-line programs. This also creates a place to put some more one-off test cases later. Discussion: https://www.postgresql.org/message-id/[email protected] https://git.postgresql.org/pg/commitdiff/c0280bc3edeb9e9958efc14083b6f301d2ef79d5 psql: Add test for handling of replication commands. Add a test for the clean handling of unsupported replication command responses. This was once accidentally broken, and it seems unusual enough that it's easy to forget when testing manually. Discussion: https://www.postgresql.org/message-id/[email protected] https://git.postgresql.org/pg/commitdiff/67c069848a998de1436cad2d67baedbf31c3a28c psql: Fix test. The test didn't work on platforms where getopt() doesn't support non-option arguments before options. https://git.postgresql.org/pg/commitdiff/d9ddc50bafc062ec1ae7f98b886b7950102d87fc psql: Fix some scan-build warnings. A repeated complaint was that scan-build thought that if the \timing setting changes during processing of a query, the post-processing might read garbage time values. This is probably not possible right now, but it's not entirely inconceivable given the code structure. So silence this warning with small restructuring that makes this more robust. The other warnings were a few dead stores that are easy to remove. Discussion: https://www.postgresql.org/message-id/[email protected] https://git.postgresql.org/pg/commitdiff/390edeeb570c01de1a14e2985ffed96de001e42e Fix incorrect format placeholder. https://git.postgresql.org/pg/commitdiff/780054bf31a0a6ba781f46c454f0116efee8a74c Robert Haas pushed: Refactor basebackup.c's _tarWriteDir() function. Sometimes, we replace a symbolic link that we find in the data directory with an actual directory within the tarfile that we create. _tarWriteDir was responsible both for making this substitution and also for writing the tar header for the resulting directory into the tar file. Make it do only the first of those things, and rename to convert_link_to_directory. Substantially larger refactoring of this source file is planned, but this little bit seemed to make sense to commit independently. Discussion: http://postgr.es/m/CA+Tgmobz6tuv5tr-WxURe5JA1vVcGz85k4kkvoWxcyHvDpEqFA@mail.gmail.com https://git.postgresql.org/pg/commitdiff/967a17fe2fa77b61061c8fb1183f64a5df4e080a Refactor some end-of-recovery code out of StartupXLOG(). Create a new function PerformRecoveryXLogAction() and move the code which either writes an end-of-recovery record or requests a checkpoint there. Also create a new function CleanupAfterArchiveRecovery() to perform a few tasks that we want to do after we've actually exited archive recovery but before we start accepting new WAL writes. More refactoring of this file is planned, but this commit is just straightforward code movement to make StartupXLOG() a little bit shorter and a little bit easier to understand. Robert Haas and Amul Sul Discussion: http://postgr.es/m/CAAJ_b97abMuq=470Wahun=aS1PHTSbStHtrjjPaD-C0YQ1AqVw@mail.gmail.com https://git.postgresql.org/pg/commitdiff/6df1543abfed6f6a86b76a48fa11a6f019111c01 Postpone some end-of-recovery operations related to allowing WAL. CreateOverwriteContrecordRecord(), UpdateFullPageWrites(), PerformRecoveryXLogAction(), and CleanupAfterArchiveRecovery() are moved somewhat later in StartupXLOG(). This is preparatory work for a future patch that wants to allow recovery to end at one time and only later start to allow WAL writes. To do that, it's necessary to separate code that has to do with allowing WAL writes from other things that need to happen simply because recovery is ending, such as initializing shared memory data structures that depend on information that might not be accurate before redo is complete. This commit does not achieve that goal, but it is a step in that direction. For example, there are a few different bits of code that write things into WAL once we have finished recovery, and with this change, those bits of code are closer to each other than previously, with fewer unrelated bits of code interspersed. Robert Haas and Amul Sul Discussion: http://postgr.es/m/CAAJ_b97abMuq=470Wahun=aS1PHTSbStHtrjjPaD-C0YQ1AqVw@mail.gmail.com https://git.postgresql.org/pg/commitdiff/811051c2e7af1b030467760baf7ee0f4a22bc992 shm_mq: Update mq_bytes_written less often. Do not update shm_mq's mq_bytes_written until we have written an amount of data greater than 1/4th of the ring size, unless the caller of shm_mq_send(v) requests a flush at the end of the message. This reduces the number of calls to SetLatch(), and also the number of CPU cache misses, considerably, and thus makes shm_mq significantly faster. Dilip Kumar, reviewed by Zhihong Yu and Tomas Vondra. Some minor cosmetic changes by me. Discussion: http://postgr.es/m/CAFiTN-tVXqn_OG7tHNeSkBbN+iiCZTiQ83uakax43y1sQb2OBA@mail.gmail.com https://git.postgresql.org/pg/commitdiff/46846433a03dff4f2e08c8a161e54a842da360d6 Etsuro Fujita pushed: postgres_fdw: Move comments about elog level in (sub)abort cleanup. The comments were misplaced when adding postgres_fdw. Fix that by moving the comments to more appropriate functions. Author: Etsuro Fujita Backpatch-through: 9.6 Discussion: https://postgr.es/m/CAPmGK164sAXQtC46mDFyu6d-T25Mzvh5qaRNkit06VMmecYnOA%40mail.gmail.com https://git.postgresql.org/pg/commitdiff/8c7be8688309dd7f30f313d3b312b31f64e93497 Álvaro Herrera pushed: Change recently added test code for stability. The test code added with ff9f111bce24 fails under valgrind, and probably other slow cases too, because if (say) autovacuum runs in between and produces WAL of its own, the large INSERT fails to account for that in the LSN calculations. Rewrite to use a DO loop. Per complaint from Andres Freund Backpatch to all branches. Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/010e5233733aedf86634e1719d9536c42e18a27d Jeff Davis pushed: Check criticalSharedRelcachesBuilt in GetSharedSecurityLabel(). An extension may want to call GetSecurityLabel() on a shared object before the shared relcaches are fully initialized. For instance, a ClientAuthentication_hook might want to retrieve the security label on a role. Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.6 https://git.postgresql.org/pg/commitdiff/7821a0bf2096df659671924fbeef0ebc66449292 Andrew Dunstan pushed: Fix PostgresNode install_path sanity tests that fail on Windows. Backpatch to 14 where install_path was introduced. https://git.postgresql.org/pg/commitdiff/15124d0e22ed2280e4603638e5baede190ae584c [Less]
Posted over 2 years ago
Hello, I am extremely excited to announce the first stable release of Psycopg 3! Psycopg 3 is a complete rewrite based on the experience accumulated with the development and maintenance of psycopg2. Psycopg 3 targets all the current versions of ... [More] Python (3.6-3.10) and PostgreSQL (10-14) and allows the use of modern Python development techniques, such as async and statically typed code. A list of the new features is available in the documentation. This was a long journey: I would like to thank the people who have helped to make this project amazing with their ideas and their code: Denis Laxalde (row factories), Daniel Fortunov (transaction blocks), Jacopo Farina (PostGIS support) and many who have tested, helped, discussed, cheered for us. And an immense thank you to the sponsors who have made this project possible: Postgres Professional and Command Prompt have been our biggest supporters so far, but many companies and individuals have given their generous contribution. Surely there will be more work to come in the future: if you want you can help sponsoring the project too. If you would like to try out the project please check out the installation and usage instructions. We are eager to hear your feedback and to share this journey with you. -- Daniele, on behalf of Psycopg [Less]
Posted over 2 years ago
PGConf NYC 2021 Sessions Announced, Last Week for Early Bird! The first community PostgreSQL conference in many months is coming to New York City in less than two months! PGConf NYC is a non-profit, community-run and PostgreSQL community recognized ... [More] conference being run by the United States PostgreSQL Association (PgUS). PGConf NYC delivers two days packed with presentations about PostgreSQL and related technologies, as well as the usual hallway and social track. PGConf NYC is being held December 2nd and 3rd, 2021 in New York City. Sessions The PGConf NYC 2021 sessions have now been announced and are available here: https://postgresql.us/events/pgconfnyc2021/sessions/ Our talk selection committee, comprised of 5 individuals from 5 different companies, chose these as the best of the over 100 sessions which were submitted this year! Details of our operations, talk selection committees, policies, and who should attend PGConf NYC is available here: https://2021.pgconf.nyc/about/. Registration We've extended Early Bird registration until October 17th, but that's less than a week away! Be sure to get your Early Bird ticket before they're sold out: https://2021.pgconf.nyc/tickets/ Venue Our venue and recommended hotel this year is the fantastic New York Marriott Downtown in New York City. Please be sure and book your stay using our conference discount code by going through the Venue & Hotel page: https://2021.pgconf.nyc/venue/ Sponsors & Sponsorship As always, we wouldn't be able to put on these great events without the support of our sponsors. This year we are pleased to be able to recognize our Platinum sponsors: EnterpriseDB Corporation - https://www.enterprisedb.com/ Percona, LLC - https://www.percona.com/ Timescale, Inc. - https://www.timescale.com/ and our Gold sponsors: CYBERTEC PostgreSQL International GmbH - https://www.cybertec-postgresql.com Team Cymru - https://team-cymru.com/ Be sure to check out our site to see all of our sponsors: https://2021.pgconf.nyc/sponsors/ Many sponsorship opportunities are still available! Please visit https://2021.pgconf.nyc/becomesponsor/ to review our prospectus. Contact Us Finally, for frequent updates and information related to our conference, please follow our Twitter account: https://twitter.com/PGConfNYC Any questions? Please contact us at [email protected] and we'll be happy to assist. We look forward to seeing everyone in New York City! https://2021.pgconf.nyc/ [Less]
Posted over 2 years ago
PostgreSQL Partition Manager (pg_partman) v4.6.0 has been released. IMPORTANT REQUEST: A topic has been opened on the github page to discuss the future development of pg_partman and support for trigger-based partitioning. A plan is currently in ... [More] place to begin dropping trigger-based support upon the EOL for PostgreSQL 10 on November 10, 2022. Feedback is requested for use-cases that could potentially change these plans and continue supporting trigger-based partitioning until native partitioning better supports them. https://github.com/pgpartman/pg_partman/discussions/360 Version 4.6.0 brings significantly better support for partitioning with arbitrary time interval values. Other changes of note are: PostgreSQL 14 support Deprecation of pg_partman's specialized UPSERT support for PG 11 and greater. Usage of the built-in INSERT ... ON CONFLICT feature is better supported in native partitioning as of version 11. When dropping child tables for retention, DROP ... CASCADE is no longer supported in native partitioning. This avoids the foreign key references to the partition set being dropped completely whenever a child table is dropped. Additional features and bug fixes for this release can be found in the CHANGELOG. Links: Website - https://github.com/pgpartman/pg_partman Installation - https://github.com/pgpartman/pg_partman#installation Documentation - https://github.com/pgpartman/pg_partman/blob/master/doc/pg_partman.md Release Notes - https://github.com/pgpartman/pg_partman/blob/master/CHANGELOG.txt Crunchy Data - https://www.crunchydata.com Crunchy Data is proud to support the development and maintenance of pg_partman. -- Keith Fiske Senior Database Engineer Crunchy Data [Less]
Posted over 2 years ago
PostgreSQL Weekly News - October 10, 2021 PostgreSQL Product News pgCluu 3.2, a Perl program to audit PostgreSQL performance, released. PGroonga 2.3.2 a full text search platform for all languages, released. PostgreSQL Jobs for October ... [More] https://archives.postgresql.org/pgsql-jobs/2021-10/ PostgreSQL in the News Planet PostgreSQL: https://planet.postgresql.org/ PostgreSQL Weekly News is brought to you this week by David Fetter Submit news and announcements by Sunday at 3:00pm PST8PDT to [email protected]. Applied Patches Michaël Paquier pushed: Fix snapshot builds during promotion of hot standby node with 2PC. Some specific logic is done at the end of recovery when involving 2PC transactions: 1) Call RecoverPreparedTransactions(), to recover the state of 2PC transactions into memory (re-acquire locks, etc.). 2) ShutdownRecoveryTransactionEnvironment(), to move back to normal operations, mainly cleaning up recovery locks and KnownAssignedXids (including any 2PC transaction tracked previously). 3) Switch XLogCtl->SharedRecoveryState to RECOVERY_STATE_DONE, which is the tipping point for any process calling RecoveryInProgress() to check if the cluster is still in recovery or not. Any snapshot taken between steps 2) and 3) would be empty, causing any transaction relying on a snapshot at this point to potentially corrupt data as there could still be some 2PC transactions to track, with RecentXmin moving backwards on successive calls to GetSnapshotData() in the same transaction. As SharedRecoveryState is the point to take into account to know if it is safe to discard KnownAssignedXids, this commit moves step 2) after step 3), so as we can never finish with empty snapshots. This exists since the introduction of hot standby, so backpatch all the way down. The window with incorrect snapshots is extremely small, but I have seen it when running 023_pitr_prepared_xact.pl, as did buildfarm member fairywren. Thomas Munro also found it independently. Special thanks to Andres Freund for taking the time to analyze this issue. Reported-by: Thomas Munro, Michael Paquier Analyzed-by: Andres Freund Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.6 https://git.postgresql.org/pg/commitdiff/8a4237908c0fe73dd41d4d7c7a6314f17dfd7a6f Fix warning in TAP test of pg_verifybackup. Oversight in a3fcbcd. Reported-by: Thomas Munro Discussion: https://postgr.es/m/CA+hUKGKnajZEwe91OTjro9kQLCMGGFHh2vvFn8tgHgbyn4bF9w@mail.gmail.com Backpatch-through: 13 https://git.postgresql.org/pg/commitdiff/ec2133a447318ac6d78887e91940d69e6d92a435 Refactor per-destination file rotation in logging collector. stderr and csvlog have been using duplicated code when it came to the rotation of their file by size, age or if forced by a user request (pg_ctl logrotate or the SQL function pg_rotate_logfile). The main difference between both is that stderr requires its file to always be opened, so as it is possible to have a redirection route if the logging collector is not ready yet to do its work if alternate destinations are enabled. Also, if csvlog gets disabled, we need to close properly its meta-data stored in the logging collector (last file name for current_logfiles and fd currently open for business). Except for those points, the code is the same in terms of error handling and if a file should be created or just continued. This change makes the code simpler overall, and it will help in the introduction of more file-based log destinations. This refactoring is similar to the work done in 5b0b699. Most of the duplication originates from fd801f4. Some of the TAP tests of pg_ctl check the case of a forced log rotation, but this is somewhat limited as there is no coverage for log_rotation_age or log_rotation_size (these may not be worth the extra resources to run either), and no coverage for reload of log_destination with different combinations of stderr and csvlog. I have tested all those cases separately for this refactoring. Author: Michael Paquier Discussion: https://postgr.es/m/CAH7T-aqswBM6JWe4pDehi1uOiufqe06DJWaU5=X7dDLyqUExHg@mail.gmail.com https://git.postgresql.org/pg/commitdiff/5c6e33f071537d9831db57471a06d39a175b535a Fix compilation warning in syslogger.c. Oversight in 5c6e33f. Author: Nathan Bossart Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/05c4248ad1bf0c2721ce9445f6908da9ece36ff8 Refactor fallback to stderr for csvlog to handle better WIN32 service case. send_message_to_server_log() would force a redirection of a log entry to stderr in some cases for csvlog, like the syslogger not being available yet. If this happens, csvlog would fall back to stderr to log some information rather than nothing. The code was organized so as stderr is done before csvlog, with csvlog checking that stderr did not happen yet with a reversed condition. With this code organization, it could be possible to lose some messages if running Postgres as a service on WIN32, as there is no usable stderr, and the handling of the StringInfoData holding the message for stderr was rather confusing because of that. This commit moves the csvlog handling to be before stderr, as as we are able to track down if it is necessary to log something to stderr. The reduces the handling of stderr to be in a single code path, adding a fallback to event logs for a WIN32 service. This also simplifies the way we handle the StringInfoData for stderr, making easier the integration of new file-based log destinations. I got to play with services and event logs on Windows while checking this change. Reviewed-by: Chris Bandy Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/8b76f89c37973082b3d64f5a27937efcca9d65f6 Daniel Gustafsson pushed: Replace occurrences of InvalidXid with InvalidTransactionId. While Xid is a known shortening of TransactionId, InvalidXid is not defined in the code. Fix comments which mistakenly were using the shorter version. Author: Bharath Rupireddy [email protected] Discussion: https://postgr.es/m/CALj2ACUQzdigML868nV4cojfELPkEzNLNOk7b91Pho4JB90fng@mail.gmail.com https://git.postgresql.org/pg/commitdiff/941921b875c7710e2b070c02c7819f2510808fdd Provide error hint if TAP tests are not enabled. The error message for trying to run the TAP tests in a tree not configured with --enable-tap-tests is quite terse, and could be made more helpful to new developers onboarding to postgres. This adds a small hint on how to get the tests running in such cases. Author: Kevin Burke [email protected] Discussion: https://postgr.es/m/CAKcy5ejKVYwUXguQcd6i9KHDm7cM7FzjQ+aayaPveoa_woyQpQ@mail.gmail.com https://git.postgresql.org/pg/commitdiff/b5cb4db91327c2cef66207bde9cbcb592b91f93c Provide error hint on exit() check when building libpq. Commit dc227eb82 introduced a restriction on libpq that no functions which invoke exit() are allowed to be called. This was further refined and fixed in e45b0dfa1f and 2f7bae2f92 and 792259591. While this is well documented in the Makefile, the error message emitted when the check failed was terse, without hints for new developers without prior context. This adds an error hint to assist new developers onboarding to postgres. Author: Rachel Heaton [email protected] Co-authored-by: Jacob Champion [email protected] Discussion: https://postgr.es/m/CADJcwiVL20955HCNzDqz9BEDr6A77pz6-nac5sbZVvhAEMijLg@mail.gmail.com https://git.postgresql.org/pg/commitdiff/e9bc0441f1446f6614fa6712841acec91890e089 Fix duplicate words in comments. Remove accidentally duplicated words in code comments. Author: Dagfinn Ilmari Mannsåker [email protected] Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/7111e332c57ddb562d0ce26a4e08761a0baafb65 Fix check for trapping exit() calls in libpq. Commit e9bc0441f added an errorhint on the exit() check for libpq, but accidentally changed the nm commandline to use -a instead of -A. These options are similar enough to hide it in testing, but -a can also show debugger symbols which isn't what we want. Fix by reverting the check back to using -A again. Reported-by: Anton Voloshin [email protected] Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/de744e9efbc55288572d1e81168c74ea85a4b90a Peter Eisentraut pushed: Update Unicode map text files. A couple of newer ones are available. There are no functional differences, but let's get them in anyway, so that there is no surprise diff next time someone wants to do some actual work in this area. https://git.postgresql.org/pg/commitdiff/ce27c8953e8e48c69c690c0e5795cde40ed59fd2 Make Unicode makefile parallel-safe. Fix the rules so that each rule is parallel safe, using the same trickery that we use elsewhere in the tree for rules that produce more than one output file. Refactor the whole makefile so that there is less repetition. Discussion: https://www.postgresql.org/message-id/18e34084-aab1-1b4c-edd1-c4f9fb04f714%40enterprisedb.com https://git.postgresql.org/pg/commitdiff/e752727195798c324e769cfebf9dc4baa1c6bb0c Fix loop variable signedness. https://git.postgresql.org/pg/commitdiff/ba216d3b54ac334729c505ec8a725db3826290a2 Improve order in file. Move support functions for new PublicationTable node to more sensible locations in the files. https://git.postgresql.org/pg/commitdiff/d942887039a608c91084a942fe10571c6f6be35a Tom Lane pushed: Doc: fix minor issues in GiST support function documentation. gist.sgml and xindex.sgml hadn't been fully updated for the addition of a sortsupport support function (commit 16fa9b2b3). xindex.sgml also missed that the compress and decompress support functions are optional, an apparently far older oversight. In passing, fix gratuitous inconsistencies in wording and capitalization. Noted by E. Rogov. Back-patch to v14; the residual issues before that aren't significant enough to bother with. Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/36d1a848a86afd2855215af2a112b9bde999354a Update our mapping of Windows time zone names some more. Per discussion, let's just follow CLDR's default zone mappings faithfully. There are two changes here that are clear improvements: * Mapping "Greenwich Standard Time" to Atlantic/Reykjavik is actually a better fit than using London, because Iceland hasn't observed DST since 1968, so this is more nearly what people might expect. * Since the "Samoa" zone is specified to be UTC+13:00, we must map it to Pacific/Apia not Pacific/Samoa; the latter refers to American Samoa which is now on the other side of the date line. The rest of these changes look like they're choosing the most populous IANA zone as representative. Whatever the details, we're just going to say "if you don't like this mapping, complain to CLDR". Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/c1aa3b3c0d2125cb04df8ed0387448d8aeb9519c Doc: improve description of UNION/INTERSECT/EXCEPT syntax. queries.sgml failed to mention the rather important point that INTERSECT binds more tightly than UNION or EXCEPT. I thought it could also use more discussion of the role of parentheses in these constructs. Per gripe from Christopher Painter-Wakefield. Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/f3fec23dbdead113700fb1b401b681fa24f1e4f4 Doc: improve timezone/README's recipe for tracking Windows zones. We should now cite CLDR as primary reference for the zone name mapping. Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/db692b0c84908b4ef5ea4c15fa2d742582ad2cf9 Fix null-pointer crash in postgres_fdw's conversion_error_callback. Commit c7b7311f6 adjusted conversion_error_callback to always use information from the query's rangetable, to avoid doing catalog lookups in an already-failed transaction. However, as a result of the utterly inadequate documentation for make_tuple_from_result_row, I failed to realize that fsstate could be NULL in some contexts. That led to a crash if we got a conversion error in such a context. Fix by falling back to the previous coding when fsstate is NULL. Improve the commentary, too. Per report from Andrey Borodin. Back-patch to 9.6, like the previous patch. Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/3071bbfe44f36019710190a9273ad2bd4a947878 plperl: update ppport.h to Perl 5.34.0. Also apply the changes suggested by running perl ppport.h --compat-version=5.8.0 And remove some no-longer-required NEED_foo declarations. Dagfinn Ilmari Mannsåker Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/05798c9f7f08908bdd06c82d934da67535b72005 Adjust configure to insist on Perl version >= 5.8.3. Previously it only checked for version >= 5.8.0, although the documentation has said that the minimum version is 5.8.3 since commit dea6ba939. Per the discussion leading up to that commit, I (tgl) left it that way intentionally because you could, at the time, do some bare-bones stuff with 5.8.0. But we aren't actually testing against anything older than 5.8.3, so who knows if that's still true. It's pretty unlikely that anyone would care anyway, so let's just make configure's version check match the docs. Dagfinn Ilmari Mannsåker Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/92e6a98c3636948e7ece9a3260f9d89dd60da278 Update test/perl/README to insist on Perl version >= 5.8.3, too. Oversight in previous commit, noted by Daniel Gustafsson. Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/93fb39eca643a33dd6e3c8818fc7899aa67a8103 Doc: update our claims about the minimum recommended AIX version. We currently have buildfarm members testing back to AIX 7.1, but not before, and older AIX versions are long out of support from IBM. So say that 7.1 is the oldest supported version. Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/08e2daf06c71881415ebd19105a8fe53f6eb2f8f Doc: improve documentation for ^@ starts-with operator. This operator wasn't formally documented anywhere. To give it a natural home, relabel the functions-string-other table as "Other String Functions and Operators", which is more parallel to the functions-string-sql table anyway. While here, add cross-references to the pattern match and text search sections. It seems moderately likely that people would come to this section looking for those (but I don't want to actually list them in these tables). Discussion: https://postgr.es/m/CADT4RqB13KQHOJqqQ+WXmYtJrukS2UiFdtfTvT-XA3qYLyB6Cw@mail.gmail.com https://git.postgresql.org/pg/commitdiff/2ae5d72f004f599c351ee31e8da5fb3e40303760 Andres Freund pushed: windows: Define WIN32_LEAN_AND_MEAN to make compilation faster. windows.h includes a lot of other headers, slowing down compilation significantly. WIN32_LEAN_AND_MEAN reduces that a bit. It'd be better to remove the include of windows.h (as well as indirect inclusions of it) from such a central place, but until then... Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/8162464a25e5314e753c580389f76a9b7f69445b Fix TestLib::slurp_file() with offset on windows. 3c5b0685b921 used setFilePointer() to set the position of the filehandle, but passed the wrong filehandle, always leaving the position at 0. Instead of just fixing that, remove use of setFilePointer(), we have a perl fd at this point, so we can just use perl's seek(). Additionally, the perl filehandle wasn't closed, just the windows filehandle. Reviewed-By: Andrew Dunstan [email protected] Author: Andres Freund [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch: 9.6-, like 3c5b0685b921 https://git.postgresql.org/pg/commitdiff/2f74db1236fe83e6665e5b0ddad4454c69495614 Bruce Momjian pushed: doc: remove URL for ICU explorer/locexp. The old URL was HTTP 404 and the git link didn't build. Also update two other ICU links. If we ever get a good link we will add it back. Reported-by: Anton Voloshin Author: Laurenz Albe Backpatch-through: 10 https://git.postgresql.org/pg/commitdiff/e8259439066c5fa4f3266f30434d5a52b8347bd1 Fujii Masao pushed: psql: Improve tab-completion for LOCK TABLE. This commit makes psql support the tab-completion for ONLY and NOWAIT keywords of LOCK TABLE command. Author: Koyu Tanigawa Reviewed-by: Shinya Kato, Fujii Masao Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/0b0d277c35533baecc8d1a9356f71de5f2ee0bd8 doc: Document pg_encoding_to_char() and pg_char_to_encoding(). Previously both functions were not described anywhere in the docs. But since they have been around since 7.0 and mentioned in the description for system catalog like pg_database, it's reasonable to add short descriptions for them. Author: Ian Lawrence Barwick Reviewed-by: Laurenz Albe, Fujii Masao Discussion: https://postgr.es/m/CAB8KJ=infievn4q1N4X7Vx8w4_RMPPG0pLvxhSDjy5WQOSHW9g@mail.gmail.com https://git.postgresql.org/pg/commitdiff/f6b5d05ba9a4ac7c5ebec76045c6e0afcf7c9eec Make recovery report error message when invalid page header is found. Commit 0668719801 changed XLogPageRead() so that it validated the page header, if invalid page header was found reset the error message and retried reading the page, to fix the scenario where streaming standby got stuck at a continuation record. This change hid the error message about invalid page header, which would make it harder for users to investigate what the actual issue was found in WAL. To fix the issue, this commit makes XLogPageRead() report the error message when invalid page header is found. When not in standby mode, an invalid page header should cause recovery to end, not retry reading the page, so XLogPageRead() doesn't need to validate the page header for the retry. Instead, ReadPageInternal() should be responsible for the validation in that case. Therefore this commit changes XLogPageRead() so that if not in standby mode it doesn't validate the page header for the retry. Reported-by: Yugo Nagata Author: Yugo Nagata, Kyotaro Horiguchi Reviewed-by: Ranier Vilela, Fujii Masao Discussion: https://postgr.es/m/[email protected] https://git.postgresql.org/pg/commitdiff/68601985e699adeb267636fd19d3d6113554bd1f Amit Kapila pushed: Remove obsolete comment in snapbuild.c. Commits 955a684e04 and a975ff4980 removed the usage of running xacts information from serialized snapshots but forgot to remove the corresponding comment. Author: Masahiko Sawada Discussion: https://postgr.es/m/CAD21AoBifOr7RS=jRe7YCavc646y9omChv6zkWXvJeZcjS9mXA@mail.gmail.com https://git.postgresql.org/pg/commitdiff/826584fa5284341c601f3c49804dfa9c02295554 Robert Haas pushed: Flexible options for BASE_BACKUP. Previously, BASE_BACKUP used an entirely hard-coded syntax, but that's hard to extend. Instead, adopt the same kind of syntax we've used for SQL commands such as VACUUM, ANALYZE, COPY, and EXPLAIN, where it's not necessary for all of the option names to be parser keywords. In the new syntax, most of the options now take an optional Boolean argument. To match our practice in other in places, the options which the old syntax called NOWAIT and NOVERIFY_CHECKSUMS options are in the new syntax called WAIT and VERIFY_CHECKUMS, and the default value is false. In the new syntax, the FAST option has been replaced by a CHECKSUM option whose value may be 'fast' or 'spread'. This commit does not remove support for the old syntax. It just adds the new one as an additional option, and makes pg_basebackup prefer the new syntax when the server is new enough to support it. Patch by me, reviewed and tested by Fabien Coelho, Sergei Kornilov, Fujii Masao, and Tushar Ahuja. Discussion: http://postgr.es/m/CA+TgmobAczXDRO_Gr2euo_TxgzaH1JxbNxvFx=HYvBinefNH8Q@mail.gmail.com Discussion: http://postgr.es/m/CA+TgmoZGwR=ZVWFeecncubEyPdwghnvfkkdBe9BLccLSiqdf9Q@mail.gmail.com https://git.postgresql.org/pg/commitdiff/0ba281cb4bf9f5f65529dfa4c8282abb734dd454 Flexible options for CREATE_REPLICATION_SLOT. Like BASE_BACKUP, CREATE_REPLICATION_SLOT has historically used a hard-coded syntax. To improve future extensibility, adopt a flexible options syntax here, too. In the new syntax, instead of three mutually exclusive options EXPORT_SNAPSHOT, USE_SNAPSHOT, and NOEXPORT_SNAPSHOT, there is now a single SNAPSHOT option with three possible values: 'export', 'use', and 'nothing'. This commit does not remove support for the old syntax. It just adds the new one as an additional option, makes pg_receivewal, pg_recvlogical, and walreceiver processes use it. Patch by me, reviewed by Fabien Coelho, Sergei Kornilov, and Fujii Masao. Discussion: http://postgr.es/m/CA+TgmobAczXDRO_Gr2euo_TxgzaH1JxbNxvFx=HYvBinefNH8Q@mail.gmail.com Discussion: http://postgr.es/m/CA+TgmoZGwR=ZVWFeecncubEyPdwghnvfkkdBe9BLccLSiqdf9Q@mail.gmail.com https://git.postgresql.org/pg/commitdiff/0266e98c6b865246c3031bbf55cb15f330134e30 Dean Rasheed pushed: Fix corner-case loss of precision in numeric_power(). This fixes a loss of precision that occurs when the first input is very close to 1, so that its logarithm is very small. Formerly, during the initial low-precision calculation to estimate the result weight, the logarithm was computed to a local rscale that was capped to NUMERIC_MAX_DISPLAY_SCALE (1000). However, the base may be as close as 1e-16383 to 1, hence its logarithm may be as small as 1e-16383, and so the local rscale needs to be allowed to exceed 16383, otherwise all precision is lost, leading to a poor choice of rscale for the full-precision calculation. Fix this by removing the cap on the local rscale during the initial low-precision calculation, as we already do in the full-precision calculation. This doesn't change the fact that the initial calculation is a low-precision approximation, computing the logarithm to around 8 significant digits, which is very fast, especially when the base is very close to 1. Patch by me, reviewed by Alvaro Herrera. Discussion: https://postgr.es/m/CAEZATCV-Ceu%2BHpRMf416yUe4KKFv%3DtdgXQAe5-7S9tD%3D5E-T1g%40mail.gmail.com https://git.postgresql.org/pg/commitdiff/e54a758d24dab056bb7f50d26c57a3c8761cc44a Etsuro Fujita pushed: Add missing word to comment in joinrels.c. Author: Amit Langote Backpatch-through: 13 Discussion: https://postgr.es/m/CA%2BHiwqGQNbtamQ_9DU3osR1XiWR4wxWFZurPmN6zgbdSZDeWmw%40mail.gmail.com https://git.postgresql.org/pg/commitdiff/700c73312841bd1a89263f238556ce8d8d916258 postgres_fdw: Fix comments in connection.c. Commit 27e1f1456 missed updating some comments. Reviewed-by: Bharath Rupireddy Backpatch-through: 14 Discussion: https://postgr.es/m/CAPmGK15Q2Nm6U%2Ba_GwskrWFEVBZ9_3VKOvRrprGufpx91M_3Sw%40mail.gmail.com https://git.postgresql.org/pg/commitdiff/972c7c6567fbb02a59b94ede80b17805de1bc03c [Less]