Re: PGSERVICEFILE as part of a normal connection string

2024-11-19 Thread Corey Huinker
> > > > Interesting. We've never had tests for that even for "service". > Perhaps it would be the time to add some tests for the existing case > and the one you are adding? Your test suite should make that easy to > add. > Currently, a lot of our utility scripts (anything that uses connectDatab

pg_prepared_xacts returns transactions that are foreign to the caller

2024-11-19 Thread Vladimir Sitnikov
Hi, "select * from pg_prepared_xacts" might produce transactions created by a different user, so the caller won't be able to issue "commit prepared". I think there should be a view that returns only the transactions that the caller can commit or rollback. Is it something that can be implemented a

Re: Support LIKE with nondeterministic collations

2024-11-19 Thread jian he
On Tue, Nov 19, 2024 at 9:51 PM Peter Eisentraut wrote: > > On 18.11.24 04:30, jian he wrote: > > we can optimize when trailing (last character) is not wildcards. > > > > SELECT 'Ha12foo' LIKE '%foo' COLLATE ignore_accents; > > within the for loop > > for(;;) > > { > > intcmp; > > CHE

Re: POC, WIP: OR-clause support for indexes

2024-11-19 Thread Andrei Lepikhov
On 18/11/2024 06:19, Alexander Korotkov wrote: On Fri, Nov 15, 2024 at 3:27 PM Alexander Korotkov wrote: Here is the next revision of this patch. No material changes, adjustments for comments and commit message. I have passed through the code and found no issues. Maybe only phrase: "eval_const

Re: nbtree VACUUM's REDO routine doesn't clear page's VACUUM cycle ID

2024-11-19 Thread Michael Paquier
On Fri, Nov 15, 2024 at 11:33:37AM -0500, Peter Geoghegan wrote: > Attached patch teaches btree_xlog_vacuum, nbtree VACUUM's REDO > routine, to reset the target page's opaque->btpo_cycleid to 0. This > makes the REDO routine match original execution, which seems like a > good idea on consistency gr

Re: Proposals for EXPLAIN: rename ANALYZE to EXECUTE and extend VERBOSE

2024-11-19 Thread Guillaume Lelarge
Le mer. 20 nov. 2024 à 01:13, Greg Sabino Mullane a écrit : > I'm with Robert on this one. I'm a grudging +1 to buffers defaulting on, > and a strong -1 to all the other proposals. Guillaume, the patch looks > pretty good. > Thanks :) > I would like to see some of the example output have more

Re: PGSERVICEFILE as part of a normal connection string

2024-11-19 Thread Michael Paquier
On Mon, Nov 18, 2024 at 09:21:56PM +0100, Torsten Förtsch wrote: > I like to bundle all my database connections in a .pg_service.conf. Over > time I collected a bunch of such service files. A while back I discovered > that the service file can only be specified as an environment variable. It > cann

Re: Update Unicode data to Unicode 16.0.0

2024-11-19 Thread Laurenz Albe
On Tue, 2024-11-19 at 13:42 -0800, Jeff Davis wrote: > On Tue, 2024-11-12 at 10:40 +0100, Laurenz Albe wrote: > > I want to reiterate what I said in the above thread: > > If that means that indexes on strings using the "builtin" collation > > provider need to be reindexed after an upgrade, I am ver

Re: Sample rate added to pg_stat_statements

2024-11-19 Thread Michael Paquier
On Tue, Nov 19, 2024 at 09:39:21AM -0500, Greg Sabino Mullane wrote: > Oh, and a +1 in general to the patch, OP, although it would also be nice to > start finding the bottlenecks that cause such performance issues. FWIW, I'm not eager to integrate this proposal without looking at this exact argume

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-19 Thread Alvaro Herrera
On 2024-Nov-14, Amit Langote wrote: > Sorry, here's the full example. Note I'd changed both > AddRelationNotNullConstraints() and AdjustNotNullInheritance() to not > throw an error *if* the table is a leaf partition when the NO INHERIT > of an existing constraint doesn't match that of the new con

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

2024-11-19 Thread Noah Misch
On Thu, Oct 03, 2024 at 06:55:47AM -0700, Masahiko Sawada wrote: > I've attached PoC patches for the idea Noah proposed. Newly created > clusters unconditionally have default_char_signedness=true, and the > only source of signedness=false is pg_upgrade. To update the > signedness in the controlfile

