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

2025-03-19 Thread Andres Freund
Hi, On 2025-03-19 08:28:44 -0400, Andrew Dunstan wrote: > On 2025-03-18 Tu 1:55 PM, Tom Lane wrote: > > > But at least I should get it set up here. I tried setting > > > PG_TEST_EXTRA=code-indent locally and running 'meson test' and I > > > didn't get a failure -- and 'git grep code-indent' return

Re: Vacuuming the free space map considered harmful?

2025-03-19 Thread Michael Banck
Hi, On Wed, Mar 19, 2025 at 09:53:37AM +0100, Christophe Pettus wrote: > We're tracking down an issue that we've seen in two separate > installations so far, which is that, at the very end of a vacuum, the > vacuum operation starts using *very* high levels of CPU and > (sometimes) I/O, often to th

Re: optimize file transfer in pg_upgrade

2025-03-19 Thread Nathan Bossart
On Tue, Mar 18, 2025 at 01:50:10PM -0400, Andres Freund wrote: > 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 r

Re: PATCH: warn about, and deprecate, clear text passwords

2025-03-19 Thread Bruce Momjian
On Wed, Mar 19, 2025 at 09:24:19AM -0400, Greg Sabino Mullane wrote: > I'm a little confused at some of the pushback - this patch is 100% backwards > compatible, addresses a specific requested concern by allowing a DBA to > disallow clear text passwords, and adds a warning to what is clearly a bad

Re: PATCH: warn about, and deprecate, clear text passwords

2025-03-19 Thread Greg Sabino Mullane
> > The user has no particular reason to care about the fact that the password > they just typed ended up in the log. That is a concern for > the DBA, not the user, and even if they care about the DBA's feelings, > they only get the warning after it's too late to do otherwise. Can't the same be s

Re: Vacuuming the free space map considered harmful?

2025-03-19 Thread Christophe Pettus
> On Mar 19, 2025, at 12:12, Álvaro Herrera wrote: > Assuming this analysis is correct, I agree that the FSM vacuuming should > also be throttled, as long as that can be done without blocking > concurrent operations (insertions) on the table. From an (admittedly somewhat naïve) look at the cod

Re: making EXPLAIN extensible

2025-03-19 Thread Robert Haas
On Tue, Mar 18, 2025 at 11:21 PM Sami Imseih wrote: > > > 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

Re: optimize file transfer in pg_upgrade

2025-03-19 Thread Nathan Bossart
On Tue, Mar 18, 2025 at 09:14:22PM -0500, Nathan Bossart wrote: > And here is a new version of the full patch set. I'm currently planning to commit this sometime early-ish next week. One notable loose end is the lack of a pg_upgrade test with a non-default tablespace, but that is an existing prob

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

2025-03-19 Thread Christoph Berg
Re: Michael Paquier > Fine by me as well to keep a dependency based on the fact that the > structure is rather complicated, but I'd rather document that as well > in parsenodes.h with a slightly fatter comment. What do you think? You are of course right, that one-line comment was just snakeoil :D

Re: Vacuuming the free space map considered harmful?

2025-03-19 Thread Christophe Pettus
> On Mar 19, 2025, at 15:12, Andres Freund wrote: > That can be checked with pg_relation_size(), e.g. > SELECT pg_relation_size('pg_class', 'fsm'); > nothing special required. Thanks!

Re: Memoize ANTI and SEMI JOIN inner

2025-03-19 Thread Andrei Lepikhov
On 6/3/2025 14:08, Andrei Lepikhov wrote: Hi, In case of NestLoop with parameterised inner semi-join for each outer tuple requires only a single tuple from its inner relation to produce a result. It seems that the same principle applies to an anti-join. This approach could effectively allow t

Re: pg_stat_statements and "IN" conditions

2025-03-19 Thread Dmitry Dolgov
> On Tue, Mar 18, 2025 at 02:54:18PM GMT, 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. Sure,

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

2025-03-19 Thread Zhijie Hou (Fujitsu)
On Wed, Mar 19, 2025 at 2:55 PM Shubham Khanna wrote: > > I have merged the changes and prepared the latest patch. The attached > patch contains the suggested changes. Thanks for updating the patch. Here are few comments: 1. pg_log_error("object type \"%s

Re: Using read_stream in index vacuum

2025-03-19 Thread Melanie Plageman
On Thu, Nov 28, 2024 at 10:29 AM Kirill Reshke wrote: > > 0001 Looks mature. Some comments: > 1) > >+# This ensures autovacuum do not run > >+$node->append_conf('postgresql.conf', 'autovacuum = off'); > The other option is to set `autovacuum = off `in relation DDL. I'm not > sure which option is b

