Re: Atomic ops for unlogged LSN

2023-06-12 Thread Nathan Bossart
On Mon, Jun 12, 2023 at 07:24:18PM -0400, Stephen Frost wrote: > * Nathan Bossart (nathandboss...@gmail.com) wrote: >> Is it? I see uses in GiST indexing (62401db), so it's not immediately >> obvious to me how it is debugging-only. If it is, then I think this patch >> ough

Re: Setting restrictedtoken in pg_regress

2023-06-12 Thread Nathan Bossart
My suspicion is that this was chosen to align with CreateProcess and to allow things like if (!CreateRestrictedProcess(...)) -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: [PATCH] Slight improvement of worker_spi.c example

2023-06-12 Thread Nathan Bossart
current code could lead folks to think that PushActiveSnapshot must go after SPI_connect, but wouldn't the reverse ordering just give folks the opposite impression? -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Setting restrictedtoken in pg_regress

2023-06-12 Thread Nathan Bossart
steo from fa1e5afa8a2 > which does that in restricted_token.c? If not needed, removing it makes the > code more readable IMO. Looks reasonable to me. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Atomic ops for unlogged LSN

2023-06-12 Thread Nathan Bossart
a given writer. If this matters in a given situation, some other mechanism must be used instead of or in addition to memory barriers. IIUC we know that shared memory accesses cannot be reordered to precede aquisition or follow release of a spinlock (thanks to 0709b7e), which is why this i

Re: Improve logging when using Huge Pages

2023-06-12 Thread Nathan Bossart
On Tue, May 02, 2023 at 11:17:50AM +0900, Michael Paquier wrote: > On Thu, Apr 20, 2023 at 02:16:17PM -0700, Nathan Bossart wrote: >> AFAICT this would involve adding a bool to BackendParameters and using it >> in save_backend_variables() and restore_backend_variables(), which is a

add non-option reordering to in-tree getopt_long

2023-06-09 Thread Nathan Bossart
[2] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=ffd3980 [3] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=d9ddc50 [4] https://postgr.es/m/20539.1237314382%40sss.pgh.pa.us -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 68c866da205592a370279d6b2a1

Re: Fix search_path for all maintenance commands

2023-06-08 Thread Nathan Bossart
n anything else. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Typo in src/backend/access/nbtree/README?

2023-06-08 Thread Nathan Bossart
ct"? >> > >> > These two additions make it possible detect a concurrent page split >> >> Agreed. Attached is a small patch that fixes this. > > > +1. A little nitpick: the new line seems overly long compared to > adjacent lines, should we wrap it? Committed, thanks. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: createuser --memeber and PG 16

2023-05-23 Thread Nathan Bossart
ck the state of the tarballs to-be-released. Thanks, committed. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: createuser --memeber and PG 16

2023-05-22 Thread Nathan Bossart
On Mon, May 22, 2023 at 08:42:28AM +0200, Peter Eisentraut wrote: > On 21.05.23 19:07, Nathan Bossart wrote: >> How do folks feel about keeping --role undocumented? Should we give it a >> mention in the docs for --member-of? > > We made a point in this release to docume

Re: createuser --memeber and PG 16

2023-05-21 Thread Nathan Bossart
On Mon, May 22, 2023 at 09:11:18AM +0900, Michael Paquier wrote: > On Sun, May 21, 2023 at 12:16:58PM -0700, Nathan Bossart wrote: >> Alright. Barring any additional feedback, I'll commit this tonight. > > v2 passes the eye test, and I am not spotting any references to the >

Re: createuser --memeber and PG 16

2023-05-21 Thread Nathan Bossart
On Sun, May 21, 2023 at 01:20:01PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> Fixed. > > v2 looks good to me, except the documentation wording for --with-role > is needlessly inconsistent with --with-admin. The --with-admin > wording looks better, so I suggest &g

Re: PostgreSQL 16 Beta 1 release announcement draft

