Re: add function argument names to regex* functions.

2024-05-15 Thread David G. Johnston
On Wed, May 15, 2024 at 1:19 PM Robert Haas wrote: > > So my point was: to me, N is more self-documenting than replace_at, > and less self-documenting than count or occurrence. > > If your mileage varies on that point, so be it! > > Maybe just "match" instead of "replace_match". Reading this it

Re: add function argument names to regex* functions.

2024-05-15 Thread Chapman Flack
On 05/15/24 15:31, Robert Haas wrote: > On Wed, May 15, 2024 at 3:23 PM Chapman Flack wrote: >> What would be wrong with [occurrence], for consistency's sake? > > It was proposed and rejected upthread, but that's not to say that I > necessarily endorse the reasons given. Apologies for not having

Re: Why does pgindent's README say to download typedefs.list from the buildfarm?

2024-05-15 Thread Nathan Bossart
On Wed, May 15, 2024 at 04:07:18PM -0400, Robert Haas wrote: > On Wed, May 15, 2024 at 3:30 PM Nathan Bossart > wrote: >> This is much cleaner, thanks. The only thing that stands out to me is that >> the "once per release cycle" section should probably say to do an indent >> run after downloadin

Re: add function argument names to regex* functions.

2024-05-15 Thread Robert Haas
On Wed, May 15, 2024 at 4:25 PM David G. Johnston wrote: > Maybe just "match" instead of "replace_match". Well, this is just turning into a bikeshedding exercise at this point. We can generate names for this parameter all day long, but a bunch of names none of which gets more than one vote is not

Re: Why does pgindent's README say to download typedefs.list from the buildfarm?

2024-05-15 Thread Tom Lane
Nathan Bossart writes: > On Wed, May 15, 2024 at 04:07:18PM -0400, Robert Haas wrote: >> How's this? > I compared this with my v1, and the only bit of information there that I > see missing in v3 is that validation step 4 only applies in the > once-per-cycle run (or if you forget to pgindent befo

Re: Why does pgindent's README say to download typedefs.list from the buildfarm?

2024-05-15 Thread Robert Haas
On Wed, May 15, 2024 at 4:50 PM Tom Lane wrote: > At this point my OCD got the better of me and I did a little > additional wordsmithing. How about the attached? No objections here. -- Robert Haas EDB: http://www.enterprisedb.com

Re: Why does pgindent's README say to download typedefs.list from the buildfarm?

2024-05-15 Thread Nathan Bossart
On Wed, May 15, 2024 at 04:52:19PM -0400, Robert Haas wrote: > On Wed, May 15, 2024 at 4:50 PM Tom Lane wrote: >> At this point my OCD got the better of me and I did a little >> additional wordsmithing. How about the attached? > > No objections here. +1 -- Nathan Bossart Amazon Web Services:

Re: Fix PGresult leak in pg_dump during binary upgrade

2024-05-15 Thread Daniel Gustafsson
> On 15 May 2024, at 20:46, Tom Lane wrote: > > Daniel Gustafsson writes: >> While looking at pg_dump performance today I noticed that pg_dump fails to >> clear query results in binary_upgrade_set_pg_class_oids during binary upgrade >> mode. 9a974cbcba00 moved the query to the outer block, but

Re: recovery modules

2024-05-15 Thread Nathan Bossart
rebased -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 046d6e4b13d3a6b15df1245f3154969f7553594d Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 15 Feb 2023 14:28:53 -0800 Subject: [PATCH v22 1/5] introduce routine for checking mutually exclusive string GUCs --- s

Re: Adding the extension name to EData / log_line_prefix

2024-05-15 Thread Andres Freund
Hi, On 2024-05-15 13:45:30 -0400, Tom Lane wrote: > There is one advantage over my suggestion of changing PG_MODULE_MAGIC: > if we tell people to write > >PG_MODULE_MAGIC; >#undef TEXTDOMAIN >#define TEXTDOMAIN PG_TEXTDOMAIN("hstore") > > then that's 100% backwards compatible and the

