Re: pgsql: Remove misleading hint for "unexpected data beyond EOF" error.

2025-07-29 Thread Robert Haas
On Mon, Jul 28, 2025 at 11:30 PM David Rowley wrote: > On Tue, 29 Jul 2025 at 03:17, Robert Haas wrote: > > Remove misleading hint for "unexpected data beyond EOF" error. > > Just FYI, koel is failing the pgindent test from this: Oops. Fixed, I hope.

pgsql: Run pgindent.

2025-07-29 Thread Robert Haas
Run pgindent. Per buildfarm member koel, Nathan Bossart, and David Rowley. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1d1612aec7688139e1a5506df1366b4b6a69605d Modified Files -- src/backend/storage/buffer/bufmgr.c | 6 +++--- 1 file changed, 3 insert

pgsql: Remove misleading hint for "unexpected data beyond EOF" error.

2025-07-28 Thread Robert Haas
delete the existing one and update the comments to mention one possibility that is known to cause problems of this kind: something other than PostgreSQL is modifying files in the PostgreSQL data directory. Author: Jakub Wartak Reviewed-by: Robert Haas Reviewed-by: Andres Freund Reviewe

pgsql: Avoid throwing away the error message in syncrep_yyerror.

2025-07-28 Thread Robert Haas
Avoid throwing away the error message in syncrep_yyerror. Commit 473a575e05979b4dbb28b3f2544f4ec8f184ce65 purported to make this function stash the error message in *syncrep_parse_result_p, but it didn't actually. As a result, an attempt to set synchronous_standby_names to any value that does not

pgsql: Avoid throwing away the error message in syncrep_yyerror.

2025-07-28 Thread Robert Haas
Avoid throwing away the error message in syncrep_yyerror. Commit 473a575e05979b4dbb28b3f2544f4ec8f184ce65 purported to make this function stash the error message in *syncrep_parse_result_p, but it didn't actually. As a result, an attempt to set synchronous_standby_names to any value that does not

Re: pgsql: copyfromparse.c: use pg_ascii_tolower() rather than tolower().

2025-06-11 Thread Robert Haas
On Wed, Jun 11, 2025 at 6:15 PM Jeff Davis wrote: > On Wed, 2025-06-11 at 16:07 -0400, Robert Haas wrote: > > All 3 of these commits seem like things that could just as well have > > been done after we branch. > > Yeah, I called out my mistake here: > > https://ww

Re: pgsql: copyfromparse.c: use pg_ascii_tolower() rather than tolower().

2025-06-11 Thread Robert Haas
-by: Peter Eisentraut All 3 of these commits seem like things that could just as well have been done after we branch. -- Robert Haas EDB: http://www.enterprisedb.com

pgsql: pg_prewarm: Allow autoprewarm to use more than 1GB to dump block

2025-06-06 Thread Robert Haas
pg_prewarm: Allow autoprewarm to use more than 1GB to dump blocks. Reported-by: Daria Shanina Author: Daria Shanina Author: Robert Haas Backpatch-through: 13 Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/a4b9707c417666841733fe4f5bec9b18e184028e

pgsql: pg_prewarm: Allow autoprewarm to use more than 1GB to dump block

2025-06-06 Thread Robert Haas
pg_prewarm: Allow autoprewarm to use more than 1GB to dump blocks. Reported-by: Daria Shanina Author: Daria Shanina Author: Robert Haas Backpatch-through: 13 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/d59ff3be24a336ab080c66fa6ceafbf52e7be1c1

pgsql: pg_prewarm: Allow autoprewarm to use more than 1GB to dump block

2025-06-06 Thread Robert Haas
pg_prewarm: Allow autoprewarm to use more than 1GB to dump blocks. Reported-by: Daria Shanina Author: Daria Shanina Author: Robert Haas Backpatch-through: 13 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/016e407f4ba10b230f5094c9ba36a1df3d34fb22 Modified Files

pgsql: pg_prewarm: Allow autoprewarm to use more than 1GB to dump block

