Re: [PATCH]Feature improvement for MERGE tab completion

2022-09-17 Thread Fujii Masao
On 2022/09/16 11:46, bt22kawamotok wrote: Thanks for updating. +    COMPLETE_WITH("UPDATE", "DELETE", "DO NOTHING"); "UPDATE" is always followed by "SET",  so why not complement it with "UPDATE SET"? Thanks for reviewing. That's a good idea! I create new patch v7. Thanks for updating

Re: [EXTERNAL] Re: Support load balancing in libpq

2022-09-17 Thread Michael Banck
Hi, On Mon, Sep 12, 2022 at 02:16:56PM +, Jelte Fennema wrote: > Attached is an updated patch with the following changes: > 1. rebased (including solved merge conflict) > 2. fixed failing tests in CI > 3. changed the commit message a little bit > 4. addressed the two remarks from Micheal > 5.

Re: [EXTERNAL] Re: Support load balancing in libpq

2022-09-17 Thread Michael Banck
Hi, On Wed, Sep 14, 2022 at 05:53:48PM +0300, Maxim Orlov wrote: > > Also, IMO, the solution must have a fallback mechanism if the > > standby/chosen host isn't reachable. > > Yeah, I think it should. I'm not insisting on a particular name of options > here, but in my view, the overall idea may

Re: fix stats_fetch_consistency value in postgresql.conf.sample

2022-09-17 Thread Justin Pryzby
This is an alternative implementation, which still relies on adding the GUC_DYNAMIC, flag but doesn't require adding a new, sql-accessible function to convert the GUC to a pretty/human display value. >From 25ee6d6ed23ff273e622551fd033c8d086953fe5 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date:

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

2022-09-17 Thread Fujii Masao
On 2022/03/04 15:17, kuroda.hay...@fujitsu.com wrote: Hi Hackers, It's not happy, but I'm not sure about a good solution. I made a timer reschedule if connection lost had detected. But if queries in the transaction are quite short, catching SIGINT may be fail. Attached uses another way:

Re: Refactor backup related code (was: Is it correct to say, "invalid data in file \"%s\"", BACKUP_LABEL_FILE in do_pg_backup_stop?)

2022-09-17 Thread Fujii Masao
On 2022/09/17 16:18, Bharath Rupireddy wrote: Good idea. It makes a lot more sense to me, because xlog.c is already a file of 9000 LOC. I've created xlogbackup.c/.h files and added the new code there. Once this patch gets in, I can offer my hand to move do_pg_backup_start() and

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-17 Thread Peter Geoghegan
On Fri, Sep 16, 2022 at 11:59 PM Michael Paquier wrote: > If check_usermap() is used in a bugfix, that could be a risk, so this > bit warrants a backpatch in my opinion. Makes sense. Committed and backpatched a fix for check_usermap() just now Thanks -- Peter Geoghegan

Re: remove more archiving overhead

2022-09-17 Thread Nathan Bossart
On Sat, Sep 17, 2022 at 11:46:39AM +0200, Peter Eisentraut wrote: >> > --- a/doc/src/sgml/backup.sgml >> > +++ b/doc/src/sgml/backup.sgml >> > @@ -691,11 +691,9 @@ test ! -f >> > /mnt/server/archivedir/000100A90065 cp pg_wal/0 >> > system crashes before the server makes a

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

2022-09-17 Thread Nathan Bossart
On Fri, Sep 16, 2022 at 02:54:14PM +0700, John Naylor wrote: > Here again, I'd rather put this off and focus on getting the "large > details" in good enough shape so we can got towards integrating with > vacuum. I started a new thread for the SIMD patch [0] so that this thread can remain focused

Re: missing indexes in indexlist with partitioned tables

2022-09-17 Thread Tom Lane
Alvaro Herrera writes: > On 2022-Sep-16, David Rowley wrote: >> I kinda disagree with Alvaro's fix in 05fb5d661. I think indexlist is >> the place to store these details. That commit added the following >> comment: >> >> /* >> * Ignore partitioned indexes, since they are not usable for >> *

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-17 Thread Peter Geoghegan
On Sat, Sep 17, 2022 at 11:26 AM Tom Lane wrote: > Yeah, bringing the regex code into line with our standards is fine. > I don't really see a reason not to do it with the timezone code > either, as long as there aren't too many changes there. We are > carrying a pretty large number of diffs from

Re: missing indexes in indexlist with partitioned tables

2022-09-17 Thread Alvaro Herrera
On 2022-Sep-16, David Rowley wrote: > I kinda disagree with Alvaro's fix in 05fb5d661. I think indexlist is > the place to store these details. That commit added the following > comment: > > /* > * Ignore partitioned indexes, since they are not usable for > * queries. > */ > > But neither are

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-17 Thread Tom Lane
Peter Geoghegan writes: > Several files from src/timezone and from src/backend/regex make use of > unnamed parameters in function declarations. It wouldn't be difficult > to fix everything and call it a day, but I wonder if there are any > special considerations here. I don't think that Henry

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-17 Thread Peter Geoghegan
On Fri, Sep 16, 2022 at 6:48 PM Peter Geoghegan wrote: > On Fri, Sep 16, 2022 at 6:20 PM Tom Lane wrote: > > I think they're easily Stroustrup's worst idea ever. You're basically > > throwing away an opportunity for documentation, and that documentation > > is often sorely needed. > > He could

Re: Allow file inclusion in pg_hba and pg_ident files

2022-09-17 Thread Julien Rouhaud
On Tue, Aug 16, 2022 at 02:10:30PM +0800, Julien Rouhaud wrote: > Hi, > > On Sat, Jul 30, 2022 at 04:09:36PM +0800, Julien Rouhaud wrote: > > > > > - 0001: the rule_number / mapping_number addition in the views in a separate > > commit > > - 0002: the main file inclusion patch. Only a few