2023-05-21 Thread Nathan Bossart
On Sun, May 21, 2023 at 12:51:05PM -0400, Jonathan S. Katz wrote: > On 5/19/23 10:57 AM, Nathan Bossart wrote: >> [pg_use_]reserved_connections might also deserve a mention here. AFAICT >> it's the only new predefined role that isn't mentioned in the announcement. >> I'm oka

Re: createuser --memeber and PG 16

2023-05-21 Thread Nathan Bossart
a member of >>> ROLE\n")); > > (I assume that's what this should say, it's backwards ATM) > and > >>> + printf(_(" -m, --with-member=ROLE ROLE will be a member of new >>> role\n")); Fixed. How do folks feel about keeping --role undocume

Re: createuser --memeber and PG 16

2023-05-21 Thread Nathan Bossart
On Sun, May 21, 2023 at 07:44:49AM -0700, Nathan Bossart wrote: > On Sun, May 21, 2023 at 08:00:15AM +0200, Peter Eisentraut wrote: >> Maybe >> >> createuser --with-members >> >> and >> >> createuser --member-of >> >> would be clearer.

Re: createuser --memeber and PG 16

2023-05-21 Thread Nathan Bossart
On Sun, May 21, 2023 at 08:00:15AM +0200, Peter Eisentraut wrote: > Maybe > > createuser --with-members > > and > > createuser --member-of > > would be clearer. Those seem like reasonable choices to me. I suspect we'll want to keep --role around for backward

Re: Naming of gss_accept_deleg

2023-05-20 Thread Nathan Bossart
On Sat, May 20, 2023 at 11:21:57PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> The buildfarm and cfbot seem unhappy with 9c0a0e2. It looks like there are >> a few remaining uses of gss_accept_deleg to rename. I'm planning to commit >> the attached patch shortly

Re: Naming of gss_accept_deleg

2023-05-20 Thread Nathan Bossart
_deleg to rename. I'm planning to commit the attached patch shortly. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index c8018da04a..b090ec5245 100644 --- a/src/backend/util

Re: Naming of gss_accept_deleg

2023-05-19 Thread Nathan Bossart
something to be said for keeping >> those three things alike? > > +1 for spelling it out in all user-visible names. I do not think > that that GSS-API C symbol is a good precedent to follow. +1 -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: PostgreSQL 16 Beta 1 release announcement draft

2023-05-19 Thread Nathan Bossart
user. [pg_use_]reserved_connections might also deserve a mention here. AFAICT it's the only new predefined role that isn't mentioned in the announcement. I'm okay with leaving it out if folks don't think it should make the cut. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: PG 16 draft release notes ready

2023-05-19 Thread Nathan Bossart
quickly show > all updates. Thanks! > Allow GRANT to give vacuum and analyze permission to users beyond the > table owner or superusers (Nathan Bossart) This one was effectively reverted in favor of the MAINTAIN privilege. > Create a predefined role with permission to perform ma

Re: The documentation for READ COMMITTED may be incomplete or wrong

2023-05-18 Thread Nathan Bossart
that got cargo-culted in rather than anything we > actually need. I see that part was added in 385f337 [0]. I haven't had a chance to evaluate whether it seems necessary. [0] https://postgr.es/m/9A28C8860F777E439AA12E8AEA7694F80117370C%40BPXM15GP.gisp.nec.co.jp -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: The documentation for READ COMMITTED may be incomplete or wrong

2023-05-18 Thread Nathan Bossart
-table case, the DELETE statement reports "DELETE 2". -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: The documentation for READ COMMITTED may be incomplete or wrong

2023-05-18 Thread Nathan Bossart
points me to 86dc900. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Missing warning on revokes with grant options

2023-05-17 Thread Nathan Bossart
; is in the code, but we should probably just add a warning there. І'm not certain, but I suspect the calls to aclupdate() in merge_acl_with_grant() take care of this because the grantors will never match. [0] https://postgr.es/m/20040511091816.E9887CF519E%40www.postgresql.com -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Possible regression setting GUCs on \connect

