aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Initialize ShmemVariableCache like other shmem areasHeikki Linnakangas2023-12-08
| | | | | | | For sake of consistency. Reviewed-by: Tristan Partin, Richard Guo Discussion: https://www.postgresql.org/message-id/6537d63d-4bb5-46f8-9b5d-73a8ba4720ab@iki.fi
* Don't try to open visibilitymap when analyzing a foreign tableHeikki Linnakangas2023-12-08
| | | | | | | | It's harmless, visibilitymap_count() returns 0 if the file doesn't exist. But it's also very pointless. I noticed this when I added an assertion in smgropen() that the relnumber is valid. Discussion: https://www.postgresql.org/message-id/621a52fd-3cd8-4f5d-a561-d510b853bbaf@iki.fi
* Fix potential pointer overflow in xlogreader.c.Thomas Munro2023-12-08
| | | | | | | | | | | | | | | | | | | While checking if a record could fit in the circular WAL decoding buffer, the coding from commit 3f1ce973 used arithmetic that could overflow. 64 bit systems were unaffected for various technical reasons, which probably explains the lack of problem reports. Likewise for 32 bit systems running known 32 bit kernels. The systems at risk of problems appear to be 32 bit processes running on 64 bit kernels, with unlucky placement in memory. Per complaint from GCC -fsanitize=undefined -m32, while testing variations of 039_end_of_wal.pl. Back-patch to 15. Reviewed-by: Nathan Bossart <nathandbossart@gmail.com> Reviewed-by: Robert Haas <robertmhaas@gmail.com> Discussion: https://postgr.es/m/CA%2BhUKGKH0oRPOX7DhiQ_b51sM8HqcPp2J3WA-Oen%3DdXog%2BAGGQ%40mail.gmail.com
* Fix path of regress shared library in pg_upgrade testMichael Paquier2023-12-08
| | | | | | | | | | | | | | | | During a pg_upgrade test using an old dump, all references to the old regress shared library path (so, dylib or dll) are updated to point to the library path used by the new build, to ensure a consistent comparison between the old and new dumps. The test previously relied on a hardcoded value of "src/test/regress/" to build the new path value, which would point to an incorrect location for the meson and vpath builds. This is replaced by REGRESS_SHLIB, able to point to the correct location of the regress shared library. Author: Alexander Lakhin Discussion: https://postgr.es/m/a628d8ad-a08a-2eab-4ca9-641bc82d3193@gmail.com Backpatch-through: 15
* Shrink Unicode category table.Jeff Davis2023-12-07
| | | | | | Missing entries can implicitly be considered "unassigned". Discussion: https://postgr.es/m/ff4c2f2f9c8fc7ca27c1c24ae37ecaeaeaff6b53.camel@j-davis.com
* Verify that attribute counts match in ExecCopySlotDavid Rowley2023-12-07
| | | | | | | | | | | | | | | | | | | | | | | | tts_virtual_copyslot() contained an Assert that checked that the srcslot contained <= attributes than the dstslot. This seems to be backwards as if the srcslot contained fewer attributes then the dstslot could be left with stale Datum values from the previously stored tuple. It might make more sense to allow the source to contain additional attributes and only copy the leading ones that also exist in the destination, however, that's not what we're doing here. Here we just remove the Assert from tts_virtual_copyslot() and add an Assert to ExecCopySlot() to verify the attribute counts match. There does not seem to be any places where the destination contains fewer attributes, so instead of going to the trouble of making the code properly handle this, let's just ensure the attribute counts match. If this Assert fails then that will indicate that we do have cases that require us to handle the srcslot with more attributes than the dstslot. It seems better to only write this code if there's a genuine requirement for it rather than write it now only to leave it untested. Thanks to Andres Freund for helping with the analysis of this. Discussion: https://postgr.es/m/CAApHDvpMAvBL0T+TRORquyx1iqFQKMVTXtqNocOw0Pa2uh1heg@mail.gmail.com
* Improve some error messages with invalid indexes for REINDEX CONCURRENTLYMichael Paquier2023-12-07
| | | | | | | | | | | | | | An invalid index is skipped when doing REINDEX CONCURRENTLY at table level, with INDEX_CORRUPTED used as errcode. This is confusing, because an invalid index could exist after an interruption. The errcode is switched to OBJECT_NOT_IN_PREREQUISITE_STATE instead, as per a suggestion from Andres Freund. While on it, the error messages are reworded, and a hint is added, telling how to rebuild an invalid index in this case. This has been suggested by Noah Misch. Discussion: https://postgr.es/m/20231118230958.4fm3fhk4ypshxopa@awork3.anarazel.de
* Fix issues in binary_upgrade_logical_slot_has_caught_up().Amit Kapila2023-12-07
| | | | | | | | | | | | | | | | | The commit 29d0a77fa6 labelled binary_upgrade_logical_slot_has_caught_up() as a non-strict function to allow providing a better error message to callers in case the passed slot_name is NULL. On further discussion, it seems that it is not helpful to have a different error message for NULL input in this function, so this patch marks the function as strict. This patch also removes the explicit permission check to use replication slots as this function is invoked only by superusers and instead adds an Assert. Reported-by: Masahiko Sawada Author: Hayato Kuroda Reviewed-by: Vignesh C Discussion: https://postgr.es/m/CAD21AoDSyiBKkMXBxN_gUayZZUCOgyHnG8Ge8rcPXNP3Tf6B4g@mail.gmail.com
* Fix assertion failure with REINDEX and event triggersMichael Paquier2023-12-07
| | | | | | | | | | | | | | | | | | | | | | | A REINDEX CONCURRENTLY run on a table with no indexes would always pop the topmost snapshot from the active snapshot stack, making the snapshot handling inconsistent between the multiple-relation and single-relation cases. This commit slightly changes the snapshot stack handling so as a snapshot is popped only ReindexMultipleInternal() in this case after a relation has been reindexed, fixing a problem where an event trigger function may need a snapshot but does not have one. This also keeps the places where PopActiveSnapshot() is called closer to each other. While on it, this expands the existing tests to cover all the cases that could be faced with REINDEX commands and such event triggers, for one or more relations, with or without indexes. This behavior is inconsistent since 5dc92b844e68, but we've never had a need for an active snapshot at the end of a REINDEX until now. Thanks also to Jian He for the input. Reported-by: Alexander Lakhin Discussion: https://postgr.es/m/cb538743-484c-eb6a-a8c5-359980cd3a17@gmail.com
* Suppress -Wunused-result warning about write().Nathan Bossart2023-12-06
| | | | | | | | | | | pg_test_fsync's signal_cleanup() intentionally ignores the write() result since there's not much we could do about it, but certain compilers make that harder than it ought to be. This was missed in commit 52e98d4502. Reviewed-by: Tristan Partin, Peter Eisentraut Discussion: https://postgr.es/m/20231206161839.GA2828158%40nathanxps13
* Use signal-safe functions in signal handlerPeter Eisentraut2023-12-06
| | | | | | | | According to signal-safety(7), exit(3) and puts(3) are not safe to call in a signal handler. Author: Tristan Partin <tristan@neon.tech> Discussion: https://www.postgresql.org/message-id/flat/CTVDKVZCCVSY.1XQ87UL50KQRD%40gonk
* Fix compilation on Windows with WAL_DEBUGMichael Paquier2023-12-06
| | | | | | | | | | This has been broken since b060dbe0001a that has reworked the callback mechanism of XLogReader, most likely unnoticed because any form of development involving WAL happens on platforms where this compiles fine. Author: Bharath Rupireddy Discussion: https://postgr.es/m/CALj2ACVF14WKQMFwcJ=3okVDhiXpuK5f7YdT+BdYXbbypMHqWA@mail.gmail.com Backpatch-through: 13
* Apply filters to dump files all the time in 002_pg_upgrade.plMichael Paquier2023-12-06
| | | | | | | | | | | | | | | | | | | | This commit removes the restriction that would not apply filters to the dumps used for comparison in the TAP test of pg_upgrade when using the same base version for the old and new nodes. The previous logic would fail on Windows if loading a dump while using the same set of binaries for the old and new nodes, as the library dependencies updated in the old dump would append CRLFs to the dump file as it is treated as a text file. The dump filtering logic replaces all CRLFs (\r\n) by LFs (\n), which is able to prevent this issue. When the old and new versions of the binaries are the same, AdjustUpgrade removes all blank lines, removes version-based comments generated by pg_dump and replaces CRLFs by LFs. Reported-by: Alexander Lakhin Discussion: https://postgr.es/m/60d434b9-53d9-9ea1-819b-efebdcf44e41@gmail.com Backpatch-through: 15
* Rename pg_verifybackup's JsonManifestParseContext callback functions.Robert Haas2023-12-05
| | | | | | | | | | | The old names were too generic, and would have applied to any binary that made use of JsonManifestParseContext. Rename to make the names specific to pg_verifybackup, since there are plans afoot to reuse this infrastructure. Per suggestion from Álvaro Herrra. Discussion: http://postgr.es/m/202311131625.o7hzq3oukuyd@alvherre.pgsql
* Rename JsonManifestParseContext callbacks.Robert Haas2023-12-05
| | | | | | | | | There is no real reason to just run multiple words together when we can instead punctuate them with marks intended for that purpose. Per suggestion from Álvaro Herrera. Discussion: http://postgr.es/m/202311161021.nisg7imt7kyf@alvherre.pgsql
* Fix indentationDaniel Gustafsson2023-12-05
| | | | | | When preparing commit 98e675ed7af I accidentally forgot to run pgindent, which did produce a diff. Fix by adding the required whitespace per the koel buildfarm failure.
* Fix incorrect error message for IDENTIFY_SYSTEMDaniel Gustafsson2023-12-05
| | | | | | | | | | | | | | | | Commit 5a991ef8692e accidentally reversed the order of the tuples and fields parameters, making the error message incorrectly refer to 3 tuples with 1 field when IDENTIFY_SYSTEM returns 1 tuple and 3 or 4 fields. Fix by changing the order of the parameters. This also adds a comment describing why we check for < 3 when postgres since 9.4 has been sending 4 fields. Backpatch all the way since the bug is almost a decade old. Author: Tomonari Katsumata <t.katsumata1122@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Bug: #18224 Backpatch-through: v12
* Fix handling of errors in libpq pipelinesAlvaro Herrera2023-12-05
| | | | | | | | | | | | | | | | | | The logic to keep the libpq command queue in sync with queries that have been processed had a bug when errors were returned for reasons other than problems in queries -- for example, when a connection is lost. We incorrectly consumed an element from the command queue every time, but this is wrong and can lead to the queue becoming empty ahead of time, leading to later malfunction: PQgetResult would return nothing, potentially causing the calling application to enter a busy loop. Fix by making the SYNC queue element a barrier that can only be consumed when a SYNC message is received. Backpatch to 14. Reported by: Иван Трофимов (Ivan Trofimov) <i.trofimow@yandex.ru> Discussion: https://postgr.es/m/17948-fcace7557e449957@postgresql.org
* Fix a random failure in 003_logical_slots.pl.Amit Kapila2023-12-05
| | | | | | | | | | | | | | | The failed test was trying to validate that the two_phase option for a slot is retained after the upgrade. The problem was that it didn't get enabled before the upgrade so expecting to be enabled after the upgrade was not right in the first place. This is a timing issue because we enable the two_phase once the initial sync for all the tables is finished. Normally, we wait for the two_phase state to be enabled but this test missed that step. Per buildfarm. Author: Hayato Kuroda Discussion: https://postgr.es/m/TY3PR01MB98892396D1071FC4320D6B31F586A@TY3PR01MB9889.jpnprd01.prod.outlook.com
* Optimize SearchPathCache by saving the last entry.Jeff Davis2023-12-04
| | | | | | | Repeated lookups are common, so it's worth it to check the last entry before doing another hash lookup. Discussion: https://postgr.es/m/04c8592dbd694e4114a3ed87139a7a04e4363030.camel%40j-davis.com
* Teach convert() and friends to avoid copying when possible.Nathan Bossart2023-12-04
| | | | | | | | | | | | | Presently, pg_convert() allocates a new bytea and copies the result regardless of whether any conversion actually happened. This commit adjusts this function to return the source pointer as-is if no conversion occurred. This optimization isn't expected to make a tremendous difference, but it still seems worthwhile to avoid unnecessary memory allocations. Author: Yurii Rashkovskii Reviewed-by: Bertrand Drouvot Discussion: https://postgr.es/m/CA%2BRLCQyknBPSWXRBQGOi6aYEcdQ9RpH9Kch4GjoeY8dQ3D%2Bvhw%40mail.gmail.com
* Remove now-unnecessary Autovacuum[Launcher|Worker]IAm functionsHeikki Linnakangas2023-12-04
| | | | | | | After commit fd5e8b440d, InitProcess() is called later in the EXEC_BACKEND startup sequence, so it's enough to set the am_autovacuum_[launcher|worker] variables at the same place as in the !EXEC_BACKEND case.
* Don't use pgbench -j in testsAlvaro Herrera2023-12-04
| | | | | | | | | | | It draws an unnecessary error in builds compiled without thread support. Added by commit 038f586d5f1d, which was backpatched to 14; though in branch master we no longer support such builds, there's no reason to have this there, so remove it in all branches since 14. Reported-by: Michael Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/ZW2G9Ix4nBKLcSSO@paquier.xyz
* Remove unnecessary include of <math.h>Peter Eisentraut2023-12-04
| | | | | | | | | | This was probably never necessary. (The header used to use random(), but that shouldn't require <math.h> either. In any case, that's gone, too.) Reviewed-by: Shubham Khanna <Shubham.Khanna@fujitsu.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/cff5475d-e0a9-4561-b094-794aa36bd031%40eisentraut.org
* Remove unnecessary include of <sys/socket.h>Peter Eisentraut2023-12-04
| | | | | | | | | | | This was put here as part of a mechanical replacement of the old "getaddrinfo.h" with <netdb.h> plus <sys/socket.h> (commit 5579388d2d). But here, we only need netdb.h (for NI_MAXHOST), not sys/socket.h. Reviewed-by: Shubham Khanna <Shubham.Khanna@fujitsu.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/cff5475d-e0a9-4561-b094-794aa36bd031%40eisentraut.org
* Remove unnecessary includes of <signal.h>Peter Eisentraut2023-12-04
| | | | | | | | | These were once needed for sig_atomic_t, but that no longer appears in these headers, so the include is not needed. Reviewed-by: Shubham Khanna <Shubham.Khanna@fujitsu.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/cff5475d-e0a9-4561-b094-794aa36bd031%40eisentraut.org
* Add support for REINDEX in event triggersMichael Paquier2023-12-04
| | | | | | | | | | | | | | This commit adds support for REINDEX in event triggers, making this command react for the events ddl_command_start and ddl_command_end. The indexes rebuilt are collected with the ReindexStmt emitted by the caller, for the concurrent and non-concurrent paths. Thanks to that, it is possible to know a full list of the indexes that a single REINDEX command has worked on. Author: Garrett Thornburg, Jian He Reviewed-by: Jim Jones, Michael Paquier Discussion: https://postgr.es/m/CAEEqfk5bm32G7sbhzHbES9WejD8O8DCEOaLkxoBP7HNWxjPpvg@mail.gmail.com
* Refactor how InitProcess is calledHeikki Linnakangas2023-12-03
| | | | | | | | | | | The order of process initialization steps is now more consistent between !EXEC_BACKEND and EXEC_BACKEND modes. InitProcess() is called at the same place in either mode. We can now also move the AttachSharedMemoryStructs() call into InitProcess() itself. This reduces the number of "#ifdef EXEC_BACKEND" blocks. Reviewed-by: Tristan Partin, Andres Freund, Alexander Lakhin Discussion: https://www.postgresql.org/message-id/7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi
* Pass BackgroundWorker entry in the parameter file in EXEC_BACKEND modeHeikki Linnakangas2023-12-03
| | | | | | | | | | | | The BackgroundWorker struct is now passed the same way as the Port struct. Seems more consistent. This makes it possible to move InitProcess later in SubPostmasterMain (in next commit), as we no longer need to access shared memory to read background worker entry. Reviewed-by: Tristan Partin, Andres Freund, Alexander Lakhin Discussion: https://www.postgresql.org/message-id/7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi
* Refactor CreateSharedMemoryAndSemaphoresHeikki Linnakangas2023-12-03
| | | | | | | | | | | | For clarity, have separate functions for *creating* the shared memory and semaphores at postmaster or single-user backend startup, and for *attaching* to existing shared memory structures in EXEC_BACKEND case. CreateSharedMemoryAndSemaphores() is now called only at postmaster startup, and a new AttachSharedMemoryStructs() function is called at backend startup in EXEC_BACKEND mode. Reviewed-by: Tristan Partin, Andres Freund Discussion: https://www.postgresql.org/message-id/7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi
* Silence Valgrind complaint with EXEC_BACKENDHeikki Linnakangas2023-12-01
| | | | | | | | | | The padding bytes written to the backend params file were uninitialized. That's harmless because we don't access the padding bytes when we read the file back in, but Valgrind doesn't know that. In any case, clear the padding bytes to make Valgrind happy. Reported-by: Alexander Lakhin Discussion: https://www.postgresql.org/message-id/014768ed-8b39-c44f-b07c-098c87b1644c@gmail.com
* pgindent fixPeter Eisentraut2023-12-01
| | | | for commit a11c9c42ea
* Check collation when creating partitioned indexPeter Eisentraut2023-12-01
| | | | | | | | | | | | | | | | | When creating a partitioned index, the partition key must be a subset of the index's columns. But this currently doesn't check that the collations between the partition key and the index definition match. So you can construct a unique index that fails to enforce uniqueness. (This would most likely involve a nondeterministic collation, so it would have to be crafted explicitly and is not something that would just happen by accident.) This patch adds the required collation check. As a result, any previously allowed unique index that has a collation mismatch would no longer be allowed to be created. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/3327cb54-f7f1-413b-8fdb-7a9dceebb938%40eisentraut.org
* Fix an uninitialized access in hash_xlog_squeeze_page().Amit Kapila2023-12-01
| | | | | | | | | | | Commit 861f86beea changed hash_xlog_squeeze_page() to start reading the write buffer conditionally but forgot to initialize it leading to an uninitialized access. Reported-by: Alexander Lakhin Author: Hayato Kuroda Reviewed-by: Alexander Lakhin, Amit Kapila Discussion: http://postgr.es/m/62ed1a9f-746a-8e86-904b-51b9b806a1d9@gmail.com
* Adjust obsolete comment explaining set_stack_base().Thomas Munro2023-12-01
| | | | | | | | | | | | | | | | | Commit 7389aad6 removed the notion of backends started from inside a signal handler. A stray comment still referred to them, while explaining the need for a call to set_stack_base(). That leads to the question of whether we still need the call in !EXEC_BACKEND builds. There doesn't seem to be much point in suppressing it now, as it doesn't hurt and probably helps to measure the stack base from the exact same place in EXEC_BACKEND and !EXEC_BACKEND builds. Back-patch to 16. Reported-by: Heikki Linnakangas <hlinnaka@iki.fi> Reported-by: Tristan Partin <tristan@neon.tech> Reported-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/CA%2BhUKG%2BEJHcevNGNOxVWxTNFbuB%3Dvjf4U68%2B85rAC_Sxvy2zEQ%40mail.gmail.com
* Print lwlock stats also for aux processes, when built with LWLOCK_STATSHeikki Linnakangas2023-12-01
| | | | | | | | | | | | | | | InitAuxiliaryProcess() closely resembles InitProcess(), but it didn't call InitLWLockAccess(). But because InitLWLockAccess() is a no-op unless compiled with LWLOCK_STATS, and everything works even if it's not called, the only consequence was that the stats were not printed for aux processes. This was an oversight in commit 1c6821be31f, in version 9.5, so it is missing in all supported branches. But since it only affects developers using LWLOCK_STATS and no one has complained, no backpatching. Discussion: https://www.postgresql.org/message-id/20231130202648.7k6agmuizdilufnv@awork3.anarazel.de
* Fix typo in 5a1dfde8334bAlexander Korotkov2023-11-30
| | | | | Reported-by: Alexander Lakhin Discussion: https://postgr.es/m/55d8800f-4a80-5256-1e84-246fbe79acd0@gmail.com
* Fix spelling and punctuationDaniel Gustafsson2023-11-30
| | | | | | | | | | Remove trailing periods from pg_log_error emitted strings as only hint and detail level error messages should be punctuated. Also reword the usage screen which was missing a word. Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Discussion: https://postgr.es/m/20231130.105223.554982964895179414.horikyota.ntt@gmail.com Discussion: https://postgr.es/m/20231130.103900.2069212175914114279.horikyota.ntt@gmail.com
* Add missing file to nls MakefileDaniel Gustafsson2023-11-30
| | | | | Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Discussion: https://postgr.es/m/20231130.120009.1370713511317755874.horikyota.ntt@gmail.com
* Fix array subscript warningsDaniel Gustafsson2023-11-30
| | | | | | | | | | | | Commit a5cf808be55 accidentally passed signed chars to isalpha and isspace in the parser code which leads to undefined behavior. Fix by casting the parameters to unsigned chars. Author: Pavel Stehule <pavel.stehule@gmail.com> Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Reported-by: Michael Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/388186.1701315586@sss.pgh.pa.us Discussion: https://postgr.es/m/ZWgg5xim2CXQcfmh@paquier.xyz
* Fix warning due non-standard inline declaration in 4ed8f0913bfdb5f355Alexander Korotkov2023-11-30
| | | | | | Reported-by: Alexander Lakhin, Tom Lane Author: Pavel Borisov Discussion: https://postgr.es/m/55d8800f-4a80-5256-1e84-246fbe79acd0@gmail.com
* Remove redundant setting of hashkey after insertionJohn Naylor2023-11-30
| | | | | | | | | | | | | | | | It's not necessary to fill the key field in most cases, since hash_search has already done that. Some existing call sites have an assert or comment that this contract has been fulfilled, but those are quite old and that practice seems unnecessary here. While at it, remove a nearby redundant assignment that a smart compiler will elide anyway. Zhao Junwang, with some adjustments by me Reviewed by Nathan Bossart, with additional feedback from Tom Lane Discussion: http://postgr.es/m/CAEG8a3%2BUPF%3DR2QGPgJMF2mKh8xPd1H2TmfH77zPuVUFdBpiGUA%40mail.gmail.com
* Add tests for XID wraparound.Masahiko Sawada2023-11-30
| | | | | | | | | | | | | | The test module includes helper functions to quickly burn through lots of XIDs. They are used in the tests, and are also handy for manually testing XID wraparound. Since these tests are very expensive the entire suite is disabled by default. It requires to set PG_TEST_EXTRA to run it. Reviewed-by: Daniel Gustafsson, John Naylor, Michael Paquier Reviewed-by: vignesh C Author: Heikki Linnakangas, Masahiko Sawada, Andres Freund Discussion: https://www.postgresql.org/message-id/CAD21AoDVhkXp8HjpFO-gp3TgL6tCKcZQNxn04m01VAtcSi-5sA%40mail.gmail.com
* Apply quotes more consistently to GUC names in logsMichael Paquier2023-11-30
| | | | | | | | | | | | | | Quotes are applied to GUCs in a very inconsistent way across the code base, with a mix of double quotes or no quotes used. This commit removes double quotes around all the GUC names that are obviously referred to as parameters with non-English words (use of underscore, mixed case, etc). This is the result of a discussion with Álvaro Herrera, Nathan Bossart, Laurenz Albe, Peter Eisentraut, Tom Lane and Daniel Gustafsson. Author: Peter Smith Discussion: https://postgr.es/m/CAHut+Pv-kSN8SkxSdoHano_wPubqcg5789ejhCDZAcLFceBR-w@mail.gmail.com
* Add option to specify timeout seconds to BackgroundPsql.pm.Masahiko Sawada2023-11-30
| | | | | | | | | | | | Previously, a background psql session uses the default timeout and it cannot be overridden. This change adds a new option to set the timeout during start. There are no users of this new option. It is needed for an upcoming patch adding tests for XID wraparound. Reviewed-by: Daniel Gustafsson, Noah Misch Discussion: https://postgr.es/m/C9CF2F76-0D81-4C9D-9832-202BE8517056%40yesql.se
* Remove unused macroPeter Eisentraut2023-11-30
| | | | Usage was removed in a33e17f210 but the definition was not removed.
* Improve "user mapping not found" error messagePeter Eisentraut2023-11-30
| | | | | | | | | | Display the name of the foreign server for which the user mapping was not found. Author: Ian Lawrence Barwick <barwick@gmail.com> Reviewed-by: Laurenz Albe <laurenz.albe@cybertec.at> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://www.postgresql.org/message-id/flat/CAB8KJ=jFzNaeyFtLcTZNOc6fd1+F93pGVLFa-wyt31wn7VNxqQ@mail.gmail.com
* Fix a test in 003_logical_slots.Amit Kapila2023-11-30
| | | | | | | | | | | | | | | We allow to upgrade the slot iff there is no pending WAL to be processed. The test first disables the subscription to avoid unnecessary LOGs on the subscriber and then stops the publisher node. It is quite possible that just before the shutdown of the publisher, autovacuum generates some WAL record that needs to be processed, so just disable the autovacuum for this test. Per buildfarm. Author: Hayato Kuroda Reviewed-by: Amit Kapila Discussion: http://postgr.es/m/OS3PR01MB9882FED1F0060468FB01B9DAF583A@OS3PR01MB9882.jpnprd01.prod.outlook.com
* Fix wrong description of BackgroundPsql's timeout.Masahiko Sawada2023-11-30
| | | | | | | | Backpatch through 16 where this was introduced by 664d757531e1. Reviewed-by: Daniel Gustafsson Backpatch-through: 16 Discussion: http://postgr.es/m/CAD21AoBXMEqDBLoDuAWVWoTLYB4aNsxx4oYNmyJJbhfq_vGQBQ@mail.gmail.com
* Fix BackgroundPsql's set_query_timer_restart() issue without argument.Masahiko Sawada2023-11-30
| | | | | | | | | | | | | | | The set_query_timer_restart() required an argument to define a value to query_timer_restart, but none of the existing callers passes an argument to this function. This changes the function to set a value without an argument. Backpatch through 16 where the background psql TAP functions were refactored by 664d757531e1. Reviewed-by: Bharath Rupireddy, Tom Lane Discussion: https://postgr.es/m/CAD21AoA0B6VKe_5A9nZi8i5umwSN-zJJuPVNht9DaOZ9SJumMA@mail.gmail.com Backpatch-through: 16