Re: Proposals for EXPLAIN: rename ANALYZE to EXECUTE and extend VERBOSE

2024-11-19 Thread Greg Sabino Mullane
I'm with Robert on this one. I'm a grudging +1 to buffers defaulting on, and a strong -1 to all the other proposals. Guillaume, the patch looks pretty good. I would like to see some of the example output have more than just "shared hit" and "read" though: let's throw some "dirtied" and "written" in

Re: Proposals for EXPLAIN: rename ANALYZE to EXECUTE and extend VERBOSE

2024-11-19 Thread Greg Sabino Mullane
> > Maybe the wording could just be based on the wording for the SUMMARY > option, i.e. "Summary information is included by default when ANALYZE > is used but otherwise is not included by default". > Yes, I like that. Avoids the whole TRUE/FALSE altogether. Thanks, Greg

Re: UUID v7

2024-11-19 Thread Andrey M. Borodin
> On 20 Nov 2024, at 00:06, Masahiko Sawada wrote: > > On Tue, Nov 19, 2024 at 9:45 AM Andrey M. Borodin > wrote: >> >> >> >>> On 19 Nov 2024, at 14:31, Andrey M. Borodin wrote: >>> >>> Done. >> >> Here's v33 intact + one more patch to add 2 bits of entropy on MacOS (to >> compensate

Re: pg_rewind WAL segments deletion pitfall

2024-11-19 Thread Michael Paquier
On Fri, Nov 15, 2024 at 01:22:21PM +0100, Alvaro Herrera wrote: > Oh wow, thanks for noticing that. I had already rewritten the commit > message to some extent, but "master" had remained. Now I pushed the > patch to branches 14+, having replaced it as you suggested. Thanks for taking care of thi

Re: Support for NO INHERIT to INHERIT state change with named NOT NULL constraints

2024-11-19 Thread jian he
On Thu, Nov 14, 2024 at 1:02 PM Suraj Kharage wrote: > > Hi, > > Upstream commit 14e87ffa5c543b5f30ead7413084c25f7735039f added the support > for named NOT NULL constraints which are INHERIT by default. > We can declare those as NO INHERIT which means those constraints will not be > inherited to

Re: [PATCH] Fixed assertion issues in "pg_get_viewdef"

2024-11-19 Thread zengman
Thanks for your guidance, you are right, I looked at your patch and combined it with the example to generate a new patch, which is really better. Thanks, Man Zeng -- Original -- From:  "Tom Lane" v3-fix-incorrect-assertion.patch Description: Binary data

Re: memory leak in pgoutput

2024-11-19 Thread Michael Paquier
On Tue, Nov 19, 2024 at 07:08:26AM +, by Yang wrote: > I have verifed that this patch works for REL_[15-17]_STABLE and master. > The memory consumption of "logical replication cache context" remains > consistently at 112 MB during the benchmark mentioned above. You should be more careful with

Re: Converting SetOp to read its two inputs separately

2024-11-19 Thread Tom Lane
Richard Guo writes: > On Thu, Nov 14, 2024 at 11:00 AM Tom Lane wrote: >> Aside from that minor TODO, the main thing that's left undone in this >> patch series is to persuade the thing to exploit presorted input >> paths. > I think we may need to do the following to make this work: > 1. We need

Re: sunsetting md5 password support

2024-11-19 Thread Nathan Bossart
On Tue, Nov 19, 2024 at 07:29:27PM -0500, Greg Sabino Mullane wrote: > I just took a fresh look at / compiled this patch, and it all works as > advertised. My one minor nit is this hint: > > HINT: Refer to the PostgreSQL documentation for details about migrating to > another password type. > > W

Parallel safety docs for CTEs

2024-11-19 Thread James Coleman
Hello, A colleague noticed today that the docs still say that "Scans of common table expressions (CTEs)" are "always parallel restricted". While I think that strictly remains true at the implementation level, from a user's perspective I think that's not been true since the change to default to tr

Re: Replace current implementations in crypt() and gen_salt() to OpenSSL

2024-11-19 Thread Joe Conway
On 10/29/24 10:08, Daniel Gustafsson wrote: On 29 Oct 2024, at 13:53, Joe Conway wrote: On 10/29/24 05:57, Daniel Gustafsson wrote: On 26 Oct 2024, at 20:10, Joe Conway wrote: Rather than depend on figuring out if we are in FIPS_mode in a portable way, I think the GUC is simpler and suffici

