pgsql: Wait for WAL summarization to catch up before creating .partial

2024-07-26 Thread Robert Haas
Wait for WAL summarization to catch up before creating .partial file. When a standby is promoted, CleanupAfterArchiveRecovery() may decide to rename the final WAL file from the old timeline by adding ".partial" to the name. If WAL summarization is enabled and this file is renamed before its

pgsql: Wait for WAL summarization to catch up before creating .partial

2024-07-26 Thread Robert Haas
Wait for WAL summarization to catch up before creating .partial file. When a standby is promoted, CleanupAfterArchiveRecovery() may decide to rename the final WAL file from the old timeline by adding ".partial" to the name. If WAL summarization is enabled and this file is renamed before its

pgsql: Fix indentation.

2024-07-26 Thread Robert Haas
Fix indentation. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c883453cb29cb40c1e59c3c54d159c5e744da8a9 Modified Files -- src/backend/postmaster/walsummarizer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

pgsql: Fix indentation.

2024-07-26 Thread Robert Haas
Fix indentation. Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f2af1f4559ea74a6133ac36df3204c12e8d12ed3 Modified Files -- src/backend/postmaster/walsummarizer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

pgsql: Allow WAL summarization to back up when timeline changes.

2024-07-26 Thread Robert Haas
Allow WAL summarization to back up when timeline changes. The old code believed that it was not possible to switch timelines without first replaying all of the WAL from the old timeline, but that turns out to be false, as demonstrated by an example from Fujii Masao. As a result, it assumed that

pgsql: Allow WAL summarization to back up when timeline changes.

2024-07-26 Thread Robert Haas
Allow WAL summarization to back up when timeline changes. The old code believed that it was not possible to switch timelines without first replaying all of the WAL from the old timeline, but that turns out to be false, as demonstrated by an example from Fujii Masao. As a result, it assumed that

pgsql: Document restrictions regarding incremental backups and standbys

2024-07-25 Thread Robert Haas
will understand what has gone wrong. Laurenz Albe and Robert Haas Discussion: https://postgr.es/m/5468641ad821dad7aa3b2d65bf843146443a1b68.ca...@cybertec.at Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/de8b098ce567526e4da7d6e51cfe0fb132123ad7 Modified Files

pgsql: Document restrictions regarding incremental backups and standbys

2024-07-25 Thread Robert Haas
will understand what has gone wrong. Laurenz Albe and Robert Haas Discussion: https://postgr.es/m/5468641ad821dad7aa3b2d65bf843146443a1b68.ca...@cybertec.at Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/744ddc6c6a0fa5d4d6d0e187cadcc632daaefc0e Modified Files

pgsql: Initialize wal_level in the initial checkpoint record.

2024-07-22 Thread Robert Haas
Initialize wal_level in the initial checkpoint record. As per Coverity and Tom Lane, commit 402b586d0 (back-patched to v17 as 2b5819e2b) forgot to initialize this new structure member in this code path. Branch -- master Details ---

pgsql: Initialize wal_level in the initial checkpoint record.

2024-07-22 Thread Robert Haas
Initialize wal_level in the initial checkpoint record. As per Coverity and Tom Lane, commit 402b586d0 (back-patched to v17 as 2b5819e2b) forgot to initialize this new structure member in this code path. Branch -- REL_17_STABLE Details ---

pgsql: Remove grotty use of disable_cost for TID scan plans.

2024-07-22 Thread Robert Haas
Remove grotty use of disable_cost for TID scan plans. Previously, the code charged disable_cost for CurrentOfExpr, and then subtracted disable_cost from the cost of a TID path that used CurrentOfExpr as the TID qual, effectively disabling all paths except that one. Now, we instead suppress

pgsql: Add missing call to ConditionVariableCancelSleep().

2024-07-22 Thread Robert Haas
Add missing call to ConditionVariableCancelSleep(). After calling ConditionVariableSleep() or ConditionVariableTimedSleep() one or more times, code is supposed to call ConditionVariableCancelSleep() to remove itself from the waitlist. This code neglected to do so. As far as I know, that had no

pgsql: Add missing call to ConditionVariableCancelSleep().

2024-07-22 Thread Robert Haas
Add missing call to ConditionVariableCancelSleep(). After calling ConditionVariableSleep() or ConditionVariableTimedSleep() one or more times, code is supposed to call ConditionVariableCancelSleep() to remove itself from the waitlist. This code neglected to do so. As far as I know, that had no

pgsql: Do not summarize WAL if generated with wal_level=minimal.