Re: Adding the extension name to EData / log_line_prefix

2024-05-15 Thread Tom Lane
Andres Freund writes: > What portability issues do you forsee? We already look up the same symbol in > all the shared libraries ("Pg_magic_func"), so we know that we can deal with > duplicate function names. Are you thinking that somehow we'd end up with > symbol interposition or something? No, i

Re: Why is citext/regress failing on hamerkop?

2024-05-15 Thread Thomas Munro
On Wed, May 15, 2024 at 6:00 PM Alexander Lakhin wrote: > 15.05.2024 01:26, Thomas Munro wrote: > > OK, so we know what the problem is here. Here is the simplest > > solution I know of for that problem. I have proposed this in the past > > and received negative feedback because it's a really gro

Re: Introduce new multi insert Table AM and improve performance of various SQL commands with it for Heap AM

2024-05-15 Thread Andres Freund
Hi, On 2024-05-15 11:14:14 +0200, Alvaro Herrera wrote: > On 2024-May-15, Bharath Rupireddy wrote: > > > It looks like with the use of the new multi insert table access method > > (TAM) for COPY (v20-0005), pgbench regressed about 35% [1]. > > Where does this acronym "TAM" comes from for "table

Re: Fix src/test/subscription/t/029_on_error.pl test when wal_debug is enabled

2024-05-15 Thread Michael Paquier
On Wed, May 15, 2024 at 05:58:18PM +0530, Amit Kapila wrote: > I guess it could be more work if we want to enhance the test for > ERRORs other than the primary key violation. And? You could pass the ERROR string expected as argument of the function if more flexibility is wanted at some point, no?

Re: Why is citext/regress failing on hamerkop?

2024-05-15 Thread Thomas Munro
On Thu, May 16, 2024 at 9:46 AM Thomas Munro wrote: > Alright, unless anyone has an objection or ideas for improvements, I'm > going to go ahead and back-patch this slightly tidied up version > everywhere. Of course as soon as I wrote that I thought of a useful improvement myself: as far as I can

Re: Introduce new multi insert Table AM and improve performance of various SQL commands with it for Heap AM

2024-05-15 Thread Michael Paquier
On Wed, May 15, 2024 at 11:14:14AM +0200, Alvaro Herrera wrote: > We don't use IAM anywhere, for example (it's always "index AM"), and I > don't think we'd turn "sequence AM" into SAM either, would we? SAM is not a term I've seen used for sequence AMs in the past, I don't intend to use it. TAM is

Re: Underscore in positional parameters?

2024-05-15 Thread Michael Paquier
On Wed, May 15, 2024 at 01:59:36PM +0200, Peter Eisentraut wrote: > On 14.05.24 18:07, Erik Wienhold wrote: >> Patch 0002 replaces atol with pg_strtoint32_safe in the backend parser >> and strtoint in ECPG. This fixes overflows like: > > Seems like a good idea, but as was said, this is an older i

Re: Log details for stats dropped more than once

2024-05-15 Thread Michael Paquier
On Wed, May 15, 2024 at 08:04:48AM +, Bertrand Drouvot wrote: > Thanks! BTW, I just realized that adding more details for this error has > already > been mentioned in [1] (and Andres did propose a slightly different version). > > [1]: > https://www.postgresql.org/message-id/20240505160915.6b

Re: Introduce new multi insert Table AM and improve performance of various SQL commands with it for Heap AM

2024-05-15 Thread Jeff Davis
On Wed, 2024-05-15 at 12:56 +0530, Bharath Rupireddy wrote: > Because of this, the > buffers get flushed sooner than that of the existing COPY with > table_multi_insert AM causing regression in pgbench which uses COPY > extensively. The flushing behavior is entirely controlled by the table AM. The

Re: Why does pgindent's README say to download typedefs.list from the buildfarm?