2025-06-06 Thread Robert Haas
pg_prewarm: Allow autoprewarm to use more than 1GB to dump blocks. Reported-by: Daria Shanina Author: Daria Shanina Author: Robert Haas Backpatch-through: 13 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/4adbaa36ca8b0042ce24be187542e846ad3a7e51

pgsql: pg_prewarm: Allow autoprewarm to use more than 1GB to dump block

2025-06-06 Thread Robert Haas
pg_prewarm: Allow autoprewarm to use more than 1GB to dump blocks. Reported-by: Daria Shanina Author: Daria Shanina Author: Robert Haas Backpatch-through: 13 Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/169429264d0638b18e01926977b910ab70457f14

pgsql: pg_prewarm: Allow autoprewarm to use more than 1GB to dump block

2025-06-06 Thread Robert Haas
pg_prewarm: Allow autoprewarm to use more than 1GB to dump blocks. Reported-by: Daria Shanina Author: Daria Shanina Author: Robert Haas Backpatch-through: 13 Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e4b8f925a929fd57570097483a0fcf82dfc141da

pgsql: pg_overexplain: Additional EXPLAIN options for debugging.

2025-04-05 Thread Robert Haas
pg_overexplain: Additional EXPLAIN options for debugging. There's a fair amount of information in the Plan and PlanState trees that isn't printed by any existing EXPLAIN option. This means that, when working on the planner, it's often necessary to rely on facilities such as debug_print_plan, which

pgsql: pg_overexplain: Use PG_MODULE_MAGIC_EXT.

2025-03-28 Thread Robert Haas
pg_overexplain: Use PG_MODULE_MAGIC_EXT. I committed this contrib module just after Tom committed 55527368bd07248e91e3d37a782bf66b76f06865; adjust it to match. Author: Man Zeng Discussion: http://postgr.es/m/174313513707.60295.16516085012903412705.p...@coridan.postgresql.org Branch -- mast

pgsql: pg_overexplain: Call previous hooks as appropriate.

2025-03-28 Thread Robert Haas
pg_overexplain: Call previous hooks as appropriate. It makes no sense to remember the previous values of the hook variables and then never bother calling those functions. Thanks to Andrei for spotting my goof. Author: Andrei Lepikhov Discussion: http://postgr.es/m/41a344e3-ffb1-4296-8ba7-801f1e9

pgsql: pg_overexplain: Filter out actual row count from test result.

2025-03-27 Thread Robert Haas
pg_overexplain: Filter out actual row count from test result. Per buildfarm, these are not stable. In particular, 1/8 is sometimes 0.12 and sometimes 0.13. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/081ec08e6a148b06a0179bf8ac50524b1f142b68 Modified Files -

pgsql: pg_overexplain: SET jit=off when running tests.

2025-03-26 Thread Robert Haas
pg_overexplain: SET jit=off when running tests. Per buildfarm. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/47a1f076a7c9789134a29dc738db0152e5f71b4c Modified Files -- contrib/pg_overexplain/expected/pg_overexplain.out | 3 +++ contrib/pg_overexplain/s

pgsql: Fix oversights in commit 8d5ceb113e3f7ddb627bd40b26438a9d2fa0551

2025-03-26 Thread Robert Haas
Fix oversights in commit 8d5ceb113e3f7ddb627bd40b26438a9d2fa05512 It added bogus whitespace at the end of a line in the documentation. It should not have done that. The pg_overexplain tests must SET debug_parallel_query = false, not just RESET debug_parallel_query, or we get failures on test mach

pgsql: Add an additional hook for EXPLAIN option validation.

2025-03-20 Thread Robert Haas
module wants to sanity check options against each other, that needs to be done after the entire options list has been processed. So, add an additional hook for that purpose. Author: Sami Imseih Reviewed-by: Robert Haas Reviewed-by: Andrei Lepikhov Reviewed-by: Tom Lane Discussion: http

pgsql: Add some new hooks so extensions can add details to EXPLAIN.

2025-03-19 Thread Robert Haas
Add some new hooks so extensions can add details to EXPLAIN. Specifically, add a per-node hook that is called after the per-node information has been displayed but before we display children, and a per-query hook that is called after existing query-level information is printed. This assumes that e