2024-07-18 Thread Robert Haas
Do not summarize WAL if generated with wal_level=minimal. To do this, we must include the wal_level in the first WAL record covered by each summary file; so add wal_level to struct Checkpoint and the payload of XLOG_CHECKPOINT_REDO and XLOG_END_OF_RECOVERY. This, in turn, requires bumping

pgsql: Do not summarize WAL if generated with wal_level=minimal.

2024-07-18 Thread Robert Haas
Do not summarize WAL if generated with wal_level=minimal. To do this, we must include the wal_level in the first WAL record covered by each summary file; so add wal_level to struct Checkpoint and the payload of XLOG_CHECKPOINT_REDO and XLOG_END_OF_RECOVERY. This, in turn, requires bumping

pgsql: pgindent, because I forgot to do that.

2024-06-28 Thread Robert Haas
pgindent, because I forgot to do that. Commit 065583cf460f980a182498941ac52810f709a897 should have included these changes. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b48f275f18d7da4f4863888ad047cbd699698880 Modified Files --

pgsql: Prevent summarizer hang when summarize_wal turned off and back o

2024-06-28 Thread Robert Haas
Prevent summarizer hang when summarize_wal turned off and back on. Before this commit, when the WAL summarizer started up or recovered from an error, it would resume summarization from wherever it left off. That was OK normally, but wrong if summarize_wal=off had been turned off temporary,

pgsql: Fix generate_union_paths for non-sortable types.

2024-05-21 Thread Robert Haas
Fix generate_union_paths for non-sortable types. The previous logic would fail to set groupList when grouping_is_sortable() returned false, which could cause queries to return wrong answers when some columns were not sortable. David Rowley, reviewed by Heikki Linnakangas and Álvaro Herrera.

pgsql: Re-allow planner to use Merge Append to efficiently implement UN

2024-05-21 Thread Robert Haas
Re-allow planner to use Merge Append to efficiently implement UNION. This reverts commit 7204f35919b7e021e8d1bc9f2d76fd6bfcdd2070, thus restoring 66c0185a3 (Allow planner to use Merge Append to efficiently implement UNION) as well as the follow-on commits d5d2205c8, 3b1a7eb28, 7487044d6. Per

pgsql: Doc: return 66c0185a3 to the release notes.

2024-05-21 Thread Robert Haas
Doc: return 66c0185a3 to the release notes. This reverts commit e1e83a71715f1c2f0717bb66e630ca3bda79b9c1. Per further discussion on pgsql-release, we wish to ship beta1 with that feature, and patch the bug, rather than shipping beta1 with that feature reverted. Branch -- master Details

pgsql: Document that increasing max_connections uses more resources.

2024-05-16 Thread Robert Haas
Document that increasing max_connections uses more resources. Roberto Mello Discussion: http://postgr.es/m/CAKz==bJBCWrvN77fmuZ2XqD3jazWEb=e80aa4yv9c9tq61y...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8ba346283335f7ee5bac2e904c2daad49a204c7c

pgsql: Minor fixes to pg_combinebackup and its documentation.

2024-04-26 Thread Robert Haas
Minor fixes to pg_combinebackup and its documentation. The --tablespace-mapping option was specified with required_argument rather than no_argument, which is wrong. Since the actual argument string passed to getopt_long() included "T:", the single-character form of the option still worked, but

pgsql: pg_combinebackup: Detect checksum mismatches and document limita

2024-04-25 Thread Robert Haas
pg_combinebackup: Detect checksum mismatches and document limitation. If not all backups have the same checksum status, but the final backup has checksums enabled, then the output directory may include pages with invalid checksums. Document this limitation and explain how to work around it. In a

pgsql: Try again to add test coverage for pg_combinebackup w/tablespace

2024-04-23 Thread Robert Haas
Try again to add test coverage for pg_combinebackup w/tablespaces. My previous attempt to add this had to be reverted in commit 82023d47de9e262730b1f9b4ea77fae201a89d0a. I've revised the problematic code a bit; hopefully it is OK now. Discussion:

pgsql: Revert recent ill-advised test case changes.

2024-04-19 Thread Robert Haas
Revert recent ill-advised test case changes. Commit 6bf5c42b5546984df29289918f952e6211069c54 cannot work on Windows, because it lacks symlink support. While the bug fix in commit cd64dc42d1e1b03e57e6ba3d316e4f9dec52a78d is correct as far as I know, the test case changes depend on the previous

pgsql: Use tempdir_short instead of tempdir.

2024-04-19 Thread Robert Haas
Use tempdir_short instead of tempdir. After cd64dc42d1e1b03e57e6ba3d316e4f9dec52a78d, a significant percentage of the buildfarm got unhappy, because pg_basebackup chokes if it tries to create a tarfile with symlink more than 99 characters in length. To try to fix that problem, use tempdir_short