Re: Proposals for EXPLAIN: rename ANALYZE to EXECUTE and extend VERBOSE

2024-11-19 Thread David Rowley
On Wed, 20 Nov 2024 at 13:13, Greg Sabino Mullane wrote: >> It defaults to TRUE when ANALYZE is >> also enabled. Otherwise, it defaults to FALSE. > > Is that second sentence really needed? Because "BUFFERS ON" will never be > needed anymore (save as a no-op to allow the same explain queries to r

Re: [PATCH] Add support for displaying database service in psql prompt

2024-11-19 Thread Greg Sabino Mullane
Compiled and tested: works fine, so +1 from me. Honestly, I was surprised %s was still available. :) Cheers, Greg

Re: sunsetting md5 password support

2024-11-19 Thread Greg Sabino Mullane
I just took a fresh look at / compiled this patch, and it all works as advertised. My one minor nit is this hint: HINT: Refer to the PostgreSQL documentation for details about migrating to another password type. We don't really have that in the docs, as near as I can tell, the closest is 20.5 wh

Re: per backend I/O statistics

2024-11-19 Thread Michael Paquier
On Tue, Nov 19, 2024 at 04:28:55PM +, Bertrand Drouvot wrote: > So, for the startup process only, what about? > > - don't call pgstat_create_backend_stat() in pgstat_beinit()... > - but call it in StartupXLOG() instead (after the stats are discarded or > restored). > > That way we could get

Re: Index AM API cleanup

2024-11-19 Thread Mark Dilger
> On Nov 16, 2024, at 9:10 AM, Kirill Reshke wrote: > > Hi! Can we please have a rebased version of this patch series? Sorry for the delay, and thanks for your interest. I will try to get around to rebasing in the next few days. — Mark Dilger EnterpriseDB: http://www.enterprisedb.com The

Re: Using Expanded Objects other than Arrays from plpgsql

2024-11-19 Thread Pavel Stehule
út 19. 11. 2024 v 18:51 odesílatel Michel Pelletier < pelletier.mic...@gmail.com> napsal: > >> So going back on the assumption I'm somehow not returning the right >> pointer, but digging into the array code I'm pretty sure I'm following the >> same pattern and tracing my code path is calling EOHPG

Re: Using Expanded Objects other than Arrays from plpgsql

2024-11-19 Thread Tom Lane
Pavel Stehule writes: > út 19. 11. 2024 v 18:51 odesílatel Michel Pelletier < > pelletier.mic...@gmail.com> napsal: >> A couple years ago I tried to compress what I learned about expanded >> objects into a dummy extension that just provides the necessary >> boilerplate. It wasn't great but a star

Re: Replace current implementations in crypt() and gen_salt() to OpenSSL

2024-11-19 Thread Robert Haas
On Tue, Nov 19, 2024 at 12:30 PM Joe Conway wrote: > Any other opinions out there? Why should we accept your patch (which adds a legacy_crypto_enabled GUC) instead of adopting the approach originally proposed (i.e. use the OpenSSL version of the functions)? It seems to me that the two proposals a

Re: Sample rate added to pg_stat_statements

2024-11-19 Thread Ilia Evdokimov
On 19.11.2024 15:11, Andrey M. Borodin wrote: On 18 Nov 2024, at 23:33, Ilia Evdokimov wrote: Hi hackers, Under high-load scenarios with a significant number of transactions per second, pg_stat_statements introduces substantial overhead due to the collection and storage of statistics. Cur

Re: pg_ctl/miscinit: print "MyStartTime" as a long long instead of long to avoid 2038 problem.

2024-11-19 Thread Nathan Bossart
On Mon, Oct 07, 2024 at 02:17:06PM -0500, Nathan Bossart wrote: > On Mon, Oct 07, 2024 at 02:00:05PM -0500, Nathan Bossart wrote: >> I refrained from introducing INT64_HEX_FORMAT/UINT64_HEX_FORMAT in c.h >> because I felt there was a nonzero chance of that causing problems with >> third-party code

Re: sunsetting md5 password support

2024-11-19 Thread Nathan Bossart
I've gotten a couple of reviews on this patch, and the thread has been quiet for a while now, so I'm considering committing this soon. There is still plenty of time to make any adjustments that are suggested post-commit. -- nathan

Re: Proposals for EXPLAIN: rename ANALYZE to EXECUTE and extend VERBOSE