pgsql: Fix indentation again.

2025-03-18 Thread Robert Haas
Fix indentation again. Because somehow I manage to keep forgetting this. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/796bdda484c838313959f65e2b700f14ac7c0e66 Modified Files -- src/include/commands/explain.h | 2 +- 1 file changed, 1 insertion(+), 1 d

pgsql: Make it possible for loadable modules to add EXPLAIN options.

2025-03-18 Thread Robert Haas
Make it possible for loadable modules to add EXPLAIN options. Modules can use RegisterExtensionExplainOption to register new EXPLAIN options, and GetExplainExtensionId, GetExplainExtensionState, and SetExplainExtensionState to store related state inside the ExplainState object. Since this substan

pgsql: Fix indentation.

2025-03-17 Thread Robert Haas
Fix indentation. Commit 99aeb84703177308c1541e2d11c09fdc59acb724 wasn't fully reindented prior to commit. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/203c1b4cc49455364b6bcab8034900d1c016b9cd Modified Files -- src/bin/pg_combinebackup/copy_file.c | 5

pgsql: pg_combinebackup: Add -k, --link option.

2025-03-17 Thread Robert Haas
danger involved. Author: Israel Barth Rubio Co-authored-by: Robert Haas (cosmetic changes) Reviewed-by: Vignesh C Discussion: http://postgr.es/m/CA+TgmoaEFsYHsMefNaNkU=2SnMRufKE3eVJxvAaX=owgcnp...@mail.gmail.com Branch -- master Details --- https://git.postgresql.or

pgsql: doc: Add missing decimal places to example rowcount.

2025-03-07 Thread Robert Haas
doc: Add missing decimal places to example rowcount. Commit 95dbd827f2edc4d10bebd7e840a0bd6782cf69b7 updated a bunch of similar cases in the documentation, but missed this one. Author: Ilia Evdokimov Reviewed-by: Fabrízio de Royes Mello Branch -- master Details --- https://git.postgre

pgsql: Avoid including explain.h in explain_format.h and explain_dr.h

2025-02-28 Thread Robert Haas
Avoid including explain.h in explain_format.h and explain_dr.h As per a suggestion from Tom Lane, we do this by declaring "struct ExplainState" here and refer to that rather than "ExplainState". Also per Tom, CreateExplainSerializeDestReceiver was still defined in explain.h in addition to explain

pgsql: Fix missing space in EXPLAIN ANALYZE output.

2025-02-28 Thread Robert Haas
Fix missing space in EXPLAIN ANALYZE output. Commit ddb17e387aa28d61521227377b00f997756b8a27 introduced this regression. Ideally, the regression tests would have caught this mistake, but apparently they don't test with timing enabled, presumably because that would make the output vary. Author: Th

pgsql: Create explain_dr.c and move DestReceiver-related code there.

2025-02-27 Thread Robert Haas
Create explain_dr.c and move DestReceiver-related code there. explain.c has grown rather large, and the code that deals with the DestReceiver that supports the SERIALIZE option is pretty easily severable from the rest of explain.c; hence, move it to a separate file. Reviewed-by: Peter Geoghegan

pgsql: Create explain_format.c and move relevant code there.

2025-02-27 Thread Robert Haas
Create explain_format.c and move relevant code there. explain.c has grown rather large, so move various functions that are principally concerned with output generation to a new source file, explain_format.c, instead of lumping them in with everything else that is part of explain.c Reviewed-by: Pe

pgsql: EXPLAIN: Always use two fractional digits for row counts.

2025-02-27 Thread Robert Haas
l digits. If that approach stands up to scrutiny from the buildfarm and human users, it spares us the trouble of doing anything more complex; if not, we can reassess. This commit incidentally reverts 44cbba9a7f51a3888d5087fc94b23614ba2b81f2, which should no longer be needed. Author: Robert Ha

pgsql: libpq: Trace all NegotiateProtocolVersion fields

