Re: Preserve index stats during ALTER TABLE ... TYPE ...

2025-10-15 Thread Bertrand Drouvot
Hi, On Thu, Oct 16, 2025 at 03:09:24PM +0900, Michael Paquier wrote: > On Thu, Oct 16, 2025 at 01:38:19AM -0400, Tom Lane wrote: > > Michael Paquier writes: > >> Hmm. Why should it be always OK to preserve the stats of an index > >> when one of its attributes is changed so as a relation is rewri

Re: Preserve index stats during ALTER TABLE ... TYPE ...

2025-10-15 Thread Michael Paquier
On Fri, Oct 10, 2025 at 07:37:59AM -0500, Sami Imseih wrote: >> As you can see, the index stats (linked to the column that has been altered) >> are >> not preserved. I think that they should be preserved (like a REINDEX does). > > I agree. Hmm. Why should it be always OK to preserve the stats o

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

2025-10-15 Thread shveta malik
On Wed, Oct 15, 2025 at 9:57 AM Ajin Cherian wrote: > > > Updated the patch with a tap test. > Attaching patch v17 which has a tap test to test the feature added. > Thanks for the patch. I noticed that in the case of API, we are passing 'some_slot_updated' as always false to wait_for_slot_activit

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

2025-10-15 Thread Michael Paquier
On Thu, Oct 09, 2025 at 04:04:46PM +0100, Mircea Cadariu wrote: > Did you mean just the tests, without the fix? If so, please find the updated > tests only patch attached. The CI has reported that this test returns incorrect results when using debug_parallel_query = regress, which is the case of t

Re: MergeAppend could consider sorting cheapest child path

2025-10-15 Thread Andrei Lepikhov
On 15/10/2025 09:59, David Rowley wrote: On Wed, 15 Oct 2025 at 19:45, Richard Guo wrote: I also noticed the hack you added to avoid using MergeAppend+Sort when none of the chosen subpaths are ordered. It seems to me that this contradicts the idea of this patch. If MergeAppend+Sort is indeed

Re: Clarification on Role Access Rights to Table Indexes

2025-10-15 Thread Nathan Bossart
I just pushed 0001, and longfin and sifaka have very quickly reminded me that we don't require C11 on v18. Will fix shortly... -- nathan

Re: Logical Replication of sequences

2025-10-15 Thread Amit Kapila
On Tue, Oct 14, 2025 at 5:08 PM Dilip Kumar wrote: > > On Tue, Oct 14, 2025 at 3:36 PM Amit Kapila wrote: > > 0001 and 0002 looks good, > Thanks, I pushed 0001. I feel it is better to next commit refactoring patch v20251014-0003-Reorganize-tablesync-Code-and-Introduce-sy as that would be less co

Re: Add log_autovacuum_{vacuum|analyze}_min_duration

2025-10-15 Thread Shinya Kato
On Wed, Oct 15, 2025 at 9:37 PM Peter Eisentraut wrote: > > On 04.09.25 08:16, kasaharatt wrote: > > 2025-09-04 13:13 に Shinya Kato wrote: > >> Hi, > >> > >> On Thu, Sep 4, 2025 at 11:31 AM kasaharatt > >> wrote: > >>> The changes(*) to guc_tables.c have been pushed into HEAD, > >>> so you may ne

remove pg_restrict workaround

2025-10-15 Thread Peter Eisentraut
When in C11 mode, MSVC supports the standard "restrict" keyword, so we don't need the workaround with using "pg_restrict" instead anymore. (Just for clarification, restrict is a C99 feature, but MSVC only accepts it properly in C11 mode.) So I'm proposing to remove that workaround here, so tha

Re: [PATCH] Remove make_temptable_name_n()

2025-10-15 Thread Aleksander Alekseev
Hi Nathan, > This dates back to commit cc1965a, and I see some discussion about this > function in the corresponding thread [0]. One thing I don't like about > the patch is that we lose the comment about relying on the name to never be > double-quoted. IMHO that's worth retaining in some form.

RE: Logical Replication of sequences

