Re: Improve logging when using Huge Pages

2023-03-09 Thread Nathan Bossart
value refers to the current server if you have to log in and execute a function to see it. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Improve logging when using Huge Pages

2023-03-09 Thread Nathan Bossart
the value in having different terminology to clearly distinguish the process(es) from the machine. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Sub-millisecond [autovacuum_]vacuum_cost_delay broken

2023-03-09 Thread Nathan Bossart
ay to be rounded up to the next resolution boundary. I've had doubts for some time about whether this is still accurate... -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: improving user.c error messages

2023-03-09 Thread Nathan Bossart
On Thu, Mar 09, 2023 at 09:58:46AM -0800, Nathan Bossart wrote: > On Thu, Mar 09, 2023 at 10:55:54AM +0100, Peter Eisentraut wrote: >> On 20.02.23 23:58, Nathan Bossart wrote: >>> For now, I've reworded these as "must inherit privileges of". >> >> I do

Re: recovery modules

2023-03-10 Thread Nathan Bossart
/20230301224751.GA1823946%40nathanxps13 [1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=6ad5793 -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 1173c8b4e476575c3e4b410f3aa6220360c38503 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Thu, 23 Feb 2023 14:27

Re: [PATCH] Extend the length of BackgroundWorker.bgw_library_name

2023-03-13 Thread Nathan Bossart
tgr.es/m/304a21ab-a9d6-264a-f688-912869c0d7c6%402ndquadrant.com -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: meson: Non-feature feature options

2023-03-13 Thread Nathan Bossart
ound Shouldn't "auto" cause Postgres to be built without OpenSSL if the required headers are not present? -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Reducing connection overhead in pg_upgrade compat check phase

2023-03-13 Thread Nathan Bossart
e function is quite lengthy, and I count 6 levels of indentation at some lines. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: meson: Non-feature feature options

2023-03-13 Thread Nathan Bossart
On Mon, Mar 13, 2023 at 09:57:22PM +0300, Nazir Bilal Yavuz wrote: > On Mon, 13 Mar 2023 at 21:04, Nathan Bossart wrote: >> Shouldn't "auto" cause Postgres to be built without OpenSSL if the required >> headers are not present? > > Yes, I tested again and it

Re: meson: Non-feature feature options

2023-03-13 Thread Nathan Bossart
On Mon, Mar 13, 2023 at 01:13:31PM -0700, Andres Freund wrote: > On 2023-03-13 11:04:32 -0700, Nathan Bossart wrote: >> I noticed that after 6a30027, if you don't have the OpenSSL headers >> installed, 'meson setup' will fail: >> >> meson.build:1

Re: pg_usleep for multisecond delays

2023-03-13 Thread Nathan Bossart
t would be easy to get wrong. I think it would be nice to have interrupt handling if possible, so I'm still (over)thinking about this. I agree with the rest of your comments. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: optimize several list functions with SIMD intrinsics

2023-03-13 Thread Nathan Bossart
ple, in an integer List, the integer will take up 4 bytes of the 8-byte ListCell (for 64-bit platforms). typedef union ListCell { void *ptr_value; int int_value; Oid oid_value;

Re: meson: Non-feature feature options

2023-03-13 Thread Nathan Bossart
On Mon, Mar 13, 2023 at 02:45:29PM -0700, Andres Freund wrote: > Pushed the patch. Thanks for the prompt fix. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Sub-millisecond [autovacuum_]vacuum_cost_delay broken

2023-03-13 Thread Nathan Bossart
y); > + delay.tv_nsec = (microsec % 100L) * 1000; > + (void) nanosleep(&delay, NULL); Using nanosleep() seems reasonable to me. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Sub-millisecond [autovacuum_]vacuum_cost_delay broken

2023-03-14 Thread Nathan Bossart
On Tue, Mar 14, 2023 at 03:38:45PM +1300, Thomas Munro wrote: > On Tue, Mar 14, 2023 at 12:10 PM Nathan Bossart > wrote: >> > * NOTE: although the delay is specified in microseconds, the effective >> > - * resolution is only 1/HZ, or 10 milliseconds, on most Unix

Re: psql \watch 2nd argument: iteration count

2023-03-14 Thread Nathan Bossart
licate these error messages too much. This code hasn't reported errors for nearly 10 years, and I'm not aware of any complaints. I ѕtill think we could simplify this to "\watch: invalid delay interval: %s" and call it a day. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: recovery modules

2023-03-14 Thread Nathan Bossart
BECYEbyV-4Q%40mail.gmail.com -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From ef9aade7270d12104647439a99e3b1822393a318 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Thu, 23 Feb 2023 14:27:48 -0800 Subject: [PATCH v14 1/7] Move extra code out of the Pre/PostRestoreComma

Re: psql \watch 2nd argument: iteration count

2023-03-14 Thread Nathan Bossart
+ sleep = strtod(opt, &opt_end); + if (sleep < 0 || *opt_end || errno == ERANGE) Should we set errno to 0 before calling strtod()? -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: optimize several list functions with SIMD intrinsics

2023-03-15 Thread Nathan Bossart
On Wed, Mar 15, 2023 at 07:31:46PM +0530, Ankit Kumar Pandey wrote: >> On 14/03/23 03:10, Nathan Bossart wrote: >> On Sat, Mar 11, 2023 at 09:41:18AM +, Ankit Kumar Pandey wrote: >> > 1. In list_member_ptr, will it be okay to bring `const ListCell >> >

Re: improving user.c error messages

2023-03-16 Thread Nathan Bossart
y: > > - errdetail("Only roles with privileges of role \"%s\" may drop its > objects.", > + errdetail("Only roles with privileges of role \"%s\" may drop objects > owned by it.", > > - errdetail("Only roles with privileges of role \"%s\" may reassign its > objects.", > + errdetail("Only roles with privileges of role \"%s\" may reassign objects > owned by it.", Will do. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: improving user.c error messages

2023-03-16 Thread Nathan Bossart
On Thu, Mar 16, 2023 at 04:59:53PM +0100, Peter Eisentraut wrote: > On 16.03.23 16:48, Nathan Bossart wrote: >> > I think the following change in DropRole() is incorrect: >> > >> > if (!is_admin_of_role(GetUserId(), roleid)) &

Re: improving user.c error messages

2023-03-16 Thread Nathan Bossart
Here is a rebased patch in which I've addressed the latest feedback except for the DropRole() part that is under discussion. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From cd6a75109471e173869a15b39342ff4882eac61f Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date:

Re: suppressing useless wakeups in logical/worker.c

2023-03-16 Thread Nathan Bossart
I've attached a minimally-updated patch that doesn't yet address the bigger topics under discussion. On Thu, Mar 16, 2023 at 03:30:37PM +0530, Amit Kapila wrote: > On Wed, Feb 1, 2023 at 5:35 AM Nathan Bossart > wrote: >> On Sat, Jan 28, 2023 at 10:26:25AM +0530, Amit Kapi

Re: improving user.c error messages

2023-03-17 Thread Nathan Bossart
On Fri, Mar 17, 2023 at 10:40:06AM +0100, Peter Eisentraut wrote: > committed Thanks! -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value

2024-03-14 Thread Nathan Bossart
On Wed, Mar 13, 2024 at 01:09:18PM +0700, Yugo NAGATA wrote: > On Tue, 12 Mar 2024 22:07:17 -0500 > Nathan Bossart wrote: >> I did some light editing to prepare this for commit. > > Thank you. I confirmed the test you improved and I am fine with that. Committed. -- Nathan

Re: Psql meta-command conninfo+

2024-03-14 Thread Nathan Bossart
Hi Maiquel, On Thu, Feb 29, 2024 at 10:02:21PM +, Maiquel Grassi wrote: > Sorry for the delay. I will make the adjustments as requested soon. We have only a few weeks left before feature-freeze for v17. Do you think you will be able to send an updated patch soon? -- Nathan Bossart Ama

Re: cleanup patches for incremental backup

2024-03-14 Thread Nathan Bossart
On Wed, Jan 24, 2024 at 12:05:15PM -0600, Nathan Bossart wrote: > There might be an overflow risk in the cutoff time calculation, but I doubt > that's the root cause of these failures: > > /* >* Files should only be removed if the last modification

Re: cleanup patches for incremental backup

2024-03-14 Thread Nathan Bossart
On Thu, Mar 14, 2024 at 04:00:10PM -0500, Nathan Bossart wrote: > Separately, I suppose it's probably time to revert the temporary debugging > code adding by commit 5ddf997. I can craft a patch for that, too. As promised... -- Nathan Bossart Amazon Web Services: https://aws.amazo

Re: recovery modules

2024-03-15 Thread Nathan Bossart
rebased for cfbot -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From d3f497906daf1c405059b2c292f1eeb5cfeb742b Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 15 Feb 2023 14:28:53 -0800 Subject: [PATCH v19 1/5] introduce routine for checking mutually exclusive str

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

2024-03-15 Thread Nathan Bossart
gt; docs that "if invalidation_reason is rows_removed or >> wal_level_insufficient it's the reason for conflict with recovery". > > Fair point. I think we can go either way. Bertrand, Nathan, and > others, do you have an opinion on this matter? WFM -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Popcount optimization using AVX512

2024-03-15 Thread Nathan Bossart
(I re-compiled and re-ran the tests a couple of times because I had a difficult time believing the amount of improvement.) [0] https://postgr.es/m/CAFBsxsE7otwnfA36Ly44zZO%2Bb7AEWHRFANxR1h1kxveEV%3DghLQ%40mail.gmail.com -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: add AVX2 support to simd.h

2024-03-15 Thread Nathan Bossart
the arrays are longer. It might be possible to mitigate by using 2 registers when the "tail" is long enough, but I have yet to try that. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 3a4d74eeab18d9e8f510e11185109ed910e40268 Mon Sep 17 00:00:00 2001 From: Nathan B

Re: add AVX2 support to simd.h

2024-03-15 Thread Nathan Bossart
On Fri, Mar 15, 2024 at 12:41:49PM -0500, Nathan Bossart wrote: > I've also attached the results of running this benchmark on my machine at > HEAD, after applying 0001, and after applying both 0001 and 0002. 0001 > appears to work pretty well. When there is a small "tail,"

Re: Make attstattarget nullable

2024-03-17 Thread Nathan Bossart
. I'll commit the attached patch shortly. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c index 5f49479832..1db3ef69d2 100644 --- a/src/backend/commands/statscmds.c +++ b/src/backend/commands/stats

Re: Popcount optimization using AVX512

2024-03-18 Thread Nathan Bossart
On Mon, Mar 18, 2024 at 09:56:32AM +1300, David Rowley wrote: > Maybe it's worth exploring something along the lines of the attached > before doing the AVX512 stuff. It seems like a pretty good speed-up > and will apply for CPUs without AVX512 support. +1 -- Nathan Bossart Amazo

Re: Popcount optimization using AVX512

2024-03-18 Thread Nathan Bossart
We can apply a similar optimization for systems without AVX512 by inlining the code for pg_popcount64() and pg_popcount32(). -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Popcount optimization using AVX512

2024-03-18 Thread Nathan Bossart
On Mon, Mar 18, 2024 at 11:20:18AM -0500, Nathan Bossart wrote: > I don't think David was suggesting that we need to remove the runtime > checks for AVX512. IIUC he was pointing out that most of the performance > gain is from removing the function call overhead, which your v8-0002 p

Re: Popcount optimization using AVX512

2024-03-18 Thread Nathan Bossart
_popcount extension and run "CREATE EXTENION test_popcount;". > Another Question: Is there a reason "time psql" is used over the Postgres > "\timing" command? I don't think there's any strong reason. I've used both. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Popcount optimization using AVX512

2024-03-18 Thread Nathan Bossart
On Mon, Mar 18, 2024 at 12:30:04PM -0500, Nathan Bossart wrote: > Here is a more fleshed-out version of what I believe David is proposing. > On my machine, the gains aren't quite as impressive (~8.8s to ~5.2s for the > test_popcount benchmark). I assume this is because th

Re: Popcount optimization using AVX512

2024-03-18 Thread Nathan Bossart
, but it seems strange to have > pg_popcount_slow() do it and not pg_popcount_fast(). The only reason I left it out was because I couldn't convince myself that it wasn't dead code, given we assume that popcntq is available in pg_popcount64_fast() today. But I don't see any harm in

Re: Popcount optimization using AVX512

2024-03-18 Thread Nathan Bossart
to "if pg_popcount_available() returns true, can I safely assume I'm on a 64-bit machine?" -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Popcount optimization using AVX512

2024-03-18 Thread Nathan Bossart
On Tue, Mar 19, 2024 at 10:27:58AM +1300, David Rowley wrote: > On Tue, 19 Mar 2024 at 10:08, Nathan Bossart wrote: >> On Tue, Mar 19, 2024 at 10:02:18AM +1300, David Rowley wrote: >> > The only thing I'd question in the patch is in pg_popcount_fast(). It >> > l

Re: Popcount optimization using AVX512

2024-03-18 Thread Nathan Bossart
On Mon, Mar 18, 2024 at 04:29:19PM -0500, Nathan Bossart wrote: > Agreed. Will send an updated patch shortly. As promised... -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From b673663b1d1344549cbd0912220f96ba1712afc6 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: M

Re: add AVX2 support to simd.h

2024-03-18 Thread Nathan Bossart
a linear search, so this is where I've decided to stop. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 2f4a7747025cd3288453fdabd520638e37e3633c Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Mon, 18 Mar 2024 10:44:08 -0500 Subject: [PATCH v4 1/3] pg_lfind32(): Optim

Re: add AVX2 support to simd.h

2024-03-18 Thread Nathan Bossart
quot;end - start" is an exact multiple of blocks, and loop over > them 0002 does the opposite of this. That is, after we've completed as many blocks as possible, we move the iterator variable back to "end - block_size" and do one final iteration to cover all the remaining elements. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: add AVX2 support to simd.h

2024-03-19 Thread Nathan Bossart
On Tue, Mar 19, 2024 at 04:53:04PM +0700, John Naylor wrote: > On Tue, Mar 19, 2024 at 10:16 AM Nathan Bossart > wrote: >> 0002 does the opposite of this. That is, after we've completed as many >> blocks as possible, we move the iterator variable back to "end - >

Re: Avoiding inadvertent debugging mode for pgbench

2024-03-19 Thread Nathan Bossart
On Mon, Mar 11, 2024 at 04:59:36PM +0100, Alvaro Herrera wrote: > All in all, I support the original patch. I'll commit this in a few days if there are no objections. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: cleanup patches for incremental backup

2024-03-19 Thread Nathan Bossart
On Thu, Mar 14, 2024 at 08:52:55PM -0500, Nathan Bossart wrote: > Subject: [PATCH v1 1/2] Revert "Temporary patch to help debug pg_walsummary > test failures." > Subject: [PATCH v1 2/2] Fix possible overflow in MaybeRemoveOldWalSummaries(). Assuming there are no objections

Re: Popcount optimization using AVX512

2024-03-19 Thread Nathan Bossart
On Tue, Mar 19, 2024 at 12:30:50PM +1300, David Rowley wrote: > Looks good. Committed. Thanks for the suggestion and for reviewing! Paul, I suspect your patches will need to be rebased after commit cc4826d. Would you mind doing so? -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Avoiding inadvertent debugging mode for pgbench

2024-03-19 Thread Nathan Bossart
On Tue, Mar 19, 2024 at 01:47:53PM -0500, Nathan Bossart wrote: > On Mon, Mar 11, 2024 at 04:59:36PM +0100, Alvaro Herrera wrote: >> All in all, I support the original patch. > > I'll commit this in a few days if there are no objections. Actually, I just took a look at the

Re: add AVX2 support to simd.h

2024-03-20 Thread Nathan Bossart
On Wed, Mar 20, 2024 at 01:57:54PM +0700, John Naylor wrote: > On Tue, Mar 19, 2024 at 11:30 PM Nathan Bossart > wrote: >> I tried to trim some of the branches, and came up with the attached patch. >> I don't think this is exactly what you were suggesting, but I think i

Re: Avoiding inadvertent debugging mode for pgbench

2024-03-20 Thread Nathan Bossart
On Tue, Mar 19, 2024 at 09:15:22PM -0400, Greg Sabino Mullane wrote: > Rebased version attached (v2), with another sentence in the sgml to explain > the optional use of -d cfbot seems quite unhappy with this: https://cirrus-ci.com/build/6429518263484416 -- Nathan Bossart Amaz

Re: cleanup patches for incremental backup

2024-03-20 Thread Nathan Bossart
On Tue, Mar 19, 2024 at 01:15:02PM -0500, Nathan Bossart wrote: > Assuming there are no objections or feedback, I plan to commit these two > patches within the next couple of days. Committed. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: cleanup patches for incremental backup

2024-03-20 Thread Nathan Bossart
On Wed, Mar 20, 2024 at 02:53:01PM -0400, Robert Haas wrote: > On Wed, Mar 20, 2024 at 2:35 PM Nathan Bossart > wrote: >> Committed. > > Thanks. Sorry you had to clean up after me. :-( No worries. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: add AVX2 support to simd.h

2024-03-20 Thread Nathan Bossart
On Wed, Mar 20, 2024 at 09:31:16AM -0500, Nathan Bossart wrote: > On Wed, Mar 20, 2024 at 01:57:54PM +0700, John Naylor wrote: >> On Tue, Mar 19, 2024 at 11:30 PM Nathan Bossart >> wrote: >>> I tried to trim some of the branches, and came up with the attached patch. &

Re: An improved README experience for PostgreSQL

2024-03-21 Thread Nathan Bossart
sion. I'd rather match the style of the following paragraph (patch attached) than mess with .gitattributes. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com diff --git a/README.md b/README.md index 445eb2f2d0..f6104c038b 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,10 @@

Re: An improved README experience for PostgreSQL

2024-03-21 Thread Nathan Bossart
On Thu, Mar 21, 2024 at 03:24:17PM +0100, Daniel Gustafsson wrote: >> On 21 Mar 2024, at 15:11, Nathan Bossart wrote: >> I added that to maintain the line break that was in the non-Markdown >> version. I'd rather match the style of the following paragraph (patch >

Re: add AVX2 support to simd.h

2024-03-21 Thread Nathan Bossart
. > Further, now that the algorithm is more SIMD-appropriate, I wonder > what doing 4 registers at a time is actually buying us for either SSE2 > or AVX2. It might just be a matter of scale, but that would be good to > understand. I'll follow up with these numbers shortly. --

Re: add AVX2 support to simd.h

2024-03-21 Thread Nathan Bossart
On Thu, Mar 21, 2024 at 12:09:44PM -0500, Nathan Bossart wrote: > It does still eventually win, although not nearly to the same extent as > before. I extended the benchmark a bit to show this. I wouldn't be > devastated if we only got 0001 committed for v17, given these results

Re: add AVX2 support to simd.h

2024-03-21 Thread Nathan Bossart
On Thu, Mar 21, 2024 at 12:09:44PM -0500, Nathan Bossart wrote: > On Thu, Mar 21, 2024 at 11:30:30AM +0700, John Naylor wrote: >> Further, now that the algorithm is more SIMD-appropriate, I wonder >> what doing 4 registers at a time is actually buying us for either SSE2 >> o

Re: An improved README experience for PostgreSQL

2024-03-21 Thread Nathan Bossart
On Thu, Mar 21, 2024 at 10:24:12AM -0700, Andres Freund wrote: > I was out while this was proposed and committed. Just wanted to say: Thanks! > It was high time that we added this... Definitely. I hope we are able to build on this in the near future. -- Nathan Bossart Amazon Web Se

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

2024-03-21 Thread Nathan Bossart
t was abandoned because we didn't have any concrete use-cases at the time. (I'm looking into some additional optimizations in a separate thread [1] that would likely apply here, too.) [0] https://postgr.es/m/20230308002502.GA3378449%40nathanxps13 [1] https://postgr.es/m/20240321183823.GA180

Re: Avoiding inadvertent debugging mode for pgbench

2024-03-21 Thread Nathan Bossart
On Wed, Mar 20, 2024 at 11:57:25AM -0400, Greg Sabino Mullane wrote: > My mistake. Attached please find version 3, which should hopefully make > cfbot happy again. Here is what I have staged for commit. I plan to commit this within the next few days. -- Nathan Bossart Amazon Web Se

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

2024-03-21 Thread Nathan Bossart
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, especially seeing that it has to be done on-the-fly within the >>

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

2024-03-21 Thread Nathan Bossart
check if the filter passes? Seems worth a try. I've been looking for an excuse to use that... -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

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

2024-03-21 Thread Nathan Bossart
On Thu, Mar 21, 2024 at 08:03:32PM -0500, Nathan Bossart wrote: > On Thu, Mar 21, 2024 at 08:59:54PM -0400, Tom Lane wrote: >> However ... I just remembered that we have a Bloom filter implementation >> in core now (src/backend/lib/bloomfilter.c). How about using that >&

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

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 S

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

2024-03-22 Thread Nathan Bossart
tching goes, my current feeling is that the hash table is probably pretty safe and provides the majority of the benefit, but anything fancier should probably be reserved for v17 or v18. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

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 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

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

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 >>

Re: SET ROLE documentation improvement

2024-03-24 Thread Nathan Bossart
On Sat, Mar 23, 2024 at 08:37:20AM -0400, Robert Haas wrote: > On Fri, Mar 22, 2024 at 4:51 PM Nathan Bossart > wrote: >> Actually, shouldn't this one be back-patched to v16? If so, I'd do that >> one separately from the other changes we are discussing. > >

Re: add AVX2 support to simd.h

2024-03-24 Thread Nathan Bossart
Here's a new version of 0001 with some added #ifdefs that cfbot revealed were missing. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From cc2bc5ca5b49cd8641af8b2231a34a1aa5091bb9 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 20 Mar 2024 14:20:24 -0500 Subject

Re: add AVX2 support to simd.h

2024-03-24 Thread Nathan Bossart
On Sun, Mar 24, 2024 at 03:53:17PM -0500, Nathan Bossart wrote: > Here's a new version of 0001 with some added #ifdefs that cfbot revealed > were missing. Sorry for the noise. cfbot revealed another silly mistake (forgetting to reset the "i" variable in the assertion path).

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

2024-03-25 Thread Nathan Bossart
On Fri, Mar 22, 2024 at 04:41:49PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> LGTM > > Thanks for looking, I'll push that shortly. Are there any changes you'd like to see for the Bloom patch [0]? I'd like to see about getting that committed for v17. One

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

2024-03-25 Thread Nathan Bossart
proper order of magnitude. > * Code needs more than zero comments. Yup. > * Is it worth trying to make a subroutine, or at least a macro, > so as not to have 2 copies of the code? I think so. I'll try that in the next version. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: add AVX2 support to simd.h

2024-03-25 Thread Nathan Bossart
d. Right, will do. [0] https://postgr.es/m/20240321183823.GA1800896%40nathanxps13 -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Avoiding inadvertent debugging mode for pgbench

2024-03-25 Thread Nathan Bossart
Committed. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

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

2024-03-25 Thread Nathan Bossart
that would be used in the absence of a slot-level setting. Thoughts? -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: pgsql: Track last_inactive_time in pg_replication_slots.

2024-03-25 Thread Nathan Bossart
_time, but they avoid introducing a completely new word >> (release, as opposed to active/inactive). > > Yeah, I'd vote for inactive_since then. Having only skimmed some of the related discussions, I'm inclined to agree that inactive_since provides the clearest description for

Re: Popcount optimization using AVX512

2024-03-25 Thread Nathan Bossart
On Mon, Mar 25, 2024 at 06:42:36PM +, Amonson, Paul D wrote: > Ok, CI turned green after my re-post of the patches. Can this please get > merged? Thanks for the new patches. I intend to take another look soon. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: add AVX2 support to simd.h

2024-03-25 Thread Nathan Bossart
speedup for this case with this change (on the order of 75%), which I imagine might be due to a combination of branch prediction, caching, fewer instructions, etc. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 1dd970248efd3c5ae1736c0dd1d61fbabbb6c101 Mon Sep 17 00:00:00 20

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

2024-03-26 Thread Nathan Bossart
c_method GUC. And then make the documentation for the > other say something like, you know those issues we documented for > recovery_init_sync_method? Well they also apply to this. WFM. I'll put together a patch. [0] https://postgr.es/m/20231009204823.GA659480%40nathanxps13 -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: pgsql: Track last_inactive_time in pg_replication_slots.

2024-03-26 Thread Nathan Bossart
against wraparound more directly. I don't object to a time-based setting as well, but that won't always work as well for this particular use-case, especially if we are relying on users to set a slot-level parameter. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

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

2024-03-26 Thread Nathan Bossart
804669-7063-1320-ed37-3226d5f10...@eisentraut.org> > and some follow-up was announced but didn't happen. It was on my list to > look into cleaning up during beta. Sorry about this, I lost track of it. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

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

2024-03-26 Thread Nathan Bossart
On Tue, Mar 26, 2024 at 10:11:31AM -0500, Nathan Bossart wrote: > On Tue, Mar 26, 2024 at 11:18:57AM +0100, Peter Eisentraut wrote: >> On 22.03.24 17:52, Robert Haas wrote: >>> I'd like to complain about this commit's addition of a new appendix. >> >> I alr

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

2024-03-26 Thread Nathan Bossart
Here is a new version of the patch that I feel is in decent shape. On Mon, Mar 25, 2024 at 10:16:47AM -0500, Nathan Bossart wrote: > On Mon, Mar 25, 2024 at 11:08:39AM -0400, Tom Lane wrote: >> * The magic constants (crossover list length and bloom filter size) >> need some te

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

2024-03-26 Thread Nathan Bossart
the old filter, which would > be wrong even if it still existed which it likely won't. It's not > that much worse notationally to keep it as a local variable, as I > did in the attached. Ah, yes, that's no good. I fixed this in the new version. -- Nathan Bossart Amazon W

Re: add AVX2 support to simd.h

2024-03-26 Thread Nathan Bossart
I've committed v9, and I've marked the commitfest entry as "Committed," although we may want to revisit AVX2, etc. in the future. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: archive modules loose ends

2024-03-26 Thread Nathan Bossart
On Mon, Jan 15, 2024 at 08:50:25AM -0600, Nathan Bossart wrote: > Thanks for reviewing. I've marked this as ready-for-committer, and I'm > hoping to commit it in the near future. This one probably ought to go into v17, but I wanted to do one last call for feedback pri

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

2024-03-26 Thread Nathan Bossart
that nit. Committed with that change. Thanks for the guidance on this one. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: add AVX2 support to simd.h

2024-03-26 Thread Nathan Bossart
On Tue, Mar 26, 2024 at 07:28:24PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> I've committed v9, and I've marked the commitfest entry as "Committed," >> although we may want to revisit AVX2, etc. in the future. > > A significant fraction of the b

Re: add AVX2 support to simd.h

2024-03-26 Thread Nathan Bossart
On Tue, Mar 26, 2024 at 06:55:54PM -0500, Nathan Bossart wrote: > On Tue, Mar 26, 2024 at 07:28:24PM -0400, Tom Lane wrote: >> A significant fraction of the buildfarm is issuing warnings about >> this. > > Thanks for the heads-up. Will fix. Done. I'll keep an eye on

Re: recovery modules

2024-03-26 Thread Nathan Bossart
another rebase for cfbot -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 0ccdbb0a010830380e6ff4b7a052198d50f0680f Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 15 Feb 2023 14:28:53 -0800 Subject: [PATCH v20 1/5] introduce routine for checking mutually exclus

Re: pgsql: Track last_inactive_time in pg_replication_slots.

2024-03-27 Thread Nathan Bossart
, as any reasonable value you pick is still going to be insufficient in some cases. I think the XID-based parameter would be better here; if the server is at imminent risk of an outage due to wraparound, invalidating the slots is probably a reasonable course of action. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: pg_upgrade failing for 200+ million Large Objects

2024-03-27 Thread Nathan Bossart
r mail from January 12th a full review? > > In my mind the ball is in Nathan's court. I feel it's about > committable, but he might not agree. I'll prioritize another round of review on this one. FWIW I don't remember having any major concerns on a previous version

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

2024-03-27 Thread Nathan Bossart
On Wed, Mar 27, 2024 at 10:41:42AM -0400, Robert Haas wrote: > On Tue, Mar 26, 2024 at 12:34 PM Nathan Bossart > wrote: >> Here's a first attempt at a patch based on Robert's suggestion from >> upthread. > > WFM. Committed. Again, I apologize this took so lo

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

2024-03-27 Thread Nathan Bossart
On Wed, Mar 27, 2024 at 01:21:23PM -0300, Ranier Vilela wrote: > Nathan Bossart writes: >>Committed with that change. Thanks for the guidance on this one. > > I think that left an oversight in a commit d365ae7 > <https://github.com/pos

<    1   2   3   4   5   6   7   8   9   10   >