2025-02-24 Thread Robert Haas
libpq: Trace all NegotiateProtocolVersion fields Previously, the names of the unsupported protocol options were not traced. Since NegotiateProtocolVersion has not really been used yet, that has not mattered much, but we hope to use it eventually, so let's fix this. Author: Jelte Fennema-Nio Disc

pgsql: libpq: Add PQfullProtocolVersion to exports.txt

2025-02-24 Thread Robert Haas
libpq: Add PQfullProtocolVersion to exports.txt This is necessary to be able to actually use the function on Windows; bug introduced in commit cdb6b0fdb0b2face270406905d31f8f513b015cc. Author: Jelte Fennema-Nio Discussion: https://postgr.es/m/cageczqtfc_o+hxqao5_-xg4r3efvstefueqzsvheyyldba-...@

pgsql: Adjust EXPLAIN test case to filter out "Actual Rows" values.

2025-02-22 Thread Robert Haas
Adjust EXPLAIN test case to filter out "Actual Rows" values. Per the buildfarm, these tests appear to be unstable in the wake of commit ddb17e387aa28d61521227377b00f997756b8a27. I'm not sure that just hiding this output is the right way forward, because I think there may be other test cases that w

pgsql: Allow EXPLAIN to indicate fractional rows.

2025-02-22 Thread Robert Haas
Allow EXPLAIN to indicate fractional rows. When nloops > 1, we now display two digits after the decimal point, rather than none. This is important because what we print is actually planstate->instrument->ntuples / nloops, and sometimes what you want to know is planstate->instrument->ntuples. You c

Re: pgsql: Trial fix for old cross-version upgrades.

2025-02-21 Thread Robert Haas
On Fri, Feb 21, 2025 at 7:57 PM Jeff Davis wrote: > I think we need a similar change in the buildfarm client's > TestUpgradeXversion.pm? Is -hackers the right place to discuss that? Yes, I believe -hackers is the right place to discuss that. -- Robert Haas EDB: http://www.enterprisedb.com

Re: pgsql: Fix our Windows stat() emulation to handle file sizes > 4GB.

2024-11-08 Thread Robert Haas
On Thu, Nov 7, 2024 at 6:19 PM Andrew Dunstan wrote: > Juan José Santamaría Flecha, reviewed by Emil Iggland; > based on prior work by Michael Paquier, Sergey Zubkovsky, and others > > Author: Alexandra Wang This authorship information is confusing. -- Robert Ha

pgsql: pg_combinebackup: Error if incremental file exists in full backu

2024-11-04 Thread Robert Haas
pg_combinebackup: Error if incremental file exists in full backup. Suppose that you run a command like "pg_combinebackup b1 b2 -o output", but both b1 and b2 contain an INCREMENTAL.$something file in a directory that is expected to contain relation files. This is an error, but the previous code wo

pgsql: pg_combinebackup: Error if incremental file exists in full backu

2024-11-04 Thread Robert Haas
pg_combinebackup: Error if incremental file exists in full backup. Suppose that you run a command like "pg_combinebackup b1 b2 -o output", but both b1 and b2 contain an INCREMENTAL.$something file in a directory that is expected to contain relation files. This is an error, but the previous code wo

pgsql: pg_combinebackup: When reconstructing, avoid double slash in fil

2024-11-04 Thread Robert Haas
pg_combinebackup: When reconstructing, avoid double slash in filename. This function is always called with a relative_path that ends in a slash, so there's no need to insert a second one. So, don't. Instead, add an assertion to verify that nothing gets broken in the future, and adjust the comments

pgsql: pg_combinebackup: When reconstructing, avoid double slash in fil

2024-11-04 Thread Robert Haas
pg_combinebackup: When reconstructing, avoid double slash in filename. This function is always called with a relative_path that ends in a slash, so there's no need to insert a second one. So, don't. Instead, add an assertion to verify that nothing gets broken in the future, and adjust the comments

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-10-28 Thread Robert Haas
Point of order: Discussions of commits and potential followup commits are best redirected to -hackers rather than continuing to use -committers. ...Robert

Re: pgsql: Doc: add check to detect non-breaking spaces in the docs.