2024-11-19 Thread Guillaume Lelarge
Hello, Le mar. 12 nov. 2024 à 22:21, Robert Haas a écrit : > On Tue, Nov 12, 2024 at 4:02 PM Guillaume Lelarge > wrote: > > Sure looks easy enough to do (though it still lacks doc and tests > changes). See patch attached. > > Yep, that's very small. I'm a bit wondering if it's too small, though

Re: Parametrization minimum password lenght

2024-11-19 Thread Michael Paquier
On Tue, Nov 12, 2024 at 02:48:28PM +0100, Tomas Vondra wrote: > Thanks for the patch, seems like a useful feature. Please add the patch > to the next commitfest (2025-01) at https://commitfest.postgresql.org/ FYI, I have a large set of such things in my own repo with a clone of passwordcheck: http

Re: Statistics Import and Export

2024-11-19 Thread Bruce Momjian
On Tue, Nov 19, 2024 at 03:47:20PM -0500, Corey Huinker wrote: > I don't have a strong opinion here, but I suspect that if I was creating > vacuumdb from scratch, I'd have suggested a --missing-only flag that would > only work for --analyze-only/--analyze-in-stages.  That way, folks can

Re: Fix an error while building test_radixtree.c with TEST_SHARED_RT

2024-11-19 Thread Masahiko Sawada
On Tue, Nov 19, 2024 at 1:14 AM Alvaro Herrera wrote: > > On 19/11/2024 01:20, Masahiko Sawada wrote: > > I realized that building test_radixtree.c with TEST_SHARED_RT fails > > because it eventually sets RT_SHMEM when #include'ing radixtree.h but > > it's missing some header files to include. I'v

Re: Fix an error while building test_radixtree.c with TEST_SHARED_RT

2024-11-19 Thread Masahiko Sawada
On Mon, Nov 18, 2024 at 4:50 PM Tom Lane wrote: > > Masahiko Sawada writes: > > On Mon, Nov 18, 2024 at 3:41 PM Heikki Linnakangas wrote: > >> While we're at it, I noticed that lib/radixtree.h includes "postgres.h". > >> That's against our usual convention. > > > Good catch. I've updated the pat

Re: A way to build PSQL 17.1 source on AIX platform

2024-11-19 Thread wenhui qiu
no way ,due to remove aix support, https://commitfest.postgresql.org/50/5003/you can see this link, On Tue, 19 Nov 2024 at 23:26, Raghu Dev Ramaiah wrote: > Hi > > I am getting error while building PSQL 17.1 on AIX box- > > bash-5.1# uname -a > AIX AIXLPHPOM01 1 7 00F8B83A4C00 > > bash-5.1# ./co

Re: logical replication: restart_lsn can go backwards (and more), seems broken since 9.4

2024-11-19 Thread Tomas Vondra
OK, Now that the fix is committed, shall we introduce some of the asserts? I believe there's an agreement the restart_lsn shouldn't move backwards, so I propose the attached patch. I still think not resetting the fields when releasing the slot, and allowing the values to move backwards is rather

Re: Improve error messages for database object stats manipulation functions during recovery

2024-11-19 Thread Fujii Masao
On 2024/11/16 2:36, Fujii Masao wrote: Sounds good! I've updated the hint messages as suggested and attached the revised patch. Thanks for the review! Unless there are any objections, I'll proceed with committing it. Pushed. Thanks! Regards, -- Fujii Masao Advanced Computing Technology C

Re: Update Unicode data to Unicode 16.0.0

2024-11-19 Thread Jeff Davis
On Tue, 2024-11-12 at 10:40 +0100, Laurenz Albe wrote: > I want to reiterate what I said in the above thread: > If that means that indexes on strings using the "builtin" collation > provider need to be reindexed after an upgrade, I am very much > against it. How would you feel if there was a bette

Re: optimize file transfer in pg_upgrade

2024-11-19 Thread Nathan Bossart
On Mon, Nov 18, 2024 at 10:34:00PM -0500, Bruce Momjian wrote: > On Wed, Nov 6, 2024 at 04:07:35PM -0600, Nathan Bossart wrote: >> For clusters with many relations, the file transfer step of pg_upgrade can >> take the longest. This step clones, copies, or links the user relation >> files from the

Re: Interrupts vs signals