pgsql: pg_combinebackup: Fix incorrect tablespace handling.

2024-04-19 Thread Robert Haas
pg_combinebackup: Fix incorrect tablespace handling. The previous coding mangled the pathname calculation for incremental files located in user-defined tablespaces. Enhance the test cases to cover such cases, as I should have done originally. Thanks to Andres Freund for alerting me to the lack

pgsql: Make PostgreSQL::Test::Cluster::init_from_backup handle tablespa

2024-04-19 Thread Robert Haas
Make PostgreSQL::Test::Cluster::init_from_backup handle tablespaces. This commit doesn't use this infrastructure for anything new, although it does adapt 010_pg_basebackup.pl to use it. However, a future commit will use this to improve test coverage for pg_combinebackup. Patch by me, reviewed

pgsql: Remove spurious "the".

2024-04-18 Thread Robert Haas
Remove spurious "the". Spotted by Martin Marqués. Discussion: http://postgr.es/m/cabeg9lvqmtskrokhca_mkju1duarw4v+smejkurygjpvbzf...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/fbed6ebe41beb72d9b7978a414ed4e8515ed1b19 Modified Files

pgsql: Restrict where INCREMENTAL.${NAME} files are recognized.

2024-04-18 Thread Robert Haas
Restrict where INCREMENTAL.${NAME} files are recognized. Previously, they were recognized anywhere in an incremental backup directory; now, we restrict this to places where they are expected to appear. That means this code will need updating if we ever do incremental backups of files in other

pgsql: docs: Mention that pg_combinebackup does not verify backups.

2024-04-18 Thread Robert Haas
docs: Mention that pg_combinebackup does not verify backups. We don't want users to think that pg_combinebackup is trying to check the validity of individual backups, because it isn't. Adjust the wording about sanity checks to make it clear that verification of individual backups is the job of

pgsql: docs: Consolidate into new "WAL for Extensions" chapter.

2024-04-15 Thread Robert Haas
docs: Consolidate into new "WAL for Extensions" chapter. Previously, we had consecutive, very short chapters called "Generic WAL" and "Custom WAL Resource Managers," explaining different approaches to the same problem. Merge them into a single chapter. Explain most of the differences between the

pgsql: Fix incorrect calculation in BlockRefTableEntryGetBlocks.

2024-04-05 Thread Robert Haas
Fix incorrect calculation in BlockRefTableEntryGetBlocks. The previous formula was incorrect in the case where the function's nblocks argument was a multiple of BLOCKS_PER_CHUNK, which happens whenever a relation segment file is exactly 512MB or exactly 1GB in length. In such cases, the formula

pgsql: docs: Merge separate chapters on built-in index AMs into one.

2024-04-05 Thread Robert Haas
docs: Merge separate chapters on built-in index AMs into one. The documentation index is getting very long, which makes it hard to find things. Since these chapters are all very similar in structure and content, merging them is a natural way of reducing the size of the toplevel index. Rather

pgsql: Remove reachable call to pg_unreachable().

2024-04-04 Thread Robert Haas
Remove reachable call to pg_unreachable(). The loop just before this uses break, not return, so this line is reachable. Commit cafe1056558fe07cdc52b95205588fcd80870362 introduced this issue. Jelte Fennema-Nio, reviewed by Tristan Partin Discussion:

pgsql: Fix old, misleading comment for PGRES_POLLING_ACTIVE.

2024-04-04 Thread Robert Haas
Fix old, misleading comment for PGRES_POLLING_ACTIVE. The comment implies that we can eventually remove this, but per discussion, we actually don't want to do that ever, in order to maintain compatibility. Jelte Fennema-Nio, reviewed by Tristan Partin Discussion:

pgsql: docs: Demote "Monitoring Disk Usage" from chapter to section.

2024-04-03 Thread Robert Haas
docs: Demote "Monitoring Disk Usage" from chapter to section. This chapter is very short, and the immediately preceding chapter is called "Monitoring Database Activity". So, instead of having a separate chapter for this, make it the last section of the preceding chapter instead. Discussion:

Re: pgsql: Allow SIGINT to cancel psql database reconnections.

2024-04-03 Thread Robert Haas
On Tue, Apr 2, 2024 at 5:40 PM Alexander Korotkov wrote: > This appears to have missing pgindent. > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=koel=2024-04-02%2021%3A19%3A02 Argh, sorry. I think someone else fixed this. -- Robert Haas EDB: http://www.enterprisedb.com

pgsql: Allow SIGINT to cancel psql database reconnections.