2024-10-10 Thread Robert Haas
lose to being ready to do that, but I think it is the plan. -- Robert Haas EDB: http://www.enterprisedb.com

pgsql: File size in a backup manifest should use uint64, not size_t.

2024-10-02 Thread Robert Haas
File size in a backup manifest should use uint64, not size_t. size_t is the size of an object in memory, not the size of a file on disk. Thanks to Tom Lane for noting the error. Discussion: http://postgr.es/m/1865585.1727803...@sss.pgh.pa.us Branch -- master Details --- https://git.pos

pgsql: Fix some pg_verifybackup issues reported by Coverity.

2024-10-01 Thread Robert Haas
Fix some pg_verifybackup issues reported by Coverity. Commit 8dfd3129027969fdd2d9d294220c867d2efd84aa introduced a few problems. verify_tar_file() forgot to free a buffer; the leak can't add up to anything material, but might as well fix it. precheck_tar_backup_file() intended to return after repo

pgsql: Reindent pg_verifybackup.c.

2024-09-27 Thread Robert Haas
Reindent pg_verifybackup.c. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/7f7474a8e4002ac9fd4979cc7b16b50b70b70c28 Modified Files -- src/bin/pg_verifybackup/pg_verifybackup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

pgsql: pg_verifybackup: Verify tar-format backups.

2024-09-27 Thread Robert Haas
pg_verifybackup: Verify tar-format backups. This also works for compressed tar-format backups. However, -n must be used, because we use pg_waldump to verify WAL, and it doesn't yet know how to verify WAL that is stored inside of a tarfile. Amul Sul, reviewed by Sravan Kumar and by me, and revised

pgsql: Add PQfullProtocolVersion() to surface the precise protocol vers

2024-09-09 Thread Robert Haas
Add PQfullProtocolVersion() to surface the precise protocol version. The existing function PQprotocolVersion() does not include the minor version of the protocol. In preparation for pending work that will bump that number for the first time, add a new function to provide it to clients that may ca

pgsql: Show number of disabled nodes in EXPLAIN ANALYZE output.

2024-08-21 Thread Robert Haas
Show number of disabled nodes in EXPLAIN ANALYZE output. Now that disable_cost is not included in the cost estimate, there's no visible sign in EXPLAIN output of which plan nodes are disabled. Fix that by propagating the number of disabled nodes from Path to Plan, and then showing it in the EXPLAI

pgsql: Treat number of disabled nodes in a path as a separate cost metr

2024-08-21 Thread Robert Haas
Treat number of disabled nodes in a path as a separate cost metric. Previously, when a path type was disabled by e.g. enable_seqscan=false, we either avoided generating that path type in the first place, or more commonly, we added a large constant, called disable_cost, to the estimated startup cos

pgsql: Fix pgindent damage

2024-08-21 Thread Robert Haas
Fix pgindent damage Oversight in commit a95ff1fe2eb4926b13e0940ad1f37d048704bdb0 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2b03cfeea47834913ff769124f4deba88140f662 Modified Files -- src/backend/utils/adt/varlena.c | 20 ++-- 1 file

pgsql: pg_verifybackup: Move some declarations to new pg_verifybackup.h

2024-08-16 Thread Robert Haas
pg_verifybackup: Move some declarations to new pg_verifybackup.h This is in preparation for adding a second source file to this directory. Amul Sul, reviewed by Sravan Kumar and revised a bit by me. Discussion: http://postgr.es/m/caaj_b95mcgjkfaf1qduor97cokw8-_i-dwlm3v6x1w2-ow9...@mail.gmail.co

pgsql: pg_verifybackup: Move skip_checksums into verifier_context.

2024-08-16 Thread Robert Haas
pg_verifybackup: Move skip_checksums into verifier_context. This is in preparation for adding a second source file to this directory. It will need access to this value. Also, fewer global variables is usually a good thing. Amul Sul, reviewed by Sravan Kumar and revised a bit by me. Discussion:

pgsql: Improve more comments in astreamer_gzip.c.

