Re: Update Windows CI Task Names: Server 2022 + VS 2022 Upgrade

2025-10-30 Thread Nazir Bilal Yavuz
Hi, On Thu, 30 Oct 2025 at 20:26, Andres Freund wrote: > > On 2025-09-15 11:50:07 +0300, Nazir Bilal Yavuz wrote: > > v3 is attached. I forgot to update the MinGW task's name in the > > previous versions, it is done now. > > I pushed the s/2019/2022/ portion now. Thanks! > I'm still not convinc

Report oldest xmin source when autovacuum cannot remove tuples

2025-10-30 Thread Shinya Kato
Hi hackers, I am proposing to add the reason for the oldest xmin to VACUUM logs. This feature would be useful for identifying why dead tuples cannot be removed, thereby helping to diagnose and prevent table bloat. The current logs only indicate that dead tuples could not be reclaimed due to the o

Re: apply_scanjoin_target_to_paths and partitionwise join

2025-10-30 Thread Richard Guo
On Fri, Oct 31, 2025 at 4:57 AM Robert Haas wrote: > And just like that, I found another way that this can happen. Consider > this query from the regression tests: > > SELECT t1.a, t1.c, t2.b, t2.c FROM prt1 t1, prt2 t2 WHERE t1.a = t2.a > AND t1.a = t2.b ORDER BY t1.a, t2.b; I observed something

RE: How can end users know the cause of LR slot sync delays?

2025-10-30 Thread Hayato Kuroda (Fujitsu)
Dear Shlok, Thanks for updating the patch. Few comments: ``` The reason for the last slot synchronization skip. This field is set only for logical slots that are being synced from a primary server (that is, those whose synced field is true). ``` What happens if the sl

Re: Logical Replication of sequences

2025-10-30 Thread Peter Smith
Hi Vignesh, For later here are some review comments for the documentation patch v20251030-0002 == doc/src/sgml/config.sgml wal_retrieve_retry_interval: 1. -In logical replication, this parameter also limits how often a failing -replication apply worker or table

Re: Improve pg_sync_replication_slots() to wait for primary to advance

2025-10-30 Thread shveta malik
On Fri, Oct 31, 2025 at 11:04 AM shveta malik wrote: > > On Thu, Oct 30, 2025 at 3:48 PM Ajin Cherian wrote: > > > > > > Thanks for your review, Japin. Here's patch v20 addressing the comments. > > > > Thank You for the patch. Please find a few comment son test: > > > 1) > +# until the slot becom

Re: Improve pg_sync_replication_slots() to wait for primary to advance

2025-10-30 Thread shveta malik
On Thu, Oct 30, 2025 at 3:48 PM Ajin Cherian wrote: > > > Thanks for your review, Japin. Here's patch v20 addressing the comments. > Thank You for the patch. Please find a few comment son test: 1) +# until the slot becomes sync-ready (when the standby catches up to the +# slot's restart_lsn).

Re: Improve pg_sync_replication_slots() to wait for primary to advance