Re: Snapshot related assert failure on skink

2025-03-19 Thread Heikki Linnakangas
On 19/03/2025 04:22, Tomas Vondra wrote: I kept stress-testing this, and while the frequency massively increased on PG18, I managed to reproduce this all the way back to PG14. I see ~100x more corefiles on PG18. That is not a proof the issue was introduced in PG14, maybe it's just the assert tha

Re: pg_stat_statements and "IN" conditions

2025-03-19 Thread Dmitry Dolgov
> On Tue, Mar 18, 2025 at 07:33:25PM GMT, Álvaro Herrera wrote: > > By the way, I'm still open to adding the 'powers' mechanism that was > discussed earlier and other simple additions on top of what's there now, > if you have some spare energy to spend on this. (For full disclosure: > the "powers"

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

2025-03-19 Thread Ilia Evdokimov
On 19.03.2025 12:55, vignesh C wrote: Looks good overall. However, after pressing Tab, ONLY appears in the completion list, but it doesn't autocomplete after typing the first letter. In which case you noticed this? Ah, I just tested it using these examples from the regression tests: CREATE

Re: optimize file transfer in pg_upgrade

2025-03-19 Thread Nathan Bossart
On Wed, Mar 19, 2025 at 02:32:01PM -0500, Nathan Bossart wrote: > In addition to testing with in-place tablespaces, we might also want to > teach the transfer modes test to do cross-version testing when possible. > In that case, we can test normal (non-in-place) tablespaces. However, that > would

Re: Doc: Fixup misplaced filelist.sgml entities and add some commentary

2025-03-19 Thread Marcos Pegoraro
Em qua., 19 de mar. de 2025 às 18:14, David G. Johnston < david.g.johns...@gmail.com> escreveu: > Having been in filelist.sgml a bit recently I've noticed that the original > alphabetical ordering of the entities therein hasn't been adhered to. > Partly, I suspect, because there is no guidance abo

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-03-19 Thread Tom Lane
Robert Haas writes: > On Wed, Mar 19, 2025 at 2:32 PM Tom Lane wrote: >> Perhaps if we implemented RESTRICT/CASCADE here, that would >> at least make it harder to fall into this trap? > I have always assumed that the reason DROP ROLE blah CASCADE is not > implemented is (1) it would have to casc

Re: AIO v2.5

2025-03-19 Thread Andres Freund
Hi, On 2025-03-19 14:25:30 -0700, Noah Misch wrote: > On Wed, Mar 12, 2025 at 01:06:03PM -0400, Andres Freund wrote: > > - Right now effective_io_concurrency cannot be set > 0 on Windows and other > > platforms that lack posix_fadvise. But with AIO we can read ahead without > > posix_fadvise()

Re: Make COPY format extendable: Extract COPY TO format implementations

2025-03-19 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Wed, 19 Mar 2025 17:49:49 -0700, "David G. Johnston" wrote: >> And could someone help (take over if possible) writing a >> document for this feature? I'm not good at writing a >> document in English... 0009

Re: Proposal: Progressive explain

2025-03-19 Thread Robert Haas
On Wed, Mar 19, 2025 at 1:47 PM Rafael Thofehrn Castro wrote: > Sending a new version as rebase was required. Reading this thread, it seems to me that there has been a good deal of discussion about things like the name of the feature and what the UI ought to be, but not much discussion of whether

Re: making EXPLAIN extensible

2025-03-19 Thread Andrei Lepikhov
On 19/3/2025 18:41, Sami Imseih wrote: On Wed, Mar 19, 2025 at 11:38 AM Sami Imseih wrote: ... as I made the hook signature match that of ParseExplainOptionList, so both pstate and the options list are now available to the hook. This version LGTM, except it's not pgindent-clean. ugh, sorry

Re: making EXPLAIN extensible

2025-03-19 Thread Sami Imseih
> Why do you think this hook is not redundant? what is it redundant with? > It would be better to add the parameter "type: EXPLAIN_ONLY | > ANALYZE_ONLY | BOTH" to the RegisterExtensionExplainOption() routine. > This value will be saved inside the ExplainExtensionOption structure and > processed b

Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2025-03-19 Thread Masahiko Sawada
On Wed, Mar 19, 2025 at 2:58 AM Peter Eisentraut wrote: > > On 21.02.25 20:39, Masahiko Sawada wrote: > I have one question about the 0001 patch; since we add > 'default_char_signedness' field to ControlFileData do we need to bump > PG_CONTROL_VERSION? We have comments about bumping

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-19 Thread Thomas Munro
On Thu, Mar 20, 2025 at 11:19 AM Tom Lane wrote: > Thomas Munro writes: > > It would increase the build dependencies, assuming a package > > maintainer wants to enable as many features as possible, but it would > > *not* increase the 'package requires' footprint, merely the 'package > > suggests'

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-19 Thread Thomas Munro
On Thu, Mar 20, 2025 at 11:02 AM Thomas Munro wrote: > On Thu, Mar 20, 2025 at 10:04 AM Tom Lane wrote: > > Thomas Munro writes: > > > How feasible/fragile/weird would it be to dlopen() it on demand? . o O { There may also be security reasons to reject the idea, would need to look into that...

Re: md.c vs elog.c vs smgrreleaseall() in barrier

2025-03-19 Thread Andres Freund
Hi, On 2025-03-19 12:55:53 -0700, Noah Misch wrote: > On Mon, Mar 17, 2025 at 07:52:02PM -0400, Andres Freund wrote: > > Here's a proposed patch for this. It turns out that the bug might already be > > reachable, even without defining FDDEBUG. There's a debug ereport() in > > register_dirty_segmen

Re: Proposal: Progressive explain

2025-03-19 Thread Rafael Thofehrn Castro
Hi Robert, Thanks for sparing part of your precious time to look at the patch. I acknowledge it is a very complex one. Since you're going to take another look, providing some preliminary comments related to some of the implementation concerns. > I don't understand how this would be safe against i

Re: md.c vs elog.c vs smgrreleaseall() in barrier

2025-03-19 Thread Andres Freund
Hi, On 2025-03-19 18:45:20 -0400, Andres Freund wrote: > On 2025-03-19 12:55:53 -0700, Noah Misch wrote: > > On Mon, Mar 17, 2025 at 07:52:02PM -0400, Andres Freund wrote: > > > @@ -471,6 +522,8 @@ smgrdounlinkall(SMgrRelation *rels, int nrels, bool > > > isRedo) > > > if (nrels == 0) > > >

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-19 Thread Bruce Momjian
On Thu, Mar 20, 2025 at 11:28:50AM +1300, Thomas Munro wrote: > On Thu, Mar 20, 2025 at 11:19 AM Tom Lane wrote: > > Thomas Munro writes: > > > It would increase the build dependencies, assuming a package > > > maintainer wants to enable as many features as possible, but it would > > > *not* incr

Re: Update Unicode data to Unicode 16.0.0

2025-03-19 Thread Jeff Davis
On Wed, 2025-03-19 at 14:33 -0400, Robert Haas wrote: > I strongly believe users want to control what happens, not have > the system try to fix it for them automatically without their > knowledge. Do you have a sketch of what the ideal Unicode version management experience might look like? Very h

Re: Make COPY format extendable: Extract COPY TO format implementations

2025-03-19 Thread David G. Johnston
On Tue, Mar 18, 2025 at 7:56 PM Sutou Kouhei wrote: > And could someone help (take over if possible) writing a > document for this feature? I'm not good at writing a > document in English... 0009 in the attached v37 patch set > has a draft of it. It's based on existing documents in > doc/src/sgml

Re: AIO v2.5

2025-03-19 Thread Noah Misch
On Wed, Mar 19, 2025 at 06:17:37PM -0400, Andres Freund wrote: > On 2025-03-19 14:25:30 -0700, Noah Misch wrote: > > commit 55b454d wrote: > > > aio: Infrastructure for io_method=worker > > > > > + /* Try to launch one. */ > > > + child = StartChildProcess(B_IO_WORKER); > > > +

Re: Doc: Fixup misplaced filelist.sgml entities and add some commentary

2025-03-19 Thread David G. Johnston
On Wed, Mar 19, 2025 at 2:31 PM Marcos Pegoraro wrote: > Em qua., 19 de mar. de 2025 às 18:14, David G. Johnston < > david.g.johns...@gmail.com> escreveu: > >> Having been in filelist.sgml a bit recently I've noticed that the >> original alphabetical ordering of the entities therein hasn't been a

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-19 Thread Thomas Munro
On Thu, Mar 20, 2025 at 10:04 AM Tom Lane wrote: > Thomas Munro writes: > > How feasible/fragile/weird would it be to dlopen() it on demand? > > FWIW, that would not really move the needle one bit so far as > my worries are concerned. What I'm unhappy about is the very > sizable expansion of our

Re: Statistics Import and Export

2025-03-19 Thread Jeff Davis
On Sat, 2025-03-15 at 21:37 -0400, Corey Huinker wrote: > > 0001 - no changes, but the longer I go the more I'm certain this is > > something we want to do. This replaces regclassin with custom lookups of the namespace and relname, but misses some of the complexities that regclassin is handling. F

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-19 Thread Tom Lane
Thomas Munro writes: > It would increase the build dependencies, assuming a package > maintainer wants to enable as many features as possible, but it would > *not* increase the 'package requires' footprint, merely the 'package > suggests' footprint (as Debian calls it), and it's up to the user > w

Re: Statistics Import and Export

2025-03-19 Thread Corey Huinker
> > This replaces regclassin with custom lookups of the namespace and > relname, but misses some of the complexities that regclassin is > handling. For instance, it calls RangeVarGetRelid(), which calls > LookupExplicitNamespace(), which handles temp tables and > InvokeNamespaceSearchHook(). > > At

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-19 Thread Bruce Momjian
On Wed, Mar 19, 2025 at 02:38:08PM +0100, Daniel Gustafsson wrote: > > On 19 Mar 2025, at 05:57, Tom Lane wrote: > > > > 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 messag

Re: md.c vs elog.c vs smgrreleaseall() in barrier

2025-03-19 Thread Noah Misch
On Wed, Mar 19, 2025 at 06:45:20PM -0400, Andres Freund wrote: > On 2025-03-19 12:55:53 -0700, Noah Misch wrote: > > On Mon, Mar 17, 2025 at 07:52:02PM -0400, Andres Freund wrote: > > > @@ -362,12 +397,16 @@ smgrreleaseall(void) > > > if (SMgrRelationHash == NULL) > > > return; > > >

Re: optimize file transfer in pg_upgrade

2025-03-19 Thread Nathan Bossart
On Wed, Mar 19, 2025 at 04:28:23PM -0500, Nathan Bossart wrote: > On Wed, Mar 19, 2025 at 02:32:01PM -0500, Nathan Bossart wrote: >> In addition to testing with in-place tablespaces, we might also want to >> teach the transfer modes test to do cross-version testing when possible. >> In that case, w

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-19 Thread Andres Freund
Hi, On 2025-03-19 17:34:18 +1300, Thomas Munro wrote: > 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", >

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

2025-03-19 Thread vignesh C
On Thu, 20 Mar 2025 at 09:06, Shubham Khanna wrote: > > The attached patch contains the suggested changes. Couple of minor comments: 1) The second and third line comments can be in same line: +# Create user-defined publications, wait for streaming replication to sync them +# to the standby, then

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

2025-03-19 Thread Shubham Khanna
On Thu, Mar 20, 2025 at 9:37 AM vignesh C wrote: > > On Thu, 20 Mar 2025 at 09:06, Shubham Khanna > wrote: > > > > The attached patch contains the suggested changes. > > Couple of minor comments: > 1) The second and third line comments can be in same line: > +# Create user-defined publications, w

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