2024-08-16 Thread Robert Haas
Improve more comments in astreamer_gzip.c. Duplicate the comment from astreamer_plain_writer_new instead of just referring to it. Add a further note to mention that there are dangers if anything else is written to the same FILE. Also add a comment where we dup() the filehandle, referring to the ex

pgsql: Do not hardcode PG_PROTOCOL_LATEST in NegotiateProtocolVersion

2024-08-15 Thread Robert Haas
Do not hardcode PG_PROTOCOL_LATEST in NegotiateProtocolVersion We shouldn't ask the client to use a protocol version later than the one that they requested. To avoid that, if the client requests a version newer than the latest one we support, set FrontendProtocol to the latest version we support,

Re: pgsql: Introduce hash_search_with_hash_value() function

2024-08-07 Thread Robert Haas
On Wed, Aug 7, 2024 at 11:55 AM Alexander Korotkov wrote: > On Wed, Aug 7, 2024 at 3:24 PM Robert Haas wrote: > > You may have already realized this, but the name of the function the > > patch adds is not the same as the name that appears in the commit > > message. > >

pgsql: Improve file header comments for astramer code.

2024-08-07 Thread Robert Haas
ers, in the hopes of making life easier for anyone who hacks on this code in the future. Robert Haas, reviewed by Amul Sul. Discussion: http://postgr.es/m/CAAJ_b97O2kkKVTWxt8MxDN1o-cDfbgokqtiN2yqFf48=gxp...@mail.gmail.com Branch -- master Details --- https://git.postgres

Re: pgsql: Introduce hash_search_with_hash_value() function

2024-08-07 Thread Robert Haas
You may have already realized this, but the name of the function the patch adds is not the same as the name that appears in the commit message. ...Robert

pgsql: Move astreamer (except astreamer_inject) to fe_utils.

2024-08-05 Thread Robert Haas
Move astreamer (except astreamer_inject) to fe_utils. This allows the code to be used by other frontend applications. Amul Sul, reviewed by Sravan Kumar, Andres Freund (whose input I specifically solicited regarding the meson.build changes), and me. Discussion: http://postgr.es/m/caaj_b94stvlwr

pgsql: Move recovery injector astreamer to a separate header file.

2024-08-05 Thread Robert Haas
Move recovery injector astreamer to a separate header file. Unlike the rest of the astreamer (formerly bbstreamer) infrastructure which is reusable by other tools, astreamer_inject.c seems extremely specific to pg_basebackup. Hence, move the corresponding declarations to a separate header file, so

pgsql: Rename bbstreamer to astreamer.

2024-08-05 Thread Robert Haas
Rename bbstreamer to astreamer. I (rhaas) intended "bbstreamer" to stand for "base backup streamer," but that implies that this infrastructure can only ever be used by pg_basebackup. In fact, it is a generally useful way of streaming data from a tar or compressed tar file, and it could be extende

Re: pgsql: Fix double-release of spinlock

2024-07-29 Thread Robert Haas
t it on my CV as one of my great accomplishments. It's much better if we can find a way for a standard 'make check-world' to tell us about as many things as possible, so that we don't commit and then find out. -- Robert Haas EDB: http://www.enterprisedb.com

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 partia

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 partia

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 su

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 su

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

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

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 --- https://git.postgresql.org/pg/commitdiff/6a6ebb92b0d4c07

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 --- https://git.postgresql.org/pg/commitdiff/e7dabbce

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 generat

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 obs

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 obs

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 XLOG_PA

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 XLOG_PA

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 -- src/backend/postmaster/

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, allowin

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. Repor

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 furt

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 the

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: http://postgr.es/m/ca+tgmobiv1qjr5pejodkezdrjhzfr

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 comm

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 in

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 of

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 (bu

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 plac

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 pg_

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 a

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 wo

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 than

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: http://postgr.es/m/cageczqto72jked5461w8cytv2

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: http://postgr.es/m/cageczqto72j

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: http

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&dt=2024-04-02%2021%3A19%3A02 Argh, sorry. I think someone else fixed this. -- Robert Haas EDB: http://www.enterprisedb.com

  1   2   3   4   5   6   7   8   9   >