Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning

2025-03-18 Thread Amit Langote
On Tue, Mar 18, 2025 at 8:48 PM Ashutosh Bapat wrote: > On Tue, Mar 18, 2025 at 4:02 PM Amit Langote wrote: > > > > I ran a couple of benchmarks of my own as follows. > > > > cat benchmark_amit.sh > > for p in 0 16 32 64 128 256 512 1024; do > > echo -ne "$p\t"; > > pgbench -i --partitions=$p

Re: Forbid to DROP temp tables of other sessions

2025-03-18 Thread Daniil Davydov
Hi, On Wed, Mar 19, 2025 at 6:32 AM David G. Johnston wrote: > > I'm probably done trying to help with this one - it's beyond my ability and > desire to contribute to meaningfully. It seems to need to be escalated if > the regression has a chance of being understood and fixed. > Some good cand

Re: Proposal: Deferred Replica Filtering for PostgreSQL Logical Replication

2025-03-18 Thread David G. Johnston
On Sat, Mar 15, 2025 at 12:29 PM Dean wrote: > Currently, PostgreSQL's logical replication filters apply > deterministically. Deferred filtering, however, operates after the WAL has > been decoded, giving it access to the complete row data and making > filtering decisions based on mutable values.

Re: making EXPLAIN extensible

2025-03-18 Thread Sami Imseih
> > Do you want to propose a patch? > > yes, will attach a patch shortly. Attached is a patch to add a hook to allow extensions to add additional option validations. The hook takes in the ExplainState as an argument and returns void. It is expected the extension will raise an error if the validati

Re: add function argument name to substring and substr

2025-03-18 Thread David G. Johnston
On Tue, Mar 18, 2025 at 6:20 PM jian he wrote: > On Wed, Mar 19, 2025 at 8:19 AM David G. Johnston > wrote: > > > > The vast majority of examples throughout the manual use traditional > function call syntax func_name(arg1, arg2, etc.); I'd rather keep with > convention than start to scatter ab

Re: Update Unicode data to Unicode 16.0.0

2025-03-18 Thread Robert Haas
On Tue, Mar 18, 2025 at 5:09 PM Jeff Davis wrote: > I am not trying to be dismissive of the concerns raised in this thread, > but I'd like others to understand that what they are asking for is a > lot of work, and that the builtin collation provider solves 99% of it > already. All this effort is t

Re: Disabling vacuum truncate for autovacuum

2025-03-18 Thread Nathan Bossart
On Mon, Mar 17, 2025 at 10:14:51AM -0500, Nathan Bossart wrote: > Thank you all for the discussion. I've attempted to address the > outstanding feedback into the new version of the patch. Here is a new version of the patch with tests and some other light edits. I feel like this is committable, bu

Re: AIO v2.5

2025-03-18 Thread Andres Freund
Hi, On 2025-03-18 21:00:17 -0400, Melanie Plageman wrote: > On Tue, Mar 18, 2025 at 4:12 PM Andres Freund wrote: > > Attached is v2.10, > > This is a review of 0008: bufmgr: Implement AIO read support > > I'm afraid it is more of a cosmetic review than a sign-off on the > patch's correctnes

Re: Fwd: [BUG]: the walsender does not update its IO statistics until it exits

2025-03-18 Thread Xuneng Zhou
Hi, I am OK with PGSTAT_MIN_INTERVAL. It has been used for flushing other statistics as well. And monitoring systems are generally configured to poll at one-second or longer intervals. > > I think that reporting at PGSTAT_MIN_INTERVAL is fine and more than > enough. I > mean, I 'm not sure that t

Re: Proposal: Deferred Replica Filtering for PostgreSQL Logical Replication

2025-03-18 Thread Euler Taveira
On Tue, Mar 18, 2025, at 9:56 PM, Dean wrote: > Unfortunately, neither column lists nor row filters can provide the level of > control I'm proposing. These revised examples might help illustrate the use > case for DRF: I'm afraid I didn't understand your proposal. Are you trying to use logical r

Re: Update Unicode data to Unicode 16.0.0

2025-03-18 Thread Jeff Davis
On Tue, 2025-03-18 at 09:28 -0700, Jeremy Schneider wrote: > We think case-insensitive indexes are probably uncommon, so as > long as its "rare" we can let them break. Let's define "break" in this context to mean that the constraints are not enforced, or that the query doesn't return the results t