2024-05-15 Thread Tom Lane
I wrote: > This works for me. One point that could stand discussion while we're > here is whether the once-a-cycle run should use the verbatim buildfarm > results or it's okay to editorialize on that typedefs list. I did a > little of the latter in da256a4a7, and I feel like we should either > bl

Re: remaining sql/json patches

2024-05-15 Thread Thom Brown
On Mon, 8 Apr 2024 at 10:09, Amit Langote wrote: > On Mon, Apr 8, 2024 at 2:02 PM jian he > wrote: > > On Mon, Apr 8, 2024 at 11:21 AM jian he > wrote: > > > > > > On Mon, Apr 8, 2024 at 12:34 AM jian he > wrote: > > > > > > > > On Sun, Apr 7, 2024 at 9:36 PM Amit Langote > wrote: > > > > > 0

Re: Statistics Import and Export

2024-05-15 Thread Jeff Davis
On Mon, 2024-05-06 at 23:43 -0400, Corey Huinker wrote: > > v21 attached. > > 0003 is the statistics changes to pg_dump, adding the options -X / -- > statistics-only, and the derivative boolean statisticsOnly. The -P > option is already used by pg_restore, so instead I chose -X because > of the p

Re: Postgres and --config-file option

2024-05-15 Thread Michael Paquier
On Wed, May 15, 2024 at 04:47:27PM +0200, Jelte Fennema-Nio wrote: > I definitely think it would be useful to list this --config variant in > more places, imho it's nicer than the -c variant. Especially in the > PGOPTIONS docs it would be useful. People are already using it in the > wild and I regr

Docs: Always use true|false instead of sometimes on|off for the subscription options

2024-05-15 Thread Peter Smith
Hi hackers, There are lots of subscription options listed on the CREATE SUBSCRIPTION page [1]. Although these boolean options are capable of accepting different values like "1|0", "on|off", "true|false", here they are all described only using values "true|false". ~ IMO this consistent way of de

Re: explain format json, unit for serialize and memory are different.

2024-05-15 Thread David Rowley
On Wed, 15 May 2024 at 13:23, Tom Lane wrote: > > Michael Paquier writes: > > Perhaps Alvaro and Tom would like to chime in, as committers of > > respectively 5de890e3610d and 06286709ee06? > > No objection here. In a green field I might argue for > round-to-nearest instead of round-up, but it l

Re: CREATE TABLE/ProcessUtility hook behavior change

2024-05-15 Thread David Steele
On 4/30/24 21:15, jian he wrote: On Tue, Apr 30, 2024 at 4:35 PM David Steele wrote: On 4/30/24 12:57, jian he wrote: On Tue, Apr 30, 2024 at 10:26 AM David Steele wrote: Since bb766cde cannot be readily applied to older commits in master I'm unable to continue bisecting to find the ALTER

Re: query_id, pg_stat_activity, extended query protocol