2024-04-02 Thread Robert Haas
Allow SIGINT to cancel psql database reconnections. After installing the SIGINT handler in psql, SIGINT can no longer cancel database reconnections. For instance, if the user starts a reconnection and then needs to do some form of interaction (ie psql is polling), there is no way to cancel the

pgsql: Expose PQsocketPoll via libpq

2024-04-02 Thread Robert Haas
Expose PQsocketPoll via libpq This is useful when connecting to a database asynchronously via PQconnectStart(), since it handles deciding between poll() and select(), and some of the required boilerplate. Tristan Partin, reviewed by Gurjeet Singh, Heikki Linnakangas, Jelte Fennema-Nio, and me.

Re: pgsql: Add allow_alter_system GUC.

2024-03-29 Thread Robert Haas
On Fri, Mar 29, 2024 at 9:03 AM Jelte Fennema-Nio wrote: > no worries, these things happen. I'm just glad it's committed and I > can now focus on different things than back and forth discussion over > documentation that all looks pretty much identical to me. Yeah, imagine that! -- Ro

Re: pgsql: Add allow_alter_system GUC.

2024-03-29 Thread Robert Haas
Oh no! Jelte, I'm so sorry ... I spelled your name wrong in this commit message. :-( Please accept my apologies. ...Robert On Fri, Mar 29, 2024 at 8:45 AM Robert Haas wrote: > > Add allow_alter_system GUC. > > This is marked PGC_SIGHUP, so it can only be set in a configur

pgsql: Add allow_alter_system GUC.

2024-03-29 Thread Robert Haas
Add allow_alter_system GUC. This is marked PGC_SIGHUP, so it can only be set in a configuration file, not anywhere else; and it is also marked GUC_DISALLOW_IN_AUTO_FILE, so it can't be set using ALTER SYSTEM. When set to false, the ALTER SYSTEM command is disallowed. There was considerable

pgsql: Rename COMPAT_OPTIONS_CLIENT to COMPAT_OPTIONS_OTHER.

2024-03-27 Thread Robert Haas
Rename COMPAT_OPTIONS_CLIENT to COMPAT_OPTIONS_OTHER. The user-facing name is "Other Platforms and Clients", but the internal name seems too focused on clients specifically, especially given the plan to add a new setting to this session that is about platform or deployment model compatibility

pgsql: docs: Make claims about the benefits of HOT updates more precise

2024-03-21 Thread Robert Haas
docs: Make claims about the benefits of HOT updates more precise. The old text claims that HOT completely removes old row versions. It was unclear whether it just meant the tuples themselves, or the tuples together with their line pointers. If it meant the former, it was wrong because we can

pgsql: Allow a no-wait lock acquisition to succeed in more cases.

2024-03-14 Thread Robert Haas
the semantics of no-wait that strictly. Robert Haas and Jingxian Li Discussion: http://postgr.es/m/ca+tgmobch-kmxgvpb0bb-inmdtcnktvcz4jbxdjows3kym+...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2346df6fc373df9c5ab944eebecf7d3036d727de Modified Files

pgsql: Add the system identifier to backup manifests.

2024-03-13 Thread Robert Haas
Add the system identifier to backup manifests. Before this patch, if you took a full backup on server A and then tried to use the backup manifest to take an incremental backup on server B, it wouldn't know that the manifest was from a different server and so the incremental backup operation could

pgsql: Expose new function get_controlfile_by_exact_path().

2024-03-13 Thread Robert Haas
to the control file itself. Amul Sul and Robert Haas, reviewed by Michael Paquier Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/dbfc44716596073b99e093a04e29e774a518f520 Modified Files -- src/bin/pg_combinebackup/pg_combinebackup.c | 2 +- src/common

pgsql: pg_verifybackup: Refactor parse_manifest_file.

2024-03-04 Thread Robert Haas
pg_verifybackup: Refactor parse_manifest_file. Return a pointer to the manifest_data instead of individual pointers to relevant data stored within the manifest_data object. The previous approach scales poorly if we add more things to the backup manifest, as has been proposed. Amul Sul, reviewed

pgsql: Fix pgindent damage.

2024-03-04 Thread Robert Haas
Fix pgindent damage. Apparently, I neglected to pgindent the prior commit. Per buildfarm. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/dd7ea37c435e10f9c5aa3fb257a05c08814a4ad2 Modified Files -- src/backend/backup/basebackup_incremental.c | 4 ++--

pgsql: Fix incremental backup interaction with XLOG_DBASE_CREATE_FILE_C

2024-03-04 Thread Robert Haas
Fix incremental backup interaction with XLOG_DBASE_CREATE_FILE_COPY. After XLOG_DBASE_CREATE_FILE_COPY, a correct incremental backup needs to copy in full everything with the database and tablespace OID mentioned in that record; but that record doesn't specifically mention the blocks, or even the