2024-11-19 Thread Robert Haas
On Mon, Nov 18, 2024 at 11:09 PM Thomas Munro wrote: > Names don't match here. I prefer _CONTINUE. As for the general one, > I'm on the fence about INTERRUPT_GENERAL_WAKEUP, since wakeups aren't > necessarily involved, but I don't have a specific better idea so I'm > not objecting... Perhaps it

Re: Statistics Import and Export

2024-11-19 Thread Corey Huinker
> > I don't have a strong opinion here, but I suspect that if I was creating > vacuumdb from scratch, I'd have suggested a --missing-only flag that would > only work for --analyze-only/--analyze-in-stages. That way, folks can > still regenerate statistics if they want, but we also have an answer f

Re: Using Expanded Objects other than Arrays from plpgsql

2024-11-19 Thread Michel Pelletier
On Tue, Nov 19, 2024 at 11:45 AM Tom Lane wrote: > Pavel Stehule writes: > > út 19. 11. 2024 v 18:51 odesílatel Michel Pelletier < > > pelletier.mic...@gmail.com> napsal: > >> A couple years ago I tried to compress what I learned about expanded > >> objects into a dummy extension that just provi

Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row

2024-11-19 Thread Kirill Reshke
On Tue, 19 Nov 2024, 13:52 jian he, wrote: > > On Sat, Nov 16, 2024 at 5:55 PM Kirill Reshke wrote: > > > > I am attaching my v8 for reference. > > > > in your v8. > > > REJECT_LIMIT > > > Specifies the maximum number of errors tolerated while converting a > column'

Re: Parametrization minimum password lenght

2024-11-19 Thread Bertrand Drouvot
Hi, On Mon, Nov 18, 2024 at 05:21:18PM +0100, Emanuele Musella wrote: > We notice some errors on CFBot results. FWIW, you can run "cfbot like" tests on your own repo (see [1]). > In attached the errors fixed Thanks for the updated version! A few random comments: === 1 trailing whitespace: $

Re: UUID v7

2024-11-19 Thread Masahiko Sawada
On Tue, Nov 19, 2024 at 9:45 AM Andrey M. Borodin wrote: > > > > > On 19 Nov 2024, at 14:31, Andrey M. Borodin wrote: > > > > Done. > > Here's v33 intact + one more patch to add 2 bits of entropy on MacOS (to > compensate lack of nanoseconds). > What do you think? > Thank you for updating the p

Re: Support for NO INHERIT to INHERIT state change with named NOT NULL constraints

2024-11-19 Thread jian he
On Fri, Nov 15, 2024 at 11:15 AM Robert Haas wrote: > > On Thu, Nov 14, 2024 at 12:02 AM Suraj Kharage > wrote: >> >> Alvaro stated that allowing a not null constraint state to be modified from >> INHERIT to NO INHERIT is going to be quite problematic because of the number >> of weird cases to