2024-05-15 Thread Michael Paquier
On Wed, May 15, 2024 at 06:36:23PM +, Imseih (AWS), Sami wrote: >> Okay, that's what I precisely wanted to understand: queryId doesn't have >> semantics to show the job that consumes resources right now—it is mostly >> about convenience to know that the backend processes nothing except >> (prob

Re: Why is citext/regress failing on hamerkop?

2024-05-15 Thread Thomas Munro
On Thu, May 16, 2024 at 10:43 AM Thomas Munro wrote: > Any chance you could test this version please Alexander? Sorry, cancel that. v3 is not good. I assume it fixes the GSSAPI thing and is superficially better, but it doesn't handle code that calls twice in a row and ignores the first result (

Re: [PATCH] Add --syntax to postgres for SQL syntax checking

2024-05-15 Thread David G. Johnston
On Wed, May 15, 2024 at 1:00 PM Robert Haas wrote: > On Wed, May 15, 2024 at 3:28 PM Tom Lane wrote: > > Sorry: "make sense" was a poorly chosen phrase there. What I was > > doubting, and continue to doubt, is that 100% checking of what > > you can check without catalog access and 0% checking o

Re: [PATCH] Add --syntax to postgres for SQL syntax checking

2024-05-15 Thread David G. Johnston
On Wed, May 15, 2024 at 6:35 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > > If in core I would still want to expose this as say a contrib module > binary instead of hacking it into postgres. It would be our first server > program entry there. > > Sorry for self-reply but: Maybe na

PostgreSQL 17 Beta 1 release announcement draft

2024-05-15 Thread Jonathan S. Katz
Hi, Attached is a copy of the PostgreSQL 17 Beta 1 release announcement draft. This contains a user-facing summary of some of the features that will be available in the Beta, as well as a call to test. I've made an effort to group them logically around the different workflows they affect. A

Re: Requiring LLVM 14+ in PostgreSQL 18

2024-05-15 Thread Thomas Munro
On Wed, May 15, 2024 at 5:20 PM Peter Eisentraut wrote: > Yes, let's get that v3-0001 patch into PG17. Done. Bilal recently created the CI images for Debian Bookworm[1]. You can try them with s/bullseye/bookworm/ in .cirrus.tasks.yml, but it looks like he is still wrestling with a perl installa

Re: First draft of PG 17 release notes

2024-05-15 Thread jian he
On Thu, May 9, 2024 at 12:04 PM Bruce Momjian wrote: > > I have committed the first draft of the PG 17 release notes; you can > see the results here: > > https://momjian.us/pgsql_docs/release-17.html > >> Add local I/O block read/write timing statistics columns of >> pg_stat_statement (

Re: PostgreSQL 17 Beta 1 release announcement draft

2024-05-15 Thread David Rowley
Thanks for writing that up. It's always exciting to see this each year. On Thu, 16 May 2024 at 13:45, Jonathan S. Katz wrote: > * Please indicate if you believe there's a notable omission, or if we > should omit any of these callouts I'd say the streaming read stuff added in b5a9b18cd and subseq

Re: [PoC] Reducing planning time when tables have many partitions

2024-05-15 Thread Yuya Watari
Hello, Thank you for reviewing these patches. On Thu, May 2, 2024 at 11:35 PM jian he wrote: > on v24-0001: > +/* > + * add_eq_member - build a new EquivalenceMember and add it to an EC > + */ > +static EquivalenceMember * > +add_eq_member(EquivalenceClass *ec, Expr *expr, Relids relids, > + Jo

Re: First draft of PG 17 release notes

2024-05-15 Thread Bruce Momjian
On Wed, May 15, 2024 at 09:13:14AM -0400, Melanie Plageman wrote: > I think this wording and organization makes sense. I hadn't thought of > using "traffic" to describe this, but I like it. > > Also +1 on the Sawada/Naylor change being on the highlight section of > the release (as David suggested

Re: First draft of PG 17 release notes

2024-05-15 Thread David G. Johnston
On Wednesday, May 15, 2024, jian he wrote: > On Thu, May 9, 2024 at 12:04 PM Bruce Momjian wrote: > > > > I have committed the first draft of the PG 17 release notes; you can > > see the results here: > > > > https://momjian.us/pgsql_docs/release-17.html > > > > in section: E.1.2. Migra

Re: First draft of PG 17 release notes

2024-05-15 Thread Bruce Momjian
On Thu, May 16, 2024 at 10:39:18AM +0800, jian he wrote: > On Thu, May 9, 2024 at 12:04 PM Bruce Momjian wrote: > > > > I have committed the first draft of the PG 17 release notes; you can > > see the results here: > > > > https://momjian.us/pgsql_docs/release-17.html > > > > >> Add loca

Re: cataloguing NOT NULL constraints

2024-05-15 Thread Bruce Momjian
On Wed, May 15, 2024 at 09:50:36AM +0200, Álvaro Herrera wrote: > On 2024-May-14, Bruce Momjian wrote: > > > Turns out these commits generated a single release note item, which I > > have now removed with the attached committed patch. > > Hmm, but the commits about not-null constraints for domain

Re: More links on release-17.html

2024-05-15 Thread Bruce Momjian
On Wed, May 15, 2024 at 04:50:47PM -0300, Marcos Pegoraro wrote: > While seeing changes and new features of > https://www.postgresql.org/docs/devel/release-17.html > I see that there are too little links to other DOC pages, which would be > useful. > > There are links to > "logical-replication", "

Re: Fix src/test/subscription/t/029_on_error.pl test when wal_debug is enabled

2024-05-15 Thread Amit Kapila
On Thu, May 16, 2024 at 3:43 AM Michael Paquier wrote: > > On Wed, May 15, 2024 at 05:58:18PM +0530, Amit Kapila wrote: > > I guess it could be more work if we want to enhance the test for > > ERRORs other than the primary key violation. > > And? You could pass the ERROR string expected as argume

Re: First draft of PG 17 release notes

2024-05-15 Thread David Rowley
On Thu, 16 May 2024 at 14:48, Bruce Momjian wrote: > > On Wed, May 15, 2024 at 09:13:14AM -0400, Melanie Plageman wrote: > > Also +1 on the Sawada/Naylor change being on the highlight section of > > the release (as David suggested upthread). > > Agreed, I went with the attached applied patch. +Al

Re: First draft of PG 17 release notes

2024-05-15 Thread Andres Freund
Hi, On 2024-05-15 10:38:20 +0200, Alvaro Herrera wrote: > I disagree with this. IMO the impact of the Sawada/Naylor change is > likely to be enormous for people with large tables and large numbers of > tuples to clean up (I know we've had a number of customers in this > situation, I can't imagine

Re: PostgreSQL 17 Beta 1 release announcement draft

2024-05-15 Thread Kashif Zeeshan
Hi Jonathan Did the review and did not find any issues. Regards Kashif Zeeshan Bitnine Global On Thu, May 16, 2024 at 6:45 AM Jonathan S. Katz wrote: > Hi, > > Attached is a copy of the PostgreSQL 17 Beta 1 release announcement > draft. This contains a user-facing summary of some of the featur

Re: in parentesis is not usual on DOCs

2024-05-15 Thread jian he
On Wed, May 15, 2024 at 8:34 PM Daniel Gustafsson wrote: > > > On 15 May 2024, at 14:04, Marcos Pegoraro wrote: > > > Why (context_item), (path_expression) and (json_path_name) are inside a > > parentheses ? This is not usual when explaining any other feature. > > Agreed, that's inconsisent with

RE: Slow catchup of 2PC (twophase) transactions on replica in LR

2024-05-15 Thread Hayato Kuroda (Fujitsu)
Dear Peter, > You wrote "Fixed" for that patch v9-0004 suggestion but I don't think > anything was changed at all. Accidentally missed? Sorry, I missed to do `git add` after the revision. The change was also included in new patch [1]. [1]: https://www.postgresql.org/message-id/OSBPR01MB25522052

Re: PostgreSQL 17 Beta 1 release announcement draft

2024-05-15 Thread Thom Brown
On Thu, May 16, 2024, 02:45 Jonathan S. Katz wrote: > Hi, > > Attached is a copy of the PostgreSQL 17 Beta 1 release announcement > draft. This contains a user-facing summary of some of the features that > will be available in the Beta, as well as a call to test. I've made an > effort to group th

Re: Docs: Always use true|false instead of sometimes on|off for the subscription options

2024-05-15 Thread David Rowley
On Thu, 16 May 2024 at 12:29, Peter Smith wrote: > There are lots of subscription options listed on the CREATE > SUBSCRIPTION page [1]. > > Although these boolean options are capable of accepting different > values like "1|0", "on|off", "true|false", here they are all described > only using values

Re: PostgreSQL 17 Beta 1 release announcement draft

2024-05-15 Thread Bertrand Drouvot
Hi, On Wed, May 15, 2024 at 09:45:35PM -0400, Jonathan S. Katz wrote: > Hi, > > Attached is a copy of the PostgreSQL 17 Beta 1 release announcement draft. Thanks for working on it! I've one comment: > PostgreSQL 17 also introduces a new view, > [`pg_wait_events`](https://www.postgresql.org/do

Re: query_id, pg_stat_activity, extended query protocol

2024-05-15 Thread Andrei Lepikhov
On 15.05.2024 10:24, Imseih (AWS), Sami wrote: I discovered the current state of queryId reporting and found that it may be unlogical: Postgres resets queryId right before query execution in simple protocol and doesn't reset it at all in extended protocol and other ways to execute queries. In e

Re: PostgreSQL 17 Beta 1 release announcement draft

2024-05-15 Thread zaidagilist
Hello, I am trying to open the 17 docs but it looks removed. Getting following message "Page not found" https://www.postgresql.org/docs/17/ Regards, Zaid Shabbir On Thu, May 16, 2024 at 10:16 AM Bertrand Drouvot wrote: > > Hi, > > On Wed, May 15, 2024 at 09:45:35PM -0400, Jonathan S. Katz wro

Re: PostgreSQL 17 Beta 1 release announcement draft

2024-05-15 Thread Thom Brown
On Thu, May 16, 2024, 06:37 zaidagilist wrote: > Hello, > > I am trying to open the 17 docs but it looks removed. Getting > following message "Page not found" > > https://www.postgresql.org/docs/17/ > > > Regards, > Zaid Shabbir > That link isn't set up yet, but will be (or should be) when the a

Pre-Commitfest Party on StHighload conf

2024-05-15 Thread Andrey M. Borodin
Hi hackers! StHighload conference will be held on June 24-25[0]. I’m planning to do “Pre-Commitfest Party” there. The idea is to help promote patches among potential reviewers. And start working with the very beginning of PG18 development cycle. Good patch review of a valuable feature is a grea

Re: Pgoutput not capturing the generated columns

2024-05-15 Thread Peter Smith
Here are some review comments for the patch v1-0001. == GENERAL G.1. Use consistent names It seems to add unnecessary complications by having different names for all the new options, fields and API parameters. e.g. sometimes 'include_generated_columns' e.g. sometimes 'publish_generated_colu

Re: [UNVERIFIED SENDER] pg_upgrade can result in early wraparound on databases with high transaction load

2024-05-15 Thread Daniel Gustafsson
> On 5 Jul 2022, at 18:59, Tom Lane wrote: > Given the lack of field complaints, it's probably not worth trying > to do anything to restore that capability. But we really ought to > update pg_upgrade's code and docs in pre-v15 branches to say that > the minimum supported source version is 9.0.

Re: PostgreSQL 17 Beta 1 release announcement draft

2024-05-15 Thread David Rowley
On Thu, 16 May 2024 at 17:37, zaidagilist wrote: > I am trying to open the 17 docs but it looks removed. Getting > following message "Page not found" > > https://www.postgresql.org/docs/17/ It's called "devel" for "development" until we branch sometime before July: https://www.postgresql.org/doc

Re: Pre-Commitfest Party on StHighload conf

2024-05-15 Thread Kashif Zeeshan
Great initiative. On Thu, May 16, 2024 at 10:59 AM Andrey M. Borodin wrote: > Hi hackers! > > StHighload conference will be held on June 24-25[0]. I’m planning to do > “Pre-Commitfest Party” there. > > The idea is to help promote patches among potential reviewers. And start > working with the ve

Re: Underscore in positional parameters?

2024-05-15 Thread Peter Eisentraut
On 16.05.24 01:11, Michael Paquier wrote: On Wed, May 15, 2024 at 01:59:36PM +0200, Peter Eisentraut wrote: On 14.05.24 18:07, Erik Wienhold wrote: Patch 0002 replaces atol with pg_strtoint32_safe in the backend parser and strtoint in ECPG. This fixes overflows like: Seems like a good idea,

<    1   2