2025-03-19 Thread Shubham Khanna
On Wed, Mar 19, 2025 at 2:29 PM vignesh C wrote: > > On Wed, 19 Mar 2025 at 11:44, Shubham Khanna > wrote: > > > > > > I agree with you on this; switching to a single query with safe_psql() > > will indeed simplify the test and make the verification logic cleaner. > > > > The attached patch conta

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-03-19 Thread Robert Haas
On Thu, Mar 13, 2025 at 1:44 AM Ashutosh Sharma wrote: > On Wed, Mar 12, 2025 at 9:06 PM Nathan Bossart > wrote: > > I think this approach has other problems. For example, even if a role has > > admin directly on the dropped role, we'll block DROP ROLE if it also has > > admin indirectly: > > >

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

2025-03-19 Thread Shubham Khanna
On Wed, Mar 19, 2025 at 3:15 PM vignesh C wrote: > > On Wed, 19 Mar 2025 at 14:32, Shubham Khanna > wrote: > > > > > > Changed -r to -R based on the shared analysis to avoid conflict with > > the --retain option used in pg_upgrade and to maintain consistency > > across tools. > > > > The attached

Re: support virtual generated column not null constraint

2025-03-19 Thread jian he
On Thu, Mar 20, 2025 at 12:19 AM Álvaro Herrera wrote: > > Other comments: > > * The block in ATRewriteTable that creates a resultRelInfo for > ExecRelCheckGenVirtualNotNull needs an explanation. > I tried my best. here are the comments above the line ``if (notnull_virtual_attrs != NIL)``

