RE: Support tab completion for upper character inputs in psql

2022-01-29 Thread tanghy.f...@fujitsu.com
On Saturday, January 29, 2022 7:17 AM, Tom Lane wrote: > Sigh ... per the cfbot, this was already blindsided by 95787e849. > As I said, I don't want to sit on this for very long. Thanks for your V16 patch, I tested it. The results LGTM. Regards, Tang

RE: Support tab completion for upper character inputs in psql

2022-01-29 Thread tanghy.f...@fujitsu.com
On Saturday, January 29, 2022 1:03 AM, Tom Lane wrote: > "tanghy.f...@fujitsu.com" writes: > > I did some tests on it and here are something cases I feel we need to > > confirm > > whether they are suitable. > > > 1) postgres=# create table atest(id int, "iD" int, "ID" int); > > 2) CREATE

Re: CREATEROLE and role ownership hierarchies

2022-01-29 Thread Mark Dilger
> On Jan 25, 2022, at 12:44 PM, Stephen Frost wrote: > > I agree that CREATEROLE is overpowered and that the goal of this should > be to provide a way for roles to be created and dropped that doesn't > give the user who has that power everything that CREATEROLE currently > does. I'm attaching

Re: archive modules

2022-01-29 Thread Nathan Bossart
On Sat, Jan 29, 2022 at 04:31:48PM -0800, Nathan Bossart wrote: > On Sat, Jan 29, 2022 at 12:50:18PM -0800, Nathan Bossart wrote: >> Here is a new revision. I've moved basic_archive to contrib, hardened it >> as suggested, and added shutdown support for archive modules. > > cfbot was unhappy

[PATCH] nodeindexscan with reorder memory leak