2025-10-15 Thread Zhijie Hou (Fujitsu)
On Wednesday, October 15, 2025 4:28 PM Chao Li wrote: > /* > * getSubscriptionTables > *Get information about subscription membership for dumpable relations. > This > *will be used only in binary-upgrade mode for PG17 or later versions. > */ > void > getSubscriptionTables(Archive *f

RE: Logical Replication of sequences

2025-10-15 Thread Zhijie Hou (Fujitsu)
On Wednesday, October 15, 2025 12:12 PM shveta malik wrote: > > Please find a few more comments on 002: ... > Please find a few comments on 003: ... Thanks for the comments, I have addressed them in latest version. Best Regards, Hou zj

RE: Logical Replication of sequences

2025-10-15 Thread Zhijie Hou (Fujitsu)
On Tuesday, October 14, 2025 8:09 PM Kuroda, Hayato/黒田 隼人 wrote: > > Dear Hou, > > Thanks for updating the patch. Here are comments for recent 0002. > Others are still being reviewed Thanks for the comments. > 04. check_publications_origin > ``` > + > + query = "SELECT DISTINCT P.pubnam

Re: Making pg_rewind faster

2025-10-15 Thread Srinath Reddy Sadipiralla
On Wed, Oct 15, 2025 at 7:56 PM Srinath Reddy Sadipiralla < [email protected]> wrote: > > thanks for updating, i have attached a diff patch on > top of v9-0001 patch , where i tried to add more tests > to improve the validation that we copy the WAL file even > when it exists on both source and

Re: get rid of RM_HEAP2_ID

2025-10-15 Thread Heikki Linnakangas
On 15/10/2025 07:51, John Naylor wrote: On Tue, Oct 14, 2025 at 7:20 PM Heikki Linnakangas wrote: This patch consumes one of the padding bytes. That's not entirely free, as there is an opportunity cost: we could squeeze out the padding bytes and save 2 bytes on every WAL record instead. I mus

postgres_fdw: Use COPY to speed up batch inserts

2025-10-15 Thread Matheus Alcantara
Hi all, Currently on postgres_fdw we use prepared statements to insert batches into foreign tables. Although this works fine for the most use cases the COPY command can also be used in some scenarios to speed up large batch inserts. The attached patch implements this idea of using the COPY comman

Re: Thoughts on a "global" client configuration?

2025-10-15 Thread Peter Eisentraut
On 06.10.25 20:05, Jacob Champion wrote: I started on a proof of concept and very quickly hit a fork. Do I 1) introduce a completely new config file, or 2) adapt pg_service.conf to this use case? I've been thinking about this kind of thing for a long time, and my intuition has always been to h

Re: Thoughts on a "global" client configuration?

2025-10-15 Thread Peter Eisentraut
On 08.10.25 16:39, Robert Haas wrote: To be honest, I think part of the problem here has to do with our choice of syntax. For HTTP, you just change the URL from http to https and it's one extra character. Decorating every connection string with sslmode=none (if the default is verify-full and you'

Re: Thoughts on a "global" client configuration?

2025-10-15 Thread Jacob Champion
On Wed, Oct 15, 2025 at 12:35 PM Isaac Morland wrote: > Maybe have a way to specify one or more "base" configurations for each > service? For the use case I have in mind, my intention is that you shouldn't have to use a service at all to get these defaults to apply. > [service1] extends default

Re: Optimize LISTEN/NOTIFY

2025-10-15 Thread Arseniy Mukhin
On Wed, Oct 15, 2025 at 5:16 PM Tom Lane wrote: > > Arseniy Mukhin writes: > > I think "Direct advancement" is a good idea. But the way it's > > implemented now has a concurrency bug. Listeners store its current > > position in the local variable 'pos' during the reading in > > asyncQueueReadAllN

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

2025-10-15 Thread Peter Smith
On Thu, Oct 16, 2025 at 7:18 AM Masahiko Sawada wrote: > > On Tue, Oct 14, 2025 at 12:52 AM Peter Smith wrote: > > > > Hi Sawada-San, > > > > I started to look again at this thread. Here are some comments for v18 > > (the documentation only). > > Thank you for reviewing the patch! > > > > > =

Re: Replace O_EXCL with O_TRUNC for creation of state.tmp in SaveSlotToPath

2025-10-15 Thread Michael Paquier
On Wed, Oct 15, 2025 at 07:30:39PM +0530, Kevin K Biju wrote: > Thanks for the context. I missed the earlier discussions about the same > issue. Using unlink in the error paths makes sense to me. There is an edge > case in my mind, in case unlink fails as well, and we end up in the same > condition

Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE

2025-10-15 Thread Michael Paquier
On Wed, Oct 15, 2025 at 02:48:43AM +, Aya Iwata (Fujitsu) wrote: > Thank you for your comments. I updated this patch to v0007. + * Exit the bgworker when its database is dropped, renamed, moved to a + * different tablespace, or used as a template for CREATE DATABASE. I don't think that we nee