Re: Fix GUC_NO_SHOW_ALL test scenario in 003_check_guc.pl

2023-02-09 Thread Michael Paquier
On Wed, Feb 08, 2023 at 09:42:13PM -0500, Tom Lane wrote: > Hm. On the one hand, if it is in fact not in postgresql.conf.sample, > then that flag should be set for sure. OTOH I see that that flag > isn't purely documentation: help_config.c thinks it should hide > GUCs that are marked that way.

Re: [PoC] Improve dead tuple storage for lazy vacuum

2023-02-09 Thread Masahiko Sawada
On Fri, Feb 10, 2023 at 3:51 PM John Naylor wrote: > > > On Thu, Feb 9, 2023 at 2:08 PM Masahiko Sawada wrote: > > > > query: select * from bench_tidstore_load(0, 10 * 1000 * 1000) > > > > v15: > > load_ms > > - > > 816 > > How did you build the tid store and test on v15? I first

Re: Exit walsender before confirming remote flush in logical replication

2023-02-09 Thread Peter Smith
Here are my review comments for the v6-0002 patch. == Commit Message 1. This commit extends START_REPLICATION to accept SHUTDOWN_MODE term. Currently, it works well only for logical replication. ~ 1a. "to accept SHUTDOWN term" --> "to include a SHUTDOWN_MODE clause." ~ 1b. "it works well

Re: [PoC] Improve dead tuple storage for lazy vacuum

2023-02-09 Thread John Naylor
On Thu, Feb 9, 2023 at 2:08 PM Masahiko Sawada wrote: > > query: select * from bench_tidstore_load(0, 10 * 1000 * 1000) > > v15: > load_ms > - > 816 How did you build the tid store and test on v15? I first tried to apply v15-0009-PoC-lazy-vacuum-integration.patch, which conflicts

Re: ICU locale validation / canonicalization

2023-02-09 Thread Peter Eisentraut
On 09.02.23 22:15, Jeff Davis wrote: On Thu, 2023-02-09 at 15:44 +0100, Peter Eisentraut wrote: One use case is that if a user specifies a locale, say, of 'de-AT', this might canonicalize to 'de' today, Canonicalization should not lose useful information, it should just rearrange it, so I

Re: Introduce a new view for checkpointer related stats

2023-02-09 Thread Michael Paquier
On Thu, Feb 09, 2023 at 04:46:04PM -0800, Andres Freund wrote: > I think if we end up breaking compat, we should just drop that > column. Indeed. > Yep, and I think you are all wrong, and that this is just going to cause > unnecessary pain :). I'm not going to try to prevent the patch from going

Re: Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-02-09 Thread Tom Lane
Andres Freund writes: > On February 9, 2023 8:45:20 PM PST, Tom Lane wrote: >> Yeah. Well, we were intending to maintain the autoconf build system for >> several years more anyway. Guess we have to plan on keeping it going >> until those platforms are EOL or nearly so. > Both could be

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-02-09 Thread Andres Freund
Hi, On February 9, 2023 8:45:20 PM PST, Tom Lane wrote: >Andres Freund writes: >> The only not sufficient ones that bother me to some degree are Ubuntu 20.04 >> and RHEL 8. The issues are different, oddly enough. Ubuntu has a new enough >> ninja, but meson is too old, RHEL has it the other way

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-09 Thread Amit Kapila
On Fri, Feb 10, 2023 at 10:11 AM Amit Kapila wrote: > > On Fri, Feb 10, 2023 at 6:27 AM Kyotaro Horiguchi > wrote: > > > > At Thu, 9 Feb 2023 13:48:52 +0530, Amit Kapila > > wrote in > > > On Thu, Feb 9, 2023 at 10:45 AM Kyotaro Horiguchi > > > wrote: > > > > > > > > At Wed, 8 Feb 2023

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-02-09 Thread Tom Lane
Andres Freund writes: > The only not sufficient ones that bother me to some degree are Ubuntu 20.04 > and RHEL 8. The issues are different, oddly enough. Ubuntu has a new enough > ninja, but meson is too old, RHEL has it the other way around. Yeah. Well, we were intending to maintain the

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-09 Thread Amit Kapila
On Fri, Feb 10, 2023 at 6:27 AM Kyotaro Horiguchi wrote: > > At Thu, 9 Feb 2023 13:48:52 +0530, Amit Kapila > wrote in > > On Thu, Feb 9, 2023 at 10:45 AM Kyotaro Horiguchi > > wrote: > > > > > > At Wed, 8 Feb 2023 09:03:03 +, "Hayato Kuroda (Fujitsu)" > > > wrote in > > > > Thank you

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-02-09 Thread Andres Freund
Hi, On 2023-02-05 16:52:07 -0800, Andres Freund wrote: > I did survey available meson versions, and chose what features to > use. But not really ninja, since I didn't know about this specific issue > and other than this the ninja version differences were handled by meson. RHEL world confuses me

