Re: Extended Statistics set/restore/clear functions.

2025-11-12 Thread Corey Huinker
On Thu, Nov 13, 2025 at 2:02 AM jian he wrote: > hi. > > v12-0001 and v12-0002 overall look good to me. > > if (dependency->nattributes <= 1) > elog(ERROR, "invalid zero-length nattributes array in > MVDependencies"); > This is an unlikely-to-happen error message, but still,

Re: Optimize LISTEN/NOTIFY

2025-11-12 Thread Joel Jacobson
On Thu, Nov 13, 2025, at 07:36, Arseniy Mukhin wrote: > On Thu, Nov 13, 2025 at 9:28 AM Joel Jacobson wrote: >> I think this confirms that listeners can actually stop somewhere in between >> queueHeadBeforeWrite and queueHeadAfterWrite. > > > Ahh, yes, I think you are right. I missed that notifier

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-12 Thread Yugo Nagata
On Thu, 13 Nov 2025 11:55:25 +0900 Fujii Masao wrote: > On Wed, Nov 12, 2025 at 6:34 PM Yugo Nagata wrote: > > I've attached an updated patch. > > Thanks for updating the patch! > > > The comment for the PQpipelineSync() call has been also updated to clarify > > why it is necessary. > > + /*

Re: [WIP]Vertical Clustered Index (columnar store extension) - take2

2025-11-12 Thread Peter Smith
Hi Timur, Thank you so much for your continued interest in this patch and for taking the time to report these bugs! It is really appreciated and your info has been recorded so it won't be forgotten. Recent work and focus: * As you might have seen, there have been many changes to master lately, s

Re: Extended Statistics set/restore/clear functions.

2025-11-12 Thread jian he
hi. v12-0001 and v12-0002 overall look good to me. if (dependency->nattributes <= 1) elog(ERROR, "invalid zero-length nattributes array in MVDependencies"); This is an unlikely-to-happen error message, but still, “nattributes” seems confusing? in doc/src/sgml/func/func-json

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-12 Thread Chao Li
> On Nov 13, 2025, at 13:50, Yugo Nagata wrote: > > > To trigger a deadlock error, the tables need to have enough rows so that the > scan takes some > time. In my environment, about 1,000 rows were enough to cause a deadlock. > Yes, after inserting 1000 rows, I got the assert triggered. I

Re: Few untranslated error messages in OAuth

2025-11-12 Thread Michael Paquier
On Thu, Nov 13, 2025 at 06:01:29AM +, Zhijie Hou (Fujitsu) wrote: > During testing of libpq, I noticed several error messages not processed by > libpq_gettext, resulting in their exclusion from *.pot files. The attached > patch > wraps these messages. (Added Jacob and Daniel in CC.) async_ct

Re: Optimize LISTEN/NOTIFY

2025-11-12 Thread Arseniy Mukhin
On Thu, Nov 13, 2025 at 9:28 AM Joel Jacobson wrote: > > On Wed, Nov 12, 2025, at 17:57, Arseniy Mukhin wrote: > > IIUC it's impossible for the listener to stop somewhere in between > > queueHeadBeforeWrite and queueHeadAfterWrite. If the listener has > > managed to read the first notification fro

Re: Optimize LISTEN/NOTIFY

2025-11-12 Thread Joel Jacobson
On Wed, Nov 12, 2025, at 17:57, Arseniy Mukhin wrote: > IIUC it's impossible for the listener to stop somewhere in between > queueHeadBeforeWrite and queueHeadAfterWrite. If the listener has > managed to read the first notification from the notifier, it means the > notifier transaction is complete

Re: pgsql: Drop unnamed portal immediately after execution to completion

2025-11-12 Thread Michael Paquier
On Wed, Nov 12, 2025 at 11:14:26AM +, Mircea Cadariu wrote: > I understand the point that’s been raised. Would it be an option to indeed > revert the portal drop in postgres.c, but then append the right query in the > "temporary file: ..." log line instead? This would work at least for me. Thi

Re: Rename sync_error_count to tbl_sync_error_count in subscription statistics

2025-11-12 Thread Dilip Kumar
On Thu, Nov 13, 2025 at 10:48 AM Chao Li wrote: > > > > +1. Along with consistency with other column names, it will also make > > it easier for users to group and query all 'sync' related counts > > together. > > > > +1. A common prefix looks good and brings benefits such as what Amit > mentione

Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement

2025-11-12 Thread Chao Li
Hi Manni, I just reviewed and tested the patch, just got a few small comments: > On Nov 13, 2025, at 00:15, Álvaro Herrera wrote: > > On 2025-Nov-12, Manni Wood wrote: > >> Thanks, Álvaro, for your continued help with this. >> >> I have attached v11 patches that use all of the fixes from your

Few untranslated error messages in OAuth