2022-01-29 Thread Aliaksandr Kalenik
Hey! I was investigating a leak reported in the PostGIS issues tracker [1] which led me to the Postgres side where the problem really is. The leak is reproducible with query from original ticket [1]: WITH latitudes AS ( SELECT generate_series AS latitude FROM generate_series(-90,

Re: archive modules

2022-01-29 Thread Nathan Bossart
On Sat, Jan 29, 2022 at 12:50:18PM -0800, Nathan Bossart wrote: > Here is a new revision. I've moved basic_archive to contrib, hardened it > as suggested, and added shutdown support for archive modules. cfbot was unhappy with v14, so here's another attempt. One other change I am pondering is

Re: GUC flags

2022-01-29 Thread Justin Pryzby
On Sat, Jan 29, 2022 at 03:38:53PM +0900, Michael Paquier wrote: > +-- Three exceptions as of transaction_* > +SELECT name FROM pg_settings_flags > + WHERE NOT no_show_all AND no_reset_all > + ORDER BY 1; > + name > + > + transaction_deferrable > +

Re: pg_basebackup WAL streamer shutdown is bogus - leading to slow tests

2022-01-29 Thread Andres Freund
Hi, On 2022-01-29 12:44:22 -0800, Andres Freund wrote: > On 2022-01-17 10:06:56 -0800, Andres Freund wrote: > > Yes, that's what I was suggesting. I wasn't thinking of using a static var, > > but putting it in StreamCtl. Note that what pgwin32_waitforsinglesocket() > > is doing doesn't protect

Re: Windows crash / abort handling

2022-01-29 Thread Andres Freund
Hi, On 2022-01-09 16:57:04 -0800, Andres Freund wrote: > I've attached a patch implementing these changes. Unless somebody is planning to look at this soon, I'm planning to push it to master. It's too annoying to have these hangs and not see backtraces. We're going to have to do this in all

Re: archive modules

2022-01-29 Thread Nathan Bossart
Here is a new revision. I've moved basic_archive to contrib, hardened it as suggested, and added shutdown support for archive modules. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From f62fea53b93ba7181dfe084b4100eba59eb82aaa Mon Sep 17 00:00:00 2001 From: Nathan Bossart

Re: pg_basebackup WAL streamer shutdown is bogus - leading to slow tests

2022-01-29 Thread Andres Freund
On 2022-01-17 10:06:56 -0800, Andres Freund wrote: > Yes, that's what I was suggesting. I wasn't thinking of using a static var, > but putting it in StreamCtl. Note that what pgwin32_waitforsinglesocket() > is doing doesn't protect against the problem referenced above, because it > still is reset

Re: row filtering for logical replication

2022-01-29 Thread Alvaro Herrera
On 2022-Jan-28, Andres Freund wrote: > > + foreach(lc, data->publications) > > + { > > + Publication *pub = lfirst(lc); ... > Isn't this basically O(schemas * publications)? Yeah, there are various places in the logical replication code that seem pretty careless about this kind

Re: Add last commit LSN to pg_last_committed_xact()

2022-01-29 Thread James Coleman
On Fri, Jan 28, 2022 at 7:47 PM Andres Freund wrote: > > On 2022-01-28 16:36:32 -0800, Andres Freund wrote: > > On 2022-01-28 18:43:57 -0500, James Coleman wrote: > > > Alternatively I see pg_attribute_aligned, but that's not defined > > > (AFAICT) on clang, for example, so I'm not sure that'd be

Re: Remove extra includes of "access/xloginsert.h" when "access/xlog.h" is included

2022-01-29 Thread Alvaro Herrera
On 2022-Jan-29, Bharath Rupireddy wrote: > Removing the xloginsert.h in xlog.h would need us to add xloginsert.h > in more areas. Sure. > And also, it might break any non-core extensions that > includes just xlog.h and gets xloginsert.h. That's a pretty easy fix anyway -- it's not even

Re: Multiple Query IDs for a rewritten parse tree

2022-01-29 Thread Dmitry Dolgov
> On Sun, Jan 30, 2022 at 01:48:20AM +0800, Julien Rouhaud wrote: > Hi, > > On Sat, Jan 29, 2022 at 06:12:05PM +0100, Dmitry Dolgov wrote: > > > On Sat, Jan 29, 2022 at 03:51:33PM +0800, Julien Rouhaud wrote: > > > > > > I'm also unsure of how are extensions supposed to cooperate in general, as >

Re: Multiple Query IDs for a rewritten parse tree

2022-01-29 Thread Julien Rouhaud
Hi, On Sat, Jan 29, 2022 at 06:12:05PM +0100, Dmitry Dolgov wrote: > > On Sat, Jan 29, 2022 at 03:51:33PM +0800, Julien Rouhaud wrote: > > > > I'm also unsure of how are extensions supposed to cooperate in general, as > > I feel that queryids should be implemented for some "intent" (like > >

Re: Multiple Query IDs for a rewritten parse tree

2022-01-29 Thread Dmitry Dolgov
> On Sat, Jan 29, 2022 at 03:51:33PM +0800, Julien Rouhaud wrote: > Hi, > > On Fri, Jan 28, 2022 at 05:51:56PM +0100, Dmitry Dolgov wrote: > > > On Fri, Jan 21, 2022 at 11:33:22AM +0500, Andrey V. Lepikhov wrote: > > > On 1/9/22 5:49 AM, Tom Lane wrote: > > > > The idea I'd been vaguely thinking

Re: Allow users to choose what happens when recovery target is not reached

2022-01-29 Thread Bharath Rupireddy
On Sat, Nov 13, 2021 at 6:45 PM Bharath Rupireddy wrote: > > Firstly, the proposed patch adds no new behaviour as such, it just > gives the ability that is existing today on v12 and below (prior to > commit dc78866 which went into v13 and later). > > I think performing PITR is the user's wish -

Re: psql - add SHOW_ALL_RESULTS option

2022-01-29 Thread Fabien COELHO
Hello Peter, It would be better to do without.  Also, it makes one wonder how others are supposed to use this multiple-results API properly, if even psql can't do it without extending libpq. Needs more thought. Fine with me! Obviously I'm okay if libpq is repaired instead of writing

Re: Is it correct to update db state in control file as "shutting down" during end-of-recovery checkpoint?

2022-01-29 Thread Bharath Rupireddy
On Sat, Jan 29, 2022 at 7:43 AM Michael Paquier wrote: > > On Fri, Jan 28, 2022 at 06:32:27PM +0900, Kyotaro Horiguchi wrote: > > End-of-recovery checkpoint is requested as CHECKPOINT_WAIT, which > > seems to me to mean the state is always DB_IN_ARCHIVE_RECOVERY while > > the checkpoint is

Replace pg_controldata output fields with macros for better code manageability

2022-01-29 Thread Bharath Rupireddy
Hi, While working on another pg_control patch, I observed that the pg_controldata output fields such as "Latest checkpoint's TimeLineID:", "Latest checkpoint's NextOID:'' and so on, are being used in pg_resetwal.c, pg_controldata.c and pg_upgrade/controldata.c. Direct usage of these fields in

Re: Remove extra includes of "access/xloginsert.h" when "access/xlog.h" is included

2022-01-29 Thread Bharath Rupireddy
On Fri, Jan 28, 2022 at 9:25 PM Alvaro Herrera wrote: > > On 2022-Jan-28, Bharath Rupireddy wrote: > > > Hi, > > > > It seems like there are some instances where xloginsert.h is included > > right after xlog.h but xlog.h has already included xloginsert.h. > > Unless I'm missing something badly,

Re: [PATCH] New default role allowing to change per-role/database settings

2022-01-29 Thread Michael Banck
Hi, Am Mittwoch, dem 08.09.2021 um 07:38 + schrieb shinya11.k...@nttdata.com: > > Thanks for letting me know, I've attached a rebased v4 of this > > patch, no other changes. Please find attached another rebase, sorry it took so long. I tried it, but when I used set command, tab completion

Re: [BUG]Update Toast data failure in logical replication

2022-01-29 Thread Amit Kapila
On Fri, Jan 28, 2022 at 12:16 PM Dilip Kumar wrote: > > I think the best way is to do some refactoring and renaming of the > function, because as part of HeapDetermineModifiedColumns we are > already processing the tuple so we can not put extra overhead of > reprocessing it again. In short I