pgsql: Continue my quest to make 002_blocks.pl pass reliably.

2024-02-01 Thread Robert Haas
Continue my quest to make 002_blocks.pl pass reliably. The latest buildfarm failures show that after the insert, we don't actually wait long enough for WAL summarization to catch up, apparently because the on disk state gets updated before the in-memory state, and so by checking the on disk state

Re: pgsql: Temporary patch to help debug pg_walsummary test failures.

2024-01-31 Thread Robert Haas
n/show_log.pl?nm=koel=2024-01-28%2016%3A19%3A03 > > I think we should as we don't know how long it'll be before this gets > reverted. In the meantime, having a buildfarm member red is annoying. I included a fix for this in ea18eb7d625573dc369df619f7ff3b9e60e47531. Apologies for the incon

pgsql: In 002_blocks.pl, try to prevent a HOT update.

2024-01-31 Thread Robert Haas
In 002_blocks.pl, try to prevent a HOT update. Make the new tuple larger than the old one so that it, hopefully, won't manage to squeeze into leftover freespace on the same page. The test is trying to verify that the UPDATE touches 2 pages, but if a HOT update happens, then it doesn't. Per

pgsql: Revise pg_walsummary's 002_blocks test to avoid spurious failure

2024-01-31 Thread Robert Haas
Revise pg_walsummary's 002_blocks test to avoid spurious failures. Analysis of buildfarm results showed that the code that was intended to wait for the inserts performed by this test to complete did not actually do so. Try to make that logic more robust. Improve error checking elsewhere in the

pgsql: Temporary patch to help debug pg_walsummary test failures.

2024-01-26 Thread Robert Haas
Temporary patch to help debug pg_walsummary test failures. The tests in 002_blocks.pl are failing in the buildfarm from time to time, but we don't know how to reproduce the failure elsewhere. The most obvious explanation seems to be the unexpected disappearance of a WAL summary file, so bump up

pgsql: Combine FSM updates for prune and no-prune cases.

2024-01-26 Thread Robert Haas
combining the FSM updates, simplify the logic for calling lazy_scan_new_or_empty() and lazy_scan_noprune(). Also update a few comemnts in this part of the code to make them, hopefully, clearer. Melanie Plageman and Robert Haas Discussion: https://postgr.es/m/CA%2BTgmoaLTvipm%3Dxx4rJLr07m908PCu

pgsql: Remove LVPagePruneState.

2024-01-18 Thread Robert Haas
Remove LVPagePruneState. Commit cb970240f13df2b63f0410f81f452179a2b78d6f moved some code from lazy_scan_heap() to lazy_scan_prune(), and now some things that used to need to be passed back and forth are completely local to lazy_scan_prune(). Hence, this struct is mostly obsolete. The only thing

pgsql: Move VM update code from lazy_scan_heap() to lazy_scan_prune().

2024-01-18 Thread Robert Haas
Move VM update code from lazy_scan_heap() to lazy_scan_prune(). Most of the output parameters of lazy_scan_prune() were being used to update the VM in lazy_scan_heap(). Moving that code into lazy_scan_prune() simplifies lazy_scan_heap() and requires less communication between the two. This

pgsql: Clarify language in incremental backup glossary entry.

2024-01-18 Thread Robert Haas
Clarify language in incremental backup glossary entry. These changes were intended to be included in commit 7b1dbf0a8d1d4e1e6d01a76dc45a3216e8a16d94, but I goofed. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0a157a4d441586a0e590e2f8a3839114e01df4b7 Modified

pgsql: Optimize vacuuming of relations with no indexes.

2024-01-18 Thread Robert Haas
Optimize vacuuming of relations with no indexes. If there are no indexes on a relation, items can be marked LP_UNUSED instead of LP_DEAD when pruning. This significantly reduces WAL volume, since we no longer need to emit one WAL record for pruning and a second to change the LP_DEAD line pointers

pgsql: More documentation updates for incremental backup.

2024-01-18 Thread Robert Haas
More documentation updates for incremental backup. Add new terms to glossary. Add a reference to walsummarizer to monitoring.sgml. Matthias van de Meent and Robert Haas Discussion: http://postgr.es/m/caeze2wjhdvcqee_qqeok3na6dwudogsbjaxzmydaqiaah1u...@mail.gmail.com Branch -- master

pgsql: Be more consistent about whether to update the FSM while vacuumi

2024-01-16 Thread Robert Haas
Be more consistent about whether to update the FSM while vacuuming. Previously, when lazy_scan_noprune() was called and returned true, we would update the FSM immediately if the relation had no indexes or if the page contained no dead items. On the other hand, when lazy_scan_prune() was called,