2023-05-17 Thread Nathan Bossart
eems worth solving, but I think we ought to consider a different approach. Apologies for not chiming in earlier on the original thread. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Move un-parenthesized syntax docs to "compatibility" for few SQL commands

2023-05-16 Thread Nathan Bossart
l-breaker to me. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: createuser --memeber and PG 16

2023-05-15 Thread Nathan Bossart
use it makes the new role a member of the existing role. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Move un-parenthesized syntax docs to "compatibility" for few SQL commands

2023-05-15 Thread Nathan Bossart
On Tue, Apr 25, 2023 at 03:18:44PM +0900, Michael Paquier wrote: > On Mon, Apr 24, 2023 at 09:52:21AM -0700, Nathan Bossart wrote: >> I think this can wait for v17, but if there's a strong argument for doing >> some of this sooner, we can reevaluate. > > FWIW, I agree

Re: improve more permissions-related error messages

2023-05-12 Thread Nathan Bossart
On Fri, May 12, 2023 at 04:43:08PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> While looking around for other such error messages, I found a few dozen >> "must be superuser" errors that might be improved with the new style. If >> folks feel this is worthw

improve more permissions-related error messages

2023-05-12 Thread Nathan Bossart
essages, I found a few dozen "must be superuser" errors that might be improved with the new style. If folks feel this is worthwhile, I'll put together a patch. [0] https://postgr.es/m/20230126002251.GA1506128%40nathanxps13 -- Nathan Bossart Amazon Web Services: https://aws.amazon.

Re: Subscription statistics are not dropped at DROP SUBSCRIPTION in some cases

2023-05-08 Thread Nathan Bossart
ional. Looks reasonable to me. IIUC calling pgstat_drop_subscription() earlier makes no real difference (besides avoiding this bug) because it is uѕing pgstat_drop_transactional() behind the scenes. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Cleaning up array_in()

2023-05-08 Thread Nathan Bossart
en't had a chance to look at 0002 closely yet. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: evtcache: EventTriggerCache vs Event Trigger Cache

2023-05-08 Thread Nathan Bossart
onfusing. How about naming >>> the hash "EventTriggerCacheHash" or so? >> >> I think the level is the indicator here, but I have no strong opinions, >> EventTriggerCacheHash is fine by me. > > The attached trivial diff does that, parking this in the

Re: WAL Insertion Lock Improvements

2023-05-08 Thread Nathan Bossart
; test-case 1: -t1000, WAL ~16 bytes I wonder if it's worth doing a couple of long-running tests, too. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: PL/Python: Fix return in the middle of PG_TRY() block.

2023-05-04 Thread Nathan Bossart
ow elog.h's recommendation to the letter, but following your mental model upthread, it doesn't seem to be strictly necessary, and we'd need to set pltargs to NULL after decrementing its reference count in the PG_TRY section for such future-proofing to be effective, anyway. Thank you for reviewing! --

Re: PL/Python: Fix return in the middle of PG_TRY() block.

2023-05-03 Thread Nathan Bossart
On Wed, May 03, 2023 at 09:54:13PM -0700, Nathan Bossart wrote: > Here's a new patch that removes the volatile marker from pltdata. Gah, right after I sent that, I realized we can remove one more volatile marker. Sorry for the noise. -- Nathan Bossart Amazon Web Services: ht

Re: PL/Python: Fix return in the middle of PG_TRY() block.

2023-05-03 Thread Nathan Bossart
On Wed, May 03, 2023 at 01:58:38PM -0700, Nathan Bossart wrote: > With this change, pltdata isn't modified in the PG_TRY section, and the > only modification of pltargs happens after all elogs. It might be worth > keeping pltargs volatile in case someone decides to add an elog() in the

