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

2024-03-22 Thread Amit Kapila
On Sat, Mar 23, 2024 at 3:02 AM Bharath Rupireddy wrote: > > On Fri, Mar 22, 2024 at 3:15 PM Bertrand Drouvot > wrote: > > > > > > Worth to add some tests too (or we postpone them in future commits because > > we're > > confident enough they will follow soon)? > > Yes. Added some tests in a new

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

2024-03-22 Thread Amit Kapila
On Fri, Mar 22, 2024 at 7:17 PM Bertrand Drouvot wrote: > > On Fri, Mar 22, 2024 at 06:02:11PM +0530, Amit Kapila wrote: > > On Fri, Mar 22, 2024 at 5:30 PM Bertrand Drouvot > > wrote: > > > On Fri, Mar 22, 2024 at 03:56:23PM +0530, Amit Kapila wrote: > > > > > > > > > > That would avoid testing

Re: Large block sizes support in Linux

2024-03-22 Thread Thomas Munro
On Fri, Mar 22, 2024 at 10:56 PM Pankaj Raghav (Samsung) wrote: > My team and I have been working on adding Large block size(LBS) > support to XFS in Linux[1]. Once this feature lands upstream, we will be > able to create XFS with FS block size > page size of the system on Linux. > We also gave a

Re: SQL:2011 application time

2024-03-22 Thread jian he
On Fri, Mar 22, 2024 at 11:49 PM Peter Eisentraut wrote: > > On 22.03.24 01:35, Paul Jungwirth wrote: > > > 1. In ri_triggers.c ri_KeysEqual, you swap the order of arguments to > > ri_AttributesEqual(): > > > > > > - if (!ri_AttributesEqual(riinfo->ff_eq_oprs[i], > > RIAttType(rel,

Re: Large block sizes support in Linux

2024-03-22 Thread Bruce Momjian
On Fri, Mar 22, 2024 at 10:31:11PM +0100, Tomas Vondra wrote: > Right, but things change over time - current storage devices support > much larger sectors (LBA format), usually 4K. And if you do I/O with > this size, it's usually atomic. > > AFAIK if you built Postgres with 4K pages, on a device

Re: Potential stack overflow in incremental base backup

2024-03-22 Thread Thomas Munro
On Fri, Mar 8, 2024 at 6:53 AM Robert Haas wrote: > But I think that's really only necessary if we're actually going to > get rid of the idea of segmented relations altogether, which I don't > think is happening at least for v17, and maybe not ever. Yeah, I consider the feedback on ext4's size

Re: session username in default psql prompt?

2024-03-22 Thread Andrew Dunstan
On Fri, Mar 22, 2024 at 7:34 PM Tom Lane wrote: > > On the whole, I think we'd get more complaints about the default > prompt having more-or-less doubled in length than we'd get kudos > about this being a great usability improvement. Prompt space is > expensive and precious, at least for people

Re: Cannot find a working 64-bit integer type on Illumos

2024-03-22 Thread Tom Lane
Thomas Munro writes: > . o O ( int64_t, PRIdi64, etc were standardised a quarter of a century ago ) Yeah. Now that we require C99 it's probably reasonable to assume that those things exist. I wouldn't be in favor of ripping out our existing notations like UINT64CONST, because the code churn

Re: sublink [exists (select xxx group by grouping sets ())] causes an assertion error

2024-03-22 Thread Tom Lane
Jeff Davis writes: > On Fri, 2024-03-22 at 12:28 -0400, Tom Lane wrote: >> Thanks for the report.  I did some bisecting and found that the crash >> appears at Jeff's commit c8aeaf3ab (which introduced this assertion) >> and disappears at Heikki's c4649cce3 (which removed it).  So I would >> say

Re: sublink [exists (select xxx group by grouping sets ())] causes an assertion error

2024-03-22 Thread Jeff Davis
On Fri, 2024-03-22 at 12:28 -0400, Tom Lane wrote: > Thanks for the report.  I did some bisecting and found that the crash > appears at Jeff's commit c8aeaf3ab (which introduced this assertion) > and disappears at Heikki's c4649cce3 (which removed it).  So I would > say that the problem is "this

Re: Cannot find a working 64-bit integer type on Illumos

2024-03-22 Thread Thomas Munro
On Sat, Mar 23, 2024 at 6:26 AM Tom Lane wrote: > conftest.c:139:5: error: no previous prototype for 'does_int64_work' > [-Werror=missing-prototypes] > 139 | int does_int64_work() > | ^~~ > cc1: all warnings being treated as errors > configure:17003: $? = 1 > configure:

Re: pg_upgrade --copy-file-range

2024-03-22 Thread Thomas Munro
Hmm, this discussion seems to assume that we only use copy_file_range() to copy/clone whole segment files, right? That's great and may even get most of the available benefit given typical databases with many segments of old data that never changes, but... I think copy_write_range() allows us to

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-03-22 Thread Melanie Plageman
On Tue, Mar 19, 2024 at 02:33:35PM +0200, Heikki Linnakangas wrote: > On 18/03/2024 17:19, Melanie Plageman wrote: > > I've attached v7 rebased over this commit. > > If we delayed table_beginscan_bm() call further, after starting the TBM > iterator, we could skip it altogether when the iterator

Re: New Table Access Methods for Multi and Single Inserts

2024-03-22 Thread Jeff Davis
On Thu, 2024-03-21 at 13:10 +0530, Bharath Rupireddy wrote: > I'm attaching the v13 patches using virtual tuple slots for buffered > tuples for multi inserts. Comments: * Do I understand correctly that CMV, RMV, and CTAS experience a performance benefit, but COPY FROM does not? And is that

Re: Trying to build x86 version on windows using meson

2024-03-22 Thread Andres Freund
Hi, On 2024-03-21 13:17:44 -0400, Dave Cramer wrote: > Attached correct log file Hm. So there's something a bit odd: > Build started at 2024-03-21T13:07:08.707715 > Main binary: C:\Program Files\Meson\meson.exe > Build Options: '-Dextra_include_dirs=c:\Program Files\OpenSSL-Win64\include' >

Re: session username in default psql prompt?

2024-03-22 Thread Tom Lane
Andrew Dunstan writes: > On Fri, Mar 22, 2024 at 4:04 PM Robert Haas wrote: >> I'm not really a fan of this. Right now my prompt looks like this: >> robert.haas=# >> If we did this, it would say: >> robert.h...@robert.haas=# There would be similar duplication for, eg, the postgres user

Re: Combine Prune and Freeze records emitted by vacuum

2024-03-22 Thread Heikki Linnakangas
On 20/03/2024 21:17, Melanie Plageman wrote: Attached patch changes-for-0001.patch has a bunch of updated comments -- especially for heapam_xlog.h (including my promised diagram). And a few suggestions (mostly changes that I should have made before). New version of these WAL format changes

Re: session username in default psql prompt?

2024-03-22 Thread Andrew Dunstan
On Fri, Mar 22, 2024 at 4:04 PM Robert Haas wrote: > On Wed, Mar 13, 2024 at 4:56 AM Andrew Dunstan > wrote: > > Reposting as the archive mail processor doesn't seem to like the Apple > > mail attachment. > > I'm not really a fan of this. Right now my prompt looks like this: > > robert.haas=# >

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

2024-03-22 Thread Bharath Rupireddy
On Fri, Mar 22, 2024 at 3:15 PM Bertrand Drouvot wrote: > > Looking at v14-0002: Thanks for reviewing. I agree that 0002 with last_inactive_at can go independently and be of use on its own in addition to helping implement inactive_timeout based invalidation. > 1 === > > @@ -691,6 +699,13 @@

Re: Large block sizes support in Linux

2024-03-22 Thread Tomas Vondra
On 3/22/24 19:46, Bruce Momjian wrote: > On Thu, Mar 21, 2024 at 06:46:19PM +0100, Pankaj Raghav (Samsung) wrote: >> Hello, >> >> My team and I have been working on adding Large block size(LBS) >> support to XFS in Linux[1]. Once this feature lands upstream, we will be >> able to create XFS

Re: psql not responding to SIGINT upon db reconnection

2024-03-22 Thread Tristan Partin
On Fri Mar 22, 2024 at 12:17 PM CDT, Robert Haas wrote: On Fri, Mar 22, 2024 at 1:05 PM Tristan Partin wrote: > Sorry for taking a while to get back to y'all. I have taken your > feedback into consideration for v9. This is my first time writing > Postgres docs, so I'm ready for another round of

Re: SET ROLE documentation improvement

2024-03-22 Thread Nathan Bossart
On Fri, Mar 22, 2024 at 03:45:06PM -0500, Nathan Bossart wrote: > On Fri, Mar 22, 2024 at 03:58:59PM -0400, Robert Haas wrote: >> On Fri, Nov 10, 2023 at 12:41 PM Nathan Bossart >> wrote: >>> I still think we should update the existing note about privileges for >>> SET/RESET ROLE to something

Re: SET ROLE documentation improvement

2024-03-22 Thread Nathan Bossart
On Fri, Mar 22, 2024 at 03:58:59PM -0400, Robert Haas wrote: > On Fri, Nov 10, 2023 at 12:41 PM Nathan Bossart > wrote: >> Looking again, I'm kind of hesitant to add too much qualification to this >> note about losing superuser privileges. > > The note in question is: > > >Note that when

Re: Cannot find a working 64-bit integer type on Illumos

2024-03-22 Thread Tom Lane
Robert Haas writes: > On Fri, Mar 22, 2024 at 3:31 PM Andres Freund wrote: >> IME the bigger issue is that sometimes it doesn't lead to outright failures, >> just to lots of stuff not being detected as supported / present. > Ugh. That does, indeed, sound not very nice. I could get behind

Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs

2024-03-22 Thread Tom Lane
Nathan Bossart writes: > On Fri, Mar 22, 2024 at 11:54:48AM -0500, Nathan Bossart wrote: >> On Fri, Mar 22, 2024 at 12:53:15PM -0400, Tom Lane wrote: >>> Would you like to review the catcache patch further, or do you >>> think it's good to go? >> I'll take another look this afternoon. > LGTM

Re: [PATCH] plpython function causes server panic

2024-03-22 Thread Tom Lane
Robert Haas writes: > - I don't think the documentation changes are entirely accurate. The > whole point of the patch is to allow parallel workers to make changes > to the transaction state, but the documentation says you can't. Maybe > we should just delete "change the transaction state"

Re: session username in default psql prompt?

2024-03-22 Thread Robert Haas
On Wed, Mar 13, 2024 at 4:56 AM Andrew Dunstan wrote: > Reposting as the archive mail processor doesn't seem to like the Apple > mail attachment. I'm not really a fan of this. Right now my prompt looks like this: robert.haas=# If we did this, it would say: robert.h...@robert.haas=# I have

Re: SET ROLE documentation improvement

2024-03-22 Thread Robert Haas
On Fri, Nov 10, 2023 at 12:41 PM Nathan Bossart wrote: > On Tue, Sep 26, 2023 at 08:33:25AM -0700, Yurii Rashkovskii wrote: > > This is a good start, indeed. I've amended my patch to include it. > > Thanks for the new patch. > > Looking again, I'm kind of hesitant to add too much qualification to

Re: [HACKERS] make async slave to wait for lsn to be replayed

2024-03-22 Thread Kartyshov Ivan
Thank you for your feedback. On 2024-03-20 12:11, Alexander Korotkov wrote: On Wed, Mar 20, 2024 at 12:34 AM Kartyshov Ivan wrote: > 4.2 With an unreasonably high future LSN, BEGIN command waits > unboundedly, shouldn't we check if the specified LSN is more than > pg_last_wal_receive_lsn()

Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs

2024-03-22 Thread Nathan Bossart
On Fri, Mar 22, 2024 at 11:54:48AM -0500, Nathan Bossart wrote: > On Fri, Mar 22, 2024 at 12:53:15PM -0400, Tom Lane wrote: >> Would you like to review the catcache patch further, or do you >> think it's good to go? > > I'll take another look this afternoon. LGTM -- Nathan Bossart Amazon Web

Re: Cannot find a working 64-bit integer type on Illumos

2024-03-22 Thread Robert Haas
On Fri, Mar 22, 2024 at 3:31 PM Andres Freund wrote: > IME the bigger issue is that sometimes it doesn't lead to outright failures, > just to lots of stuff not being detected as supported / present. Ugh. That does, indeed, sound not very nice. -- Robert Haas EDB: http://www.enterprisedb.com

Re: Cannot find a working 64-bit integer type on Illumos

2024-03-22 Thread Andres Freund
Hi, On 2024-03-22 15:02:45 -0400, Robert Haas wrote: > On Fri, Mar 22, 2024 at 2:38 PM Andres Freund wrote: > > I wonder if we ought to make configure warn if it sees -Werror in CFLAGS - > > this is far from the first time somebody stumbling with -Werror. Including a > > few quite senior

Re: [HACKERS] make async slave to wait for lsn to be replayed

2024-03-22 Thread Kartyshov Ivan
Thank you for your feedback. On 2024-03-20 12:11, Alexander Korotkov wrote: On Wed, Mar 20, 2024 at 12:34 AM Kartyshov Ivan wrote: > 4.2 With an unreasonably high future LSN, BEGIN command waits > unboundedly, shouldn't we check if the specified LSN is more than > pg_last_wal_receive_lsn()

Re: documentation structure

2024-03-22 Thread Robert Haas
On Fri, Mar 22, 2024 at 3:17 PM Bruce Momjian wrote: > I agree and they should be with the other views. I was just explaining > why, at the time, I didn't touch them. Ah, OK. That makes total sense. -- Robert Haas EDB: http://www.enterprisedb.com

Re: documentation structure

2024-03-22 Thread Bruce Momjian
On Fri, Mar 22, 2024 at 03:13:29PM -0400, Robert Haas wrote: > On Fri, Mar 22, 2024 at 2:59 PM Bruce Momjian wrote: > > I assume statistics collector views are in "Monitoring Database > > Activity" because that is their purpose. > > Well, yes. :-) > > But the point is that all other statistics

Re: documentation structure

2024-03-22 Thread Robert Haas
On Fri, Mar 22, 2024 at 2:59 PM Bruce Momjian wrote: > I assume statistics collector views are in "Monitoring Database > Activity" because that is their purpose. Well, yes. :-) But the point is that all other statistics views are in a single section regardless of their purpose. We don't

Re: documentation structure

2024-03-22 Thread David G. Johnston
On Fri, Mar 22, 2024 at 11:19 AM Robert Haas wrote: > On Fri, Mar 22, 2024 at 1:35 PM Bruce Momjian wrote: > > But that all seems like a separate question from why we have the > statistic collector views in a completely different part of the > documentation from the rest of the system views. My

Re: Cannot find a working 64-bit integer type on Illumos

2024-03-22 Thread Robert Haas
On Fri, Mar 22, 2024 at 2:38 PM Andres Freund wrote: > I wonder if we ought to make configure warn if it sees -Werror in CFLAGS - > this is far from the first time somebody stumbling with -Werror. Including a > few quite senior hackers, if I recall correctly. We could also just filter it >

Re: documentation structure

2024-03-22 Thread Bruce Momjian
On Fri, Mar 22, 2024 at 02:19:29PM -0400, Robert Haas wrote: > If you were actually looking for the section called "System Views", > you weren't likely to see it here unless you already knew it was > there, because it was 64 items into a 97-item list. Having one of > these two sections inside the

Re: Large block sizes support in Linux

2024-03-22 Thread Bruce Momjian
On Thu, Mar 21, 2024 at 06:46:19PM +0100, Pankaj Raghav (Samsung) wrote: > Hello, > > My team and I have been working on adding Large block size(LBS) > support to XFS in Linux[1]. Once this feature lands upstream, we will be > able to create XFS with FS block size > page size of the system on

Re: pg_upgrade --copy-file-range

2024-03-22 Thread Robert Haas
On Fri, Mar 22, 2024 at 1:22 PM Tomas Vondra wrote: > Right, this will happen: > > pg_combinebackup: error: unable to use accelerated copy when manifest > checksums are to be calculated. Use --no-manifest > > Are you saying we should just silently override the copy method and do > the copy

Re: Cannot find a working 64-bit integer type on Illumos

2024-03-22 Thread Andres Freund
Hi, On 2024-03-22 13:25:56 -0400, Tom Lane wrote: > The short answer is that Autoconf is not designed to support -Werror > and it's not worth it to try to make it do so. I wonder if we ought to make configure warn if it sees -Werror in CFLAGS - this is far from the first time somebody stumbling

Re: documentation structure

2024-03-22 Thread Robert Haas
On Fri, Mar 22, 2024 at 1:35 PM Bruce Momjian wrote: > > One question I have is why all of these views are documented here > > rather than in chapter 53, "System Views," because surely they are > > system views. I feel like if our documentation index weren't a mile > > long and if you could

Re: [PATCH] plpython function causes server panic

2024-03-22 Thread Robert Haas
On Fri, Mar 22, 2024 at 1:52 PM Tom Lane wrote: > Robert Haas writes: > > I agree with the general direction. A few comments: > > > - Isn't it redundant to test if IsInParallelMode() || > > IsParallelWorker()? We can't be in a parallel worker without also > > being in parallel mode, except

Re: [PATCH] plpython function causes server panic

2024-03-22 Thread Tom Lane
Robert Haas writes: > I agree with the general direction. A few comments: > - Isn't it redundant to test if IsInParallelMode() || > IsParallelWorker()? We can't be in a parallel worker without also > being in parallel mode, except during the worker startup sequence. Hmm. The existing code in

Re: [DOC] Add detail regarding resource consumption wrt max_connections

2024-03-22 Thread Robert Haas
On Fri, Mar 8, 2024 at 9:52 AM Robert Treat wrote: > I'm of the opinion that advice suggestingDBA's set things to DEBUG 3 > is unfriendly at best. If you really want to add more, there is an > existing unfriendly section of the docs at >

Re: Proposal for implementing OCSP Stapling in PostgreSQL

2024-03-22 Thread Jacob Champion
On Tue, Mar 5, 2024 at 4:12 PM David Zhang wrote: > Any comments or feedback would be greatly appreciated! Hi David -- I haven't had time to get to this for the 17 release cycle, but I'm interested in this feature and I intend to review it at some point for 18. I think OCSP will be especially

Re: Add minimal C example and SQL registration example for custom table access methods.

2024-03-22 Thread Robert Haas
On Fri, Jan 26, 2024 at 3:03 PM Fabrízio de Royes Mello wrote: > On Wed, Nov 15, 2023 at 8:29 PM Roberto Mello wrote: > > Suggestion: > > > > In the C example you added you mention in the comment: > > > > + /* Methods from TableAmRoutine omitted from example, but all > > + non-optional ones

Re: Adding comments to help understand psql hidden queries

2024-03-22 Thread Greg Sabino Mullane
On Fri, Mar 22, 2024 at 11:39 AM David Christensen wrote: > I think it's easier to keep the widths balanced than constant (patch > version included here) Yeah, I'm fine with that, especially because nobody is translating it, nor are they likely to, to be honest. Cheers, Greg

Re: documentation structure

2024-03-22 Thread Bruce Momjian
On Fri, Mar 22, 2024 at 08:32:14AM -0400, Robert Haas wrote: > On Thu, Mar 21, 2024 at 6:32 PM David G. Johnston > wrote: > > Just going to note that the section on the cumulative statistics views > > being a single page is still a strongly bothersome issue here. Though the > > quick fix

Re: Simplify documentation related to Windows builds

2024-03-22 Thread Robert Haas
On Tue, Jan 30, 2024 at 3:02 AM Michael Paquier wrote: > The more I think about this thread, the more I'd tend to wipe out most > of "windows-requirements" for the sole reason that it is the far-west > regarding the various ways it is possible to get the dependencies we > need for the build and

Re: make dist using git archive

2024-03-22 Thread Tristan Partin
On Thu Mar 21, 2024 at 3:44 AM CDT, Peter Eisentraut wrote: Here is an updated version of this patch set. You should add 'disabler: true' to the git find_program in Meson. If Git doesn't exist on the system with the way your patch is currently written, the targets would be defined, even

Re: DOCS: add helpful partitioning links

2024-03-22 Thread Robert Treat
On Thu, Mar 21, 2024 at 7:27 AM Ashutosh Bapat wrote: > On Wed, Mar 20, 2024 at 5:22 PM Ashutosh Bapat > wrote: >> On Tue, Mar 19, 2024 at 6:38 PM Robert Treat wrote: >>> >>> >>> I've put it in the next commitfest with target version of 17, and I've >>> added you as a reviewer :-) >>> >> >>

Re: Built-in CTYPE provider

2024-03-22 Thread Jeff Davis
On Fri, 2024-03-22 at 15:51 +0100, Peter Eisentraut wrote: > I think this might be too big of a compatibility break.  So far, > initcap('123abc') has always returned '123abc'.  If the new collation > returns '123Abc' now, then that's quite a change.  These are not some > obscure Unicode special

Re: Cannot find a working 64-bit integer type on Illumos

2024-03-22 Thread Tom Lane
Japin Li writes: > On Sat, 23 Mar 2024 at 00:53, Andres Freund wrote: >> Likely there's an unrelated warning triggering the configure test to >> fail. We'd need to see config.log to see what that is. > Thanks for your quick reply. Attach the config.log. Yup: conftest.c:139:5: error: no

Re: Cannot find a working 64-bit integer type on Illumos

2024-03-22 Thread Japin Li
On Sat, 23 Mar 2024 at 01:04, Tom Lane wrote: > Japin Li writes: >> When I try to configure PostgreSQL 16.2 on Illumos using the following >> command, >> it complains $subject. > >> ./configure --enable-cassert --enable-debug --enable-nls --with-perl \ >> --with-python --without-tcl

Re: pg_upgrade --copy-file-range

2024-03-22 Thread Tomas Vondra
On 3/22/24 17:42, Robert Haas wrote: > On Fri, Mar 22, 2024 at 10:40 AM Tomas Vondra > wrote: >> There's one question, though. As it stands, there's a bit of asymmetry >> between handling CopyFile() on WIN32 and the clone/copy_file_range on >> other platforms). On WIN32, we simply automatically

Re: psql not responding to SIGINT upon db reconnection

2024-03-22 Thread Robert Haas
On Fri, Mar 22, 2024 at 1:05 PM Tristan Partin wrote: > Sorry for taking a while to get back to y'all. I have taken your > feedback into consideration for v9. This is my first time writing > Postgres docs, so I'm ready for another round of editing :). Yeah, that looks like it needs some

Re: psql not responding to SIGINT upon db reconnection

2024-03-22 Thread Tristan Partin
On Fri Mar 22, 2024 at 9:59 AM CDT, Robert Haas wrote: On Wed, Jan 31, 2024 at 1:07 PM Tristan Partin wrote: > I was looking for documentation of PQsocket(), but didn't find any > standalone (unless I completely missed it). So I just copied how > PQsocket() is documented in PQconnectPoll(). I

Re: Cannot find a working 64-bit integer type on Illumos

2024-03-22 Thread Tom Lane
Japin Li writes: > When I try to configure PostgreSQL 16.2 on Illumos using the following > command, > it complains $subject. > ./configure --enable-cassert --enable-debug --enable-nls --with-perl \ > --with-python --without-tcl --without-gssapi --with-openssl \ > --with-ldap

Re: documentation structure

2024-03-22 Thread David G. Johnston
On Fri, Mar 22, 2024, 09:32 Robert Haas wrote: > > > I notice that you say that the "Installation" section should "cover > the architectural overview and point people to where they can find the > stuff they need to install PostgreSQL in the various ways available to > them" so maybe you're not

Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs

2024-03-22 Thread Nathan Bossart
On Fri, Mar 22, 2024 at 12:53:15PM -0400, Tom Lane wrote: > Would you like to review the catcache patch further, or do you > think it's good to go? I'll take another look this afternoon. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs

2024-03-22 Thread Tom Lane
Nathan Bossart writes: > On Fri, Mar 22, 2024 at 11:27:46AM -0400, Tom Lane wrote: >> * Do we want to risk back-patching any of this, to fix the performance >> regression in v16? I think that the OP's situation is a pretty >> narrow one, but maybe he's not the only person who managed to dodge >>

Re: Cannot find a working 64-bit integer type on Illumos

2024-03-22 Thread Andres Freund
Hi, On 2024-03-23 00:48:05 +0800, Japin Li wrote: > When I try to configure PostgreSQL 16.2 on Illumos using the following > command, > it complains $subject. > > ./configure --enable-cassert --enable-debug --enable-nls --with-perl \ > --with-python --without-tcl --without-gssapi

Re: pgsql: Allow using syncfs() in frontend utilities.

2024-03-22 Thread Robert Haas
On Wed, Sep 6, 2023 at 7:28 PM Nathan Bossart wrote: > Allow using syncfs() in frontend utilities. > > This commit allows specifying a --sync-method in several frontend > utilities that must synchronize many files to disk (initdb, > pg_basebackup, pg_checksums, pg_dump, pg_rewind, and

Cannot find a working 64-bit integer type on Illumos

2024-03-22 Thread Japin Li
Hi, hackers, When I try to configure PostgreSQL 16.2 on Illumos using the following command, it complains $subject. ./configure --enable-cassert --enable-debug --enable-nls --with-perl \ --with-python --without-tcl --without-gssapi --with-openssl \ --with-ldap --with-libxml

Re: pg_upgrade --copy-file-range

2024-03-22 Thread Robert Haas
On Fri, Mar 22, 2024 at 10:40 AM Tomas Vondra wrote: > There's one question, though. As it stands, there's a bit of asymmetry > between handling CopyFile() on WIN32 and the clone/copy_file_range on > other platforms). On WIN32, we simply automatically switch to CopyFile > automatically, if we

Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs

2024-03-22 Thread Nathan Bossart
On Fri, Mar 22, 2024 at 11:27:46AM -0400, Tom Lane wrote: > Yeah, that's about what I'd expect: hash+bloom ought to remove > most (not quite all) of the opportunity for simd to shine, because > the bloom filter should eliminate most of the list_member_oid calls. Right. IMHO the SIMD work is

Re: documentation structure

2024-03-22 Thread Robert Haas
On Fri, Mar 22, 2024 at 11:50 AM David G. Johnston wrote: > On Fri, Mar 22, 2024 at 7:10 AM Robert Haas wrote: >> That's actually what we had in chapter >> 18, "Installation from Source Code on Windows", since removed. But for >> some reason we decided that on non-Windows platforms, it needed a

Re: sublink [exists (select xxx group by grouping sets ())] causes an assertion error

2024-03-22 Thread Tom Lane
"=?UTF-8?B?6LW15bqt5rW3KOW6reeroCk=?=" writes: > I recently notice these sql can lead to a assertion error in pg14 and older > version. Here is an example: > postgres=> CREATE TABLE t1 (a int); > postgres=> INSERT INTO t1 VALUES (1); > postgres=> SELECT EXISTS ( SELECT * FROM t1 GROUP BY

Re: [PATCH] plpython function causes server panic

2024-03-22 Thread Tom Lane
Robert Haas writes: > On Fri, Dec 29, 2023 at 12:56 PM Tom Lane wrote: >> Here's a draft patch along this line. Basically the idea is that >> subtransactions used for error control are now legal in parallel >> mode (including in parallel workers) so long as they don't try to >> acquire their

Re: documentation structure

2024-03-22 Thread David G. Johnston
On Fri, Mar 22, 2024 at 7:10 AM Robert Haas wrote: > > That's actually what we had in chapter > 18, "Installation from Source Code on Windows", since removed. But for > some reason we decided that on non-Windows platforms, it needed a > whole new chapter rather than an extra sentence in the

Re: MIN/MAX functions for a record

2024-03-22 Thread Viliam Ďurina
Exactly Tom, I see no fundamental problem for it not to be implemented, since comparison operator is already implemented. In fact, MIN/MAX should work for all types for which comparison operator is defined. Regarding index support, there should not be an issue if the index is defined for the

Re: SQL:2011 application time

2024-03-22 Thread Peter Eisentraut
On 22.03.24 01:35, Paul Jungwirth wrote: > 1. In ri_triggers.c ri_KeysEqual, you swap the order of arguments to ri_AttributesEqual(): > > -   if (!ri_AttributesEqual(riinfo->ff_eq_oprs[i], RIAttType(rel, attnums[i]), > -   oldvalue, newvalue)) > +  

Re: Add Index-level REINDEX with multiple jobs

2024-03-22 Thread Alexander Korotkov
On Wed, Mar 20, 2024 at 7:19 PM Alexander Korotkov wrote: > On Mon, Mar 11, 2024 at 3:44 PM Maxim Orlov wrote: > > On Tue, 6 Feb 2024 at 09:22, Michael Paquier wrote: > >> The problem may be actually trickier than that, no? Could there be > >> other factors to take into account for their

Re: [PATCH] plpython function causes server panic

2024-03-22 Thread Robert Haas
On Fri, Dec 29, 2023 at 12:56 PM Tom Lane wrote: > Here's a draft patch along this line. Basically the idea is that > subtransactions used for error control are now legal in parallel > mode (including in parallel workers) so long as they don't try to > acquire their own XIDs. I had to clean up

Re: Adding comments to help understand psql hidden queries

2024-03-22 Thread David Christensen
On Fri, Mar 22, 2024 at 9:47 AM Greg Sabino Mullane wrote: > > On Thu, Mar 21, 2024 at 6:20 PM Peter Eisentraut wrote: >> >> lines are supposed to align vertically. With your patch, the first line >> would have variable length depending on the command. > > > Yes, that is a good point. Aligning

Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs

2024-03-22 Thread Tom Lane
Nathan Bossart writes: > On Fri, Mar 22, 2024 at 09:47:39AM -0500, Nathan Bossart wrote: >> hash hash+simd hash+simd+bloom >> create 1.27 1.27 1.28 >> grant 0.18 0.11 0.03 > For just hash+bloom, I'm seeing 1.29 and 0.04. Yeah, that's about what I'd expect:

Re: [DOC] Introducing Quick Start Guide to PL/pgSQL and PL/Python Documentation

2024-03-22 Thread Robert Haas
On Fri, Dec 22, 2023 at 12:04 PM Pavel Stehule wrote: > I have not a strong opinion about it. My personal experience is so 99% PL > code is PLpgSQL, so it can be there, and other PL can be referenced there. I > am not sure if there is some common part for all PL. After reading over this

Re: MIN/MAX functions for a record

2024-03-22 Thread Tom Lane
Aleksander Alekseev writes: >> In my queries I often need to do MIN/MAX for tuples, for example: >> SELECT MAX(row(year, month)) >> FROM (VALUES(2025, 1), (2024,2)) x(year, month); >> This query throws: >> ERROR: function max(record) does not exist >> Was this ever discussed or is there something

Re: hot updates and fillfactor

2024-03-22 Thread Fabrice Chapuis
Thanks for your explanation and for the links On Tue, Mar 19, 2024 at 11:17 AM Aleksander Alekseev < aleksan...@timescale.com> wrote: > Hi Fabrice, > > > I do not understand why hot_updates value is not 0 for pg_database? > Given that reloptions is empty for this table that means it has a

Re: MIN/MAX functions for a record

2024-03-22 Thread Aleksander Alekseev
Hi, > In my queries I often need to do MIN/MAX for tuples, for example: > > SELECT MAX(row(year, month)) > FROM (VALUES(2025, 1), (2024,2)) x(year, month); > > This query throws: > > ERROR: function max(record) does not exist > > In this case you can replace it with

Re: psql not responding to SIGINT upon db reconnection

2024-03-22 Thread Robert Haas
On Wed, Jan 31, 2024 at 1:07 PM Tristan Partin wrote: > I was looking for documentation of PQsocket(), but didn't find any > standalone (unless I completely missed it). So I just copied how > PQsocket() is documented in PQconnectPoll(). I am happy to document it > separately if you think it would

Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs

2024-03-22 Thread Nathan Bossart
On Fri, Mar 22, 2024 at 09:47:39AM -0500, Nathan Bossart wrote: > hash hash+simd hash+simd+bloom > create 1.27 1.27 1.28 > grant 0.18 0.11 0.03 For just hash+bloom, I'm seeing 1.29 and 0.04. -- Nathan Bossart Amazon Web Services:

Re: Built-in CTYPE provider

2024-03-22 Thread Peter Eisentraut
On 21.03.24 01:13, Jeff Davis wrote: Are there any test cases that illustrate the word boundary changes in patch 0005?  It might be useful to test those against Oracle as well. The tests include initcap('123abc') which is '123abc' in the PG_C_UTF8 collation vs '123Abc' in PG_UNICODE_FAST. The

Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs

2024-03-22 Thread Nathan Bossart
On Thu, Mar 21, 2024 at 08:59:54PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> On Thu, Mar 21, 2024 at 03:40:12PM -0500, Nathan Bossart wrote: >>> On Thu, Mar 21, 2024 at 04:31:45PM -0400, Tom Lane wrote: I don't think we have any really cheap way to de-duplicate the role OIDs,

Re: Adding comments to help understand psql hidden queries

2024-03-22 Thread Greg Sabino Mullane
On Thu, Mar 21, 2024 at 6:20 PM Peter Eisentraut wrote: > lines are supposed to align vertically. With your patch, the first line > would have variable length depending on the command. > Yes, that is a good point. Aligning those would be quite tricky, what if we just kept a standard width for

Re: pg_upgrade --copy-file-range

2024-03-22 Thread Tomas Vondra
Here's a patch reworked along the lines from a couple days ago. The primary goals were to add clone/copy_file_range while minimizing unnecessary disruption, and overall cleanup of the patch. I'm not saying it's committable, but I think the patch is much easier to understand. The main change is

Re: Support a wildcard in backtrace_functions

2024-03-22 Thread Jelte Fennema-Nio
On Fri, 22 Mar 2024 at 11:14, Bharath Rupireddy wrote: > A few comments: > > 1. > @@ -832,6 +849,9 @@ matches_backtrace_functions(const char *funcname) > { > const char *p; > > +if (!backtrace_functions || backtrace_functions[0] == '\0') > +return true; > + > > Shouldn't this be

Re: [PATCH] Add sortsupport for range types and btree_gist

2024-03-22 Thread Bernd Helmle
Hi Andrey, Am Freitag, dem 22.03.2024 um 18:27 +0500 schrieb Andrey M. Borodin: > > Here is a rebased version of the patch. > > FWIW it would be nice at least port tests from commit that I > referenced upthread. > Nowadays we have injection points, so these tests can be much more > stable.

Re: speed up a logical replica setup

2024-03-22 Thread Shubham Khanna
On Fri, Mar 22, 2024 at 9:02 AM Euler Taveira wrote: > > On Thu, Mar 21, 2024, at 6:49 AM, Shlok Kyal wrote: > > There is a compilation error while building postgres with the patch > due to a recent commit. I have attached a top-up patch v32-0003 to > resolve this compilation error. > I have not

Re: UUID v7

2024-03-22 Thread Peter Eisentraut
On 20.03.24 19:08, Andrey M. Borodin wrote: On 19 Mar 2024, at 13:55, Peter Eisentraut wrote: On 16.03.24 18:43, Andrey M. Borodin wrote: On 15 Mar 2024, at 14:47, Aleksander Alekseev wrote: +1 to the idea. I doubt that anyone will miss it. PFA v22. Changes: 1. Squashed all

Re: sslinfo extension - add notbefore and notafter timestamps

2024-03-22 Thread Jacob Champion
On Fri, Mar 22, 2024 at 6:15 AM Daniel Gustafsson wrote: > While staging this to commit I realized one silly thing about it warranting > another round here. The ASN.1 timediff code can diff against *any* timestamp, > not just the UNIX epoch, so we could just pass in the postgres epoch and skip >

Re: speed up a logical replica setup

2024-03-22 Thread vignesh C
On Fri, 22 Mar 2024 at 09:01, Euler Taveira wrote: > > On Thu, Mar 21, 2024, at 6:49 AM, Shlok Kyal wrote: > > There is a compilation error while building postgres with the patch > due to a recent commit. I have attached a top-up patch v32-0003 to > resolve this compilation error. > I have not

Re: NLS for extension

2024-03-22 Thread Robert Haas
On Fri, Mar 22, 2024 at 9:27 AM Ed Behn wrote: > Thank you for your guidance. It turns out the call was coming from inside > the house. The error isn't caused by Postgres. It's the library that I'm > using that reported the error. My extension passes any errors it generates as > Postgres

Re: documentation structure

2024-03-22 Thread Robert Haas
On Fri, Mar 22, 2024 at 9:35 AM Peter Eisentraut wrote: > >> But this separation was explicitly added a few years ago, because most > >> people just want to read about the binaries. > > > > I really doubt that this is true. > > Here is the thread: >

Re: UUID v7

2024-03-22 Thread Sergey Prokhorenko
Another source: Microservices Pattern: Database per service | | | | | | | | | | | Microservices Pattern: Database per service A service's database is private to that service | | | Sergey Prokhorenko sergeyprokhore...@yahoo.com.au On Friday, 22 March 2024 at 04:58:59 pm

Re: documentation structure

2024-03-22 Thread Robert Haas
On Thu, Mar 21, 2024 at 7:40 PM Peter Eisentraut wrote: > I'm highly against this. If I want to read about PL/Python, why should > I have to wade through PL/Perl and PL/Tcl? > > I think, abstractly, in a book, PL/Python should be a chapter of its > own. Just like GiST should be a chapter of its

Re: UUID v7

2024-03-22 Thread Sergey Prokhorenko
BTW: Each microservice should have its own database to ensure data isolation and independence, enabling better scalability and fault tolerance Source: Microservices Pattern: Shared database | | | | Microservices Pattern: Shared database | | | Sergey Prokhorenko

Re: Using the %m printf format more

2024-03-22 Thread Dagfinn Ilmari Mannsåker
Dagfinn Ilmari Mannsåker writes: > Michael Paquier writes: > >> On Wed, Mar 13, 2024 at 02:33:52PM +0100, Peter Eisentraut wrote: >>> The 0002 patch looks sensible. It would be good to fix that, otherwise it >>> could have some confusing outcomes in the future. >> >> You mean if we begin to

  1   2   >