2025-11-12 Thread Zhijie Hou (Fujitsu)
Hi, During testing of libpq, I noticed several error messages not processed by libpq_gettext, resulting in their exclusion from *.pot files. The attached patch wraps these messages. Best Regards, Hou zj v1-0001-Fix-some-untranslatable-error-messages-in-OAuth.patch Description: v1-0001-Fix-some

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-12 Thread Yugo Nagata
On Thu, 13 Nov 2025 13:14:37 +0800 Chao Li wrote: > > > > On Nov 13, 2025, at 12:02, Chao Li wrote: > > > > > > > >> On Nov 13, 2025, at 11:47, Fujii Masao wrote: > >> > >> On Thu, Nov 13, 2025 at 11:21 AM Chao Li wrote: > >>> I debugged further this morning, and I think I have found the

Re: Rename sync_error_count to tbl_sync_error_count in subscription statistics

2025-11-12 Thread Chao Li
> On Nov 13, 2025, at 11:42, Amit Kapila wrote: > > On Thu, Nov 13, 2025 at 4:31 AM Peter Smith wrote: >> >> CURRENT >> seq_sync_error_count >> sync_error_count >> >> MY SUGGESTION >> sync_seq_error_count >> sync_table_error_count >> > > +1. Along with consistency with other column names,

DOCS: Missing tags for some SEQUENCE fields