Re: PL/Python: Fix return in the middle of PG_TRY() block.

2023-05-03 Thread Nathan Bossart
On Wed, May 03, 2023 at 04:33:32PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> Here's a new version of the patch. Besides adding comments and a commit >> message, I made sure to decrement the reference count for pltargs in the >> PG_CATCH block (which means that

Re: PL/Python: Fix return in the middle of PG_TRY() block.

2023-05-03 Thread Nathan Bossart
haven't thought of a better option. We could error instead of returning NULL, but IIUC that would go against d0aa965's stated purpose. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 12daf35ca398a34046d911270283f2cb7ebcbf3f Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date:

Re: Possible regression setting GUCs on \connect

2023-04-27 Thread Nathan Bossart
nice to avoid adding a new option if possible. It's not clear to me why we'd need to also check privileges at login time as opposed to only checking them at ALTER ROLE SET time. ISTM that the former approach would introduce some interesting problems around dropping roles or changing roles' pr

Re: Possible regression setting GUCs on \connect

2023-04-27 Thread Nathan Bossart
On Thu, Apr 27, 2023 at 09:53:23PM +0300, Alexander Korotkov wrote: > Thanks to everybody for catching and investigating this. > Nathan, I'd like to push it myself. I'm also going to check the code > for similar errors. Sounds good! -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Possible regression setting GUCs on \connect

2023-04-27 Thread Nathan Bossart
On Thu, Apr 27, 2023 at 09:47:33PM +0300, David Steele wrote: > That seems to work. The errors are now gone. Great. Barring objections, I'll plan on committing this shortly. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Possible regression setting GUCs on \connect

2023-04-27 Thread Nathan Bossart
, BOOLOID); } index++; -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Move un-parenthesized syntax docs to "compatibility" for few SQL commands

2023-04-24 Thread Nathan Bossart
$$ = (Node *) n; >> } >> -| CLUSTER opt_verbose >> +| CLUSTER '(' utility_option_list ')' > > It is too bad we can't do this the way VACUUM and ANALYZE do -- but > since qualified_name is required if USING is included, I suppose we > can't. It might be possible to extract the name and index part to a separate optional rule. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Move un-parenthesized syntax docs to "compatibility" for few SQL commands

2023-04-21 Thread Nathan Bossart
he only way to do a "verbose" CLUSTER without a table name in v15 and v16, too. Perhaps we should break it apart, or maybe we can just say it was used before v17. WDYT? -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 48fff177a8f0096c99c77b4e1368cc73f7e86585 Mon Sep 17

vector search support

2023-04-21 Thread Nathan Bossart
n.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From b54b938bf35f26bc8e07cd57d4bf616b7af36709 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Sun, 19 Mar 2023 14:37:54 -0700 Subject: [PATCH v1 1/3] Refactor dsqrt(). This

Re: Move un-parenthesized syntax docs to "compatibility" for few SQL commands

2023-04-21 Thread Nathan Bossart
d with this change? > > Ah, yes. Good catch! I have removed these. Thanks. I'll take a closer look at the patch soon. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: stopgap fix for signal handling during restore_command

2023-04-21 Thread Nathan Bossart
On Wed, Mar 01, 2023 at 03:13:04PM -0800, Andres Freund wrote: > On 2023-03-01 14:47:51 -0800, Nathan Bossart wrote: >> Here is an attempt at adding a signal safe function for writing to STDERR. > > Cool. I'm gently bumping this thread to see if anyone had additional feedback

Re: Move un-parenthesized syntax docs to "compatibility" for few SQL commands

2023-04-21 Thread Nathan Bossart
e.) Most of these commands have an existing note about the deprecated syntax. Could those be removed with this change? -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

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

2023-04-21 Thread Nathan Bossart
On Fri, Apr 21, 2023 at 10:49:48AM +0200, Daniel Gustafsson wrote: > On 21 Apr 2023, at 01:32, Nathan Bossart wrote: >> I am -0.5 for this. If you are writing a new background worker, it's >> probably reasonable to expect that you can locate the definition of >> BGW_MAX