Re: Perform streaming logical transactions by background workers and parallel apply

2023-02-09 Thread Peter Smith
On Fri, Feb 10, 2023 at 1:32 PM houzj.f...@fujitsu.com wrote: > > On Tuesday, February 7, 2023 11:17 AM Amit Kapila > wrote: > > > > On Mon, Feb 6, 2023 at 3:43 PM houzj.f...@fujitsu.com > > wrote: > > > > > > while reading the code, I noticed that in pa_send_data() we set wait > > > event to

Re: Inconsistent nullingrels due to oversight in deconstruct_distribute_oj_quals

2023-02-09 Thread Richard Guo
On Thu, Feb 9, 2023 at 11:55 PM Tom Lane wrote: > Richard Guo writes: > > This query would trigger the Assert() in search_indexed_tlist_for_var. > > So I wonder that we should use othersj->syn_righthand here. > > There are two such calls in deconstruct_distribute_oj_quals ... > don't they both

Re: recovery modules

2023-02-09 Thread Michael Paquier
On Thu, Feb 09, 2023 at 12:18:55PM -0800, Andres Freund wrote: > I think this nearly ready. Michael, are you planning to commit this? I could take a stab at it, now if you feel strongly about doing it yourselfof course feel free :) > Personally I'd probably squash these into a single commit.

Re: pg_usleep for multisecond delays

2023-02-09 Thread Michael Paquier
On Thu, Feb 09, 2023 at 02:51:14PM -0800, Nathan Bossart wrote: > Hm... We might be able to use WaitLatch() for some of these. Perhaps less than you think as a bit of work has been done in the last few years to reduce the gap and make such code paths more responsive, still I would not be

Re: pg_usleep for multisecond delays

2023-02-09 Thread Kyotaro Horiguchi
At Thu, 9 Feb 2023 14:51:14 -0800, Nathan Bossart wrote in > On Thu, Feb 09, 2023 at 01:30:27PM -0800, Andres Freund wrote: > > So I'm not sure it's the right direction to make pg_usleep() easier to > > use... > Hm... We might be able to use WaitLatch() for some of these. And I think we are

Re: Speed up transaction completion faster after many relations are accessed in a transaction

2023-02-09 Thread David Rowley
Thanks for having a look at this. On Wed, 1 Feb 2023 at 03:07, Amit Langote wrote: > Maybe you're planning to do it once this patch is post the PoC phase > (isn't it?), but it would be helpful to have commentary on all the new > dlist fields. I've added comments on the new fields. Maybe we can

RE: run pgindent on a regular basis / scripted manner

2023-02-09 Thread shiy.f...@fujitsu.com
On Thu, Feb 9, 2023 6:10 AM Andrew Dunstan wrote: > Thanks, I have committed this. Still looking at Robert's other request. > Hi, I tried the new option --commit and found that it seems to try to indent files which are deleted in the specified commit and reports an error. cannot open file

Re: ICU locale validation / canonicalization

2023-02-09 Thread Andreas Karlsson
On 2/10/23 02:22, Jeff Davis wrote: We will still allow the ICU format locale IDs for input; we would just convert them to BCP47 before storing them in the catalog. And there's an inverse function, so it's easy enough to offer a view that shows the ICU format locale IDs in addition to the BCP 47

Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry

2023-02-09 Thread Kyotaro Horiguchi
At Thu, 9 Feb 2023 11:38:18 +0100, "Drouvot, Bertrand" wrote in > Hi hackers, > > Please find attached a patch proposal for $SUBJECT. > > The idea has been raised in [1] by Andres: it would allow to simplify > even more the work done to > generate pg_stat_get_xact*() functions with Macros. >

RE: Perform streaming logical transactions by background workers and parallel apply

2023-02-09 Thread houzj.f...@fujitsu.com
On Tuesday, February 7, 2023 11:17 AM Amit Kapila wrote: > > On Mon, Feb 6, 2023 at 3:43 PM houzj.f...@fujitsu.com > wrote: > > > > while reading the code, I noticed that in pa_send_data() we set wait > > event to WAIT_EVENT_LOGICAL_PARALLEL_APPLY_STATE_CHANGE while > sending > > the message

Re: Generating code for query jumbling through gen_node_support.pl

2023-02-09 Thread Michael Paquier
On Thu, Feb 09, 2023 at 06:12:50PM -0500, Tom Lane wrote: > I'm okay with the pathnodes.h changes --- although surely you don't need > changes like this: > > - pg_node_attr(abstract) > + pg_node_attr(abstract, no_query_jumble) > > "abstract" should already imply "no_query_jumble". Okay,

Re: pgsql: Use appropriate wait event when sending data in the apply worker