2025-11-12 Thread Peter Smith
Hi, While reviewing the recent patches for SEQUENCE documentation I found [1] a few more instances where the tag should have been used for some of the sequence fields (per the recent push [2]). PSA patch v1 to address these. == [1] Searched all docs for 'is_called' and for 'last_value' [2]

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-12 Thread Chao Li
> On Nov 13, 2025, at 12:02, Chao Li wrote: > > > >> On Nov 13, 2025, at 11:47, Fujii Masao wrote: >> >> On Thu, Nov 13, 2025 at 11:21 AM Chao Li wrote: >>> I debugged further this morning, and I think I have found the root cause. >>> Ultimately, the problem is not with discardUntilSync(

RE: Assertion failure in SnapBuildInitialSnapshot()

2025-11-12 Thread Zhijie Hou (Fujitsu)
On Wednesday, November 12, 2025 7:27 PM Pradeep Kumar wote: > I've been investigating the assert failure in > ProcArraySetReplicationSlotXmin() and would like to share my approach and get > feedback. Instead of inverting the locks and what robert shared before [1]. > Instead of unconditionally u

Re: Add mode column to pg_stat_progress_vacuum

2025-11-12 Thread Shinya Kato
On Thu, Nov 13, 2025 at 11:11 AM Masahiko Sawada wrote: > Thank you for updating the patch! Thank you for the review! > How about the following changes for the documentation changes? > > + > + The mode of the current vacuum operation. Possible values are: > > The mode in which the c

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-12 Thread Quan Zongliang
On 11/13/25 12:17 PM, Quan Zongliang wrote: On 11/12/25 8:04 PM, Akshay Joshi wrote: Hi Hackers, I’m submitting a patch as part of the broader Retail DDL Functions project described by Andrew Dunstan https://www.postgresql.org/ message- id/945db7c5-be75-45bf-b55b-cb1e56f2e3e9%40dunslane.

Re: Newly created replication slot may be invalidated by checkpoint

2025-11-12 Thread Amit Kapila
On Thu, Nov 13, 2025 at 8:03 AM Zhijie Hou (Fujitsu) wrote: > > On Wednesday, November 12, 2025 11:55 PMVitaly Davydov > wrote: > > > > On Monday, November 10, 2025 12:11 MSK, Amit Kapila > > wrote: > > > The fix seems to be only provided for bank branches, but IIUC the > > > problem can happen

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-12 Thread Quan Zongliang
On 11/12/25 8:04 PM, Akshay Joshi wrote: Hi Hackers, I’m submitting a patch as part of the broader Retail DDL Functions project described by Andrew Dunstan https://www.postgresql.org/message- id/945db7c5-be75-45bf-b55b-cb1e56f2e3e9%40dunslane.net www.postgresql.org/message-id/945db7c5-be75-

Re: [Patch] Windows relation extension failure at 2GB and 4GB

2025-11-12 Thread Michael Paquier
On Wed, Nov 12, 2025 at 04:58:43PM +0900, Michael Paquier wrote: > Thanks. As the stamps have been pushed for the next minor release, I > have applied and backpatched the meson check for now. I'll look at > your patch next, for HEAD. Moving on to the I/O routine changes. There was a little bit

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-12 Thread Chao Li
> On Nov 13, 2025, at 11:47, Fujii Masao wrote: > > On Thu, Nov 13, 2025 at 11:21 AM Chao Li wrote: >> I debugged further this morning, and I think I have found the root cause. >> Ultimately, the problem is not with discardUntilSync(), instead, >> discardAvailableResults() mistakenly eats P

Re: tuple radix sort

2025-11-12 Thread John Naylor
On Wed, Nov 12, 2025 at 9:28 PM David Geier wrote: > I've also been looking into radix sort the last days to accelerate GIN > index builds. Ordering and removing duplicates requires a fast sort in > generate_trgm(). If that's the case then I suggest first seeing if dfd8e6c73ee made things any wor

Re: SQL:2011 Application Time Update & Delete

2025-11-12 Thread Chao Li
Sorry, I missed the attachment. Chao Li (Evan) - HighGo Software Co., Ltd. https://www.highgo.com/ On Thu, Nov 13, 2025 at 11:55 AM Chao Li wrote: > > > On Nov 5, 2025, at 23:46, Peter Eisentraut wrote: > > I committed the patches 0001 and 0002 (from v59). > > > I just not

Re: SQL:2011 Application Time Update & Delete

2025-11-12 Thread Chao Li
On Nov 5, 2025, at 23:46, Peter Eisentraut wrote: I committed the patches 0001 and 0002 (from v59). I just noticed 0001 and 0002 have been pushed, and my comments 3&4 on 0002 had been fixed in the pushed version. So, I created a patch to fix the typo of my comment 1. As the fix is really trivi

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-12 Thread Fujii Masao
On Thu, Nov 13, 2025 at 11:21 AM Chao Li wrote: > I debugged further this morning, and I think I have found the root cause. > Ultimately, the problem is not with discardUntilSync(), instead, > discardAvailableResults() mistakenly eats PGRES_PIPELINE_SYNC. Thanks for debugging! Yes, discardAvai

Re: misleading error message in ProcessUtilitySlow T_CreateStatsStmt

2025-11-12 Thread jian he
hi. new patch attached. Summary of the problem we’re trying to solve: 1. ProcessUtility for T_CreateStatsStmt, there’s a lot of code that doesn’t belong there. 2. The current pattern of repeatedly performing RangeVar lookups isn’t ideal — we should perform the lookup once and then use the corresp

Re: code cleanup for CREATE STATISTICS

2025-11-12 Thread jian he
On Wed, May 3, 2023 at 1:50 AM Robert Haas wrote: > > Hi, > > So the attached patch is proposed as code cleanup, rather than > security patches. It changes the code to avoid the duplicate name > lookup altogether. There is no reason that I know of why this needs to > be back-patched for correctnes

Re: Rename sync_error_count to tbl_sync_error_count in subscription statistics

2025-11-12 Thread Amit Kapila
On Thu, Nov 13, 2025 at 4:31 AM Peter Smith wrote: > > CURRENT > seq_sync_error_count > sync_error_count > > MY SUGGESTION > sync_seq_error_count > sync_table_error_count > +1. Along with consistency with other column names, it will also make it easier for users to group and query all 'sync' rela

Re: SQL:2011 Application Time Update & Delete

2025-11-12 Thread Chao Li
> On Nov 12, 2025, at 17:31, Chao Li wrote: > > > >> On Nov 5, 2025, at 03:12, Paul A Jungwirth >> wrote: >> >> On Wed, Oct 29, 2025 at 11:02 PM Paul A Jungwirth >> wrote: >>> >>> On Tue, Oct 28, 2025 at 3:49 AM Peter Eisentraut >>> wrote: On 24.10.25 19:08, Paul A Jungwirth wrot

Re: Logical replication: lost updates/deletes and invalid log messages caused by SnapshotDirty + concurrent updates

2025-11-12 Thread Mihail Nikalayeu
Hello! Issue is known for almost a year, so I propose to document it at least. This is a draft of a documentation update. Best regards, Mikhail. From 08f4ccf2b5403b84b15b14ddb26b529cb3c11c27 Mon Sep 17 00:00:00 2001 From: Mikhail Nikalayeu Date: Thu, 13 Nov 2025 03:11:11 +0100 Subject: [PATCH v

Re: Proposal: Allow excluding specific file patterns in pg_checksums

2025-11-12 Thread Horimoto Yasuhiro
Hi all, Thanks Greg and Daniel for the helpful feedback and suggestions. Following your advice, we're considering moving PGroonga's database-specific files out of the `base/` directory to avoid interference with `pg_checksums`. Specifically, we're exploring placing them under a path such as `pgr

Re: [PATCH] Add pg_get_subscription_ddl() function

2025-11-12 Thread Peter Smith
Hi, A couple more comments. These seem like general questions that might apply to other DDL funtion implementations -- not only this one. == 1. Question - is it deliberate to *always* return DLL with every possible option assigned, even if those are just the option default values? e.g. For

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-12 Thread Fujii Masao
On Wed, Nov 12, 2025 at 6:34 PM Yugo Nagata wrote: > I've attached an updated patch. Thanks for updating the patch! > The comment for the PQpipelineSync() call has been also updated to clarify > why it is necessary. + /* + * If a PGRES_PIPELINE_SYNC is followed by something other than + * PGRES

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-12 Thread Yugo Nagata
On Wed, 12 Nov 2025 01:47:37 +0900 Fujii Masao wrote: > On Tue, Nov 11, 2025 at 11:49 AM Chao Li wrote: > > I just did more tests on both pipeline mode and non-pipeline mode, I think > > the main purpose of discardAvailableResults() is to drain results for > > pipeline mode. In non-pipeline mo

Re: Doc: add XML ID attributes to tags for create_foreign_table, alter_foreign_table

2025-11-12 Thread wenhui qiu
Hi > Since no more suggestions have been provided. And this is a very minor > change. Although there are currently no other documents linked to these > tags. This patch makes this document more complete and in line with > conventions of other similar documents. So I changed it to "Ready for > Comm

Re: Speed up COPY FROM text/CSV parsing using SIMD

2025-11-12 Thread Manni Wood
On Wed, Nov 12, 2025 at 8:44 AM KAZAR Ayoub wrote: > On Tue, Nov 11, 2025 at 11:23 PM Manni Wood > wrote: > >> Hello! >> >> I wanted reproduce the results using files attached by Shinya Kato and >> Ayoub Kazar. I installed a postgres compiled from master, and then I >> installed a postgres built

RE: Newly created replication slot may be invalidated by checkpoint

2025-11-12 Thread Zhijie Hou (Fujitsu)
On Wednesday, November 12, 2025 11:55 PMVitaly Davydov wrote: > > On Monday, November 10, 2025 12:11 MSK, Amit Kapila > wrote: > > The fix seems to be only provided for bank branches, but IIUC the > > problem can happen in HEAD as well. In Head, how about acquiring > > ReplicationSlotAllocation

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-12 Thread Chao Li
> On Nov 12, 2025, at 17:34, Yugo Nagata wrote: > > On Wed, 12 Nov 2025 00:20:15 +0900 > Fujii Masao wrote: > >> On Tue, Nov 11, 2025 at 10:50 AM Yugo Nagata wrote: >>> I've attached a patch to fix this. >> >> Thanks for reporting the issue and providing the patch! >> >>> If a PGRES_PIPELI

Re: Doc: add XML ID attributes to tags for create_foreign_table, alter_foreign_table

2025-11-12 Thread Quan Zongliang
On 9/22/25 9:27 AM, Quan Zongliang wrote: On 9/19/25 11:08 AM, jian he wrote: hi. with commit like: https://git.postgresql.org/cgit/postgresql.git/commit/? id=78ee60ed84bb3a1cf0b6bd9a715dcbcf252a90f5 we can make a url link that points directly to a specific subsection of the document. f

Re: Add mode column to pg_stat_progress_vacuum

2025-11-12 Thread Masahiko Sawada
On Thu, Oct 30, 2025 at 12:39 AM Shinya Kato wrote: > > On Thu, Oct 30, 2025 at 8:40 AM Masahiko Sawada wrote: > > > I have updated the patch according to your comments. I have modified > > > this to display the behavior mode (normal, aggressive, failsafe) in > > > the mode column, > > > > The ne

Re: [Patch] Windows relation extension failure at 2GB and 4GB

2025-11-12 Thread Michael Paquier
On Thu, Nov 13, 2025 at 12:26:03AM +1300, Thomas Munro wrote: > On Wed, Nov 12, 2025 at 11:55 PM Dagfinn Ilmari Mannsåker > wrote: >> I just noticed that the check is for 2GB, but the error message says >> 1GB. > > -Dsegsize only accepts integers here and it's expressed in GB, so only > 1 will ac

Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions

2025-11-12 Thread Fujii Masao
On Wed, Nov 12, 2025 at 10:23 PM Sugamoto Shinya wrote: > Thanks everyone for reviewing my proposal. > I've hard-coded the valid list of encoding names. > > Also, I modified the hint string into like "Valid encodings are \"hex\", > \"base64\", \"base64url\", and \"escape\"." > by adding "and" bef

Re: another autovacuum scheduling thread

2025-11-12 Thread Sami Imseih
> > > On Nov 12, 2025, at 5:10 PM, Sami Imseih wrote: > > > >  > >> > >> I do think re-prioritization is worth considering, but IMHO we should > leave > >> it out of phase 1. I think it's pretty easy to reason about one round > of > >> prioritization being okay. The order is completely arbitrar

Re: pg_getaddrinfo_all() with hintp=NULL

2025-11-12 Thread Tom Lane
Daniel Gustafsson writes: > It's still not clear to ne that we should make pg_getaddr_info() mimic the API > of getaddrinfo since it's not a thin wrapper over getaddrinfo. The > alternative > option would be to return EAI_FAIL on a null hint and force the caller to > provide an AF_UNSPEC if that

Re: Fix incorrect assignment of InvalidXLogRecPtr to a non-LSN variable.

2025-11-12 Thread Fujii Masao
On Wed, Nov 12, 2025 at 6:14 PM Xuneng Zhou wrote: > Good catch! I checked that no other similar misuses of > InvalidXLogRecPtr assigned to non-LSN variables were found in > logicalfuncs.c. Thanks, Steven and Xuneng, for the reviews! I've pushed the patch. Regards, -- Fujii Masao

Re: Sequence Access Methods, round two

2025-11-12 Thread Michael Paquier
On Tue, Nov 11, 2025 at 09:59:40AM +0100, Andrei Lepikhov wrote: > On 11/11/2025 02:43, Michael Paquier wrote: >> On Mon, Nov 10, 2025 at 04:31:07PM +0100, Andrei Lepikhov wrote: >>> In multimaster, you may find an implementation of strictly monotone >>> sequences. This method is covered by a GUC,

Re: another autovacuum scheduling thread

2025-11-12 Thread Jeremy Schneider
> On Nov 12, 2025, at 5:10 PM, Sami Imseih wrote: > >  >> >> I do think re-prioritization is worth considering, but IMHO we should leave >> it out of phase 1. I think it's pretty easy to reason about one round of >> prioritization being okay. The order is completely arbitrary today, so how

Re: pg_getaddrinfo_all() with hintp=NULL

2025-11-12 Thread Daniel Gustafsson
> On 12 Nov 2025, at 09:46, Sergey Tatarintsev > wrote: > I added a comment to pg_freeaddrinfo_all. > I don't think it made sense to comment that hint_ai_family simply shouldn't > be equal to AF_UNIX, > so I specified that if the original hints were NULL, hint_ai_family should be > equal to AF

Re: Extended test coverage and docs for SSL passphrase commands

2025-11-12 Thread Daniel Gustafsson
> On 12 Nov 2025, at 18:47, Álvaro Herrera wrote: > > On 2025-Nov-12, Daniel Gustafsson wrote: > >> As far as I know the only way to programmatically learn that from the Perl >> testcode would be to check for the presence of the CONFIG_EXEC_PARAMS file in >> $self->data_dir, which should be easy

Re: Serverside SNI support in libpq

2025-11-12 Thread Daniel Gustafsson
> On 12 Nov 2025, at 23:44, Jacob Champion > wrote: > Did you have any thoughts on my earlier review [2]? The test patch > attached there still fails on my machine with v9. Oh shoot, I missed that when going back over the thread. Will have a look. -- Daniel Gustafsson

Re: Rename sync_error_count to tbl_sync_error_count in subscription statistics

2025-11-12 Thread Peter Smith
On Wed, Nov 12, 2025 at 4:04 PM shveta malik wrote: > > On Wed, Nov 12, 2025 at 9:54 AM vignesh C wrote: > > > > Hi, > > > > This patch proposes renaming a column in the view > > pg_stat_subscription_stats to disambiguate between table sync and > > sequence sync error counts. With the introductio

Re: Serverside SNI support in libpq

2025-11-12 Thread Jacob Champion
On Tue, Nov 11, 2025 at 1:07 AM Chao Li wrote: > If ssl_snimode is PGC_SIGHUP that allows to reload without a server reset, > why hosts_file cannot? I think all of our FILE_LOCATIONS GUCs are handled similarly. --Jacob

Re: Serverside SNI support in libpq

2025-11-12 Thread Jacob Champion
On Mon, Nov 10, 2025 at 2:33 PM Daniel Gustafsson wrote: > Attached is a cleaned up rebase with improved memory handling, additional code > documentation, removed passphrase test (sent as a separate thread), and some > general cleanup and additional testing. Thanks! Builds and passes back to Open

Re: DOCS: ALTER PUBLICATION - Synopsis for DROP is a bit misleading

2025-11-12 Thread Peter Smith
On Wed, Nov 12, 2025 at 6:06 PM Fujii Masao wrote: > ... > I've pushed the patch. Thanks! > Thanks for pushing it. == Kind Regards, Peter Smith. Fujitsu Australia

Re: [PATCH] O_CLOEXEC not honored on Windows - handle inheritance chain

2025-11-12 Thread Bryan Green
On 11/12/2025 4:10 PM, Bryan Green wrote: > On 11/11/2025 8:34 PM, Thomas Munro wrote: >> On Wed, Nov 12, 2025 at 2:01 PM Bryan Green wrote: >>> [v3] >> >> "The original commit included a comment suggesting that our open() >> replacement doesn't create inheritable handles, but it appears this >> m

Re: [PATCH] O_CLOEXEC not honored on Windows - handle inheritance chain

2025-11-12 Thread Bryan Green
On 11/11/2025 8:34 PM, Thomas Munro wrote: > On Wed, Nov 12, 2025 at 2:01 PM Bryan Green wrote: >> [v3] > > "The original commit included a comment suggesting that our open() > replacement doesn't create inheritable handles, but it appears this > may have been based on a misunderstanding of the c

Re: another autovacuum scheduling thread

2025-11-12 Thread Sami Imseih
> I do think re-prioritization is worth considering, but IMHO we should leave > it out of phase 1. I think it's pretty easy to reason about one round of > prioritization being okay. The order is completely arbitrary today, so how > could ordering by vacuum-related criteria make things any worse?

Re: Add support for COPY TO in tablesync for partitioned tables.

2025-11-12 Thread Masahiko Sawada
On Mon, Nov 10, 2025 at 7:37 PM Ajin Cherian wrote: > > On Tue, Nov 11, 2025 at 2:19 PM Amit Kapila wrote: > > > > In the commit message, you mentioned: "Performance tests show it's > > faster than the COPY (SELECT ...) TO variant as it avoids the > > overheads of query processing and sending res

Re: Early December Commitfest app release

2025-11-12 Thread Jacob Champion
On Tue, Nov 11, 2025 at 2:12 AM Jelte Fennema-Nio wrote: > 3. Make user dropdowns searchable when not logged in Adding Magnus -- Magnus, do you remember the rationale for re-adding this protection back in 6ff8c6a52? Does it still apply? --Jacob

Re: obsolete autovacuum comment

2025-11-12 Thread Nathan Bossart
On Wed, Nov 12, 2025 at 06:09:40PM +0100, Álvaro Herrera wrote: > The comment you cite appears more or less in the same place in > autovacuum-6.patch (the routine was called test_rel_for_autovac there), > but I think what it really is about, is the AVOperUpdateCounts operation > that was in autovac

Re: Improve LWLock tranche name visibility across backends

2025-11-12 Thread Nathan Bossart
On Tue, Nov 11, 2025 at 01:50:20PM -0600, Sami Imseih wrote: > LGTM. Committed, thanks for reviewing. -- nathan

Re: Optimize LISTEN/NOTIFY

2025-11-12 Thread Joel Jacobson
On Wed, Nov 12, 2025, at 21:37, Joel Jacobson wrote: > Sequence of events: > > 1. In the notifier, PreCommit_Notify calls asyncQueueAddEntries, > which updates QUEUE_HEAD when the page is full, > (and sets queueHeadAfterWrite to this value). > > 2. At this time, a listener wakes up and asyncQueueAd

Re: Trying out read streams in pgvector (an extension)

2025-11-12 Thread Melanie Plageman
On Tue, Nov 11, 2025 at 11:12 PM Thomas Munro wrote: > > Here is a draft patch like that, that tries to be as small as > possible. Trying out the name read_stream_resume(). I like read_stream_resume(). Tested out 0001 with pgvector and can confirm it works. In the test, I would initialize test_

Re: Optimize LISTEN/NOTIFY

2025-11-12 Thread Joel Jacobson
On Wed, Nov 12, 2025, at 17:57, Arseniy Mukhin wrote: > On Tue, Nov 11, 2025 at 7:35 PM Joel Jacobson wrote: >> I'm therefore attaching v24 again, but renamed to v26. > > Thank you for the new version! Thanks for reviewing! > I read direct advancement part of v26, one point about it: > > The com

Re: another autovacuum scheduling thread

2025-11-12 Thread Nathan Bossart
On Tue, Nov 11, 2025 at 06:22:36PM -0500, Robert Treat wrote: > On Tue, Nov 11, 2025 at 3:27 PM David Rowley wrote: >> On Wed, 12 Nov 2025 at 09:13, Nathan Bossart >> wrote: >> > My concern is that this might add already-processed tables back to the >> > list, so a worker might never be able to

Re: Use streaming read I/O in BRIN vacuuming

2025-11-12 Thread Arseniy Mukhin
Hi, On Mon, Oct 13, 2025 at 5:54 PM Arseniy Mukhin wrote: > > Hi, > > On Thu, Oct 9, 2025 at 2:03 AM Masahiko Sawada wrote: > > > > On Sun, Aug 31, 2025 at 12:48 PM Arseniy Mukhin > > wrote: > > > > > > Hi! > > > > > > On Sun, Aug 31, 2025 at 8:49 PM Andrey Borodin > > > wrote: > > > > > > >

Re: Support a`--with-copy-program` compile flag

2025-11-12 Thread Nathan Bossart
On Wed, Nov 12, 2025 at 01:07:27PM -0500, Steve Chavez wrote: > So I wonder if we could remove the possibility of shell access by providing > a `--with-copy-program` compile flag. You might be interested in this past discussion for a similar idea: https://postgr.es/m/flat/20220520225619.G

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

2025-11-12 Thread Heikki Linnakangas
On 07/11/2025 16:14, Álvaro Herrera wrote: One thing I noticed while testing this is that asyncQueueAddEntries() fills the end of a page with a dummy entry, when the next notify doesn't fit. However, this dummy entry contains a very valid TransactionId, which the new freezing code will try to lo

Re: Remaining dependency on setlocale()

2025-11-12 Thread Jeff Davis
On Wed, 2025-11-12 at 19:41 +0100, Peter Eisentraut wrote: > The impact area of LC_CTYPE is much larger and more complicated > and possibly interacts with other settings and third-party libraries > in > ways that we don't understand yet and might not be able to change. > That's why I'm more hesi

Re: Remaining dependency on setlocale()

2025-11-12 Thread Peter Eisentraut
On 29.10.25 01:19, Jeff Davis wrote: On Wed, 2025-07-23 at 19:11 -0700, Jeff Davis wrote: On Fri, 2025-07-11 at 11:48 +1200, Thomas Munro wrote: On Fri, Jul 11, 2025 at 6:22 AM Jeff Davis wrote: I don't have a great windows development environment, and it appears CI and the buildfarm don't of

Re: Remaining dependency on setlocale()

2025-11-12 Thread Peter Eisentraut
On 03.11.25 20:14, Daniel Verite wrote: No, I think we should put the database's lc_ctype into LC_CTYPE and the database's lc_collate into LC_COLLATE, independently of anything else, like it was done until commit 5e6e42e. I believe that's the purpose of these database properties, whether the prov

Re: Support a`--with-copy-program` compile flag

2025-11-12 Thread Andres Freund
Hi, On 2025-11-12 13:07:27 -0500, Steve Chavez wrote: > Postgres provides the `COPY .. TO/FROM PROGRAM` statement. This is > dangerous from a security perspective because it allows users to escape > from the SQL sandbox and gain shell access on the instance. > > Now there's the `pg_execute_server

Re: Support a`--with-copy-program` compile flag

2025-11-12 Thread Heikki Linnakangas
On 12/11/2025 20:07, Steve Chavez wrote: Hello hackers, Postgres provides the `COPY .. TO/FROM PROGRAM` statement. This is dangerous from a security perspective because it allows users to escape from the SQL sandbox and gain shell access on the instance. Now there's the `pg_execute_server_pr

Support a`--with-copy-program` compile flag

2025-11-12 Thread Steve Chavez
Hello hackers, Postgres provides the `COPY .. TO/FROM PROGRAM` statement. This is dangerous from a security perspective because it allows users to escape from the SQL sandbox and gain shell access on the instance. Now there's the `pg_execute_server_program` predefined role to restrict access to `

Re: Update timezone to C99

2025-11-12 Thread Tom Lane
Peter Eisentraut writes: > To fix that, I re-downloaded the upstream code (same version as before), > applied the fixes described in src/timezone/README, except those related > to the integer types, and then put back the PostgreSQL-specific code and > massaged things to remove irrelevant differ

Re: Extended test coverage and docs for SSL passphrase commands

2025-11-12 Thread Álvaro Herrera
On 2025-Nov-12, Daniel Gustafsson wrote: > As far as I know the only way to programmatically learn that from the Perl > testcode would be to check for the presence of the CONFIG_EXEC_PARAMS file in > $self->data_dir, which should be easy enough to do. Do you know of a better > way? We have check

Re: index prefetching

2025-11-12 Thread Tomas Vondra
On 11/11/25 00:59, Peter Geoghegan wrote: > On Sun, Nov 2, 2025 at 6:49 PM Peter Geoghegan wrote: >> Nothing really new here (I've been >> working on batching on the table AM side, but nothing to show on that >> just yet). > > Tomas and I had a meeting on Friday to discuss a way forward with this

Re: Extended test coverage and docs for SSL passphrase commands

2025-11-12 Thread Daniel Gustafsson
> On 12 Nov 2025, at 15:15, Peter Eisentraut wrote: > > On 07.11.25 21:26, Daniel Gustafsson wrote: >> When I was writing tests for the SSL SNI patch [0] I realized that the >> current >> tests for ssl passphrase commands aren't fully exercising the feature, so I >> extended them to better under

Re: obsolete autovacuum comment

2025-11-12 Thread Álvaro Herrera
On 2025-Nov-12, David Rowley wrote: > I've never been able to make sense of that comment. I tried to dig a > bit yesterday and still couldn't make sense of it in the context of > the commit when it was added. I assume it's talking about > pg_stat_all_tables.autovacuum_count, but I can't think why

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

2025-11-12 Thread Masahiko Sawada
On Wed, Nov 12, 2025 at 3:42 AM shveta malik wrote: > > On Wed, Nov 12, 2025 at 3:36 PM Masahiko Sawada wrote: > > > > On Tue, Nov 11, 2025 at 6:05 PM Masahiko Sawada > > wrote: > > > > > > On Mon, Nov 10, 2025 at 8:05 PM shveta malik > > > wrote: > > > > > > > > On Thu, Nov 6, 2025 at 4:32 A

Re: obsolete autovacuum comment

2025-11-12 Thread Álvaro Herrera
On 2025-Nov-10, Nathan Bossart wrote: > While working on my autovacuum scheduling patch [0], I noticed the > following comment in relation_needs_vacanalyze(): > > /* > * Note that we don't need to take special consideration for stat > * reset, because if that happens, th

Re: relfilenode statistics

2025-11-12 Thread Bertrand Drouvot
Hi, On Mon, Nov 10, 2025 at 05:53:45PM +0900, Michael Paquier wrote: > On Sun, Nov 09, 2025 at 08:33:54AM +0900, Michael Paquier wrote: > > Looking at this part of the patch set for now, not looked at the rest > > yet. This new stats_1.out is 2k lines long, introduced for the tests > > related to

Re: Optimize LISTEN/NOTIFY

2025-11-12 Thread Arseniy Mukhin
Hi, On Tue, Nov 11, 2025 at 7:35 PM Joel Jacobson wrote: > > On Sat, Nov 8, 2025, at 16:04, Joel Jacobson wrote: > > On Sat, Nov 8, 2025, at 13:59, Joel Jacobson wrote: > >> On Fri, Nov 7, 2025, at 19:59, Joel Jacobson wrote: > >> This in turn could cause a listening backend to remain behind, if

Re: CURL_IGNORE_DEPRECATION

2025-11-12 Thread Jacob Champion
On Wed, Nov 12, 2025 at 3:36 AM Álvaro Herrera wrote: > Thanks all for looking -- pushed. Slightly late to the party, but thanks! This is much nicer. --Jacob

Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement

2025-11-12 Thread Manni Wood
On Wed, Nov 12, 2025 at 10:15 AM Álvaro Herrera wrote: > On 2025-Nov-12, Manni Wood wrote: > > > Thanks, Álvaro, for your continued help with this. > > > > I have attached v11 patches that use all of the fixes from your > > review.patch.txt. > > OK, thanks, I pushed 0001 now. > > I think you coul

Update timezone to C99

2025-11-12 Thread Peter Eisentraut
The code in src/timezone/ still contained workarounds for not wanting to rely on C99 and , even though the rest of the code uses those now. To fix that, I re-downloaded the upstream code (same version as before), applied the fixes described in src/timezone/README, except those related to the

Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement

2025-11-12 Thread Álvaro Herrera
On 2025-Nov-12, Manni Wood wrote: > Thanks, Álvaro, for your continued help with this. > > I have attached v11 patches that use all of the fixes from your > review.patch.txt. OK, thanks, I pushed 0001 now. I think you could claim that some routines currently in src/backend/commands/tablespace.c

Re: [WIP]Vertical Clustered Index (columnar store extension) - take2

2025-11-12 Thread Timur Magomedov
Hello Peter! I've succeeded in making a reproducer for a infrequent bug I've seen several times with ROS control daemon enabled. Looks like WAL records produced by ROS control daemon while processing "vci_rc_update_del_vec" command are not compatible with what heap_xlog_prune_freeze() function expe

RE: Newly created replication slot may be invalidated by checkpoint

2025-11-12 Thread Vitaly Davydov
On Friday, October 31, 2025 12:48 MSK, "Hayato Kuroda (Fujitsu)" wrote: > Firstly I considered an ad-hoc way, which sets the candidate restart_lsn as > replicationSlotMinLSN before using as slot->data.restart_lsn. PSA the idea. > It can fix your reproducer. Hayato-san, thank you for the idea. Ye

Re: should we have a fast-path planning for OLTP starjoins?

2025-11-12 Thread Tomas Vondra
Hi, Here's a v5, addressing some (but not all) of the things discussed earlier in this thread. This does nothing about the "opposite" type of join, with many small tables linking to a single "central" table. I'm not convinced it makes sense to handle that together with starjoins. But I haven't tr

Re: alignas (C11)

2025-11-12 Thread Peter Eisentraut
On 12.11.25 15:17, Thomas Munro wrote: In a very quick hack (so probably missing things) I also seemed to be able to get rid of all our ALIGNOF_ configure probes and just write alignof(int) when I want the alignment of int, According to my research, using alignof could be quite dangerous for ou

Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement

2025-11-12 Thread Manni Wood
On Tue, Nov 11, 2025 at 9:16 AM Álvaro Herrera wrote: > On 2025-Nov-10, Nishant Sharma wrote: > > > PFA, v10 patch set. > > I propose the following changes for 0001, in patch hunk ordering. > > 1. pg_tablespace_location was introduced in 2011 (commit 16d8e594acd9), > so claim copyright starting a

Re: alignas (C11)

2025-11-12 Thread Andres Freund
Hi, On 2025-11-12 16:09:14 +0100, Peter Eisentraut wrote: > On 12.11.25 15:02, Andres Freund wrote: > > Hi, > > > > On 2025-11-12 12:39:19 +0100, Peter Eisentraut wrote: > > > - You cannot use alignas on a typedef. So some uses of the attribute > > > pg_attribute_aligned() like for PgAioUringCon

Re: alignas (C11)

2025-11-12 Thread Peter Eisentraut
On 12.11.25 15:02, Andres Freund wrote: Hi, On 2025-11-12 12:39:19 +0100, Peter Eisentraut wrote: - You cannot use alignas on a typedef. So some uses of the attribute pg_attribute_aligned() like for PgAioUringContext or the whole int128 business cannot be converted directly. The solution for

Re: libpq OpenSSL and multithreading

2025-11-12 Thread Daniel Gustafsson
> On 29 Oct 2025, at 10:41, Peter Eisentraut wrote: > On 22.10.25 10:59, Daniel Gustafsson wrote: >>> On 1 Sep 2025, at 07:27, Peter Eisentraut wrote: >>> I suggest that instead of adding the context to the Port structure, make a >>> separate context struct for this purpose, for example: >> Fai

Re: Speed up COPY FROM text/CSV parsing using SIMD

2025-11-12 Thread KAZAR Ayoub
On Tue, Nov 11, 2025 at 11:23 PM Manni Wood wrote: > Hello! > > I wanted reproduce the results using files attached by Shinya Kato and > Ayoub Kazar. I installed a postgres compiled from master, and then I > installed a postgres built from master plus Nazir Bilal Yavuz's v3 patches > applied. > >

Re: [PATCH] Add hints for invalid binary encoding names in encode/decode functions

2025-11-12 Thread Peter Eisentraut
On 10.11.25 10:06, Chao Li wrote: The list is defined in encode.c (search for enclist in the file), I guess we can add a function to return a string with a encoding names. 2 ``` +errhint("Valid binary encodings are: %s", +

  1   2   >