Re: [RFC] building postgres with meson - v13

2022-09-17 Thread Andres Freund
Hi, On 2022-09-16 16:22:35 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2022-09-16 09:14:20 +1200, Thomas Munro wrote: > >> On Thu, Sep 15, 2022 at 2:26 PM Andres Freund wrote: > >>> - noticed that libpgport.a had and needed a dependency on errcodes.h - > >>> that > >>> seemed wrong.

Re: Patch to address creation of PgStat* contexts with null parent context

2022-09-17 Thread Andres Freund
Hi, On 2022-09-07 11:11:11 +0200, Drouvot, Bertrand wrote: > On 9/6/22 7:53 AM, Kyotaro Horiguchi wrote: > > At Mon, 5 Sep 2022 14:46:55 +0200, "Drouvot, Bertrand" > > wrote in > > > Looks like that both approaches have their pros and cons. I'm tempted > > > to vote +1 on "just changing" the

Re: archive modules

2022-09-17 Thread Peter Eisentraut
On 14.09.22 23:09, Nathan Bossart wrote: On Wed, Sep 14, 2022 at 09:31:04PM +0200, Peter Eisentraut wrote: Here is a patch that addresses this. My intent was to present archive_command as the built-in archive library, but I can see how this might cause confusion, so this change seems

Re: remove more archiving overhead

2022-09-17 Thread Peter Eisentraut
On 03.08.22 09:16, Noah Misch wrote: On Mon, Aug 01, 2022 at 10:02:19PM -0700, Nathan Bossart wrote: On Sat, Jul 30, 2022 at 11:51:56PM -0700, Noah Misch wrote: Inviting the administrator to resolve things is more dangerous than just returning true. I recommend making this text more

Re: ICU for global collation

2022-09-17 Thread Marina Polyakova
On 2022-09-16 10:56, Peter Eisentraut wrote: On 15.09.22 17:41, Marina Polyakova wrote: I agree with you. Here's another version of the patch. The locale/encoding checks and reports in initdb have been reordered, because now the encoding is set first and only then the ICU locale is checked.

Re: ICU for global collation

2022-09-17 Thread Marina Polyakova
Thanks to Kyotaro Horiguchi review we found out that there're interesting cases due to the order of some ICU checks: 1. ICU locale vs supported encoding: 1.1. On 2022-09-15 09:52, Kyotaro Horiguchi wrote: If I executed initdb as follows, I would be told to specify --icu-locale option. $

Re: Refactor backup related code (was: Is it correct to say, "invalid data in file \"%s\"", BACKUP_LABEL_FILE in do_pg_backup_stop?)

2022-09-17 Thread Bharath Rupireddy
On Fri, Sep 16, 2022 at 12:01 PM Michael Paquier wrote: > > On Wed, Sep 14, 2022 at 02:24:12PM +0530, Bharath Rupireddy wrote: > > I'm attaching the v4 patch that's rebased on to the latest HEAD. > > Please consider this for review. > > I have been looking at this patch. Thanks for reviewing it.

Re: ICU for global collation

2022-09-17 Thread Marina Polyakova
On 2022-09-16 11:11, Kyotaro Horiguchi wrote: At Fri, 16 Sep 2022 09:49:28 +0300, Marina Polyakova wrote in In continuation of options check: AFAICS the following checks in initdb if (locale_provider == COLLPROVIDER_ICU) { if (!icu_locale)

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-17 Thread Michael Paquier
On Fri, Sep 16, 2022 at 06:48:36PM -0700, Peter Geoghegan wrote: > On Fri, Sep 16, 2022 at 6:20 PM Tom Lane wrote: >> I'd view the current state of reorderbuffer.h as pretty unacceptable on >> stylistic grounds no matter which position you take. Having successive >> declarations randomly using

Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf

2022-09-17 Thread Michael Paquier
On Fri, Sep 16, 2022 at 06:24:07PM +0200, Drouvot, Bertrand wrote: > The CF bot is failing for Windows (all other tests are green) and only for > the new tap test related to the regular expression on the host name (the > ones on database and role are fine). > > The issue is not related to the

Re: Pruning never visible changes

2022-09-17 Thread Simon Riggs
On Fri, 16 Sept 2022 at 18:37, Tom Lane wrote: > > Simon Riggs writes: > > On Fri, 16 Sept 2022 at 15:26, Tom Lane wrote: > >> You cannot > >> do that, at least not without checking that the originating > >> transaction has no snapshots that could see the older row version. > > > I'm saying

Re: Pruning never visible changes

2022-09-17 Thread Simon Riggs
On Fri, 16 Sept 2022 at 21:07, Laurenz Albe wrote: > > On Fri, 2022-09-16 at 10:26 -0400, Tom Lane wrote: > > Simon Riggs writes: > > > A user asked me whether we prune never visible changes, such as > > > BEGIN; > > > INSERT... > > > UPDATE.. (same row) > > > COMMIT; > > > > Didn't we just have

Re: Slow standby snapshot

2022-09-17 Thread Simon Riggs
On Fri, 16 Sept 2022 at 17:08, Michail Nikolaev wrote: > > Hello everyone. > > To find the best frequency for calling KnownAssignedXidsCompress in > Simon's patch, I made a set of benchmarks. It looks like each 8th xid > is a little bit often. > > Setup and method is the same as previous (1).

Re: ICU for global collation

2022-09-17 Thread Marina Polyakova
On 2022-09-16 10:57, Peter Eisentraut wrote: On 16.09.22 09:31, Marina Polyakova wrote: IMO it is hardly understantable from the program output either - it looks like I manually chose the encoding UTF8. Maybe first inform about selected encoding?.. Yes, I included something like that in the