Re: optimize several list functions with SIMD intrinsics

2023-04-21 Thread Nathan Bossart
On Fri, Apr 21, 2023 at 01:50:34PM +0700, John Naylor wrote: > On Wed, Mar 8, 2023 at 7:25 AM Nathan Bossart > wrote: >> was mostly a fun weekend project, and I don't presently have any concrete >> examples of workloads where this might help. > > It seems like that shoul

Re: New committers: Nathan Bossart, Amit Langote, Masahiko Sawada

2023-04-21 Thread Nathan Bossart
hank you all for the wishes. Thanks everyone! And congratulations to Masahiko and Amit. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

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

2023-04-20 Thread Nathan Bossart
nition of BGW_MAXLEN. Also, I think there's a good chance that we'd forget to update such documentation the next time we adjust it. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Should we remove vacuum_defer_cleanup_age?

2023-04-20 Thread Nathan Bossart
On Fri, Apr 14, 2023 at 03:07:37PM -0400, Jonathan S. Katz wrote: > +1. +1. I agree with the upthread discussion and support removing vacuum_defer_cleanup_age. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Improve logging when using Huge Pages

2023-04-20 Thread Nathan Bossart
. AFAICT this would involve adding a bool to BackendParameters and using it in save_backend_variables() and restore_backend_variables(), which is an additional 3 lines of code. That doesn't sound too bad to me, but perhaps I am missing something. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Tab completion for GRANT MAINTAIN

2023-04-20 Thread Nathan Bossart
see any easy way to improve that situation though.) Sorry, I think this was my fault. Thanks for fixing. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Clean up hba.c of code freeing regexps

2023-04-17 Thread Nathan Bossart
0] is still set to "needs review." Can it be closed now? [0] https://commitfest.postgresql.org/43/4277/ -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: check_strxfrm_bug()

2023-04-17 Thread Nathan Bossart
nown implementation, via TRUST_STRXFRM (or rather the > lack of it). So I think it's time to remove that function; please see > attached. Seems reasonable to me. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: optimize several list functions with SIMD intrinsics

2023-04-17 Thread Nathan Bossart
Here is a new patch set. I've split it into two patches: one for the 64-bit functions, and one for the 32-bit functions. I've also added tests for pg_lfind64/pg_lfind64_idx and deduplicated the code a bit. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >F

Re: recovery modules

2023-04-17 Thread Nathan Bossart
rebased -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From b8856e61d775bc248a292163facc0b227abdde97 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Thu, 23 Feb 2023 14:27:48 -0800 Subject: [PATCH v15 1/7] Move extra code out of the Pre/PostRestoreCommand() bl

Re: Can we delete the vacuumdb.sgml notes about which version each option was added in?

2023-04-16 Thread Nathan Bossart
o use an option on and older server, anyway. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: monitoring usage count distribution

2023-04-07 Thread Nathan Bossart
seemed to me that sum(buffers) ought to agree with the > shared_buffers setting. Makes sense. Thanks! -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: monitoring usage count distribution

2023-04-06 Thread Nathan Bossart
ated summary function is clearly useful as well. > So I'm now thinking that we do want the patch as-submitted. > (Caveat: I've not read the patch, just the description.) In case we want to do both, here's a 0002 that changes usagecount_avg to an array of usage counts. -- Nathan Bossart A

Re: monitoring usage count distribution

2023-04-05 Thread Nathan Bossart
hat quick summing > up multple rows, just to get a quick overview over the number of dirty rows. This is what v1-0001 does. We could probably make pg_buffercache_summary a view on pg_buffercache_usage_counts, too, but that doesn't strike me as tremendously important. -- Nathan Bossart Amazon

Re: monitoring usage count distribution