2023-02-09 Thread Amit Kapila
On Thu, Feb 9, 2023 at 7:56 PM Robert Haas wrote: > > On Mon, Feb 6, 2023 at 11:40 PM Amit Kapila wrote: > > Use appropriate wait event when sending data in the apply worker. > > > > Currently, we reuse WAIT_EVENT_LOGICAL_PARALLEL_APPLY_STATE_CHANGE in the > > apply worker while sending data to

Re: Minor meson gripe

2023-02-09 Thread Peter Geoghegan
On Thu, Feb 9, 2023 at 5:17 PM Andres Freund wrote: > I've seen more failures than I'd like. Permission errors, conflicting names, > and similar things. But mainly that was a reference to running initdb, which > I've broken temporarily many a time. We've all temporarily broken initdb literally

Re: Is psSocketPoll doing the right thing?

2023-02-09 Thread Kyotaro Horiguchi
> Subject: is p*s*Socket.. Oops... At Thu, 9 Feb 2023 17:32:08 +0900, Fujii Masao wrote in > > > On 2023/02/09 11:50, Kyotaro Horiguchi wrote: > > Hello. > > While looking a patch, I found that pqSocketPoll passes through the > > result from poll(2) to the caller and throws away revents. If

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-09 Thread Peter Geoghegan
On Wed, Feb 8, 2023 at 7:18 PM Andres Freund wrote: > > This is a good thing for performance, of course, but it also makes VACUUM > > VERBOSE show information that makes sense to users, since things actually > > happen in a way that makes a lot more sense. I'm quite happy about the fact > > that

Re: ICU locale validation / canonicalization

2023-02-09 Thread Jeff Davis
On Fri, 2023-02-10 at 01:04 +0100, Andreas Karlsson wrote: > I have the same feeling one is readable and the other unreadable but > the > unreadable one is standardized. Hard call. > > And in general I agree, if we are going to make ICU default it needs > to > be more user friendly than it is

Re: Minor meson gripe

2023-02-09 Thread Andres Freund
Hi, On 2023-02-09 17:00:48 -0800, Peter Geoghegan wrote: > On Thu, Feb 9, 2023 at 4:33 PM Andres Freund wrote: > > I e.g. have a not-quite-done patch that creates a "template initdb", which > > pg_regress and tap tests automatically use (except if non-default options > > are > > required),

Re: [PATCH] Add pretty-printed XML output option

2023-02-09 Thread Peter Smith
On Thu, Feb 9, 2023 at 7:17 PM Jim Jones wrote: > > On 09.02.23 08:23, Tom Lane wrote: > > Um ... why are you using PG_TRY here at all? It seems like > > you have full control of the actually likely error cases. > > The only plausible error out of the StringInfo calls is OOM, > > and you

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-09 Thread Kyotaro Horiguchi
Mmm. A part of the previous mail have gone anywhere for a uncertain reason and placed by a mysterious blank lines... At Fri, 10 Feb 2023 09:57:22 +0900 (JST), Kyotaro Horiguchi wrote in > At Thu, 9 Feb 2023 13:48:52 +0530, Amit Kapila > wrote in > > On Thu, Feb 9, 2023 at 10:45 AM Kyotaro

Re: Minor meson gripe