pgsql: Fix typos.

2024-01-15 Thread Robert Haas
Fix typos. Alexander Lakhin Discussion: http://postgr.es/m/212b0987-83e5-e2ae-c5e8-b8170fdaf...@gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/237d01139b8a2ad26036d9025ae8e8e99b53e08c Modified Files -- doc/src/sgml/func.sgml

Re: pgsql: Add new pg_walsummary tool.

2024-01-12 Thread Robert Haas
On Thu, Jan 11, 2024 at 1:49 PM Robert Haas wrote: > On Thu, Jan 11, 2024 at 12:56 PM Robert Haas wrote: > > Add new pg_walsummary tool. > > culicidae is unhappy with this, but I don't yet understand why. The output is: > > # Failed test 'stdout shows block 0 modified' >

Re: pgsql: Add new pg_walsummary tool.

2024-01-12 Thread Robert Haas
On Thu, Jan 11, 2024 at 12:56 PM Robert Haas wrote: > Add new pg_walsummary tool. culicidae is unhappy with this, but I don't yet understand why. The output is: # Failed test 'stdout shows block 0 modified' # at t/002_blocks.pl line 85. # 'TS 1663, DB 5, REL 16384, F

pgsql: Fix typo.

2024-01-12 Thread Robert Haas
Fix typo. Noriyoshi Shinoda Discussion: http://postgr.es/m/dm4pr84mb17347d9466419413698105d8ee...@dm4pr84mb1734.namprd84.prod.outlook.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/882887e9b458f533b301c36951c93dfdd37dccfc Modified Files --

pgsql: Try to fix pg_walsummary buildfarm failures.

2024-01-11 Thread Robert Haas
Try to fix pg_walsummary buildfarm failures. Apparently the new tuple isn't guaranteed to end up at the end of the relation, so make the test not depend on that happening. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a7097ca630a25dd2248229f21ebce4968d85d10a

pgsql: Remove hastup from LVPagePruneState.

2024-01-11 Thread Robert Haas
Remove hastup from LVPagePruneState. Instead, just have lazy_scan_prune() and lazy_scan_noprune() update LVRelState->nonempty_pages directly. This makes the two functions more similar and also removes makes lazy_scan_noprune need one fewer output parameters. Melanie Plageman, reviewed by Andres

pgsql: Reindent after commit d9ef650fca7bc574586f4171cd929cfd5240326e.

2024-01-11 Thread Robert Haas
Reindent after commit d9ef650fca7bc574586f4171cd929cfd5240326e. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5faffa0434b484772782ff4763c0b2080222dde0 Modified Files -- src/backend/postmaster/walsummarizer.c | 2 +- 1 file changed, 1 insertion(+), 1

pgsql: Repair various defects in dc212340058b4e7ecfc5a7a81ec50e7a207bf2

2024-01-11 Thread Robert Haas
Repair various defects in dc212340058b4e7ecfc5a7a81ec50e7a207bf288. pg_combinebackup had various problems: * strncpy was used in various places where strlcpy should be used instead, to avoid any possibility of the result not being \0-terminated. * scan_for_existing_tablespaces() failed to

pgsql: Add new pg_walsummary tool.

2024-01-11 Thread Robert Haas
Add new pg_walsummary tool. This can dump the contents of the WAL summary files found in pg_wal/summaries. Normally, this shouldn't really be something anyone needs to do, but it may be needed for debugging problems with incremental backup, or could possibly be useful to external tools.

pgsql: Add new function pg_get_wal_summarizer_state().

2024-01-11 Thread Robert Haas
Add new function pg_get_wal_summarizer_state(). This makes it possible to access information about the progress of WAL summarization from SQL. The previously-added functions pg_available_wal_summaries() and pg_wal_summary_contents() only examine on-disk state, but this function exposes

pgsql: Document WAL summarization information functions.

2024-01-09 Thread Robert Haas
Document WAL summarization information functions. Commit 174c480508ac25568561443e6d4a82d5c1103487 added two new information functions but failed to document them anywhere. Discussion: http://postgr.es/m/CA+Tgmobvqqj-DW9F7uUzT-cQqs6wcVb-Xhs=w=hzjnxse-k...@mail.gmail.com Branch -- master

pgsql: Fix defects in PrepareForIncrementalBackup.

2024-01-03 Thread Robert Haas
Fix defects in PrepareForIncrementalBackup. Swap the arguments to TimestampDifferenceMilliseconds so that we get a positive answer instead of zero. Then use the result of that computation instead of ignoring it. Per reports from Alexander Lakhin. Discussion:

pgsql: Remove Lock suffix from WALSummarizerLock in wait_event_names.tx

2024-01-02 Thread Robert Haas
Remove Lock suffix from WALSummarizerLock in wait_event_names.txt Nathan Bossart Discussion: https://postgr.es/m/20240102173120.GA1061678@nathanxps13 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/371b07e8944983261a0f73c3b52dbbf0fd076a96 Modified Files

pgsql: libpq: fix typo "occurences" -> "occurrences" in tests

2024-01-02 Thread Robert Haas
libpq: fix typo "occurences" -> "occurrences" in tests Dagfinn Ilmari Mannsåker, reviewed by Shubham Khanna. Discussion: http://postgr.es/m/87le9fmi01@wibble.ilmari.org Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ff09129bec28028c57eb263cbca2836f42c2256c

pgsql: tsquery: fix typo "rewrited" -> "rewritten"

2024-01-02 Thread Robert Haas
tsquery: fix typo "rewrited" -> "rewritten" Dagfinn Ilmari Mannsåker, reviewed by Shubham Khanna. Discussion: http://postgr.es/m/87le9fmi01@wibble.ilmari.org Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/591cf626e71b460c53bef23347b93a0cfbd91f0f Modified

pgsql: jsonpath_exec: fix typo "absense" -> "absence"

2024-01-02 Thread Robert Haas
jsonpath_exec: fix typo "absense" -> "absence" Dagfinn Ilmari Mannsåker, reviewed by Shubham Khanna. Discussion: http://postgr.es/m/87le9fmi01@wibble.ilmari.org Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5bc7b33b4e16d02fc21b493649939e438b071850 Modified

pgsql: gist: fix typo "split(t)ed" -> "split"

2024-01-02 Thread Robert Haas
gist: fix typo "split(t)ed" -> "split" Dagfinn Ilmari Mannsåker, reviewed by Shubham Khanna. Discussion: http://postgr.es/m/87le9fmi01@wibble.ilmari.org Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e62e73f3a2f2af765a3c69486ed78a5bc451367e Modified Files

pgsql: Fix typos in comments and in one isolation test.

2024-01-02 Thread Robert Haas
Fix typos in comments and in one isolation test. Dagfinn Ilmari Mannsåker, reviewed by Shubham Khanna. Some subtractions by me. Discussion: http://postgr.es/m/87le9fmi01@wibble.ilmari.org Branch -- master Details ---

pgsql: Add WALSummarizerLock to wait_event_names.txt

2024-01-02 Thread Robert Haas
Add WALSummarizerLock to wait_event_names.txt Per report from Nathan Bossart. Discussion: http://postgr.es/m/20231227153647.GA601861@nathanxps13 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5c430f9dc559ecd3bda8bebf4854f3f8d8bd86f3 Modified Files --

pgsql: Initialize variable to placate compiler.

2023-12-27 Thread Robert Haas
Initialize variable to placate compiler. I don't think there's a real problem here, because if we reach the loop over 'tles' then we will either find at least one TimeLineHistoryEntry such that oldest_segno != 0, in which case unsummarized_lsn will be initialized, or else unsummarized_tli will

pgsql: Replace nonsense comment with a relevant one.

2023-12-21 Thread Robert Haas
Replace nonsense comment with a relevant one. Per report from Alexander Lakhin. Discussion: http://postgr.es/m/061cccf7-0cac-804f-4c2a-9d6da8e38...@gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ffc6ab9b56ae02a64349c8c6b59dd659dab5516a Modified Files

pgsql: Fix numerous typos in incremental backup commits.

2023-12-21 Thread Robert Haas
Fix numerous typos in incremental backup commits. Apparently, spell check would have been a really good idea. Alexander Lakhin, with a few additions as per an off-list report from Andres Freund. Discussion: http://postgr.es/m/f08f7c60-1ad3-0b57-d580-54b11f07c...@gmail.com Branch -- master

Re: pgsql: Remove MSVC scripts

2023-12-20 Thread Robert Haas
On Wed, Dec 20, 2023 at 10:35 AM Andrew Dunstan wrote: > Yeah, the commit removed our dummy version of Win32/Registry.pm. I have > disabled the test for that file on branches later than 16, and koel and > crake are back to green. Great, thanks for the quick work. -- Robert Haas

pgsql: Add support for incremental backup.

2023-12-20 Thread Robert Haas
Add support for incremental backup. To take an incremental backup, you use the new replication command UPLOAD_MANIFEST to upload the manifest for the prior backup. This prior backup could either be a full backup or another incremental backup. You then use BASE_BACKUP with the INCREMENTAL option

Re: pgsql: Remove MSVC scripts