2025-10-30 Thread Japin Li
On Thu, 30 Oct 2025 at 19:15, Chao Li wrote: > Hi Ajin, > > I have reviewed v20 and got a few comments: > >> On Oct 30, 2025, at 18:18, Ajin Cherian wrote: >> >> > > 1 - slotsync.c > ``` > + if (slot_names) > + list_free_deep(slot_names); > > /* C

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-10-30 Thread Amit Kapila
On Fri, Oct 31, 2025 at 3:30 AM Masahiko Sawada wrote: > > On Wed, Oct 29, 2025 at 8:12 PM Amit Kapila wrote: > > > > On Thu, Oct 30, 2025 at 12:56 AM Masahiko Sawada > > wrote: > > > > > > On Wed, Oct 29, 2025 at 5:10 AM Amit Kapila > > > wrote: > > > > > > > > > > > > 8. > > > > @@ -136,6 +

Re: Improve pg_sync_replication_slots() to wait for primary to advance

2025-10-30 Thread Japin Li
On Thu, 30 Oct 2025 at 21:18, Ajin Cherian wrote: > On Mon, Oct 27, 2025 at 8:22 PM Japin Li wrote: >> >> >> Hi, Ajin >> >> Thanks for updating the patch. >> >> On Mon, 27 Oct 2025 at 18:47, Ajin Cherian wrote: >> > On Fri, Oct 24, 2025 at 8:29 PM shveta malik >> > wrote: >> >> >> >> On Wed, O

Re: Logical Replication of sequences

2025-10-30 Thread Amit Kapila
On Fri, Oct 31, 2025 at 7:34 AM Peter Smith wrote: > > == > .../replication/logical/sequencesync.c > > 2. > + * A single sequencesync worker is responsible for synchronizing all > sequences > + * in INIT state in pg_subscription_rel. It begins by retrieving the list of > + * sequences flagged

Re: Issue with logical replication slot during switchover

2025-10-30 Thread shveta malik
On Tue, Oct 28, 2025 at 6:33 PM Alexander Kukushkin wrote: > > Hi all, > > I don't think we really need to have allow_overwrite. > It is not possible to create logical slots on standby with failover=true, > therefore we can safely rely on failover being true to understand that at > some point th

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-10-30 Thread Bertrand Drouvot
Hi, On Thu, Oct 30, 2025 at 02:55:51PM +0100, Peter Eisentraut wrote: > On 30.10.25 10:17, Bertrand Drouvot wrote: > > - 0002 deprecates XLogRecPtrIsInvalid(): it emits a warning message at > > compilation > > time if XLogRecPtrIsInvalid() is in use in the code base. > > Surely this could be fac

Re: Add wal_fpi_bytes_[un]compressed to pg_stat_wal

2025-10-30 Thread Shinya Kato
On Thu, Oct 30, 2025 at 3:57 PM Michael Paquier wrote: > > On Tue, Oct 28, 2025 at 10:04:20PM +0900, Michael Paquier wrote: > > I'll clean up that tomorrow, which can be summarized as something like > > the attached (quick fix, need to double-check). > > Done this cleanup as d3111cb753e8, and twea

Re: Logical Replication of sequences

2025-10-30 Thread Peter Smith
Hi Vignesh, Some review comments for v20251030-0001 == Commit message 1. 3) ALTER SUBSCRIPTION ... REFRESH SEQUENCES - (A new command introduced in PG19 by a prior patch.) - All sequences in pg_subscription_rel are reset to DATASYNC state. ~ DATASYNC? Just above, it says the only po

Re: [PATCH] Add pg_get_type_ddl() to retrieve the CREATE TYPE statement

2025-10-30 Thread Philip Alger
Hi Quan, This is part of a larger project as noted here: > I am submitting a patch as part of the Retail DDL functions project > > described here [1]. > > > 1. https://www.postgresql.org/message-id/945db7c5-be75-45bf-b55b- > > cb1e56f2e3e9%40dunslane.net >

Re: [PATCH] Add pg_get_type_ddl() to retrieve the CREATE TYPE statement

2025-10-30 Thread Quan Zongliang
On 10/31/25 5:52 AM, Philip Alger wrote: Hello Hackers, I am submitting a patch as part of the Retail DDL functions project described here [1]. This patch creates a function called pg_get_type_ddl designed to retrieve the DDL statement for CREATE TYPE. Users can get the DDL by providing a

Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions

2025-10-30 Thread Michael Paquier
On Thu, Oct 30, 2025 at 05:00:27PM +0530, Sadhuprasad Patro wrote: > On Fri, Oct 17, 2025 at 11:11 AM Michael Paquier > wrote: >> -ok($node->log_contains(qr/no SSL error reported/) == 0, >> +is($node->log_contains(qr/no SSL error reported/), 0 >> >> The CI was failing with the change in the SSL te

Re: make -C src/test/isolation failure in index-killtuples due to btree_gist

2025-10-30 Thread Michael Paquier
On Thu, Oct 30, 2025 at 11:24:55AM -0400, Andres Freund wrote: > Well, it tests multiple index types, not just gist. I guess > test/modules/indexes/ or so should work? Not sure about plural or not. test/modules/index/ would work here. If you feel strongly about being able to do an EXTRA_INSTALL i

Re: another autovacuum scheduling thread

2025-10-30 Thread Sami Imseih
> FWIW, I've been putting some scripts together to test some workloads > and I will share shortly what I have. Here is my attempt to test the behavior with the new prioritization. I wanted a way to run the same tests with different workloads, both with and without the prioritization patch, and to

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2025-10-30 Thread Alexander Korotkov
On Tue, Oct 28, 2025 at 1:12 AM Dmitry Koval wrote: > 1. > > The second CommandCounterIncrement() is needed to make the renamed > > relation visible within our transaction. Why do we need the first > >one? I see tests pass without it. > > It's strange. If I comment the first "CommandCounterIn

Re: Extend injection_points_attach() to accept a user-defined function

2025-10-30 Thread Mihail Nikalayeu
Hello! I thought it may help me to implement some kind of notice+wait required for [1] in order to stabilize the tests. Is it possible to do something like this in the attached function? RAISE NOTICE 'going to wait'; SELECT injection_points_run(some_point_with_wait"); -- wait called insi

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-10-30 Thread Joel Jacobson
On Fri, Oct 31, 2025, at 00:08, Joel Jacobson wrote: > On Thu, Oct 30, 2025, at 14:25, Heikki Linnakangas wrote: >> Joel, since you've been working on some optimizations in this area too, >> would you happen to have some suitable performance test scripts for this? > > Glad you asked. I'm actually

Re: Should we update the random_page_cost default value?

2025-10-30 Thread Bruce Momjian
On Thu, Oct 9, 2025 at 08:05:37AM -0400, Robert Haas wrote: > On Wed, Oct 8, 2025 at 8:16 PM Bruce Momjian wrote: > > I rewrote the random_page_cost docs, attached, to remove a focus on > > magnetic disk, and added network latency as a reason for > > random_page_cost being low. I removed the spe

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-10-30 Thread Joel Jacobson
On Thu, Oct 30, 2025, at 14:25, Heikki Linnakangas wrote: > Joel, since you've been working on some optimizations in this area too, > would you happen to have some suitable performance test scripts for this? Glad you asked. I'm actually working on a benchmark+correctness tester. It's very much wo

Re: Resetting recovery target parameters in pg_createsubscriber

2025-10-30 Thread Alexander Korotkov
On Wed, Oct 29, 2025 at 9:47 PM Robert Haas wrote: > > On Mon, Oct 27, 2025 at 8:22 AM Alena Vinter wrote: > > Robert, this scenario actually occurred in production at one of our > > customer environments. Even though this workflow may be uncommon, > > PostgreSQL should still handle it graceful

Re: Potential bug introduced in PG17 with query parallelization - plan flip

2025-10-30 Thread David Rowley
On Fri, 31 Oct 2025 at 10:40, Jon Jenkins wrote: > -> Index Scan using index_on_merge_requests_for_latest_diffs > on public.merge_requests (cost=0.57..1011.36 rows=773 width=4) > (actual time=0.015..10.901 rows=9271 loops=1) >Index Cond: (merge_requests.target_project_id

Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array

2025-10-30 Thread Masahiko Sawada
On Thu, Oct 30, 2025 at 9:21 AM Xuneng Zhou wrote: > > Hi, > > On Wed, Oct 29, 2025 at 8:17 PM Xuneng Zhou wrote: > > > > Hi, > > > > On Sat, Oct 25, 2025 at 2:36 AM Masahiko Sawada > > wrote: > > > > > > On Thu, Oct 23, 2025 at 1:17 AM Xuneng Zhou wrote: > > > > > > > > Hi Sawada-san, Michael

Re: apply_scanjoin_target_to_paths and partitionwise join

2025-10-30 Thread Arne Roland
On 2025-10-30 16:52, Robert Haas wrote: Have you localized the problem to cpu_tuple_cost specifically, vs. cpu_index_tuple_cost or cpu_operator_cost? I've generally found that I need to reduce random_page_cost and seq_page_cost significantly to avoid getting sequential scans when index scans wo

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-10-30 Thread Masahiko Sawada
On Wed, Oct 29, 2025 at 8:12 PM Amit Kapila wrote: > > On Thu, Oct 30, 2025 at 12:56 AM Masahiko Sawada > wrote: > > > > On Wed, Oct 29, 2025 at 5:10 AM Amit Kapila wrote: > > > > > > > > > 8. > > > @@ -136,6 +137,12 @@ create_logical_replication_slot(char *name, char > > > *plugin, > > >

[PATCH] Add pg_get_type_ddl() to retrieve the CREATE TYPE statement

2025-10-30 Thread Philip Alger
Hello Hackers, I am submitting a patch as part of the Retail DDL functions project described here [1]. This patch creates a function called pg_get_type_ddl designed to retrieve the DDL statement for CREATE TYPE. Users can get the DDL by providing a TYPE name like the following for the ENUM type:

Potential bug introduced in PG17 with query parallelization - plan flip

2025-10-30 Thread Jon Jenkins
Hello! My organization GitLab is planning on upgrading to PG17 in the near future, and we performed a series of automated regression tests against a set of sample queries. Most of the plans looked identical or better between 16 and 17, but one that stood out was for the following query: SELECT

Re: MinGW compiler warnings in ecpg tests

2025-10-30 Thread Andres Freund
Hi, On 2024-12-06 15:44:20 +1300, Thomas Munro wrote: > On Fri, Dec 6, 2024 at 4:13 AM Tom Lane wrote: > > Thomas Munro writes: > > > Yeah. This warning is visible on CI, and on fairywren since its MSYS2 > > > upgrade a couple of months ago. Old MinGW didn't like %lld (I think > > > perhaps th

Fully documenting the design of nbtree row comparison scan keys

2025-10-30 Thread Peter Geoghegan
nbtree row comparison scan keys consist of one header key (which appears in so->keyData[]), and 2 or more subkeys (which _bt_check_rowcompare accesses by following a pointer stored in the header key). This design makes sense to me, but it's not at all obvious why the scan keys are structured in thi

Re: another autovacuum scheduling thread

2025-10-30 Thread Sami Imseih
> On Thu, Oct 30, 2025 at 04:05:19PM -0400, Robert Haas wrote: > > Are you planning to do some practical experimentation with this? I > > feel like it would be a good idea to set up some kind of a test case > > where this is expected to provide a benefit and see if it actually > > does; and also ma

Re: another autovacuum scheduling thread

2025-10-30 Thread Nathan Bossart
On Thu, Oct 30, 2025 at 04:05:19PM -0400, Robert Haas wrote: > Are you planning to do some practical experimentation with this? I > feel like it would be a good idea to set up some kind of a test case > where this is expected to provide a benefit and see if it actually > does; and also maybe set up

Re: Remaining dependency on setlocale()

2025-10-30 Thread Jeff Davis
On Thu, 2025-10-30 at 21:41 +0100, Daniel Verite wrote: > What about code in extensions? AFAIU a user can control the > locale in effect by setting the LC_CTYPE argument of > CREATE DATABASE, which ends up in the environment > of backends serving that database. > If it's forced to "C", how can an

Re: Remaining dependency on setlocale()

2025-10-30 Thread Daniel Verite
Jeff Davis wrote: > The goal here is to do a permanent: > > setlocale(LC_CTYPE, "C") > > in the postmaster, and instead use _l() variants where necessary. What about code in extensions? AFAIU a user can control the locale in effect by setting the LC_CTYPE argument of CREATE DATABASE,

Re: V18 change on EXPLAIN ANALYZE

2025-10-30 Thread Maciek Sakrejda
Thanks for the feedback! On Thu, Oct 30, 2025 at 7:35 AM Ilia Evdokimov wrote: > 1. I think the mention of VERBOSE might be unnecessary, since this is already > covered in parallel.sgml, section 'Parallel Plan Tips'. That section > explicitly says that EXPLAIN (ANALYZE, VERBOSE) shows per-worke

Re: Upgrade macOS CI image from Sonoma to Sequoia

2025-10-30 Thread Andres Freund
Hi, On 2025-10-09 15:30:20 +0300, Nazir Bilal Yavuz wrote: > On Thu, 9 Oct 2025 at 14:54, Nazir Bilal Yavuz wrote: > > > > Hi, > > > > The Sequoia macOS runner is available in Cirrus CI. The attached patch > > updates macOS CI image from Sonoma to Sequoia. > > This time with the back-patches. T

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-30 Thread Robert Haas
On Thu, Oct 30, 2025 at 8:42 AM David E. Wheeler wrote: > Might I suggest, however, that it also run for branches matching /_STABLE$/ > even if there is no .abi-hstory-file? The whole point of this exercise was to > increase the confidence in ABI stability in stable branches. Running it in > su

Re: another autovacuum scheduling thread

2025-10-30 Thread Robert Haas
On Wed, Oct 29, 2025 at 11:51 AM Nathan Bossart wrote: > Oops. I fixed that typo in v7. Are you planning to do some practical experimentation with this? I feel like it would be a good idea to set up some kind of a test case where this is expected to provide a benefit and see if it actually does;

Re: apply_scanjoin_target_to_paths and partitionwise join

2025-10-30 Thread Robert Haas
On Thu, Oct 30, 2025 at 11:52 AM Robert Haas wrote: > Right. Although that's the main thing here, I am inclined to suspect > there are other ways to hit this problem, maybe ways that are more > likely to happen in the real world, because... And just like that, I found another way that this can ha

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-30 Thread Masahiko Sawada
On Wed, Oct 29, 2025 at 5:19 AM Andrey Borodin wrote: > > > > > On 28 Oct 2025, at 22:44, Masahiko Sawada wrote: > > > > Andrey has shared his patch for base32hex support before[1]. While it > > needs to be updated, it seems to implement sufficient function. > > I'd propose something like attache

Re: Update Windows CI Task Names: Server 2022 + VS 2022 Upgrade

2025-10-30 Thread Andres Freund
On 2025-09-15 11:50:07 +0300, Nazir Bilal Yavuz wrote: > v3 is attached. I forgot to update the MinGW task's name in the > previous versions, it is done now. I pushed the s/2019/2022/ portion now. I'm still not convinced by the OS enablement for vs*... Greetings, Andres

Re: Remaining dependency on setlocale()

2025-10-30 Thread Jeff Davis
On Tue, 2025-10-28 at 17:19 -0700, Jeff Davis wrote: > Attached a new patch series, v6. I'm eager to start committing this series so that we have plenty of time to sort out any problems. I welcome feedback before or after commit, and I can revert if necessary. The goal here is to do a permanent:

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-30 Thread David E. Wheeler
On Oct 30, 2025, at 11:22, Mankirat Singh wrote: > We can put a note in the compliance check result for new STABLE > branches - "no .abi-compliance-history file found", but keep the > client status green? Yes, I think that’s the thing to do. D signature.asc Description: Message signed with O

Re: [PING] fallocate() causes btrfs to never compress postgresql files

2025-10-30 Thread Bruce Momjian
On Thu, Oct 30, 2025 at 11:14:07AM +0100, Jakub Wartak wrote: > On Thu, Oct 30, 2025 at 4:56 AM Thomas Munro wrote: > > > > On Wed, Oct 29, 2025 at 4:31 AM Dimitrios Apostolou wrote: > > > Sorry to ping again, but was there a conclusion reached regarding adding > > > the new file_extend_method s

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-30 Thread Bruce Momjian
On Wed, Oct 29, 2025 at 05:37:36PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Fri, Oct 17, 2025 at 07:07:36PM -0400, Tom Lane wrote: > >> That seems overcomplicated: how does the buildfarm know > >> what's a maintenance branch? I think the rule should be > >> just "run ABI checks if th

Re: postgres_fdw: Use COPY to speed up batch inserts

2025-10-30 Thread Andrew Dunstan
On 2025-10-29 We 8:28 PM, Matheus Alcantara wrote: On Wed Oct 29, 2025 at 12:10 AM -03, jian he wrote: On Sat, Oct 25, 2025 at 2:27 AM Matheus Alcantara wrote: On this new version I also added some regress tests on postgres_fdw.sql In the CopyFrom function, we have the CopyInsertMethod, CI

Re: POC: make mxidoff 64 bits

2025-10-30 Thread Maxim Orlov
On Thu, 30 Oct 2025 at 12:10, Heikki Linnakangas wrote: > > Oh I see, the 'base' is not necessarily the base offset of the first > multixact on the page, it's the base offset of the first multixid that > is written to the page. And the (short) offsets can be negative. That's > a frighteningly cle

Re: apply_scanjoin_target_to_paths and partitionwise join

2025-10-30 Thread Robert Haas
On Wed, Oct 29, 2025 at 9:23 PM Arne Roland wrote: > The main factor of your example is, that the amount of rows handled by the > (Merge) Append is different. Right. Although that's the main thing here, I am inclined to suspect there are other ways to hit this problem, maybe ways that are more l

Re: Channel binding for post-quantum cryptography

2025-10-30 Thread Nico Williams
On Thu, Oct 30, 2025 at 11:39:38AM +0100, Filip Janus wrote: > Thank you for posting it there. If I understand correctly, the resolution > should be to use internal hash algorithms — in this case, SHAKE. In this case, yes, it seem the consensus (though it's early to call it) is SHAKE256. > Now, t

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-30 Thread Nathan Bossart
On Wed, Oct 29, 2025 at 10:49:24PM -0400, Tom Lane wrote: > No; my proposal was "don't run the ABI check unless the branch has > a .abi-compliance-history file". master would normally not contain > such a file, thus no check. As I was just discussing with Bruce, > we could put one there for awhil

Re: GNU/Hurd portability patches

2025-10-30 Thread Michael Banck
Hi, On Tue, Oct 28, 2025 at 07:00:01AM +0200, Alexander Lakhin wrote: > One month later, fruitcrow has generated this failure too: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fruitcrow&dt=2025-10-25%2007%3A45%3A03 Thanks for noticing that, I was distracted with pgconf.eu last week..

Re: make -C src/test/isolation failure in index-killtuples due to btree_gist

2025-10-30 Thread Andres Freund
Hi, On 2025-10-28 16:55:49 +0900, Michael Paquier wrote: > On Fri, Aug 22, 2025 at 07:46:43PM -0400, Andres Freund wrote: > > That would be the easiest fix - but I'm starting to wonder if it shouldn't > > just be its own test module, as annoying as the boilerplate for that is. > > > > While the te

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-30 Thread Mankirat Singh
On Thu, 30 Oct 2025 at 19:40, David E. Wheeler wrote: > > On Oct 30, 2025, at 09:55, Tom Lane wrote: > > > Trouble is, you then need an arbitrary client-made choice about which > > commit to run the ABI check against. > > It’s currently coded to use the most recent tag or, if there is none in the

Re: Use BumpContext contexts for TupleHashTables' tablecxt

2025-10-30 Thread Tom Lane
David Rowley writes: > I'm fine with the patch, assuming it now includes the new > BuildTupleHashTable() comment and adjusted > ExecEndRecursiveUnion/ExecEndSetOp comments. OK, pushed after a tiny bit more comment-smithing. Thanks for reviewing! regards, tom lane

Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)

2025-10-30 Thread Bryan Green
On 10/30/2025 3:52 AM, Jakub Wartak wrote: On Thu, Oct 30, 2025 at 10:40 AM Bryan Green wrote: On 10/30/2025 3:37 AM, Álvaro Herrera wrote: On 2025-Oct-30, Jakub Wartak wrote: Hi Bryan, cfbot is red. I'm was fan of having those tests for this (bring complexity and we didn't have tests for L

Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)

2025-10-30 Thread Bryan Green
On 10/30/2025 3:52 AM, Jakub Wartak wrote: On Thu, Oct 30, 2025 at 10:40 AM Bryan Green wrote: On 10/30/2025 3:37 AM, Álvaro Herrera wrote: On 2025-Oct-30, Jakub Wartak wrote: Hi Bryan, cfbot is red. I'm was fan of having those tests for this (bring complexity and we didn't have tests for L

Re: V18 change on EXPLAIN ANALYZE

2025-10-30 Thread Ilia Evdokimov
Hi hackers, On 27.09.2025 03:31, Maciek Sakrejda wrote: However, to get a parallel query in the regression database (I chose EXPLAIN ANALYZE SELECT * FROM tenk2), I had to change some settings: SET min_parallel_table_scan_size = 0; SET parallel_tuple_cost = 0; SET parallel_setup_cost = 0; Shou

Re: Mark ItemPointer arguments as const thoughoutly

2025-10-30 Thread Chao Li
Hi Peter, > On Oct 30, 2025, at 21:30, Peter Eisentraut wrote: > > I have committed most of this patch. Thank you so much for committing my patch and for your guidance. I’m still ramping up on PostgreSQL development, and your guidance has been super helpful to me. > > I didn't like the few

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-30 Thread David E. Wheeler
On Oct 30, 2025, at 09:55, Tom Lane wrote: > Trouble is, you then need an arbitrary client-made choice about which > commit to run the ABI check against. It’s currently coded to use the most recent tag or, if there is none in the branch, the branch root. > If that code does something we > real

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-10-30 Thread Peter Eisentraut
On 30.10.25 10:17, Bertrand Drouvot wrote: - 0002 deprecates XLogRecPtrIsInvalid(): it emits a warning message at compilation time if XLogRecPtrIsInvalid() is in use in the code base. Surely this could be factored out in macro in such a way that the warning message is a macro argument and we

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-30 Thread Tom Lane
"David E. Wheeler" writes: > Might I suggest, however, that it also run for branches matching /_STABLE$/ > even if there is no .abi-hstory-file? The whole point of this exercise was to > increase the confidence in ABI stability in stable branches. Running it in > such branches would help remind

Re: Coccinelle for PostgreSQL development [1/N]: coccicheck.py

2025-10-30 Thread Mats Kindahl
Hi all, Here is an updated set of patches based on the latest HEAD of PostgreSQL. Best wishes, Mats Kindahl From 5fa03693cca229dc2228348e642a243eff6c670a Mon Sep 17 00:00:00 2001 From: Mats Kindahl Date: Sun, 29 Dec 2024 19:35:58 +0100 Subject: [PATCH 1/7] Add initial coccicheck script The coc

Re: doc: Improve description of io_combine_limit and io_max_combine_limit GUCs

2025-10-30 Thread Fujii Masao
On Mon, Oct 13, 2025 at 10:33 PM Chao Li wrote: > > > > On Oct 13, 2025, at 19:33, Karina Litskevich > wrote: > > On Thu, Oct 9, 2025 at 6:05 AM Chao Li wrote: > > > So, this patch looks good to me. Please any committer takes care of this > patch. > > > Thank you for the review! > > Could you

Re: Mark ItemPointer arguments as const thoughoutly

2025-10-30 Thread Peter Eisentraut
On 26.09.25 04:54, Chao Li wrote: On Wed, Sep 10, 2025 at 1:20 PM Chao Li > wrote: On Sep 10, 2025, at 12:20, Chao Li mailto:[email protected]>> wrote: v2 tries to fix the CI failure. Chao Li (Evan) - HighGo Software

Re: contrib/sepgsql regression tests have been broken for months

2025-10-30 Thread Joe Conway
On 10/29/25 19:36, Tom Lane wrote: I poked around in the buildfarm client and was surprised to find that the old TestSepgsql.pm module does in fact expect to have sudo privileges, and it seems to install, enable, and eventually remove the sepgsql-regtest kernel module. I thought we were trying t

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-10-30 Thread Heikki Linnakangas
On 29/10/2025 18:48, Tom Lane wrote: However ... that won't actually work, the reason being that asyncQueueProcessPageEntries() doesn't work directly from an SLRU page but from a local copy. Even if it were to modify the state of that copy, no other backend would see the effects. Ah, I missed

Re: Problem while updating a foreign table pointing to a partitioned table on foreign server

2025-10-30 Thread Daniil Davydov
Hi, On Fri, Oct 3, 2025 at 5:51 PM Etsuro Fujita wrote: > > Sorry, I don't fully understand you here, but I think that when > updating a foreign table via ForeignModify, we 1) should retrieve > tabloid from the remote if the foreign table points to a remote > partitioned/inherited table, and 2) s

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-30 Thread David E. Wheeler
On Oct 29, 2025, at 22:49, Tom Lane wrote: >> We can remove the branch check, of course, but then you would have to >> maintain .abi-compliance-history in master, no? > > No; my proposal was "don't run the ABI check unless the branch has > a .abi-compliance-history file". master would normally

Re: Fix bug with accessing to temporary tables of other sessions

2025-10-30 Thread Daniil Davydov
Hi, > I've rebased patches on the newest master. My apologies - in previous letter I had attached the wrong files. Thanks Jim Jones for noticing it :) I am attaching the correct patches to this email. -- Best regards, Daniil Davydov From aeb8bd09d31ac571b120bb1057edbee5bea440f9 Mon Sep 17 00:00

Re: How can end users know the cause of LR slot sync delays?

2025-10-30 Thread Shlok Kyal
On Mon, 20 Oct 2025 at 14:27, Hayato Kuroda (Fujitsu) wrote: > > Dear Shlok, > > > > 01. > > > ``` > > > + /* Update the slot sync reason */ > > > + SpinLockAcquire(&slot->mutex); > > > + if (slot->slot_sync_skip_reason != skip_reason) > > > + slot->slot_sync_skip_r