2023-02-09 Thread Peter Geoghegan
On Thu, Feb 9, 2023 at 4:33 PM Andres Freund wrote: > The individual test is actually named tmp_install. I thought it might be > useful to add further things to the setup "stage", hence the more general > name. I did notice that, but only after sitting with my initial confusion for a while. > I

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-09 Thread Kyotaro Horiguchi
At Thu, 9 Feb 2023 13:48:52 +0530, Amit Kapila wrote in > On Thu, Feb 9, 2023 at 10:45 AM Kyotaro Horiguchi > wrote: > > > > At Wed, 8 Feb 2023 09:03:03 +, "Hayato Kuroda (Fujitsu)" > > wrote in > > > Thank you for reviewing! PSA new version. > > > > + if (statusinterval_ms

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-09 Thread Kyotaro Horiguchi
At Thu, 9 Feb 2023 13:26:19 +0530, Amit Kapila wrote in amit.kapila16> On Thu, Feb 9, 2023 at 12:17 AM Peter Smith wrote: > > I understand in theory, your code is more efficient, but in practice, > > I think the overhead of a single variable assignment every loop > > iteration (which is doing

Re: Introduce a new view for checkpointer related stats

2023-02-09 Thread Andres Freund
Hi, On 2023-02-09 19:00:00 +0530, Bharath Rupireddy wrote: > On Thu, Feb 9, 2023 at 12:33 PM Andres Freund wrote: > > On 2023-02-09 12:21:51 +0530, Bharath Rupireddy wrote: > > > @@ -1105,18 +1105,22 @@ CREATE VIEW pg_stat_archiver AS > > > > > > CREATE VIEW pg_stat_bgwriter AS > > >

Re: Importing pg_bsd_indent into our source tree

2023-02-09 Thread Tom Lane
Andres Freund writes: > Perhaps we should install it, just not in bin/, but alongside pgxs/, similar > to pg_regress et al? For my own purposes, I really don't want it anywhere in the --prefix tree. That's not necessarily present when I'm using the program. (Hmm, clarify: it wouldn't matter if

Re: Importing pg_bsd_indent into our source tree

2023-02-09 Thread Andres Freund
On 2023-02-09 19:20:37 -0500, Tom Lane wrote: > Andres Freund writes: > > I'm fine either way. It's barely noticeable compared to the rest of > > postgres. > > Yeah, build-by-default isn't really a big deal. Install-by-default > is more of a problem... Perhaps we should install it, just not

Re: Minor meson gripe

2023-02-09 Thread Andres Freund
Hi, On 2023-02-09 15:34:34 -0800, Peter Geoghegan wrote: > Why not change the suite name to tmp_install? That immediately reminds > me of what's really going on here, since I'm used to seeing that > directory name. And it clashes with "--suite setup" in a way that > seems useful. The individual

Re: Importing pg_bsd_indent into our source tree

2023-02-09 Thread Tom Lane
Andres Freund writes: > On 2023-02-09 18:19:06 -0500, Tom Lane wrote: >> I thought about registering it, but that won't teach us anything unless >> we make it built-by-default, which was not my intention. I guess we >> could temporarily include it in the build. > The meson patch I sent did

Re: Importing pg_bsd_indent into our source tree

2023-02-09 Thread Andres Freund
Hi, On 2023-02-09 18:19:06 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2023-02-09 17:19:22 -0500, Tom Lane wrote: > >> Hmmm .. a shell script would be fine by me, but it won't help in > >> testing a Windows build. Maybe we need to make it a Perl script? > > > At least for casual

Re: make_ctags: use -I option to ignore pg_node_attr macro

2023-02-09 Thread Tatsuo Ishii
>> Oops. Thank you for pointing it out. BTW, just out of curiosity, do >> you have etags on you Mac? > > Yes. > > $ etags --version > etags (GNU Emacs 28.2) > Copyright (C) 2022 Free Software Foundation, Inc. > This program is distributed under the terms in ETAGS.README Ok. Probably that was

Re: ICU locale validation / canonicalization

2023-02-09 Thread Andreas Karlsson
On 2/9/23 23:09, Jeff Davis wrote: I do like the ICU format locale IDs from a readability standpoint. "en_US@colstrength=primary" is more meaningful to me than "en-US-u-ks- level1" (the equivalent language tag). And the format is specified[1], even though it's not an independent standard. But I

Re: Minor meson gripe

2023-02-09 Thread Peter Geoghegan
On Thu, Feb 9, 2023 at 12:56 PM Andres Freund wrote: > > * Isn't it confusing that we have a suite by that name, given that we > > also need to use the unrelated --setup flag for some nearby testing > > recipes? > > Hm. I don't find it particularly confusing, but I don't think I'm a good judge >

Re: Importing pg_bsd_indent into our source tree

2023-02-09 Thread Tom Lane
Andres Freund writes: > On 2023-02-09 17:19:22 -0500, Tom Lane wrote: >> Hmmm .. a shell script would be fine by me, but it won't help in >> testing a Windows build. Maybe we need to make it a Perl script? > At least for casual testing a shell script actually mostly works, due to git > it's

Re: Generating code for query jumbling through gen_node_support.pl

2023-02-09 Thread Tom Lane
Michael Paquier writes: > Tom, did you get a chance to look at what is proposed here and expand > the use of query_jumble_ignore in the definitions of the nodes rather > than have an enforced per-file policy in gen_node_support.pl? Sorry, didn't look at it before. I'm okay with the pathnodes.h

Re: Importing pg_bsd_indent into our source tree

2023-02-09 Thread Andres Freund
Hi, On 2023-02-09 17:19:22 -0500, Tom Lane wrote: > Andres Freund writes: > > The trivial fix of using MAXPGPATH made it build, without warnings. That > > doesn't say anything about actually working. So I guess porting the test > > would > > make sense. > > > Opinions on whether it would make

Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux?

2023-02-09 Thread Michael Paquier
On Fri, Feb 10, 2023 at 08:15:21AM +1300, Thomas Munro wrote: > For the record, according to [1] it's not necessary to use > --reset-author when back-patching. (Maybe a little confusingly, > because it's not quite clear whether our policies consider the author > field to be meaningful or not.) >

Re: pg_usleep for multisecond delays

2023-02-09 Thread Nathan Bossart
On Thu, Feb 09, 2023 at 01:30:27PM -0800, Andres Freund wrote: > On 2023-02-09 12:59:29 -0800, Nathan Bossart wrote: >> I just found myself carefully counting the zeros in a call to pg_usleep(). >> Besides getting my eyes checked, perhaps there should be a wrapper called >> pg_ssleep() than can be

Re: Generating code for query jumbling through gen_node_support.pl

2023-02-09 Thread Michael Paquier
On Wed, Feb 08, 2023 at 03:47:51PM +0900, Michael Paquier wrote: > This one was intentional to let extensions play with jumbling of such > nodes, but perhaps you are right that it makes little sense at this > stage. If there is an ask for it later, though.. Using > shared_preload_libraries =

Re: recovery modules

2023-02-09 Thread Nathan Bossart
On Thu, Feb 09, 2023 at 12:18:55PM -0800, Andres Freund wrote: > On 2023-02-09 11:39:17 -0800, Nathan Bossart wrote: > Personally I'd probably squash these into a single commit. done > I'd probably mention that this should typically be of server lifetime / a > 'static const' struct. Tableam

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-09 Thread Peter Smith
> The comment adjustment suggested by Peter-san above > was also included in this v33. > Please have a look at the attached patch. Patch v33 LGTM. -- Kind Regards, Peter Smith. Fujitsu Australia

Re: Importing pg_bsd_indent into our source tree

2023-02-09 Thread Tom Lane
Andres Freund writes: > The trivial fix of using MAXPGPATH made it build, without warnings. That > doesn't say anything about actually working. So I guess porting the test would > make sense. > Opinions on whether it would make sense as a shell script? Hmmm .. a shell script would be fine by

Re: Importing pg_bsd_indent into our source tree

2023-02-09 Thread Andres Freund
Hi, On 2023-02-09 13:55:32 -0800, Andres Freund wrote: > ../src/tools/pg_bsd_indent/args.c(179): error C2065: 'PATH_MAX': undeclared > identifier > ../src/tools/pg_bsd_indent/args.c(179): error C2057: expected constant > expression > ../src/tools/pg_bsd_indent/args.c(179): error C2466: cannot

Re: Importing pg_bsd_indent into our source tree

2023-02-09 Thread Tom Lane
Andres Freund writes: > Did that in the attached. Thanks. > I didn't convert the test though, due to the duplicating it'd create. Perhaps > we should just move it to a shell script? Or maybe it just doesn't matter > enough to bother with? We could move it to a shell script perhaps, but that

Re: ICU locale validation / canonicalization

2023-02-09 Thread Jeff Davis
On Thu, 2023-02-09 at 10:53 -0500, Robert Haas wrote: > Unfortunately, I have no idea whether your specific ideas about how > to > make that happen are any good or not. But I hope they are, because > the > current situation is pessimal. It feels like BCP 47 is the right catalog representation. We

Re: postgres_fdw, dblink, and CREATE SUBSCRIPTION security

2023-02-09 Thread Jacob Champion
On 2/6/23 08:22, Robert Haas wrote: > I don't think that's quite the right concept. It seems to me that the > client is responsible for informing the server of what the situation > is, and the server is responsible for deciding whether to allow the > connection. In your scenario, the client is not

Re: Importing pg_bsd_indent into our source tree

2023-02-09 Thread Tom Lane
Andres Freund writes: > On 2023-02-09 13:30:30 -0500, Tom Lane wrote: >> 0003 lacks meson support (anyone want to help with that?) > I'll give it a go, unless somebody else wants to. Thanks. > Do we expect pg_bsd_indent to build / work on windows, right now? It would be desirable, for sure.

Re: pg_usleep for multisecond delays

2023-02-09 Thread Andres Freund
Hi, On 2023-02-09 12:59:29 -0800, Nathan Bossart wrote: > I just found myself carefully counting the zeros in a call to pg_usleep(). > Besides getting my eyes checked, perhaps there should be a wrapper called > pg_ssleep() than can be used for multisecond sleeps. Or maybe the > USECS_PER_SEC

Re: ICU locale validation / canonicalization

2023-02-09 Thread Jeff Davis
On Thu, 2023-02-09 at 15:44 +0100, Peter Eisentraut wrote: > One use case is that if a user specifies a locale, say, of 'de-AT', > this > might canonicalize to 'de' today, Canonicalization should not lose useful information, it should just rearrange it, so I don't see a risk here based on what I

Re: Importing pg_bsd_indent into our source tree

2023-02-09 Thread Andres Freund
Hi, On 2023-02-09 13:30:30 -0500, Tom Lane wrote: > 0003 lacks meson support (anyone want to help with that?) I'll give it a go, unless somebody else wants to. Do we expect pg_bsd_indent to build / work on windows, right now? If it doesn't, do we want to make that a hard requirement? I'll

pg_usleep for multisecond delays

2023-02-09 Thread Nathan Bossart
I just found myself carefully counting the zeros in a call to pg_usleep(). Besides getting my eyes checked, perhaps there should be a wrapper called pg_ssleep() than can be used for multisecond sleeps. Or maybe the USECS_PER_SEC macro should be used more widely. I attached a patch for the former

Re: Minor meson gripe

2023-02-09 Thread Andres Freund
Hi, On 2023-02-09 11:01:31 -0800, Peter Geoghegan wrote: > Currently, meson has a test suite named "setup". According to the > Wiki, this is needed to get something equivalent to "make check", by > running "meson test -v --suite setup --suite regress". Yep. > Some questions about this: > > *

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-02-09 Thread Andres Freund
Hi, On 2023-02-09 13:48:46 -0500, Tom Lane wrote: > Andres Freund writes: > > I think this misunderstanding is again due to the confusion between the > > 'all' > > target in doc/src/sgml and the default target, just like earlier in the > > thread > > / why I ended up with the prior set of

Re: Can we do something to help stop users mistakenly using force_parallel_mode?

2023-02-09 Thread David Rowley
On Thu, 9 Feb 2023 at 21:20, John Naylor wrote: > Looks good at a glance, just found a spurious word: > > + "by forcing the planner into to generate plans which contains nodes " Thanks for looking. I'll fix that. Likely the hardest part to get right here is the new name. Can anyone think of

Re: recovery modules

2023-02-09 Thread Andres Freund
Hi, On 2023-02-09 11:39:17 -0800, Nathan Bossart wrote: > rebased for cfbot I think this nearly ready. Michael, are you planning to commit this? Personally I'd probably squash these into a single commit. > diff --git a/doc/src/sgml/archive-modules.sgml > b/doc/src/sgml/archive-modules.sgml >

Re: pg_stat_statements and "IN" conditions

2023-02-09 Thread Dmitry Dolgov
> On Thu, Feb 09, 2023 at 06:26:51PM +0100, Alvaro Herrera wrote: > On 2023-Feb-09, Dmitry Dolgov wrote: > > > > On Thu, Feb 09, 2023 at 02:30:34PM +0100, Peter Eisentraut wrote: > > > > What is the point of making this a numeric setting? Either you want > > > to merge all values or you don't

Re: recovery modules

2023-02-09 Thread Nathan Bossart
rebased for cfbot -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From ea6339276c6863f260572dfc816f9dd27ac7b516 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Fri, 27 Jan 2023 21:01:22 -0800 Subject: [PATCH v9 1/3] s/ArchiveContext/ArchiveCallbacks ---

Re: Weird failure with latches in curculio on v15

2023-02-09 Thread Andres Freund
Hi, On 2023-02-09 11:12:21 -0500, Robert Haas wrote: > On Thu, Feb 9, 2023 at 10:51 AM Tom Lane wrote: > > I'm fairly concerned about the idea of making it common for people > > to write their own main loop for the archiver. That means that, if > > we have a bug fix that requires the archiver

Re: Improve logging when using Huge Pages

2023-02-09 Thread Nathan Bossart
On Thu, Feb 09, 2023 at 10:40:13AM +0100, Alvaro Herrera wrote: > On 2023-Feb-08, Justin Pryzby wrote: >> I don't think it makes sense to run postgres -C huge_pages_active, >> however, so I see no issue that that would always returns "false". > > Hmm, I would initialize it to return "unknown"

Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux?

2023-02-09 Thread Thomas Munro
On Wed, Feb 8, 2023 at 5:12 PM Michael Paquier wrote: > At the end, I have just done this stuff down to ~12, 11 does not seem > worth the trouble as the next stable version to go out of support. > I'll reduce gokiburi's script a bit, as a result, until the oldest > version support is v12. For

Minor meson gripe

2023-02-09 Thread Peter Geoghegan
Currently, meson has a test suite named "setup". According to the Wiki, this is needed to get something equivalent to "make check", by running "meson test -v --suite setup --suite regress". Some questions about this: * Isn't it confusing that we have a suite by that name, given that we also need

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-02-09 Thread Tom Lane
Andres Freund writes: > I think this misunderstanding is again due to the confusion between the 'all' > target in doc/src/sgml and the default target, just like earlier in the thread > / why I ended up with the prior set of targets under 'docs'. > # Make "html" the default target, since that

Re: run pgindent on a regular basis / scripted manner

2023-02-09 Thread Andrew Dunstan
On 2023-02-08 We 21:29, Shinoda, Noriyoshi (PN Japan FSIP) wrote: Hi, I tried the committed pgindent. The attached small patch changes spaces in the usage message to tabs. Options other than --commit start with a tab. Thanks, pushed. cheers andrew -- Andrew Dunstan

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-02-09 Thread Andres Freund
Hi, On 2023-02-09 09:57:42 -0500, Tom Lane wrote: > Peter Eisentraut writes: > > On 08.02.23 23:18, Tom Lane wrote: > >> I pushed the discussed documentation improvements, and changed the > >> behavior of "ninja docs" to only build the HTML docs. > > > I don't like this change. Now the default

Re: pg_stat_statements and "IN" conditions

2023-02-09 Thread Alvaro Herrera
On 2023-Feb-09, Dmitry Dolgov wrote: > > On Thu, Feb 09, 2023 at 02:30:34PM +0100, Peter Eisentraut wrote: > > What is the point of making this a numeric setting? Either you want > > to merge all values or you don't want to merge any values. > > At least in theory the definition of "too many

Re: recovery modules

2023-02-09 Thread Nathan Bossart
On Wed, Feb 08, 2023 at 09:16:19PM -0800, Andres Freund wrote: > Pushed. Thanks! Thanks! -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Weird failure with latches in curculio on v15

2023-02-09 Thread Nathan Bossart
On Thu, Feb 09, 2023 at 11:12:21AM -0500, Robert Haas wrote: > On Thu, Feb 9, 2023 at 10:51 AM Tom Lane wrote: >> If we think we need primitives to let the archiver hooks get all >> the pending files, or whatever, by all means add those. But don't >> cede fundamental control of the archiver.

Re: HOT chain validation in verify_heapam()

2023-02-09 Thread Himanshu Upadhyaya
On Wed, Feb 8, 2023 at 11:17 PM Robert Haas wrote: > On Sun, Feb 5, 2023 at 3:57 AM Himanshu Upadhyaya > wrote: > > Thanks, yes it's working fine with Prepared Transaction. > > Please find attached the v9 patch incorporating all the review comments. > > I don't know quite how we're still going

Re: Inconsistent nullingrels due to oversight in deconstruct_distribute_oj_quals

2023-02-09 Thread Tom Lane
I wrote: > Richard Guo writes: >> It seems to me there is oversight here. Actually in next level up this >> othersj would null all the relids in its syn_righthand, not only the >> relids in its min_righthand. > Good point. I think this code originated before it was clear to me > that

Re: Weird failure with latches in curculio on v15

2023-02-09 Thread Robert Haas
On Thu, Feb 9, 2023 at 10:51 AM Tom Lane wrote: > I'm fairly concerned about the idea of making it common for people > to write their own main loop for the archiver. That means that, if > we have a bug fix that requires the archiver to do X, we will not > just be patching our own code but trying

Re: Inconsistent nullingrels due to oversight in deconstruct_distribute_oj_quals

2023-02-09 Thread Tom Lane
Richard Guo writes: > It seems to me there is oversight here. Actually in next level up this > othersj would null all the relids in its syn_righthand, not only the > relids in its min_righthand. Good point. I think this code originated before it was clear to me that nullingrels would need to

Re: ICU locale validation / canonicalization

2023-02-09 Thread Robert Haas
On Wed, Feb 8, 2023 at 2:59 AM Jeff Davis wrote: > We do check that the value is accepted by ICU, but ICU seems to accept > anything and use some fallback logic. Bogus strings will typically end > up as the "root" locale (spelled "root" or ""). I've noticed this, and I think it's really

Re: AW: Wrong rows estimations with joins of CTEs slows queries by more than factor 500

2023-02-09 Thread Tomas Vondra
> > FWIW I suggest you provide the data in a form that's easier to use (like > a working SQL script). More people are likely to look and help than when > they have to extract stuff from an e-mail, fill in missing pieces etc. > BTW if anyone wants to play with this, here are the SQL scripts I

Re: Weird failure with latches in curculio on v15

2023-02-09 Thread Tom Lane
Robert Haas writes: > I think that we could certainly, as Michael suggests, have people > provide their own background worker rather than having the archiver > invoke the user-supplied code directly. As long as the functions that > you need in order to get the necessary information can be called

[Question] Revamping btree gist implementation of inet

2023-02-09 Thread Ankit Kumar Pandey
Hi, I was looking at bug mentioned at https://www.postgresql.org/message-id/flat/201010112055.o9BKtZf7011251%40wwwmaster.postgresql.org Issue appears to be in gbt_inet_compress which doesn't store inet details like ip_family and netmask details in inetKEY and gbt_inet_consistent which

Re: meson: Optionally disable installation of test modules

2023-02-09 Thread Nazir Bilal Yavuz
Hi, On 2/8/23 13:30, Peter Eisentraut wrote: If you feel that your patch is ready, please add it to the commit fest. I look forward to reviewing it. Thanks! Commit fest entry link: https://commitfest.postgresql.org/42/4173/ Regards, Nazir Bilal Yavuz Microsoft

Re: pg_stat_statements and "IN" conditions

2023-02-09 Thread Dmitry Dolgov
> On Thu, Feb 09, 2023 at 02:30:34PM +0100, Peter Eisentraut wrote: > On 07.02.23 21:14, Sergei Kornilov wrote: > > It seems a little strange to me that with const_merge_threshold = 1, such a > > test case gives the same result as with const_merge_threshold = 2 > > What is the point of making

Re: pg_stat_statements and "IN" conditions

2023-02-09 Thread Dmitry Dolgov
> On Tue, Feb 07, 2023 at 11:14:52PM +0300, Sergei Kornilov wrote: > Hello! Thanks for reviewing. > Unfortunately, rebase is needed again due to recent changes in > queryjumblefuncs ( 9ba37b2cb6a174b37fc51d0649ef73e56eae27fc ) Yep, my favourite game, rebaseball. Will post a new version soon,

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-02-09 Thread Tom Lane
Peter Eisentraut writes: > On 08.02.23 23:18, Tom Lane wrote: >> I pushed the discussed documentation improvements, and changed the >> behavior of "ninja docs" to only build the HTML docs. > I don't like this change. Now the default set of docs is different > between the make builds and the

Re: ICU locale validation / canonicalization

2023-02-09 Thread Peter Eisentraut
On 08.02.23 08:59, Jeff Davis wrote: The overall benefit here is that we keep our catalogs consistently using an independent standard format for ICU locale strings, rather than whatever the user specifies. That makes it less likely that ICU needs to use any fallback logic when trying to open a

RE: [Proposal] Add foreign-server health checks infrastructure

2023-02-09 Thread Hayato Kuroda (Fujitsu)
Dear Katsuragi-san, Thank you for reviewing! PSA new version patches. > 0001: > + while (result < 0 && errno == EINTR); > + > + if (result < 0) > + return -1; > > this `return -1` is not indented properly. This part is no longer needed. Please see another

RE: [Proposal] Add foreign-server health checks infrastructure

2023-02-09 Thread Hayato Kuroda (Fujitsu)
Dear Horiguchi-san, Thank you for checking! The patch will be attached to another mail. > At Fri, 27 Jan 2023 06:57:01 +, "Hayato Kuroda (Fujitsu)" > wrote in > > I found cfbot failure, PSA fixed version. > > + Unlike , this function checks socket > + health. This check is

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-02-09 Thread Peter Eisentraut
On 08.02.23 23:18, Tom Lane wrote: I pushed the discussed documentation improvements, and changed the behavior of "ninja docs" to only build the HTML docs. I don't like this change. Now the default set of docs is different between the make builds and the meson builds. And people will be

Re: AW: Wrong rows estimations with joins of CTEs slows queries by more than factor 500

2023-02-09 Thread Tomas Vondra
On 2/9/23 10:03, Hans Buschmann wrote: > Hello Tomas, > > > Thank you for looking at. > > > First, I miscalculated the factor which should be about 50, not 500. Sorry. > > Then I want to show you the table definitions (simple, very similar, > ommited child_tables and additional indexes,

Re: pgsql: Use appropriate wait event when sending data in the apply worker

2023-02-09 Thread Robert Haas
On Mon, Feb 6, 2023 at 11:40 PM Amit Kapila wrote: > Use appropriate wait event when sending data in the apply worker. > > Currently, we reuse WAIT_EVENT_LOGICAL_PARALLEL_APPLY_STATE_CHANGE in the > apply worker while sending data to the parallel apply worker via a shared > memory queue. This is

Re: Weird failure with latches in curculio on v15

2023-02-09 Thread Robert Haas
On Wed, Feb 8, 2023 at 7:24 PM Nathan Bossart wrote: > On Thu, Feb 09, 2023 at 08:56:24AM +0900, Michael Paquier wrote: > > On Wed, Feb 08, 2023 at 02:25:54PM -0800, Nathan Bossart wrote: > >> These are all good points. Perhaps there could be a base archiver > >> implementation that

Re: Introduce a new view for checkpointer related stats

2023-02-09 Thread Bharath Rupireddy
On Thu, Feb 9, 2023 at 12:33 PM Andres Freund wrote: > > Hi, Thanks for looking at this. > On 2023-02-09 12:21:51 +0530, Bharath Rupireddy wrote: > > @@ -1105,18 +1105,22 @@ CREATE VIEW pg_stat_archiver AS > > > > CREATE VIEW pg_stat_bgwriter AS > > SELECT > > -

Re: pg_stat_statements and "IN" conditions

2023-02-09 Thread Peter Eisentraut
On 07.02.23 21:14, Sergei Kornilov wrote: It seems a little strange to me that with const_merge_threshold = 1, such a test case gives the same result as with const_merge_threshold = 2 What is the point of making this a numeric setting? Either you want to merge all values or you don't want

Re: [PoC] Improve dead tuple storage for lazy vacuum

2023-02-09 Thread John Naylor
On Thu, Feb 9, 2023 at 2:08 PM Masahiko Sawada wrote: > I think it's still important for lazy vacuum that an iteration over a > TID store returns TIDs in ascending order, because otherwise a heap > vacuum does random writes. That being said, we can have > RT_ITERATE_NEXT() return key-value pairs

Re: [PATCH] Compression dictionaries for JSONB

2023-02-09 Thread Andres Freund
Hi, On February 9, 2023 2:50:57 AM PST, Aleksander Alekseev wrote: >Hi Andres, > >> > So to clarify, are we talking about tuple-level compression? Or >> > perhaps page-level compression? >> >> Tuple level. > >> although my own patch proposed attribute-level compression, not >> tuple-level one,

  1   2   >