2023-12-20 Thread Robert Haas
rl5) at ./src/tools/win32tzlist.pl line 21. BEGIN failed--compilation aborted at ./src/tools/win32tzlist.pl line 21. win32tzlist.pl still says "use Win32::Registry" but the commit removed src/tools/msvc/dummylib/Win32/Registry.pm. -- Robert Haas EDB: http://www.enterprisedb.com

pgsql: Add a new WAL summarizer process.

2023-12-20 Thread Robert Haas
Add a new WAL summarizer process. When active, this process writes WAL summary files to $PGDATA/pg_wal/summaries. Each summary file contains information for a certain range of LSNs on a certain TLI. For each relation, it stores a "limit block" which is 0 if a relation is created or destroyed

pgsql: Move src/bin/pg_verifybackup/parse_manifest.c into src/common.

2023-12-19 Thread Robert Haas
Move src/bin/pg_verifybackup/parse_manifest.c into src/common. This makes it possible for the code to be easily reused by other client-side tools, and/or by the server. Patch by me. Review of this patch in particular by at least Peter Eisentraut; reviewers for the patch series in general include

pgsql: Fix brown paper bag bug in 5c47c6546c413d5eb51c1626070a807026e61

2023-12-19 Thread Robert Haas
Fix brown paper bag bug in 5c47c6546c413d5eb51c1626070a807026e6139d. The previous logic failed to work for anything other than the first segment of a relation. Report by Jakub Wartak. Patch by me. Discussion: http://postgr.es/m/cakzirmwd3ktnmqhm9bv4or_1umehxroo6kgyjqkiw9dfm8c...@mail.gmail.com

pgsql: Rename pg_verifybackup's JsonManifestParseContext callback funct

2023-12-05 Thread Robert Haas
Rename pg_verifybackup's JsonManifestParseContext callback functions. 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.

pgsql: Rename JsonManifestParseContext callbacks.

2023-12-05 Thread Robert Haas
Rename JsonManifestParseContext callbacks. 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 Branch

pgsql: Change how a base backup decides which files have checksums.

2023-11-14 Thread Robert Haas
Change how a base backup decides which files have checksums. Previously, it thought that any plain file located under global, base, or a tablespace directory had checksums unless it was in a short list of excluded files. Now, it thinks that files in those directories have checksums if

pgsql: Change struct tablespaceinfo's oid member from 'char *' to 'Oid'

2023-10-23 Thread Robert Haas
Change struct tablespaceinfo's oid member from 'char *' to 'Oid' This shouldn't change behavior except in the unusual case where there are file in the tablespace directory that have entirely numeric names but are nevertheless not possible names for a tablespace directory, either because their

pgsql: Refactor parse_filename_for_nontemp_relation to parse more.

2023-10-23 Thread Robert Haas
Refactor parse_filename_for_nontemp_relation to parse more. Instead of returning the number of characters in the RelFileNumber, return the RelFileNumber itself. Continue to return the fork number, as before, and additionally return the segment number. parse_filename_for_nontemp_relation now

pgsql: During online checkpoints, insert XLOG_CHECKPOINT_REDO at redo p

2023-10-19 Thread Robert Haas
During online checkpoints, insert XLOG_CHECKPOINT_REDO at redo point. This allows tools that read the WAL sequentially to identify (possible) redo points when they're reached, rather than only being able to detect them in retrospect when XLOG_CHECKPOINT_ONLINE is found, possibly much later in the

pgsql: Reword messages about impending (M)XID exhaustion.

2023-10-17 Thread Robert Haas
for it. Alexander Alekseev, John Naylor, Robert Haas, reviewed at various times by Peter Geoghegan, Hannu Krosing, and Andres Freund. Discussion: http://postgr.es/m/ca+tgmozbg95fir9wvqpaxpgprkacst2okvge+pkppfppn7s...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg

pgsql: Talk about assigning, rather than generating, new MultiXactIds.

2023-10-17 Thread Robert Haas
Talk about assigning, rather than generating, new MultiXactIds. The word "assign" is used in various places internally to describe what GetNewMultiXactId does, but the user-facing messages have previously said "generate". For consistency, standardize on "assign," which seems (at least to me) to

pgsql: Update the documentation on recovering from (M)XID exhaustion.

2023-10-16 Thread Robert Haas
of VACUUM failing in multi-user mode were much higher. Alexander Alekseev, John Naylor, Robert Haas, reviewed at various times by Peter Geoghegan, Hannu Krosing, and Andres Freund. Discussion: http://postgr.es/m/ca+tgmoytsudrzahcmjfhlztk1vev29mo_u-mt+xwhrbj_4n...@mail.gmail.com Branch

  1   2   3   4   5   6   7   8   >