Re: pg_stat_statements and "IN" conditions

2025-03-18 Thread Sami Imseih
I want to mention that the current patch does not deal with external parameters ( prepared statements ) [0] [1]. This could be a follow-up, as it may need some further discussion. It is important to address this case, IMO. [0] https://www.postgresql.org/message-id/CAA5RZ0uGfxXyzhp9N5nfsS%2BZqF5ng

Re: Optimization for lower(), upper(), casefold() functions.

2025-03-18 Thread Tom Lane
Jeff Davis writes: > On Tue, 2025-03-18 at 11:11 -0400, Tom Lane wrote: >> Also, probably better to make it const: >> >> -static const pg_wchar *casekind_map[NCaseKind] = >> +static const pg_wchar * const casekind_map[NCaseKind] = > Was this a general suggestion, or did you see something in part

Re: NOT ENFORCED constraint feature

2025-03-18 Thread Álvaro Herrera
On 2025-Mar-12, Amul Sul wrote: > On Tue, Mar 11, 2025 at 11:13 PM Peter Eisentraut > wrote: > > I think the next step here is that you work to fix Álvaro's concerns > > about the recursion structure. > > Yes, I worked on that in the attached version. I refactored > ATExecAlterConstraintIntern

Re: race condition in pg_class

2025-03-18 Thread Andres Freund
Hi, On 2024-05-12 16:29:23 -0700, Noah Misch wrote: > Author: Noah Misch > Commit: Noah Misch > > Make TAP todo_start effects the same under Meson and prove_check. > > This could have caused spurious failures only on SPARC Linux, because > today's only todo_start tests

Re: pgsql: aio: Infrastructure for io_method=worker

2025-03-18 Thread Nathan Bossart
On Tue, Mar 18, 2025 at 07:07:53PM -0400, Andres Freund wrote: > On 2025-03-18 18:53:48 -0400, Tom Lane wrote: >> It's probably time to just abandon the idea of being able to run with >> only 60 semaphores. > > Agreed. It's an absurdly outdated OS default configuration. Realistically one > can't r

Re: Proposal: Deferred Replica Filtering for PostgreSQL Logical Replication

2025-03-18 Thread Dean
Unfortunately, neither column lists nor row filters can provide the level of control I'm proposing. These revised examples might help illustrate the use case for DRF: Alice, Bob, and Eve subscribe to changes on a `friend_requests` table. Row-level security ensures CRUD access based on user IDs. 1.

Re: add function argument name to substring and substr