Re: Memoize ANTI and SEMI JOIN inner

2025-03-19 Thread David Rowley
On Thu, 20 Mar 2025 at 06:16, Andrei Lepikhov wrote: > How can we be sure that semi or anti-join needs only one tuple? I think > it would be enough to control the absence of join clauses and filters in > the join. Unfortunately, we only have such a guarantee in the plan > creation stage (maybe eve

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

2025-03-19 Thread Sungwoo Chang
Well, by exposing detach/destory functions at the query level, users will be able to manage dangling shmem in dsm registry if for some reason you cannot access the segment anymore. Otherwise, if a shmem segment becomes orphaned, the only thing you can do to clear the shmem resource is restarting th

Re: Fix 035_standby_logical_decoding.pl race conditions

2025-03-19 Thread Bertrand Drouvot
Hi, On Wed, Mar 19, 2025 at 12:12:19PM +0530, Amit Kapila wrote: > On Mon, Feb 10, 2025 at 8:12 PM Bertrand Drouvot > wrote: > > > > Please find attached a patch to $SUBJECT. > > > > In rare circumstances (and on slow machines) it is possible that a > > xl_running_xacts > > is emitted and that t

Re: Vacuuming the free space map considered harmful?

2025-03-19 Thread Álvaro Herrera
On 2025-Mar-19, Christophe Pettus wrote: > Everything seems to point to the vacuum free space map operation, > since it would have a lot of work to do in that particular situation, > it happens at just the right place in the vacuum cycle, and its > resource consumption is not throttled the way the

Re: [PATCH] SVE popcount support

2025-03-19 Thread chiranmoy.bhattacha...@fujitsu.com
On Wed, Mar 13, 2025 at 12:02:07AM +, nathandboss...@gmail.com wrote: > Those are nice results. I'm a little worried about the Neon implementation > for smaller inputs since it uses a per-byte loop for the remaining bytes, > though. If we can ensure there's no regression there, I think this p

Re: Conflict detection for multiple_unique_conflicts in logical replication

2025-03-19 Thread Amit Kapila
On Wed, Mar 19, 2025 at 11:11 AM Nisha Moond wrote: > > Please find the attached v5-0001 patch without the stats part. > Review: === 1. + foreach_ptr(TupleTableSlot, slot, conflictSlots) + { + indexoid = lfirst_oid(list_nth_cell(conflictIndexes, conflictNum)); + + Assert(!OidIsValid(indexoid)

Re: Test to dump and restore objects left behind by regression

2025-03-19 Thread Ashutosh Bapat
On Thu, Mar 13, 2025 at 6:10 PM Ashutosh Bapat wrote: > > > > I think the fix is to explicitly pass --lc-monetary to the old cluster > > and the restored cluster. 003 patch in the attached patch set does > > that. Please check if it fixes the issue for you. > > > > Additionally we should check tha

Re: RFC: Additional Directory for Extensions

2025-03-19 Thread Gabriele Bartolini
Thanks everyone for making this happen. Ciao, Gabriele On Wed, 19 Mar 2025 at 07:42, Peter Eisentraut wrote: > 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

Re: Proposal - Allow extensions to set a Plan Identifier

2025-03-19 Thread Ilia Evdokimov
Hi, Thank you for the patches. They're very important for many extensions. I've debugged them using simple extensions pg_stat_statements and auto_explain, specifically checking cases involving PlannedStmt and pg_stat_get_activity - , and haven't encountered any issues so far. However, I have

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

2025-03-19 Thread vignesh C
On Wed, 19 Mar 2025 at 14:46, Ilia Evdokimov wrote: > > Looks good overall. However, after pressing Tab, ONLY appears in the > completion list, but it doesn't autocomplete after typing the first letter. In which case you noticed this? Regards, Vignesh

Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2025-03-19 Thread Peter Eisentraut
On 21.02.25 20:39, Masahiko Sawada wrote: I have one question about the 0001 patch; since we add 'default_char_signedness' field to ControlFileData do we need to bump PG_CONTROL_VERSION? We have comments about bumping PG_CONTROL_VERSION when changing CheckPoint struct or DBState enum so it seems

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

2025-03-19 Thread vignesh C
On Wed, 19 Mar 2025 at 14:32, Shubham Khanna wrote: > > > Changed -r to -R based on the shared analysis to avoid conflict with > the --retain option used in pg_upgrade and to maintain consistency > across tools. > > The attached patch contains the suggested change. Few suggestions: 1) I felt the

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

2025-03-19 Thread vignesh C
On Wed, 19 Mar 2025 at 13:27, Ilia Evdokimov wrote: > > It would be nice if this works with VACUUM VERBOSE ANALYZE ONLY table; Thanks for the comment, here is an updated v3 version with the change for the same. Regards, Vignesh v3-0001-psql-Tab-completion-for-VACUUM-and-ANALYZE-.-ONLY.patch De

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

2025-03-19 Thread Shubham Khanna
On Wed, Mar 19, 2025 at 12:44 PM Zhijie Hou (Fujitsu) wrote: > > On Wed, Mar 19, 2025 at 2:55 PM Shubham Khanna wrote: > > > > I have merged the changes and prepared the latest patch. The attached > > patch contains the suggested changes. > > Thanks for updating the patch. Here are few comments: >

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

2025-03-19 Thread Amit Kapila
On Wed, Mar 19, 2025 at 12:29 PM Hayato Kuroda (Fujitsu) wrote: > > 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 o

Vacuuming the free space map considered harmful?

2025-03-19 Thread Christophe Pettus
We're tracking down an issue that we've seen in two separate installations so far, which is that, at the very end of a vacuum, the vacuum operation starts using *very* high levels of CPU and (sometimes) I/O, often to the point that the system becomes unable to service other requests. We've seen

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

2025-03-19 Thread vignesh C
On Wed, 19 Mar 2025 at 11:44, Shubham Khanna wrote: > > > I agree with you on this; switching to a single query with safe_psql() > will indeed simplify the test and make the verification logic cleaner. > > The attached patch contains the suggested change. Few comments: 1) I felt we are not doing

Re: Draft for basic NUMA observability

2025-03-19 Thread Jakub Wartak
On Tue, Mar 18, 2025 at 3:29 PM Bertrand Drouvot wrote: Hi! v15 attached, rebased, CI-tested, all fixed incorporated. > > I've adjusted it all and settled on "numa_node_id" column name. > [...] > I think that we can get rid of the "numa_" stuff in column(s) name as > the column(s) are part of "n

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

2025-03-19 Thread Ilia Evdokimov
On 19.03.2025 08:12, vignesh C wrote: How about we handle it like in the attached patch? Apart from this, similar handling was required for "ANALYZE VERBOSE" also. Looks good overall. However, after pressing Tab, ONLY appears in the completion list, but it doesn't autocomplete after typing t

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

2025-03-19 Thread Xuneng Zhou
Hi, Moving the other two provides a more complete view of the settings. For newcomers(like me) to the codebase, seeing all three related values in one place helps avoid a narrow view of the settings. But I am not sure that I understand the cons of this well. Bertrand Drouvot 于2025年3月19日周三 13:50写

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

2025-03-19 Thread Ilia Evdokimov
On 19.03.2025 08:12, vignesh C wrote: How about we handle it like in the attached patch? Apart from this, similar handling was required for "ANALYZE VERBOSE" also. Regards, Vignesh It would be nice if this works with VACUUM VERBOSE ANALYZE ONLY table; -- Best regards, Ilia Evdokimov, Tantor

Re: Update Unicode data to Unicode 16.0.0

2025-03-19 Thread Robert Haas
On Wed, Mar 19, 2025 at 1:25 AM Jeremy Schneider wrote: > Maybe Postgres can be the first database to always ship support for the > latest Unicode with each major version Shipping the latest Unicode with our latest major version is existing policy, as I understand it. I don't think we're breaking

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

2025-03-19 Thread Robert Haas
On Tue, Mar 18, 2025 at 4:38 PM Tom Lane wrote: > On my machine, that took right about 2 minutes for a long time; > lately it's crept up to about 2:15 which is already annoying me. I'm constantly amazed by how well-optimized you and Andres are around this stuff and how little delay it takes to an

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-19 Thread Bruce Momjian
On Wed, Mar 19, 2025 at 12:57:29AM -0400, Tom Lane wrote: > * Given libcurl's very squishy portfolio: > > libcurl is a free and easy-to-use client-side URL transfer library, > supporting > FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, > IMAP, > SMTP, POP3 and RT

Re: race condition in pg_class

2025-03-19 Thread Andres Freund
Hi, On 2025-03-18 12:17:41 -0700, Noah Misch wrote: > On Tue, Mar 18, 2025 at 03:03:52PM -0400, Andres Freund wrote: > > Subject: [PATCH v1] meson: Flush stdout in testwrap > > > > Otherwise the progress won't reliably be displayed during a test. > > --- > > src/tools/testwrap | 1 + > > 1 file

Re: Add Pipelining support in psql

2025-03-19 Thread Daniel Verite
Michael Paquier wrote: > Perhaps an \extended command that behaves outside a pipeline makes > sense to force the use of queries without parameters to use the > extended mode, but I cannot get much excited about the concept knowing > all the meta-commands we have now (not talking about the

Re: Vacuuming the free space map considered harmful?

2025-03-19 Thread Melanie Plageman
On Wed, Mar 19, 2025 at 4:54 AM Christophe Pettus wrote: > > Everything seems to point to the vacuum free space map operation, since it > would have a lot of work to do in that particular situation, it happens at > just the right place in the vacuum cycle, and its resource consumption is not >

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-19 Thread Daniel Gustafsson
> On 19 Mar 2025, at 05:57, Tom Lane wrote: > > 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

Re: Snapshot related assert failure on skink

2025-03-19 Thread Tomas Vondra
On 3/19/25 08:17, Heikki Linnakangas wrote: > On 19/03/2025 04:22, Tomas Vondra wrote: >> I kept stress-testing this, and while the frequency massively increased >> on PG18, I managed to reproduce this all the way back to PG14. I see >> ~100x more corefiles on PG18. >> >> That is not a proof the is

Re: Disabling vacuum truncate for autovacuum

2025-03-19 Thread Nathan Bossart
On Wed, Mar 19, 2025 at 10:40:31AM -0500, Nathan Bossart wrote: > On Thu, Mar 20, 2025 at 12:34:59AM +0900, Fujii Masao wrote: >> +# - Default Behavior - >> + >> +#vacuum_truncate = on # enable truncation after vacuum >> >> Since there's no existing GUC category that fits to

Re: support virtual generated column not null constraint

2025-03-19 Thread Álvaro Herrera
On 2025-Mar-13, jian he wrote: > hi. > > new patch attached. > > 0001 for virtual generated columns not null. > minor change to fix the compiler warning. I gave a look at 0001, and I propose some fixes. 0001 is just a typo in an error message. 0002 is pgindent. Then 0003 contain some more in

Re: making EXPLAIN extensible

2025-03-19 Thread Sami Imseih
> On Wed, Mar 19, 2025 at 11:38 AM Sami Imseih wrote: > > ... as I made the hook signature match that of > > ParseExplainOptionList, so both pstate and the options list > > are now available to the hook. > > This version LGTM, except it's not pgindent-clean. ugh, sorry about that. ran it for both

Re: RFC: Additional Directory for Extensions

2025-03-19 Thread David E. Wheeler
On Mar 19, 2025, at 02:42, Peter Eisentraut wrote: > Committed that, thanks. 🎉 I’ve been meaning to test the patch again, so here goes. First thing I notice is that prefix= uses the magic to insert “postgresql” into the path if it’s not already there: ``` console ❯ make PG_CONFIG=~/dev/c/pos

Re: AIO v2.5

2025-03-19 Thread Melanie Plageman
On Tue, Mar 18, 2025 at 4:12 PM Andres Freund wrote: > > Attached is v2.10, I noticed a few comments could be improved in 0011: bufmgr: Use AIO in StartReadBuffers() In WaitReadBuffers(), this comment is incomplete: /* -* Skip this block if someone else has already completed it

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-03-19 Thread David G. Johnston
On Wed, Mar 19, 2025 at 10:28 AM Robert Haas wrote: > I in general dislike throwing up barriers that prevent objects from > being dropped. As a user, I find such rules frustrating, especially if > I'm still allowed to accomplish the same drop indirectly by some > series of commands (e.g. REVOKE f

Re: Proposal: Progressive explain

2025-03-19 Thread Rafael Thofehrn Castro
Sending a new version as rebase was required. Rafael. v10-0001-Proposal-for-progressive-explains.patch Description: Binary data

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-03-19 Thread Tom Lane
Robert Haas writes: > if I say I want to DROP ROLE b, I'm going to have to first REVOKE c > FROM b -- there is no real other alternative. So why not make that > happen automatically? When I say I want to DROP something, I'm > serious: I really want it gone. For privileges on ordinary objects, we

Re: pg_recvlogical requires -d but not described on the documentation

2025-03-19 Thread Fujii Masao
On 2025/03/19 11:32, Hayato Kuroda (Fujitsu) wrote: Dear Fujii-san, It looks like commit 0c013e08cfb introduced a bug that causes "pg_recvlogical --drop-slot" without --dbname to check whether it's connected to a specific database and fail if it's not. This commit was added before 9.5, whil

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-03-19 Thread Robert Haas
On Wed, Mar 19, 2025 at 1:55 PM Tom Lane wrote: > That being the case, I'm against imposing restrictions on DROP ROLE > because of the properties of particular role grants. If you get > into a situation where you need a superuser's help to undo something, > well hopefully you learned better and w

Re: making EXPLAIN extensible

2025-03-19 Thread Robert Haas
On Wed, Mar 19, 2025 at 1:41 PM Sami Imseih wrote: > ugh, sorry about that. ran it for both modified files and it found one > indentation correction from v2. Yeah, that's the one I noticed. I think this should be uncontroversial but I'll give it a day or two in case anyone wants to complain. --

Re: AIO v2.5

2025-03-19 Thread Melanie Plageman
On Tue, Mar 18, 2025 at 4:12 PM Andres Freund wrote: > > Attached is v2.10 This is a review of 0002: bufmgr: Improve stats when buffer is read in concurrently In the commit message, it might be worth distinguishing that pg_stat_io and vacuum didn't double count reads, they under-counted hits. p

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

2025-03-19 Thread David Rowley
On Wed, 19 Mar 2025 at 23:22, Ilia Evdokimov wrote: > Everything seems fine with the ANALYZE command autocompletion. Regarding > VACUUM, I'm not entirely convinced we should provide autocompletion in every > case. I'd prefer to keep the behavior from the v3 patch because the original > intentio

Re: Show WAL write and fsync stats in pg_stat_io

2025-03-19 Thread Ranier Vilela
Em ter., 18 de mar. de 2025 às 20:34, Michael Paquier escreveu: > 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

Re: Add time spent in posix_fadvise() in I/O read time ?

2025-03-19 Thread Frédéric Yhuel
On 3/14/25 09:43, Frédéric Yhuel wrote: One thing I've noticed is that posix_fadvise(,,POSIX_FADV_WILLNEED) isn't always non-blocking on Linux. As Ted Ts'o explains in this old thread[1], it blocks when the request queue fills up. When posix_fadvise() blocks, it doesn't seem to be completel

Re: Add missing PQclear for StreamLogicalLog function

2025-03-19 Thread Daniel Gustafsson
> On 19 Mar 2025, at 06:38, Steven Niu wrote: > 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. Than

Re: RFC: Additional Directory for Extensions

2025-03-19 Thread Christoph Berg
Re: Peter Eisentraut > Committed that, thanks. Awesome, thanks! It works perfectly for the Debian "test extension packages at build time" use case, replacing our old extension_destdir patch. PKGARGS="--pgoption extension_control_path=$PWD/debian/$PACKAGE/usr/share/postgresql/$v/extension:\$syst

Re: Using read_stream in index vacuum

2025-03-19 Thread Andrey Borodin
> On 18 Mar 2025, at 23:21, Melanie Plageman wrote: > > I actually think you could do the test with one injection point and > just wait on it twice I was not sure we can safely wake up on injection point and stop and the same point on next iteration. But, apparently, it is safe, due to wait_

Re: doc patch: wrong descriptions for dropping replication slots

2025-03-19 Thread Fujii Masao
On 2025/03/19 11:07, Hayato Kuroda (Fujitsu) wrote: 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 descrip

Re: optimize file transfer in pg_upgrade

2025-03-19 Thread Andres Freund
Hi, On 2025-03-19 12:28:33 -0400, Tom Lane wrote: > Nathan Bossart writes: > > I'm currently planning to commit this sometime early-ish next week. One > > notable loose end is the lack of a pg_upgrade test with a non-default > > tablespace, but that is an existing problem that IMHO is best handl

Re: dblink: Add SCRAM pass-through authentication

2025-03-19 Thread Jacob Champion
On Tue, Mar 18, 2025 at 12:32 PM Peter Eisentraut wrote: > Yeah, I think option (2) is enough for now. If someone wants to enable > the kinds of things you describe, they can always come back and > implement option (1) later. Sounds good to me. -- Notes on v8: - The following documentation pi

  1   2   >