2023-04-05 Thread Nathan Bossart
On Wed, Apr 05, 2023 at 03:07:10PM -0400, Tom Lane wrote: > Seems to me that six rows would be easier to aggregate manually. > An array column seems less SQL-ish and harder to manipulate. +1 -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: monitoring usage count distribution

2023-04-05 Thread Nathan Bossart
the extension. >> >> I'd have no issue with that. > > Cool. The six-element array approach won't show the number of dirty and pinned buffers for each usage count, but I'm not sure that's a deal-breaker. Barring objections, I'll post an updated patch shortly with that approach

Re: O(n) tasks cause lengthy startups and checkpoints

2023-04-03 Thread Nathan Bossart
I sent this one to the next commitfest and marked it as waiting-on-author and targeted for v17. I'm aiming to have something that addresses the latest feedback ready for the July commitfest. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: pg_usleep for multisecond delays

2023-04-03 Thread Nathan Bossart
ommitfest and marked the target version as v17. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: O(n) tasks cause lengthy startups and checkpoints

2023-04-02 Thread Nathan Bossart
On Sun, Apr 02, 2023 at 04:37:38PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> It's been a little while since I dug into this, but I do see your point >> that the wraparound risk could be higher in some cases. For example, if >> you have a billion temp files to cl

Re: O(n) tasks cause lengthy startups and checkpoints

2023-04-02 Thread Nathan Bossart
On Sun, Apr 02, 2023 at 04:23:05PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> On Sun, Apr 02, 2023 at 01:40:05PM -0400, Tom Lane wrote: >>> * Why does LookupCustodianFunctions think it needs to search the >>> constant array? > >> The order of the

Re: O(n) tasks cause lengthy startups and checkpoints

2023-04-02 Thread Nathan Bossart
.anarazel.de [1] https://postgr.es/m/20220217065938.x2esfdppzypegn5j%40alap3.anarazel.de -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: O(n) tasks cause lengthy startups and checkpoints

2023-04-02 Thread Nathan Bossart
https://postgr.es/m/CANbhV-EagKLoUH7tLEfg__VcLu37LY78F8gvLMzHrRZyZKm6sw%40mail.gmail.com -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

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: 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 Kapila wrote:

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: Thu,

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
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: 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: psql \watch 2nd argument: iteration count

2023-03-14 Thread Nathan Bossart
+ sleep = strtod(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: recovery modules

2023-03-14 Thread Nathan Bossart
mail.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/PostRestoreCommand() block. If SIG

Re: psql \watch 2nd argument: iteration count

2023-03-14 Thread Nathan Bossart
s 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: 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,

Re: Sub-millisecond [autovacuum_]vacuum_cost_delay broken

2023-03-13 Thread Nathan Bossart
delay.tv_nsec = (microsec % 100L) * 1000; > + (void) nanosleep(, NULL); Using nanosleep() seems reasonable to me. -- 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 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: 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: pg_usleep for multisecond delays

2023-03-13 Thread Nathan Bossart
k 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: 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:1195:4: ERR

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 i

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
o" cause Postgres to be built without OpenSSL if the required headers are not present? -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

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

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

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: 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 don't h

Re: Sub-millisecond [autovacuum_]vacuum_cost_delay broken

2023-03-09 Thread Nathan Bossart
e 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: Improve logging when using Huge Pages

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

Re: Improve logging when using Huge Pages

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

Re: psql \watch 2nd argument: iteration count

2023-03-09 Thread Nathan Bossart
: invalid delay interval: %s", opt); + free(opt); + resetPQExpBuffer(query_buf); + return PSQL_CMD_ERROR; Is this missing psql_scan_reset(scan_state)? I haven't had a chance to look closely at 0002 yet. -- N

Re: improving user.c error messages

2023-03-09 Thread Nathan Bossart
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 don't have a good mental model of all this role inheritance, personally, > but I

<    5   6   7   8   9   10   11   12   13   14   >