2025-03-18 Thread David G. Johnston
On Mon, Mar 17, 2025 at 8:20 PM jian he wrote: > On Tue, Feb 18, 2025 at 6:13 AM David G. Johnston > wrote: > > > > Table 9.9 limits itself to those functions defined in the SQL standard; > which are basically the ones that use keywords instead of commas. > > > > The substring(string, start, cou

Re: AIO v2.5

2025-03-18 Thread Melanie Plageman
On Tue, Mar 18, 2025 at 4:12 PM Andres Freund wrote: > Attached is v2.10, This is a review of 0008: bufmgr: Implement AIO read support I'm afraid it is more of a cosmetic review than a sign-off on the patch's correctness, but perhaps it will help future readers who may have the same question

Re: Add -k/--link option to pg_combinebackup

2025-03-18 Thread Tom Lane
Robert Haas writes: > On Tue, Mar 18, 2025 at 1:55 PM Tom Lane wrote: >> 10s added to every check-world run doesn't sound "cheap" to me. > Really? If you're sensitive to the time the tests take to run, maybe > use 'meson test' rather than 'make check-world'? FTR, what I actually use is make -s

Re: pgsql: aio: Infrastructure for io_method=worker

2025-03-18 Thread Andres Freund
Hi, On 2025-03-18 18:53:48 -0400, Tom Lane wrote: > Andres Freund writes: > > To allow the number of IO workers to be increased without a restart, we need > > to reserve PGPROC entries for the workers unconditionally. This has been > > judged to be worth the cost. If it turns out to be problemati

Re: Add pg_buffercache_evict_all() and pg_buffercache_mark_dirty[_all]() functions

2025-03-18 Thread Aidar Imamov
Hi! This is my first time trying out as a patch reviewer, and I don't claim to be an expert. I am very interested in the topic of buffer cache and would like to learn more about it. I have reviewed the patches after they were edited and I would like to share my thoughts on some points. pg_bu

Re: query_id: jumble names of temp tables for better pg_stat_statement UX

2025-03-18 Thread Michael Paquier
On Tue, Mar 18, 2025 at 05:51:54PM +0100, Christoph Berg wrote: > I had thought about it, but figured that integers and strings are > already separate namespaces, so hashing them shouldn't have any > conflicts. But it's more clear to do that, so added in the new > version: > >AppendJumble(

Re: Fwd: [BUG]: the walsender does not update its IO statistics until it exits

2025-03-18 Thread Michael Paquier
On Tue, Mar 18, 2025 at 09:51:14AM +, Bertrand Drouvot wrote: > Thanks! Done that part for now. It will be possible to look at the bug fix after the release freeze as it impacts stable branches as well. -- Michael signature.asc Description: PGP signature

Re: Update Unicode data to Unicode 16.0.0

2025-03-18 Thread Joe Conway
On 3/18/25 16:30, Robert Haas wrote: On Tue, Mar 18, 2025 at 3:50 PM Tom Lane wrote: That approach works only if you sit on Unicode 15.1 *forever*. The impracticality of that seems obvious to me. Sooner or later you will need to update, and then you are going to suffer pain. I completely agr

Re: Show WAL write and fsync stats in pg_stat_io

2025-03-18 Thread Michael Paquier
On Tue, Mar 18, 2025 at 04:13:15PM +0300, Nazir Bilal Yavuz wrote: > Thanks for the report! Yes, it is an oversight on my part. No worries. It's most likely me while reviewing the whole as I've reordered these blocks a bit while going through the patch. This has little consequences for the end u

Re: Forbid to DROP temp tables of other sessions

2025-03-18 Thread David G. Johnston
On Mon, Mar 17, 2025 at 9:27 PM Daniil Davydov <3daniss...@gmail.com> wrote: > Hi, > > On Tue, Mar 18, 2025 at 2:36 AM David G. Johnston > wrote: > > > > "I want to give a better error message" is not a good enough reason to > change this long-standing behavior in a back-patchable bug fix. > >...

Re: vacuumdb changes for stats import/export

2025-03-18 Thread Nathan Bossart
Committed with the following small changes: * I renamed the new option to --missing-stats-only, which I felt was more descriptive. * I moved the new tests to the main vacuumdb test file and interspersed some --analyze-only uses. * I fixed a couple of other things in the new parts of the cata

Re: Adding support for SSLKEYLOGFILE in the frontend

2025-03-18 Thread Jacob Champion
On Tue, Mar 18, 2025 at 5:43 AM Daniel Gustafsson wrote: > Personally I think this feature has enough value even without the env var to > not postpone it, especially since adding an env var in 19 will still be > backwards compatible. I would go for option 1 to stay on the safe side and > allow ti

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-18 Thread David G. Johnston
On Tue, Mar 18, 2025 at 4:47 AM Amit Kapila wrote: > I don't understand --dry-run part of conversation here. As per > existing code (or with the patch), we seem to be already printing the > publications to be dropped in dry-run mode. > Sorry, that was me making a bad assumption rather than check

Re: maintenance_work_mem = 64kB doesn't work for vacuum

2025-03-18 Thread Masahiko Sawada
On Mon, Mar 17, 2025 at 11:54 PM David Rowley wrote: > > On Tue, 18 Mar 2025 at 19:34, Masahiko Sawada wrote: > > I've attached the updated patch. > > Looks good to me. Thank you for reviewing the patch. Pushed (backpatched to v17). Regards, -- Masahiko Sawada Amazon Web Services: https://aws

Re: Fwd: [BUG]: the walsender does not update its IO statistics until it exits

2025-03-18 Thread Michael Paquier
On Thu, Mar 13, 2025 at 01:18:45PM +, Bertrand Drouvot wrote: > This particular sub-patch needs a rebase though, done in the attached. 0001 > remains unchanged as compared to the v4 one just shared up-thread. If 0001 > goes > in, merging 0002 would be less beneficial (as compared to v3). PgSt

Re: add function argument name to substring and substr

2025-03-18 Thread jian he
On Wed, Mar 19, 2025 at 8:19 AM David G. Johnston wrote: > > The vast majority of examples throughout the manual use traditional function > call syntax func_name(arg1, arg2, etc.); I'd rather keep with convention > than start to scatter about alternative syntax choices just to give the > rand

Re: making EXPLAIN extensible

2025-03-18 Thread Sami Imseih
> Do you want to propose a patch? yes, will attach a patch shortly. -- Sami

Re: making EXPLAIN extensible

2025-03-18 Thread Tom Lane
Robert Haas writes: > If you mean just after, that would amount to deciding that information > coming from extensions goes before information from core rather than > after. I thought about that and it's defensible, but in the end I > thought it made more sense for core info to come first. We could

Re: Update Unicode data to Unicode 16.0.0

2025-03-18 Thread Robert Haas
On Tue, Mar 18, 2025 at 11:54 AM Jeff Davis wrote: > What do you think of Tom's argument that waiting to update Unicode is > what creates the problem in the first place? > > "by then they might well have instances of the newly-assigned code > points in their database"[1] I know you weren't asking

Re: [PATCH] Optionally record Plan IDs to track plan changes for a query

2025-03-18 Thread Ilia Evdokimov
On 12.02.2025 19:00, Alvaro Herrera wrote: On 2025-Feb-12, Julien Rouhaud wrote: On Wed, Feb 12, 2025 at 01:57:47PM +0100, Alvaro Herrera wrote: Anyway, I think that's different. We do support compute_query_id=off as a way for a custom module to compute completely different query IDs using

Re: dblink: Add SCRAM pass-through authentication

2025-03-18 Thread Peter Eisentraut
On 18.03.25 17:53, Jacob Champion wrote: On Tue, Mar 18, 2025 at 9:35 AM Peter Eisentraut wrote: So the way I understand this is that the options are: (1) We add a libpq function like PQconnectionUsedScramKeys() in the style of PQconnectionUsedPassword() and call that function during the check

Re: Optimize truncation logic to reduce AccessExclusive lock impact

2025-03-18 Thread David Rowley
On Tue, 18 Mar 2025 at 19:04, Stepan Neretin wrote: > We propose modifying the truncation condition in should_attempt_truncation to > avoid unnecessary full buffer scans. The new formula ensures we only attempt > truncation when we can free at least 3% of the relation size + 2 pages. This > cha

RE: doc patch: wrong descriptions for dropping replication slots

2025-03-18 Thread Hayato Kuroda (Fujitsu)
Dear Fujii-san, > Why was this restriction removed? If there was a past discussion about it, > could you share the details? More properly, pg_drop_replication_slot() has been introduced since PG9.4, and old documents did not have the description. The description has been added while developing P

Release freeze April 8

2025-03-18 Thread Bruce Momjian
With the last commitfest underway: https://commitfest.postgresql.org/52/ the release team has decided that the feature freeze deadline will be April 8, 2025, time zone Anywhere on Earth (AoE) (UTC-12): https://www.timeanddate.com/time/zones/aoe -- Bruce Momjian https

RE: Proposal: Deferred Replica Filtering for PostgreSQL Logical Replication

2025-03-18 Thread Zhijie Hou (Fujitsu)
On 2025/03/19 10:00:00 wrote: On Wed, Mar 19, 2025 at 8:56 AM Dean wrote: > Unfortunately, neither column lists nor row filters can provide the level of > control I'm proposing. These revised examples might help illustrate the use > case for DRF: > > Alice, Bob, and Eve subscribe to changes on a

Re: optimize file transfer in pg_upgrade

2025-03-18 Thread Andres Freund
On 2025-03-18 12:47:01 -0500, Nathan Bossart wrote: > On Tue, Mar 18, 2025 at 01:37:02PM -0400, Andres Freund wrote: > > - Do we need a new old cluster for each of the modes? That seems like wasted > > time? I guess it's required for --link... > > It'll also be needed for --swap. We could opti

Re: pg_stat_statements and "IN" conditions

2025-03-18 Thread Álvaro Herrera
On 2025-Mar-18, Sami Imseih wrote: > I want to mention that the current patch does not deal > with external parameters ( prepared statements ) [0] [1]. This could be a > follow-up, as it may need some further discussion. It is important to > address this case, IMO. Yes, I realize that. Feel free

Re: Supporting TCP_SYNCNT in libpq

2025-03-18 Thread Andres Freund
Hi, On 2025-03-13 09:37:37 +0100, Francesco Canovai wrote: > In this scenario, `tcp_user_timeout` could close a connection retrying > the SYNs (even though it doesn't seem to do it from the documentation, > it works) the parameter will affect the entire connection. > `connect_timeout`, doesn't wor

Increase default maintenance_io_concurrency to 16

2025-03-18 Thread Bruce Momjian
On Tue, Mar 18, 2025 at 04:13:26PM -0400, Andres Freund wrote: > Hi, > > On 2025-03-18 16:08:22 -0400, Bruce Momjian wrote: > > This commit makes our default random_page_cost = 4 out of line with > > these new settings (assumes modern SSD/NAS/SAN hardware) and more out of > > line with reality. >

Re: Add Pipelining support in psql

2025-03-18 Thread Michael Paquier
On Tue, Mar 18, 2025 at 10:36:28AM +0100, Daniel Verite wrote: > It's actually possible to use parameters > > \startpipeline > \bind 'foo' > select $1; > \endpipeline > > ?column? > -- > foo > (1 row) > > I suspect there's a misunderstanding that \bind can only be placed > after the

Re: Update Unicode data to Unicode 16.0.0

2025-03-18 Thread Tom Lane
Robert Haas writes: > On Tue, Mar 18, 2025 at 2:55 PM Jeff Davis wrote: >> Continuing on with Unicode 15.1 and accepting the unassigned code point >> *cannot* prevent breakage. > Under your definition, this is true, but I think Jeremy would define > breakage differently. His primary concern, I e

Re: pg_stat_statements and "IN" conditions

2025-03-18 Thread Álvaro Herrera
On 2025-Mar-18, Dmitry Dolgov wrote: > Thanks, much appreciated! I've inspected the diff between patches and > run few tests, at the first glance everything looks fine. Thanks for looking once more. > > I am tempted to say that explicit casts should also be considered > > squashable (that is, in

Re: ecdh support causes unnecessary roundtrips

2025-03-18 Thread Daniel Gustafsson
> On 18 Mar 2025, at 00:34, Jacob Champion > wrote: > > On Thu, Mar 13, 2025 at 2:41 PM Daniel Gustafsson wrote: >> OpenSSL 3.4 also doesn't like it and AFAICT neither does the upcoming 3.5, >> just >> haven't had the cycles yet to ship out a new patch with all the >> time-consuming >> testin

Re: Supporting TCP_SYNCNT in libpq

2025-03-18 Thread Gabriele Bartolini
Ciao Francesco, On Mon, 17 Mar 2025 at 09:19, Francesco Canovai < francesco.cano...@enterprisedb.com> wrote: > This patch introduces support for a `tcp_syn_count` parameter in > libpq, allowing control over the number of SYN retransmissions when > initiating a connection. > > The primary goal is

Re: Update Unicode data to Unicode 16.0.0

2025-03-18 Thread Jeremy Schneider
On Tue, 18 Mar 2025 08:53:56 -0700 Jeff Davis wrote: > What do you think of Tom's argument that waiting to update Unicode is > what creates the problem in the first place? > > "by then they might well have instances of the newly-assigned code > points in their database"[1] > > [1] > https://www

Re: Increase default maintenance_io_concurrency to 16

2025-03-18 Thread Tom Lane
Bruce Momjian writes: >>> https://www.postgresql.org/docs/current/runtime-config-query.html#RUNTIME-CONFIG-QUERY-CONSTANTS >>> >>> Random access to mechanical disk storage is normally much more expensive >>> than four times sequential access. However, a lower default is used >>> (4.0) because the

Re: pgsql: aio: Infrastructure for io_method=worker

2025-03-18 Thread Tom Lane
Andres Freund writes: > To allow the number of IO workers to be increased without a restart, we need > to reserve PGPROC entries for the workers unconditionally. This has been > judged to be worth the cost. If it turns out to be problematic, we can > introduce a PGC_POSTMASTER GUC to control the m

Re: Increase default maintenance_io_concurrency to 16

2025-03-18 Thread Andres Freund
Hi, On 2025-03-18 16:22:45 -0400, Bruce Momjian wrote: > On Tue, Mar 18, 2025 at 04:13:26PM -0400, Andres Freund wrote: > > Hi, > > > > On 2025-03-18 16:08:22 -0400, Bruce Momjian wrote: > > > This commit makes our default random_page_cost = 4 out of line with > > > these new settings (assumes mo

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-18 Thread Amit Kapila
On Wed, Mar 19, 2025 at 2:11 AM David G. Johnston wrote: > > On Tue, Mar 18, 2025 at 4:47 AM Amit Kapila wrote: >> >> I don't understand --dry-run part of conversation here. As per >> existing code (or with the patch), we seem to be already printing the >> publications to be dropped in dry-run mo

Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning

2025-03-18 Thread Ashutosh Bapat
Hi Amit, On Tue, Mar 18, 2025 at 4:02 PM Amit Langote wrote: > > I ran a couple of benchmarks of my own as follows. > > cat benchmark_amit.sh > for p in 0 16 32 64 128 256 512 1024; do > echo -ne "$p\t"; > pgbench -i --partitions=$p > /dev/null 2>&1 > pgbench -n -T 30 -f /tmp/query.sql | g

Re: making EXPLAIN extensible

2025-03-18 Thread Robert Haas
On Tue, Mar 18, 2025 at 2:40 PM Tom Lane wrote: > FWIW, I am fairly strongly against that. Every extension author is > going to feel that their information is so important it should come > first. Other people might have a different opinion about that, and > in any case they can't all be first.

Re: like pg_shmem_allocations, but fine-grained for DSM registry ?

2025-03-18 Thread Sungwoo Chang
Hi, I made a patch that adds Detach and Destroy functions for dsm registry. https://commitfest.postgresql.org/patch/5654 I was thinking, given the forementioned patch is reviewed and merged, it would be nice to add SQL command that allows manually detach or destroy the dsm registry entry. On th

Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.

2025-03-18 Thread Shubham Khanna
On Wed, Mar 19, 2025 at 11:17 AM vignesh C wrote: > > On Tue, 18 Mar 2025 at 17:34, Shubham Khanna > wrote: > > > > I have added an additional test case to 040_pg_createsubscriber.pl as > > suggested. > > > > The attached patch contains the suggested changes. > > How about we change the below co

Add missing PQclear for StreamLogicalLog function

2025-03-18 Thread Steven Niu
Hi, hackers, During browsing the code, I found one missing PQclear in function StreamLogicalLog(). It's a very small problem as it only happens in error condition. However since another similar patch was accepted, maybe we should also fix this one. https://www.postgresql.org/message-id/flat/3

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-18 Thread vignesh C
On Wed, 19 Mar 2025 at 10:39, Shubham Khanna wrote: > > On Tue, Mar 18, 2025 at 5:17 PM Amit Kapila wrote: > > > > On Tue, Mar 18, 2025 at 4:01 PM Shubham Khanna > > wrote: > > > > > > On Tue, Mar 18, 2025 at 12:07 PM David G. Johnston > > > wrote: > > > > > > > > > > > It would be good if we c

Re: Non-text mode for pg_dumpall

2025-03-18 Thread Mahendra Singh Thalor
On Wed, 12 Mar 2025 at 21:18, Andrew Dunstan wrote: > > > On 2025-03-12 We 3:03 AM, jian he wrote: > > On Wed, Mar 12, 2025 at 1:06 AM Álvaro Herrera > > wrote: > >> Hello, > >> > >> On 2025-Mar-11, Mahendra Singh Thalor wrote: > >> > >>> In map.dat file, I tried to fix this issue by adding numb

RE: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-18 Thread Hayato Kuroda (Fujitsu)
Dear Shubham, One comment for the API. Currently the patch introduces new option '--remove', and the short term is '-r'. My suggestion is to use '-R' instead. Background == IIUC, we've planned to put outut-logs in some files on the directory [1]. This follows what pg_ugprade does. In pg

Re: add function argument name to substring and substr

2025-03-18 Thread jian he
hi. new patch attached. now \df substring looks like: List of functions Schema | Name| Result data type | Argument data types| Type +---+--+---

Re: pgsql: Avoid invalidating all RelationSyncCache entries on publication

2025-03-18 Thread Robert Haas
On Tue, Mar 18, 2025 at 2:30 AM Amit Kapila wrote: > I think I should have mentioned the future use and other improvements > of this work in the commit message. OK, thanks for the background. Yes, it would have been helpful to mention at least in general terms that it would unblock other optimiza

Re: ecdh support causes unnecessary roundtrips

2025-03-18 Thread Daniel Gustafsson
> On 18 Mar 2025, at 16:07, Andres Freund wrote: > On 2025-03-18 10:45:41 +0100, Daniel Gustafsson wrote: >> Thanks for doing that, I'll try to get this in during a break in todays >> conference. > > Thanks to both of you for fixing this! No worries, this has now been committed. Whether or not

Re: maintenance_work_mem = 64kB doesn't work for vacuum

2025-03-18 Thread Masahiko Sawada
On Mon, Mar 17, 2025 at 7:06 PM David Rowley wrote: > > On Tue, 18 Mar 2025 at 05:49, Masahiko Sawada wrote: > > I've attached the patch. I added the minimum regression tests for that. > > I think the change to vacuumlazy.c is ok. The new test you've added > creates a table called pvactst2 but th

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-18 Thread Thomas Munro
On Tue, Mar 18, 2025 at 4:08 AM Jacob Champion wrote: > 0001 will fix that. I think we should get that and 0002 in, ASAP. (And > the others.) All pushed (wasn't sure if Daniel was going to but once I got tangled up in all that kqueue stuff he probably quite reasonably assumed that I would :-)).

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-18 Thread Thomas Munro
On Wed, Mar 19, 2025 at 5:17 PM Tom Lane wrote: > fe-auth-oauth-curl.c:1392:49: error: data argument not used by format string > [-Werror,-Wformat-extra-args] > 1392 | actx_error(actx, "deleting kqueue timer: %m", > timeout); > | ~~

Add missing PQclear for StreamLogicalLog function

2025-03-18 Thread Steven Niu
Hi, hackers, During browsing the code, I found one missing PQclear in function StreamLogicalLog(). It's a very small problem as it only happens in error condition. However since another similar patch was accepted, maybe we should also fix this one. https://www.postgresql.org/message-id/flat/3

Re: Conflict detection for multiple_unique_conflicts in logical replication

2025-03-18 Thread Nisha Moond
On Mon, Mar 17, 2025 at 3:20 PM Amit Kapila wrote: > > On Thu, Mar 13, 2025 at 4:30 PM Nisha Moond wrote: > > > > Attached is the v4 patch (test case changes only). > > > > Comments: > = > 1. > + /* > + * Report an INSERT_EXISTS or UPDATE_EXISTS conflict when only one unique > + * constra

Re: like pg_shmem_allocations, but fine-grained for DSM registry ?

2025-03-18 Thread Florents Tselai
On Wed, Mar 19, 2025, 05:46 Sungwoo Chang wrote: > Hi, > > I made a patch that adds Detach and Destroy functions for dsm registry. > > https://commitfest.postgresql.org/patch/5654 > Yes, I've been following that thread. I find it useful too > I was thinking, given the forementioned patch is revi

Re: RFC: Additional Directory for Extensions

2025-03-18 Thread Peter Eisentraut
On 12.03.25 14:17, Matheus Alcantara wrote: There should be a simpler way into this. Maybe pg_available_extensions() should fill out the ExtensionControlFile structure itself, set ->control_dir with where it found it, then call directly to parse_extension_control_file(), and that should skip the

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-18 Thread Shubham Khanna
On Wed, Mar 19, 2025 at 12:09 PM vignesh C wrote: > > On Wed, 19 Mar 2025 at 10:39, Shubham Khanna > wrote: > > > > On Tue, Mar 18, 2025 at 5:17 PM Amit Kapila wrote: > > > > > > On Tue, Mar 18, 2025 at 4:01 PM Shubham Khanna > > > wrote: > > > > > > > > On Tue, Mar 18, 2025 at 12:07 PM David G

Re: Add Pipelining support in psql

2025-03-18 Thread Michael Paquier
On Tue, Mar 18, 2025 at 09:55:21AM +0100, Anthonin Bonnefoy wrote: > I've added additional tests when piping queries with ';': > - I've reused the same scenario with \sendpipeline: single query, > multiple queries, flushes, syncs, using COPY... > - Using ';' will replace the unnamed prepared statem

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-18 Thread Shubham Khanna
On Wed, Mar 19, 2025 at 9:06 AM Amit Kapila wrote: > > On Wed, Mar 19, 2025 at 2:11 AM David G. Johnston > wrote: > > > > On Tue, Mar 18, 2025 at 4:47 AM Amit Kapila wrote: > >> > >> I don't understand --dry-run part of conversation here. As per > >> existing code (or with the patch), we seem to

Re: Separate GUC for replication origins

2025-03-18 Thread Masahiko Sawada
On Mon, Mar 17, 2025 at 6:05 PM Euler Taveira wrote: > > On Mon, Mar 17, 2025, at 8:44 PM, Masahiko Sawada wrote: > > I would suggest putting the new max_active_replication_origins after > max_parallel_apply_workers_per_subscription as both > max_sync_workers_per_subscription and > max_parallel_ap

Re: Proposal - Allow extensions to set a Plan Identifier

2025-03-18 Thread Michael Paquier
On Thu, Feb 20, 2025 at 05:03:19PM -0600, Sami Imseih wrote: > v2-0001: > > This adds a planId to pg_stat_get_activity ( not pg_stat_activity ). > An extension > can offer its own view, similar to pg_stat_activity, which can include planId. > > Note that there are no documentation updates require

Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning

2025-03-18 Thread Ashutosh Bapat
On Wed, Mar 19, 2025 at 8:22 AM Amit Langote wrote: > > On Tue, Mar 18, 2025 at 8:48 PM Ashutosh Bapat > wrote: > > On Tue, Mar 18, 2025 at 4:02 PM Amit Langote > > wrote: > > > > > > I ran a couple of benchmarks of my own as follows. > > > > > > cat benchmark_amit.sh > > > for p in 0 16 32 64

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-18 Thread Shubham Khanna
On Tue, Mar 18, 2025 at 5:17 PM Amit Kapila wrote: > > On Tue, Mar 18, 2025 at 4:01 PM Shubham Khanna > wrote: > > > > On Tue, Mar 18, 2025 at 12:07 PM David G. Johnston > > wrote: > > > > > > > > It would be good if we could get this to play nicely with —dry-run; maybe > > > connecting to the

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-18 Thread Shubham Khanna
On Wed, Mar 19, 2025 at 2:11 AM David G. Johnston wrote: > > On Tue, Mar 18, 2025 at 4:47 AM Amit Kapila wrote: >> >> I don't understand --dry-run part of conversation here. As per >> existing code (or with the patch), we seem to be already printing the >> publications to be dropped in dry-run mo

Re: Add missing tab completion for VACUUM and ANALYZE with ONLY option

2025-03-18 Thread vignesh C
On Tue, 18 Mar 2025 at 20:43, Ilia Evdokimov wrote: > > > On 18.03.2025 17:57, Ilia Evdokimov wrote: > > Hi, > > > > Thank you for the patch. However, Is it ok if I can't tab 'ONLY' in > > VACUUM ANALYZE command? How about we handle it like in the attached patch? Apart from this, similar handling

Re: pgsql: aio: Infrastructure for io_method=worker

2025-03-18 Thread Tom Lane
Andres Freund writes: > On 2025-03-18 18:53:48 -0400, Tom Lane wrote: >> I wonder though if we ought to revert 38da05346 and/or 6d0154196 in view of >> that. > 38da05346 doesn't seem to have much value if it doesn't help us run the tests > by default - but it also doesn't really hurt. So, shrug,

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-18 Thread Tom Lane
Thomas Munro writes: > All pushed You may have noticed it already, but indri reports that this printf-like call isn't right: fe-auth-oauth-curl.c:1392:49: error: data argument not used by format string [-Werror,-Wformat-extra-args] 1392 | actx_error(actx, "deleting kqueue timer

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-18 Thread Tom Lane
BTW, I was pretty seriously disheartened just now to realize that this feature was implemented by making libpq depend on libcurl. I'd misread the relevant commit messages to say that libcurl was just being used as test infrastructure; but nope, it's a genuine build and runtime dependency. I wonder

<    1   2