Re: Batching in executor

2025-10-30 Thread Daniil Davydov
Hi, On Wed, Oct 29, 2025 at 9:23 AM Amit Langote wrote: > > Hi Daniil, > > On Tue, Oct 28, 2025 at 11:32 PM Daniil Davydov <[email protected]> wrote: > > > > Hi, > > > > As far as I understand, this work partially overlaps with what we did in the > > thread [1] (in short - we introduce support

Re: display hot standby state in psql prompt

2025-10-30 Thread Chao Li
> On Oct 30, 2025, at 18:50, Jim Jones wrote: > > > > On 30/10/2025 11:28, Chao Li wrote: >> How about this? >> >> ``` >> [read/write]select * from test_multi order by category, name; >> FATAL: terminating connection due to administrator command >> server closed the connection unexpectedly

Re: ci: Improve OpenBSD core dump backtrace handling

2025-10-30 Thread Nazir Bilal Yavuz
Hi, Thank you for looking into this! On Sat, 25 Oct 2025 at 00:41, Thomas Munro wrote: > > On Sat, Oct 25, 2025 at 2:20 AM Nazir Bilal Yavuz wrote: > > Any feedback would be appreciated. > > +filename=$(basename "$corefile") > +base=$(echo "$filename" | sed 's/\.core.*$//') > +

Re: [BUG] temporary file usage report with extended protocol and unnamed portals

2025-10-30 Thread Mircea Cadariu
On 29/10/2025 21:58, Sami Imseih wrote: We can actually remove "temporary file removed" and "no statement logged" since we expect the logging to blame the correct query in all these cases. Right, even better! v17 LGTM.

Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions

2025-10-30 Thread Sadhuprasad Patro
Thank you Michael for committing the patch... On Fri, Oct 17, 2025 at 11:11 AM Michael Paquier wrote: > On Thu, Oct 16, 2025 at 04:26:48PM +0900, Michael Paquier wrote: > > -ok($node_s->safe_psql($db1, "SELECT COUNT(*) = 2 FROM pg_publication"), > > - 'two pre-existing publications on subscr

Re: Improve pg_sync_replication_slots() to wait for primary to advance

2025-10-30 Thread Chao Li
Hi Ajin, I have reviewed v20 and got a few comments: > On Oct 30, 2025, at 18:18, Ajin Cherian wrote: > > 1 - slotsync.c ``` + if (slot_names) + list_free_deep(slot_names); /* Cleanup the synced temporary slots */ Replicati

Re: Confine vacuum skip logic to lazy_scan_skip

2025-10-30 Thread John Naylor
On Wed, Oct 22, 2025 at 11:12 PM Tom Lane wrote: > The reason it thinks that num_offsets could be as much as 2048 is > presumably the code a little bit above this: > > OffsetNumber offsets[MaxOffsetNumber]; > ... > num_offsets = TidStoreGetBlockOffsets(iter_result, offsets,

Re: display hot standby state in psql prompt

2025-10-30 Thread Jim Jones
On 30/10/2025 11:28, Chao Li wrote: > How about this? > > ``` > [read/write]select * from test_multi order by category, name; > FATAL: terminating connection due to administrator command > server closed the connection unexpectedly > This probably means the server terminated abnormally >

Re: Logical Replication of sequences

2025-10-30 Thread Amit Kapila
On Thu, Oct 30, 2025 at 8:12 AM Peter Smith wrote: > > 3. > +static void > +report_sequence_errors(StringInfo insuffperm_seqs, StringInfo > mismatched_seqs, > +StringInfo insuffperm_seqs) > > Perhaps this function should also have an assertion: > > Assert(insuffperm_seqs->len || mismatched_se

Re: Channel binding for post-quantum cryptography

2025-10-30 Thread Filip Janus
Thank you for posting it there. If I understand correctly, the resolution should be to use internal hash algorithms — in this case, SHAKE. Now, the question is whether to wait for the implementation of a public API to make the change as general as possible, or to try implementing it on the PG side?

Re: another autovacuum scheduling thread

2025-10-30 Thread David Rowley
On Thu, 30 Oct 2025 at 19:48, wenhui qiu wrote: > I think there might be some misunderstanding — I’m only suggesting > changing > effective_xid_failsafe_age = Max(vacuum_failsafe_age, > autovacuum_freeze_max_age * 1.05); > to > effective_xid_failsafe_age = (v

Re: Fix incorrect const qualification for tbm_add_tuples() and itemptr_to_uint64()

2025-10-30 Thread Peter Eisentraut
On 29.10.25 04:11, Chao Li wrote: I noticed a wrong const qualification: ``` void tbm_add_tuples(TIDBitmap *tbm, const ItemPointer tids, int ntids,   bool recheck) ``` This "const" only protects "tids" itself from updating, which is meaningless. I believe the real intention should be protectin

Re: display hot standby state in psql prompt

2025-10-30 Thread Chao Li
> On Oct 30, 2025, at 17:20, Jim Jones wrote: > > Hi Chao > > On 30/10/2025 08:51, Chao Li wrote: >> I did a quick test, and found a problem. I shutdown the server, and “\c” >> reconnecting failed, but psql still show “read/write”, which seems wrong: >> >> "read/write"\c >> connection to se

Re: Improve pg_sync_replication_slots() to wait for primary to advance

2025-10-30 Thread Ajin Cherian
On Mon, Oct 27, 2025 at 8:22 PM Japin Li wrote: > > > Hi, Ajin > > Thanks for updating the patch. > > On Mon, 27 Oct 2025 at 18:47, Ajin Cherian wrote: > > On Fri, Oct 24, 2025 at 8:29 PM shveta malik wrote: > >> > >> On Wed, Oct 22, 2025 at 10:25 AM Ajin Cherian wrote: > >> > > >> > > >> > I'v

Re: display hot standby state in psql prompt

2025-10-30 Thread Jim Jones
On 28/10/2025 17:42, Nathan Bossart wrote: > On Tue, Oct 28, 2025 at 12:03:48PM +0100, Jim Jones wrote: >> On 28/10/2025 00:55, Fujii Masao wrote: >>> If we mark transaction_read_only as GUC_REPORT, wouldn't the reset value >>> be sent automatically at the end of the transaction? It seems like we

Re: [PING] fallocate() causes btrfs to never compress postgresql files

2025-10-30 Thread Jakub Wartak
On Thu, Oct 30, 2025 at 4:56 AM Thomas Munro wrote: > > On Wed, Oct 29, 2025 at 4:31 AM Dimitrios Apostolou wrote: > > Sorry to ping again, but was there a conclusion reached regarding adding > > the new file_extend_method setting? > > No objections appeared, so the conclusion I am drawing is th

Re: Use merge-based matching for MCVs in eqjoinsel

2025-10-30 Thread Ilia Evdokimov
Hi David, On 27.10.2025 18:50, David Geier wrote: Hi Ilia! On 10.09.2025 15:56, Ilia Evdokimov wrote: LGTM. Yes, I'll test this patch. Unfortunately, the JOB benchmark does not contain semi join nodes. However, TPC-DS does. I'll look for the queries with slowest planner times there and chec

Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)

2025-10-30 Thread Jakub Wartak
On Thu, Oct 30, 2025 at 10:40 AM Bryan Green wrote: > > On 10/30/2025 3:37 AM, Álvaro Herrera wrote: > > On 2025-Oct-30, Jakub Wartak wrote: > > > >> Hi Bryan, cfbot is red. I'm was fan of having those tests for this > >> (bring complexity and we didn't have tests for Linux backtrace > >> anyway),

Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)

2025-10-30 Thread Bryan Green
On 10/30/2025 3:37 AM, Álvaro Herrera wrote: On 2025-Oct-30, Jakub Wartak wrote: Hi Bryan, cfbot is red. I'm was fan of having those tests for this (bring complexity and we didn't have tests for Linux backtrace anyway), but now MINGW win32 is failing on those tests where the feature is not pres

Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)

2025-10-30 Thread Álvaro Herrera
On 2025-Oct-30, Jakub Wartak wrote: > Hi Bryan, cfbot is red. I'm was fan of having those tests for this > (bring complexity and we didn't have tests for Linux backtrace > anyway), but now MINGW win32 is failing on those tests where the > feature is not present: I hate to say this after the code

Re: Skip unregistered custom kinds on stats load

2025-10-30 Thread Bertrand Drouvot
Hi, On Wed, Oct 22, 2025 at 02:41:42PM +, Bertrand Drouvot wrote: > Hi, > > On Wed, Oct 22, 2025 at 02:51:31PM +0900, Michael Paquier wrote: > > > > A first part here is something that Bertrand Drouvot has been working > > on: being able to rebuild the table stats during WAL replay requires

Re: display hot standby state in psql prompt

2025-10-30 Thread Jim Jones
Hi Chao On 30/10/2025 08:51, Chao Li wrote: > I did a quick test, and found a problem. I shutdown the server, and “\c” > reconnecting failed, but psql still show “read/write”, which seems wrong: > > "read/write"\c > connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or > d

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-10-30 Thread Bertrand Drouvot
Hi, On Wed, Oct 29, 2025 at 05:50:13PM +0100, Peter Eisentraut wrote: > On 28.10.25 13:33, Bertrand Drouvot wrote: > > I do prefer to introduce XLogRecPtrIsValid(x) and switch to that. Then, do > > the > > same kind of work on OidIsValid() and TransactionIdIsValid() and add an > > annual > > che

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-10-30 Thread Bertrand Drouvot
Hi, On Tue, Oct 28, 2025 at 05:57:54PM +, Bertrand Drouvot wrote: > Hi, > > On Tue, Oct 28, 2025 at 04:05:34PM +0200, Álvaro Herrera wrote: > > > > BTW we could use Coccinelle to replace all the XLogRecPtrIsInvalid() > > calls with !XLogRecPtrIsValid(), as well as all places comparing an LSN

Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)

2025-10-30 Thread Bryan Green
On 10/30/2025 2:01 AM, Jakub Wartak wrote: On Thu, Oct 30, 2025 at 4:06 AM Bryan Green wrote: [..] Hi Bryan, cfbot is red. I'm was fan of having those tests for this (bring complexity and we didn't have tests for Linux backtrace anyway), but now MINGW win32 is failing on those tests where the

Re: POC: make mxidoff 64 bits

2025-10-30 Thread Heikki Linnakangas
On 30/10/2025 08:13, Maxim Orlov wrote: On Tue, 28 Oct 2025 at 17:17, Heikki Linnakangas > wrote: On 27/10/2025 17:54, Maxim Orlov wrote: If backend C looks up multixid 101 in between steps 3 and 4, it would read the offset incorrectly, because 'base' isn't

  1   2   >