Re: tab_complete for copy(merge

2024-11-19 Thread jian he
On Tue, Nov 19, 2024 at 5:20 PM Kirill Reshke wrote: > > > Hi! > > On Tue, 19 Nov 2024, 14:08 jian he, wrote: >> >> hi. >> >> in v17, we support COPY(MERGE RETURNING) >> we can add tab_complete for it. > > > Sounds sane >> >> /* Complete COPY ( with legal query commands */ >> else if (Mat

Re: optimize file transfer in pg_upgrade

2024-11-19 Thread Nathan Bossart
On Sun, Nov 17, 2024 at 01:50:53PM -0500, Greg Sabino Mullane wrote: > On Wed, Nov 6, 2024 at 5:07 PM Nathan Bossart > wrote: >> Therefore, it can be much faster to instead move the entire data directory >> from the old cluster >> to the new cluster and to then swap the catalog relation files. >

Re: Statistics Import and Export

2024-11-19 Thread Nathan Bossart
On Mon, Nov 18, 2024 at 08:42:35PM -0500, Bruce Momjian wrote: > We can't design an API around who is going to be surprised. We have to > look at what the options say, what people would expect it to do, and > what it does. The reason "surprise" doesn't work in the long run is > that while PG 18 u

Re: POC: make mxidoff 64 bits

2024-11-19 Thread Maxim Orlov
Oops! Sorry for the noise. I've must have been overworking yesterday and messed up the working branches. v7 was a correct set and v8 don't. Here is the correction with extended Perl test. The test itself is in src/bin/pg_upgrade/t/005_offset.pl It is rather heavy and took about 45 minutes on my i5

Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY

2024-11-19 Thread Shlok Kyal
On Tue, 19 Nov 2024 at 14:39, Zhijie Hou (Fujitsu) wrote: > > On Tuesday, November 19, 2024 3:15 PM Shlok Kyal > wrote: > > > > > I noticed that we can add 'publish_generated_columns = true' for the case of > > generated column. So we won't need to remove the test. I have made the > > changes in

A way to build PSQL 17.1 source on AIX platform

2024-11-19 Thread Raghu Dev Ramaiah
Hi I am getting error while building PSQL 17.1 on AIX box- bash-5.1# uname -a AIX AIXLPHPOM01 1 7 00F8B83A4C00 bash-5.1# ./configure --prefix=/home/raghu/postgres/psql17/build --without-readline checking build system type... powerpc-ibm-aix7.1.4.0 checking host system type... powerpc-ibm-aix7.1

Re: Using Expanded Objects other than Arrays from plpgsql

2024-11-19 Thread Michel Pelletier
> > > So going back on the assumption I'm somehow not returning the right > pointer, but digging into the array code I'm pretty sure I'm following the > same pattern and tracing my code path is calling EOHPGetRWDatum when I > return the object, I can't get it to stop on DeleteExpandedObject, so I >

Re: UUID v7

2024-11-19 Thread Andrey M. Borodin
> On 19 Nov 2024, at 14:31, Andrey M. Borodin wrote: > > Done. Here's v33 intact + one more patch to add 2 bits of entropy on MacOS (to compensate lack of nanoseconds). What do you think? Best regards, Andrey Borodin. v33-0001-Implement-UUID-v7.patch Description: Binary data v34-0002-Mi

Re: AIO writes vs hint bits vs checksums

2024-11-19 Thread Andres Freund
Hi, On 2024-11-01 14:10:54 -0400, Andres Freund wrote: > I still don't like this idea a whole lot - but perhaps we could get reduce the > overhead of my proposal some, to get closer to yours. When setting hint bits > for many tuples on a page the overhead of my approach is neglegible, but when >

Re: Optimizing FastPathTransferRelationLocks()

2024-11-19 Thread Fujii Masao
On 2024/11/16 7:15, Heikki Linnakangas wrote: On 12/11/2024 03:16, Fujii Masao wrote: Hi, I've identified some opportunities to optimize FastPathTransferRelationLocks(), which transfers locks with a specific lock tag from per-backend fast- path arrays to the shared hash table. The attached p

Re: SQL Property Graph Queries (SQL/PGQ)

2024-11-19 Thread Vik Fearing
On 05/11/2024 16:41, Ashutosh Bapat wrote: On Wed, Aug 28, 2024 at 3:48 PM Ashutosh Bapat wrote: Patches 0001 - 0006 are same as the previous set. 0007 - fixes all the problems you reported till now and also the one I found. The commit message describes the fixes in detail. Here's an updated

Re: [PATCH] Fixed assertion issues in "pg_get_viewdef"

2024-11-19 Thread Tom Lane
"=?utf-8?B?5pu+5ruh?=" writes: > We can comment out the assertion that raises the exception, because I looked > up the code and found that the assertion doesn't seem to make a lot > of sense here. I looked at the git history and found that I added this assertion in 07b4c48b6. Your example shows

Re: altering a column's collation leaves an invalid foreign key

2024-11-19 Thread Peter Eisentraut
On 14.11.24 09:04, Peter Eisentraut wrote: You can also reproduce this with things that are not strings with collations.  You just need to find a type that has values that are "equal" but "distinct", which is not common, but it exists, for example 0.0 and -0.0 in floats.  Example:     create

Re: Changing shared_buffers without restart

2024-11-19 Thread Dmitry Dolgov
> On Tue, Nov 19, 2024 at 01:57:00PM GMT, Peter Eisentraut wrote: > On 18.10.24 21:21, Dmitry Dolgov wrote: > > v1-0001-Allow-to-use-multiple-shared-memory-mappings.patch > > > > Preparation, introduces the possibility to work with many shmem mappings. To > > make it less invasive, I've duplicated

Re: Statistics Import and Export

2024-11-19 Thread Bruce Momjian
On Mon, Nov 18, 2024 at 08:42:35PM -0500, Bruce Momjian wrote: > On Mon, Nov 18, 2024 at 08:29:10PM -0500, Corey Huinker wrote: > > That's not a great surprise for group 6, but I have to believe that group is > > smaller than group 5, and it's definitely smaller than the group of users > > that >

Re: Changing shared_buffers without restart

2024-11-19 Thread Peter Eisentraut
On 18.10.24 21:21, Dmitry Dolgov wrote: v1-0001-Allow-to-use-multiple-shared-memory-mappings.patch Preparation, introduces the possibility to work with many shmem mappings. To make it less invasive, I've duplicated the shmem API to extend it with the shmem_slot argument, while redirecting the or

Re: ALTER TABLE uses a bistate but not for toast tables

2024-11-19 Thread Dmitry Dolgov
> On Mon, Jul 15, 2024 at 03:43:24PM GMT, Justin Pryzby wrote: > @cfbot: rebased Hey Justin, Thanks for rebasing. To help with review, could you also describe current status of the patch? I have to admit, currently the commit message doesn't tell much, and looks more like notes for the future you

Re: Support LIKE with nondeterministic collations

2024-11-19 Thread Peter Eisentraut
On 18.11.24 04:30, jian he wrote: we can optimize when trailing (last character) is not wildcards. SELECT 'Ha12foo' LIKE '%foo' COLLATE ignore_accents; within the for loop for(;;) { intcmp; CHECK_FOR_INTERRUPTS(); } pg_strncoll comparison will become Ha12foofoo a12foo

Re: meson and check-tests

2024-11-19 Thread Nazir Bilal Yavuz
Hi, Thanks for checking it! On Tue, 19 Nov 2024 at 15:19, Ashutosh Bapat wrote: > > On Thu, Oct 31, 2024 at 11:28 PM Nazir Bilal Yavuz wrote: > > > > Yes, that is exactly why we have both '--schedule' and '--tests' > > flags. Also, a comment is added to clarify this. > > The comment is useful i

Re: Add reject_limit option to file_fdw

2024-11-19 Thread torikoshia
On 2024-11-13 23:17, Yugo NAGATA wrote: On Wed, 13 Nov 2024 21:48:10 +0900 torikoshia wrote: On 2024-11-12 14:51, Yugo Nagata wrote: Thanks for your review! > On Tue, 12 Nov 2024 10:16:50 +0900 > torikoshia wrote: > >> On 2024-11-12 01:49, Fujii Masao wrote: >> > On 2024/11/11 21:45, toriko

Re: Sample rate added to pg_stat_statements

2024-11-19 Thread Andrey M. Borodin
> On 18 Nov 2024, at 23:33, Ilia Evdokimov > wrote: > > Hi hackers, > > Under high-load scenarios with a significant number of transactions per > second, pg_stat_statements introduces substantial overhead due to the > collection and storage of statistics. Currently, we are sometimes forced

Re: meson and check-tests

2024-11-19 Thread Ashutosh Bapat
On Thu, Oct 31, 2024 at 11:28 PM Nazir Bilal Yavuz wrote: > > On Fri, 4 Oct 2024 at 18:40, Ashutosh Bapat > wrote: > > --schedule or the test selection becomes part of the test command > > itself in the current master. By passing it as an argument, in these > > patches, we are allowing those to b

Re: [PoC] Federated Authn/z with OAUTHBEARER

2024-11-19 Thread Peter Eisentraut
On 12.11.24 22:47, Jacob Champion wrote: On Fri, Nov 8, 2024 at 1:21 AM Peter Eisentraut wrote: I find the way the installation options are structured a bit odd. I would have expected --with-libcurl and -Dlibcurl (or --with-curl and -Dcurl). These build options usually just say, use this libr

Re: Doc: typo in config.sgml

2024-11-19 Thread Yugo NAGATA
On Mon, 18 Nov 2024 22:07:40 -0500 Bruce Momjian wrote: > On Tue, Nov 19, 2024 at 11:29:07AM +0900, Yugo NAGATA wrote: > > On Mon, 18 Nov 2024 16:04:20 -0500 > > > So, the failure of ligatures is caused usually by not using the right > > > Adobe Font Metric (AFM) file, I think. I have seen fault

Re: README.tuplock and SHARE lock

2024-11-19 Thread Alvaro Herrera
On 2024-Nov-19, Alvaro Herrera wrote: > Hmm, yeah, it seems you're correct about this being an oversight -- we > don't necessarily use a multixact if all we want to do is to store a FOR > SHARE lock. The "Infomask Bits" section explains correctly. I propose the following amendment, diff --git a

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-11-19 Thread vignesh C
On Tue, 19 Nov 2024 at 12:43, Nisha Moond wrote: > > Attached is the v49 patch set: > - Fixed the bug reported in [1]. > - Addressed comments in [2] and [3]. > > I've split the patch into two, implementing the suggested idea in > comment #5 of [2] separately in 001: > > Patch-001: Adds additional

Re: Allow default \watch interval in psql to be configured

2024-11-19 Thread Masahiro Ikeda
Hi, Thanks for developing this useful feature! I've tested it and reviewed the patch. I'd like to provide some feedback. (1) I tested with v3 patch and found the following compile error. It seems that math.h needs to be included in variables.c. variables.c: In function 'ParseVariableDouble':

Re: Sample rate added to pg_stat_statements

2024-11-19 Thread Ilia Evdokimov
Hi everyone, I believe we should also include this check in the pgss_ExecutorEnd() function because sampling in pgss_ExecutorEnd() ensures that a query not initially sampled in pgss_ExecutorStart() can still be logged if it meets the pg_stat_statements.sample_rate criteria. This approach adds

RE: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY

2024-11-19 Thread Zhijie Hou (Fujitsu)
On Tuesday, November 19, 2024 5:10 PM Zhijie Hou (Fujitsu) wrote: > > On Tuesday, November 19, 2024 3:15 PM Shlok Kyal > wrote: > > > > > I noticed that we can add 'publish_generated_columns = true' for the case of > > generated column. So we won't need to remove the test. I have made the > >

Re: UUID v7

2024-11-19 Thread Andrey M. Borodin
> On 19 Nov 2024, at 02:16, Masahiko Sawada wrote: > > I realized that what we do in get_real_time_ns() on Windows is > essentially the same as what we do in gettimeofday(). Probably we can > just do either clock_gettime() with CLOCK_REALTIME on unix-like > systems and gettimeofday() on Windows

tab_complete for copy(merge

2024-11-19 Thread jian he
hi. in v17, we support COPY(MERGE RETURNING) we can add tab_complete for it. /* Complete COPY ( with legal query commands */ else if (Matches("COPY|\\copy", "(")) - COMPLETE_WITH("SELECT", "TABLE", "VALUES", "INSERT INTO", "UPDATE", "DELETE FROM", "WITH"); + CO

Re: tab_complete for copy(merge

2024-11-19 Thread Kirill Reshke
Hi! On Tue, 19 Nov 2024, 14:08 jian he, wrote: > hi. > > in v17, we support COPY(MERGE RETURNING) > we can add tab_complete for it. > Sounds sane > /* Complete COPY ( with legal query commands */ > else if (Matches("COPY|\\copy", "(")) > - COMPLETE_WITH("SELECT", "TABLE",

RE: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY

2024-11-19 Thread Zhijie Hou (Fujitsu)
On Tuesday, November 19, 2024 3:15 PM Shlok Kyal wrote: > > I noticed that we can add 'publish_generated_columns = true' for the case of > generated column. So we won't need to remove the test. I have made the > changes in v9 patch [1]. I think this would unexpectedly change the original purpo

Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row

2024-11-19 Thread jian he
On Sat, Nov 16, 2024 at 5:55 PM Kirill Reshke wrote: > > I am attaching my v8 for reference. > in your v8. REJECT_LIMIT Specifies the maximum number of errors tolerated while converting a column's input value to its data type, when ON_ERROR is set to ignore.

Re: README.tuplock and SHARE lock

2024-11-19 Thread Will Mortensen
Sounds good to me. :-)

Re: README.tuplock and SHARE lock

2024-11-19 Thread Alvaro Herrera
On 2024-Nov-18, Will Mortensen wrote: > README.tuplock says: > > > There is one exception > > here: since infomask space is limited, we do not provide a separate bit > > for SELECT FOR SHARE, so we have to use the extended info in a MultiXact in > > that case. (The other cases, SELECT FOR UPDATE

Re: Adding skip scan (including MDAM style range skip scan) to nbtree

2024-11-19 Thread Masahiro Ikeda
Hi, Apologies for the delayed response. I've confirmed that the costing is significantly improved for multicolumn indexes in the case I provided. Thanks! https://www.postgresql.org/message-id/TYWPR01MB10982A413E0EC4088E78C0E11B1A62%40TYWPR01MB10982.jpnprd01.prod.outlook.com I have some comment