Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-10 Thread Jeff Davis
On Wed, 2022-03-02 at 22:37 +0530, Bharath Rupireddy wrote: > > Attaching v6 patch set with above review comments addressed. Please > review it further. * Don't issue WARNINGs or other messages for ordinary situations, like when pg_get_wal_records_info() hits the end of WAL. * It feels like the

Re: Optimize external TOAST storage

2022-03-10 Thread davinder singh
Thanks Dilip, I have fixed your comments, please find the updated patch. On Tue, Mar 8, 2022 at 9:44 PM Dilip Kumar wrote:. > +/* incompressible, ignore on subsequent compression passes. */ > +orig_attr->tai_colflags |= TOASTCOL_INCOMPRESSIBLE; > > Do we need to set TOAST

Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)

2022-03-10 Thread Fabien COELHO
Hello Justin, I hope to look at it over the week-end. -- Fabien Coelho - CRI, MINES ParisTech

Re: Pluggable toaster

2022-03-10 Thread Nikita Malakhov
Hi Hackers, In addition to original patch set for Pluggable Toaster, we have two more patches (actually, small, but important fixes), authored by Nikita Glukhov: 1) 0001-Fix-toast_tuple_externalize.patch This patch fixes freeing memory in case of new toasted value is the same as old one, this see

Re: ICU for global collation

2022-03-10 Thread Peter Eisentraut
On 05.03.22 09:38, Julien Rouhaud wrote: @@ -168,18 +175,6 @@ DefineCollation(ParseState *pstate, List *names, List *parameters, bool if_not_e errmsg("collation \"default\" cannot be copied"))); } - if (localeEl) - { - collcollate = defGetString(localeEl); -

Re: ICU for global collation

2022-03-10 Thread Julien Rouhaud
On Thu, Mar 10, 2022 at 10:52:41AM +0100, Peter Eisentraut wrote: > On 05.03.22 09:38, Julien Rouhaud wrote: > > @@ -168,18 +175,6 @@ DefineCollation(ParseState *pstate, List *names, List > > *parameters, bool if_not_e > > errmsg("collation \"default\" cannot be copied"))); >

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-10 Thread Dilip Kumar
On Wed, Mar 9, 2022 at 6:44 PM Robert Haas wrote: > > > Right, infact now also if you see the logic, the > > write_relmap_file_internal() is taking care of the actual update and > > the write_relmap_file() is doing update + setting the global > > variables. So yeah we can rename as you suggested

Re: logical decoding and replication of sequences

2022-03-10 Thread Peter Eisentraut
On 23.02.22 00:24, Tomas Vondra wrote: Here's an updated version of the patch, fixing most of the issues from reviews so far. There's still a couple FIXME comments, but I think those are minor and/or straightforward to deal with. This patch needs a rebase because of a conflict in expected/publ

Re: Optimize external TOAST storage

2022-03-10 Thread Dilip Kumar
On Thu, Mar 10, 2022 at 2:04 PM davinder singh wrote: > > Thanks Dilip, I have fixed your comments, please find the updated patch. > Some more comments +/* + * For those cases where storing compressed data is not optimal, We will use + * this pointer copy for referring uncompressed d

Re: Skipping logical replication transactions on subscriber side

2022-03-10 Thread Amit Kapila
On Tue, Mar 1, 2022 at 8:31 PM Masahiko Sawada wrote: > > I've attached an updated patch along with two patches for cfbot tests > since the main patch (0003) depends on the other two patches. Both > 0001 and 0002 patches are the same ones I attached on another > thread[2]. > Few comments on 0003:

Re: ltree_gist indexes broken after pg_upgrade from 12 to 13

2022-03-10 Thread Tomas Vondra
On 3/10/22 08:09, Alexander Korotkov wrote: > On Tue, Mar 8, 2022 at 2:05 AM Alexander Korotkov > wrote: >> ... >> >> Good. The revised patch is attached. Instead of adding argument to >> LTREE_GET_ASIGLEN(), it introduces separate LTREE_GET_SIGLEN() and >> LTREE_GET_ASIGLEN() macros. > > No f

Re: PATCH: add "--config-file=" option to pg_rewind

2022-03-10 Thread Michael Banck
Heya, some minor comments, I didn't look at the added test and I did not test the patch at all, but (as part of the Debian/Ubuntu packaging team) I think this patch is really important: On Tue, Mar 01, 2022 at 12:35:27PM +0100, Gunnar "Nick" Bluth wrote: > diff --git a/doc/src/sgml/ref/pg_rewind.

Re: Changing "Hot Standby" to "hot standby"

2022-03-10 Thread Daniel Westermann (DWE)
>>>Hmm.  Outside the title that had better use upper-case characters for >>>the first letter of each word, I can see references to the pattern you >>>are trying to eliminate in amcheck.sgml (1), config.sgml (3), >>>protocol.sgml (3) and mvcc.sgml (1).  Shouldn't you refresh these as >>>well if the

Re: Lowering the ever-growing heap->pd_lower

2022-03-10 Thread Matthias van de Meent
On Wed, 16 Feb 2022 at 21:14, Matthias van de Meent wrote: > > On Wed, 16 Feb 2022 at 20:54, Peter Geoghegan wrote: > > > > On Tue, Feb 15, 2022 at 10:48 AM Matthias van de Meent > > wrote: > > > Peter Geoghegan asked for good arguments for the two changes > > > implemented. Below are my argumen

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-10 Thread Ashutosh Sharma
Here are some review comments on the latest patch (v11-0004-WAL-logged-CREATE-DATABASE.patch). I actually did the review of the v10 patch but that applies for this latest version as well. + /* Now errors are fatal ... */ + START_CRIT_SECTION(); Did you mean PANIC inste

Re: PATCH: add "--config-file=" option to pg_rewind

2022-03-10 Thread Gunnar "Nick" Bluth
Am 10.03.22 um 14:43 schrieb Michael Banck: > Heya, > > some minor comments, I didn't look at the added test and I did not test > the patch at all, but (as part of the Debian/Ubuntu packaging team) I > think this patch is really important: Much appreciated! [...] > I think we usually just say "

Re: role self-revocation

2022-03-10 Thread Robert Haas
On Wed, Mar 9, 2022 at 4:31 PM Tom Lane wrote: > I don't think we need syntax to describe it. As I just said in my > other reply, we have a perfectly good precedent for this already > in ordinary object permissions. That is: an object owner always, > implicitly, has GRANT OPTION for all the obje

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-10 Thread Dilip Kumar
On Thu, Mar 10, 2022 at 7:22 PM Ashutosh Sharma wrote: > > Here are some review comments on the latest patch > (v11-0004-WAL-logged-CREATE-DATABASE.patch). I actually did the review > of the v10 patch but that applies for this latest version as well. > > + /* Now errors are fatal ...

Re: ltree_gist indexes broken after pg_upgrade from 12 to 13

2022-03-10 Thread Tom Lane
Alexander Korotkov writes: > Good. The revised patch is attached. Instead of adding argument to > LTREE_GET_ASIGLEN(), it introduces separate LTREE_GET_SIGLEN() and > LTREE_GET_ASIGLEN() macros. Um ... what I see after applying the patch is two redundant definitions of LTREE_GET_ASIGLEN, and no

Re: ltree_gist indexes broken after pg_upgrade from 12 to 13

2022-03-10 Thread Andrew Dunstan
On 3/6/22 17:33, Andres Freund wrote: > Hi, > > On 2022-03-06 07:46:04 -0500, Andrew Dunstan wrote: >> This is an area not currently touched by the buildfarm's cross version >> upgrade testing, which basically compares a pre-upgrade and post-upgrade >> dump of the databases. The upgraded cluster

Re: support for MERGE

2022-03-10 Thread Simon Riggs
On Sun, 27 Feb 2022 at 17:35, Alvaro Herrera wrote: > > > + /* > > > +* Project the tuple. In case of a > > > partitioned table, the > > > +* projection was already built to use the > > > root's descriptor, > > >

Re: ltree_gist indexes broken after pg_upgrade from 12 to 13

2022-03-10 Thread Tom Lane
Andrew Dunstan writes: > On 3/6/22 17:33, Andres Freund wrote: >> A sequence of >> pg_upgrade; amcheck; upgrade all extensions; amcheck; >> would make sense. > See > Does this detect the problem at hand?

Re: role self-revocation

2022-03-10 Thread David G. Johnston
On Thu, Mar 10, 2022 at 7:46 AM Robert Haas wrote: > On Wed, Mar 9, 2022 at 4:31 PM Tom Lane wrote: > > I don't think we need syntax to describe it. As I just said in my > > other reply, we have a perfectly good precedent for this already > > in ordinary object permissions. That is: an object

Re: role self-revocation

2022-03-10 Thread Stephen Frost
Greetings, * David G. Johnston (david.g.johns...@gmail.com) wrote: > On Thu, Mar 10, 2022 at 7:46 AM Robert Haas wrote: > > On Wed, Mar 9, 2022 at 4:31 PM Tom Lane wrote: > > > I don't think we need syntax to describe it. As I just said in my > > > other reply, we have a perfectly good preceden

Re: role self-revocation

2022-03-10 Thread Mark Dilger
> On Mar 10, 2022, at 7:56 AM, David G. Johnston > wrote: > > > I want that because I want mini-superusers, where alice can administer > the users that alice creates just as if she were a superuser, > including having their permissions implicitly and dropping them when > she wants them gone,

Re: [RFC] building postgres with meson -v7

2022-03-10 Thread Peter Eisentraut
On 09.03.22 17:44, Andres Freund wrote: v6-0009-prereq-make-unicode-targets-work-in-vpath-builds.patch.gz Another directory issue I think it's a tad different, in that it's fixing something that's currently broken in VPATH builds. Ok, I took another look at this. -override CPPFLAGS := -DFRON

Re: pg_stat_statements and "IN" conditions

2022-03-10 Thread Dmitry Dolgov
> On Wed, Jan 05, 2022 at 10:11:11PM +0100, Dmitry Dolgov wrote: > > On Tue, Jan 04, 2022 at 06:02:43PM -0500, Tom Lane wrote: > > We can debate whether the rules proposed here are good for > > pg_stat_statements or not, but it seems inevitable that they will be a > > disaster for some other consum

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-10 Thread Bharath Rupireddy
On Thu, Mar 10, 2022 at 1:52 PM Jeff Davis wrote: > > On Wed, 2022-03-02 at 22:37 +0530, Bharath Rupireddy wrote: > > > > Attaching v6 patch set with above review comments addressed. Please > > review it further. Thanks Jeff for reviewing it. I've posted the latest v7 patch-set upthread [1] which

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-10 Thread Robert Haas
On Thu, Mar 10, 2022 at 6:02 AM Dilip Kumar wrote: > I have completely changed the logic for this refactoring. Basically, > write_relmap_file(), is already having parameters to control whether > to write wal, send inval and we are already passing the dbpath. > Instead of making a new function I j

Re: ltree_gist indexes broken after pg_upgrade from 12 to 13

2022-03-10 Thread Andrew Dunstan
On 3/10/22 10:53, Tom Lane wrote: > Andrew Dunstan writes: >> On 3/6/22 17:33, Andres Freund wrote: >>> A sequence of >>> pg_upgrade; amcheck; upgrade all extensions; amcheck; >>> would make sense. >> See >>

Re: role self-revocation

2022-03-10 Thread Robert Haas
On Thu, Mar 10, 2022 at 11:19 AM Stephen Frost wrote: > I disagree that ownership is needed that's not what the spec calls for > either. What we need is more flexibility when it comes to the > relationships which are allowed to be created between roles and what > privileges come with them. To th

Re: pg_stat_statements and "IN" conditions

2022-03-10 Thread Tom Lane
Dmitry Dolgov <9erthali...@gmail.com> writes: > New status: Waiting on Author > This seems incorrect, as the only feedback I've got was "this is a bad > idea", and no reaction on follow-up questions. I changed the status because it seems to me there is no chance of this being committed as-is. 1.

Re: ltree_gist indexes broken after pg_upgrade from 12 to 13

2022-03-10 Thread Andres Freund
On 2022-03-10 10:43:06 -0500, Andrew Dunstan wrote: > On 3/6/22 17:33, Andres Freund wrote: > > One thing that's likely worth doing as part of the cross version upgrade > > test, > > even if it wouldn't even help in this case, is to run amcheck post > > upgrade. Just dumping data isn't going to to

Re: role self-revocation

2022-03-10 Thread David G. Johnston
On Thu, Mar 10, 2022 at 9:19 AM Stephen Frost wrote: > Greetings, > > * David G. Johnston (david.g.johns...@gmail.com) wrote: > > On Thu, Mar 10, 2022 at 7:46 AM Robert Haas > wrote: > > > On Wed, Mar 9, 2022 at 4:31 PM Tom Lane wrote: > > > > I don't think we need syntax to describe it. As I

Re: role self-revocation

2022-03-10 Thread Joshua Brindle
On Thu, Mar 10, 2022 at 12:11 PM Robert Haas wrote: > > On Thu, Mar 10, 2022 at 11:19 AM Stephen Frost wrote: > > I disagree that ownership is needed that's not what the spec calls for > > either. What we need is more flexibility when it comes to the > > relationships which are allowed to be cre

Re: pg_stat_statements and "IN" conditions

2022-03-10 Thread Robert Haas
On Thu, Mar 10, 2022 at 12:12 PM Tom Lane wrote: > > This seems incorrect, as the only feedback I've got was "this is a bad > > idea", and no reaction on follow-up questions. > > I changed the status because it seems to me there is no chance of > this being committed as-is. > > 1. I think an absol

Re: Parameter for planner estimate of recursive queries

2022-03-10 Thread Simon Riggs
On Fri, 28 Jan 2022 at 14:07, Robert Haas wrote: > > On Tue, Jan 25, 2022 at 4:44 AM Peter Eisentraut > wrote: > > On the one hand, this smells like a planner hint. But on the other > > hand, it doesn't look like we will come up with proper graph-aware > > selectivity estimation system any time

Re: ltree_gist indexes broken after pg_upgrade from 12 to 13

2022-03-10 Thread Alexander Korotkov
On Thu, Mar 10, 2022 at 6:39 PM Tom Lane wrote: > Alexander Korotkov writes: > > Good. The revised patch is attached. Instead of adding argument to > > LTREE_GET_ASIGLEN(), it introduces separate LTREE_GET_SIGLEN() and > > LTREE_GET_ASIGLEN() macros. > > Um ... what I see after applying the pat

Re: Reducing power consumption on idle servers

2022-03-10 Thread Simon Riggs
On Wed, 9 Mar 2022 at 01:16, Zheng Li wrote: > > 1. Standardize the hibernation time at 60s, using a #define > > HIBERNATE_DELAY_SEC 60 > > I notice in patch 3 HIBERNATE_DELAY_SEC has been increased to 300 > seconds, what’s the reasoning behind it? Is longer hibernation delay > better? If so can

Re: role self-revocation

2022-03-10 Thread Stephen Frost
Greetings, * David G. Johnston (david.g.johns...@gmail.com) wrote: > On Thu, Mar 10, 2022 at 9:19 AM Stephen Frost wrote: > > * David G. Johnston (david.g.johns...@gmail.com) wrote: > > > On Thu, Mar 10, 2022 at 7:46 AM Robert Haas > > wrote: > > > > On Wed, Mar 9, 2022 at 4:31 PM Tom Lane wrot

Re: role self-revocation

2022-03-10 Thread Robert Haas
On Thu, Mar 10, 2022 at 12:26 PM Joshua Brindle wrote: > Ownership implies DAC, the ability to grant others rights to an > object. It's not "kooky" to see roles as owned objects, but it isn't > required either. For example most objects on a UNIX system are owned > and subject to DAC but users aren

Re: Column Filtering in Logical Replication

2022-03-10 Thread Tomas Vondra
On 3/9/22 10:20, Peter Eisentraut wrote: > > On 07.03.22 16:18, Tomas Vondra wrote: >> AFAICS these issues should be resolved by the adoption of the row-filter >> approach (i.e. it should fail the same way as for row filter). > > The first two patches (additional testing for row filtering feature

Re: Avoiding smgrimmedsync() during nbtree index builds

2022-03-10 Thread Andres Freund
Hi, > From a06407b19c8d168ea966e45c0e483b38d49ddc12 Mon Sep 17 00:00:00 2001 > From: Melanie Plageman > Date: Fri, 4 Mar 2022 14:48:39 -0500 > Subject: [PATCH v6 1/4] Add unbuffered IO API I think this or one of the following patches should update src/backend/access/transam/README > @@ -164,6

Re: role self-revocation

2022-03-10 Thread Peter Eisentraut
On 09.03.22 14:02, Robert Haas wrote: On Wed, Mar 9, 2022 at 7:55 AM Peter Eisentraut wrote: Do we have subtractive permissions today? Not in the GRANT/REVOKE sense, I think, but you can put a user in a group and then mention that group in pg_hba.conf. And that line might be "reject" or whate

Re: pg_stat_statements and "IN" conditions

2022-03-10 Thread Dmitry Dolgov
> On Thu, Mar 10, 2022 at 12:32:08PM -0500, Robert Haas wrote: > On Thu, Mar 10, 2022 at 12:12 PM Tom Lane wrote: > > > 2. You haven't made a case for it. The original complaint was > > about different lengths of IN lists not being treated as equivalent, > > but this patch has decided to do I'm-n

Re: Column Filtering in Logical Replication

2022-03-10 Thread Tomas Vondra
On 3/10/22 19:17, Tomas Vondra wrote: > On 3/9/22 11:12, houzj.f...@fujitsu.com wrote: >> Hi, >> >> Here are some tests and results about the table sync query of >> column filter patch and row filter. >> >> 1) multiple publications which publish schema of parent table and partition. >> pub >

Re: Column Filtering in Logical Replication

2022-03-10 Thread Tomas Vondra
On 3/10/22 04:09, Amit Kapila wrote: > On Wed, Mar 9, 2022 at 3:33 PM Amit Kapila wrote: >> >> On Mon, Mar 7, 2022 at 8:48 PM Tomas Vondra >> wrote: >> >>> OK, I reworked this to do the same thing as the row filtering patch. >>> >> >> Thanks, I'll check this. >> > > Some assorted comments: >

Re: role self-revocation

2022-03-10 Thread Robert Haas
On Thu, Mar 10, 2022 at 2:05 PM Peter Eisentraut wrote: > On 09.03.22 14:02, Robert Haas wrote: > > On Wed, Mar 9, 2022 at 7:55 AM Peter Eisentraut > > wrote: > >> Do we have subtractive permissions today? > > > > Not in the GRANT/REVOKE sense, I think, but you can put a user in a > > group and t

Re: role self-revocation

2022-03-10 Thread David G. Johnston
On Thu, Mar 10, 2022 at 11:05 AM Stephen Frost wrote: > Greetings, > > * David G. Johnston (david.g.johns...@gmail.com) wrote: > > On Thu, Mar 10, 2022 at 9:19 AM Stephen Frost > wrote: > > > * David G. Johnston (david.g.johns...@gmail.com) wrote: > > > > On Thu, Mar 10, 2022 at 7:46 AM Robert H

Re: Reducing power consumption on idle servers

2022-03-10 Thread Andres Freund
Hi, On 2022-03-10 17:50:47 +, Simon Riggs wrote: > On Wed, 9 Mar 2022 at 01:16, Zheng Li wrote: > > > > 1. Standardize the hibernation time at 60s, using a #define > > > HIBERNATE_DELAY_SEC 60 > > > > I notice in patch 3 HIBERNATE_DELAY_SEC has been increased to 300 > > seconds, what’s the r

Re: role self-revocation

2022-03-10 Thread Stephen Frost
Greetings, * David G. Johnston (david.g.johns...@gmail.com) wrote: > On Thu, Mar 10, 2022 at 11:05 AM Stephen Frost wrote: > > * David G. Johnston (david.g.johns...@gmail.com) wrote: > > > On Thu, Mar 10, 2022 at 9:19 AM Stephen Frost wrote: > > > > * David G. Johnston (david.g.johns...@gmail.co

Re: role self-revocation

2022-03-10 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > But that's not to say that we couldn't decide to do something else > instead, and that other thing might well be better. Do you want to > sketch out a full proposal, even just what the syntax would look like, > and share that here? And if y

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-10 Thread Robert Haas
On Thu, Mar 10, 2022 at 3:22 AM Jeff Davis wrote: > * Can we mark this extension 'trusted'? I'm not 100% clear on the > standards for that marker, but it seems reasonable for a database owner > with the right privileges might want to install it. I'm not clear on the standard either, exactly, but

Re: role self-revocation

2022-03-10 Thread David G. Johnston
On Thu, Mar 10, 2022 at 12:45 PM Stephen Frost wrote: > > * David G. Johnston (david.g.johns...@gmail.com) wrote: > > On Thu, Mar 10, 2022 at 11:05 AM Stephen Frost > wrote: > Why not just look at the admin_option field of pg_auth_members...? I > don't get why that isn't an even more minimal fi

Re: role self-revocation

2022-03-10 Thread Robert Haas
On Thu, Mar 10, 2022 at 2:58 PM Stephen Frost wrote: > It'd be useful to have a better definition of exactly what a > 'mini-superuser' is, but at least for the moment when it comes to roles, > let's look at what the spec says: Gosh, I feel like I've spelled that out approximately 463,121 times al

Re: role self-revocation

2022-03-10 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Thu, Mar 10, 2022 at 2:58 PM Stephen Frost wrote: > > It'd be useful to have a better definition of exactly what a > > 'mini-superuser' is, but at least for the moment when it comes to roles, > > let's look at what the spec says: > > G

Re: Adding CI to our tree

2022-03-10 Thread Andres Freund
Hi, On 2022-03-02 14:50:58 -0600, Justin Pryzby wrote: > From 883edaa653bcf7f1a2369d8edf46eaaac1ba0ba2 Mon Sep 17 00:00:00 2001 > From: Justin Pryzby > Date: Mon, 17 Jan 2022 00:53:04 -0600 > Subject: [PATCH 1/7] cirrus: include hints how to install OS packages.. > > This is useful for patches d

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-10 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Thu, Mar 10, 2022 at 3:22 AM Jeff Davis wrote: > > * Can we mark this extension 'trusted'? I'm not 100% clear on the > > standards for that marker, but it seems reasonable for a database owner > > with the right privileges might want to

Re: Adding CI to our tree

2022-03-10 Thread Justin Pryzby
On Thu, Mar 10, 2022 at 12:50:15PM -0800, Andres Freund wrote: > > - setup_cores_script: | > > + setup_os_script: | > > mkdir -m 770 /tmp/cores > > chown root:postgres /tmp/cores > > sysctl kern.corefile='/tmp/cores/%N.%P.core' > > +#pkg install -y ... > > Would you mind if I

Re: role self-revocation

2022-03-10 Thread David G. Johnston
On Thu, Mar 10, 2022 at 12:58 PM Stephen Frost wrote: > I don't think we're that far from having all of these though. To start > with, we remove from CREATEROLE the random things that it does which go > beyond what folks tend to expect- remove the whole 'grant any role to > any other' stuff, rem

Re: [PATCH] pg_permissions

2022-03-10 Thread Chapman Flack
On 02/26/22 03:27, Joel Jacobson wrote: > On Fri, Feb 25, 2022, at 22:12, Chapman Flack wrote: >> I would be happy to review this patch, but a look through the email leaves me >> thinking it may still be waiting on a C implementation of pg_get_acl(). Is >> that >> right? > > Not sure. It looked

Re: role self-revocation

2022-03-10 Thread Robert Haas
On Thu, Mar 10, 2022 at 3:41 PM Stephen Frost wrote: > > Gosh, I feel like I've spelled that out approximately 463,121 times > > already. That estimate might be slightly off though; I've been known > > to make mistakes from time to time > > If there's a specific message that details it closely

Re: role self-revocation

2022-03-10 Thread Bruce Momjian
On Thu, Mar 10, 2022 at 02:22:05PM -0500, Robert Haas wrote: > I mean, I didn't design pg_hba.conf, but I think it's part of the > database doing a reasonable thing, not an external system doing a > nonsensical thing. FYI, I think pg_hba.conf gets away with having negative/reject permissions only

Re: role self-revocation

2022-03-10 Thread Robert Haas
On Thu, Mar 10, 2022 at 4:00 PM David G. Johnston wrote: > I dislike changing the documented behavior of CREATEROLE to the degree > suggested here. However, there are three choices here, only one of which can > be chosen: > > 1. Leave CREATEROLE alone entirely > 2. Make it so CREATEROLE cannot

Re: role self-revocation

2022-03-10 Thread Robert Haas
On Thu, Mar 10, 2022 at 5:00 PM Bruce Momjian wrote: > On Thu, Mar 10, 2022 at 02:22:05PM -0500, Robert Haas wrote: > > I mean, I didn't design pg_hba.conf, but I think it's part of the > > database doing a reasonable thing, not an external system doing a > > nonsensical thing. > > FYI, I think pg

Re: Adding CI to our tree

2022-03-10 Thread Justin Pryzby
See attached, or at https://github.com/justinpryzby/postgres/runs/5503079878 >From c631c3d9bdb8325aaaecc5dcdfac46eca7bd907a Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Mon, 17 Jan 2022 00:53:04 -0600 Subject: [PATCH 1/7] cirrus: include hints how to install OS packages.. This is useful for

Re: range_agg with multirange inputs

2022-03-10 Thread Chapman Flack
On 03/05/22 15:53, Paul Jungwirth wrote: > On 3/1/22 13:33, Chapman Flack wrote: >> I think the 4 lines should suffice, but it looks like this patch was >> generated from a rebase of the old one (with three lines) that ended up >> putting the new 'range_agg' entry ahead of 'max' in func.sgml, which

Re: role self-revocation

2022-03-10 Thread David G. Johnston
On Thu, Mar 10, 2022 at 3:01 PM Robert Haas wrote: > On Thu, Mar 10, 2022 at 4:00 PM David G. Johnston > wrote: > > I dislike changing the documented behavior of CREATEROLE to the degree > suggested here. However, there are three choices here, only one of which > can be chosen: > > > > 1. Leave

Re: role self-revocation

2022-03-10 Thread Tom Lane
Robert Haas writes: > Probably easier to just say it again: I want to have users that can > create roles and then have superuser-like powers with respect to those > roles. They can freely exercise the privileges of those roles, and > they can do all the things that a superuser can do but only with

Re: role self-revocation

2022-03-10 Thread Mark Dilger
> On Mar 10, 2022, at 2:01 PM, Robert Haas wrote: > > It sounds like you prefer a behavior where CREATEROLE gives power over > all non-superusers, but that seems pretty limiting to me. Why can't > someone want to create a user with power over some users but not > others? I agree with Robert o

Re: ltree_gist indexes broken after pg_upgrade from 12 to 13

2022-03-10 Thread Tom Lane
Alexander Korotkov writes: > Sorry for publishing a patch, which doesn't even compile. > The attached version should be good. OK, better. So to clarify: we are going to back-patch as far as v13, and then in the minor releases we are going to tell people they need to REINDEX all gist indexes on l

Re: Add index scan progress to pg_stat_progress_vacuum

2022-03-10 Thread Nathan Bossart
On Thu, Mar 10, 2022 at 09:30:57PM +, Imseih (AWS), Sami wrote: > Attached v4 which includes accounting for the hash size on startup, removal > of the no longer needed comment in pgstatfuncs.c and a change in both > code/docs to only reset the indexes_total to 0 when failsafe is triggered. T

Re: Changing "Hot Standby" to "hot standby"

2022-03-10 Thread Robert Treat
On Thu, Mar 10, 2022 at 8:45 AM Daniel Westermann (DWE) wrote: > > >>>Hmm. Outside the title that had better use upper-case characters for > >>>the first letter of each word, I can see references to the pattern you > >>>are trying to eliminate in amcheck.sgml (1), config.sgml (3), > >>>protocol.s

Re: [Proposal] vacuumdb --schema only

2022-03-10 Thread Robert Treat
On Thu, Mar 10, 2022 at 1:32 AM Gilles Darold wrote: > > Le 09/03/2022 à 22:10, Justin Pryzby a écrit : > > On Mon, Mar 07, 2022 at 08:38:04AM +0100, Gilles Darold wrote: > > Maybe it's clearer to write this with =ANY() / != ALL() ? > See 002. > > I have applied your changes and produced a new ver

Re: PG DOCS - logical replication filtering

2022-03-10 Thread Euler Taveira
On Fri, Mar 4, 2022, at 12:41 AM, Peter Smith wrote: > PSA patch v3 to address all comments received so far. Peter, I started reviewing this documentation for row filter and I noticed that I was changing too much lines to submit a patch on the top of it. Hence, I'm attaching a new version based on

Re: trigger example for plsample

2022-03-10 Thread Chapman Flack
On 03/02/22 15:12, Mark Wong wrote: > I've attached v2, which reduces the output: > > * Removing the notices for the text body, and the "compile" message. > * Replaced the notice for "compile" message with a comment as a > placeholder for where a compiling code or checking a cache may go. > * R

Re: Concurrent deadlock scenario with DROP INDEX on partitioned index

2022-03-10 Thread Tom Lane
Jimmy Yih writes: > When dropping a partitioned index, the locking order starts with the > partitioned table, then its partitioned index, then the partition > indexes dependent on that partitioned index, and finally the dependent > partition indexes' parent tables. This order allows a deadlock > s

Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file

2022-03-10 Thread Chapman Flack
On 03/09/22 19:06, Nathan Bossart wrote: > Done. I went ahead and added "label => 'label'" for consistency. Looks like this change to an example in func.sgml is not quite right: -postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); +postgres=# SELECT * FROM pg_walfile_name_offset(p

Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file

2022-03-10 Thread Nathan Bossart
On Thu, Mar 10, 2022 at 07:13:14PM -0500, Chapman Flack wrote: > Looks like this change to an example in func.sgml is not quite right: > > -postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); > +postgres=# SELECT * FROM pg_walfile_name_offset(pg_backup_stop()); > > pg_backup_stop r

Re: refactoring basebackup.c

2022-03-10 Thread Justin Pryzby
I'm getting errors from pg_basebackup when using both -D- and --compress=server-* The issue seems to go away if I use --no-manifest. $ ./src/bin/pg_basebackup/pg_basebackup -h /tmp -Ft -D- --wal-method none --compress=server-gzip >/dev/null ; echo $? pg_basebackup: error: tar member has empty na

Re: Skipping logical replication transactions on subscriber side

2022-03-10 Thread Masahiko Sawada
On Thu, Mar 10, 2022 at 2:10 PM osumi.takami...@fujitsu.com wrote: > > On Wednesday, March 2, 2022 12:01 AM Masahiko Sawada > wrote: > > I've attached an updated patch along with two patches for cfbot tests since > > the > > main patch (0003) depends on the other two patches. Both > > 0001 and

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-10 Thread Kyotaro Horiguchi
At Thu, 10 Mar 2022 22:15:42 +0530, Bharath Rupireddy wrote in > On Thu, Mar 10, 2022 at 1:52 PM Jeff Davis wrote: > > > > On Wed, 2022-03-02 at 22:37 +0530, Bharath Rupireddy wrote: > > > > > > Attaching v6 patch set with above review comments addressed. Please > > > review it further. > > Th

Re: Column Filtering in Logical Replication

2022-03-10 Thread Amit Kapila
On Fri, Mar 11, 2022 at 12:44 AM Tomas Vondra wrote: > > On 3/10/22 04:09, Amit Kapila wrote: > > On Wed, Mar 9, 2022 at 3:33 PM Amit Kapila wrote: > >> > >> On Mon, Mar 7, 2022 at 8:48 PM Tomas Vondra > >> wrote: > >> > >>> OK, I reworked this to do the same thing as the row filtering patch. >

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-10 Thread Kyotaro Horiguchi
Sorry, some minor non-syntactical corrections. At Fri, 11 Mar 2022 11:38:22 +0900 (JST), Kyotaro Horiguchi wrote in > I played with this a bit, and would like to share some thoughts on it. > > It seems to me too rigorous that pg_get_wal_records_info/stats() > reject future LSNs as end-LSN and

Re: wal_compression=zstd

2022-03-10 Thread Michael Paquier
On Wed, Mar 09, 2022 at 07:14:11AM -0600, Justin Pryzby wrote: > Anyway there's no compelling reason to not use the default. If we were to use > a non-default default, we'd have to choose between 1 and 2 (or some negative > compression level). My thinking was that zstd-1 would give the lowest-han

Re: Column Filtering in Logical Replication

2022-03-10 Thread Amit Kapila
On Fri, Mar 11, 2022 at 7:26 AM Tomas Vondra wrote: > > But this does not address tablesync.c :-( That still copies everything, > because it decides to sync both rels (test_pub_part_1, test_pub_part_2), > with it's row filter. On older releases this would fail, because we'd > start two workers: >

Re: pg_rewind enhancements

2022-03-10 Thread Bharath Rupireddy
On Fri, Mar 4, 2022 at 7:50 PM RKN Sai Krishna wrote: > > Hi, > > While using pg_rewind, I found that it is a bit difficult to use pg_rewind as > it seems to copy even the configuration files and also remove some of the > files created on the old primary which may not be present on the new prima

Re: Column Filtering in Logical Replication

2022-03-10 Thread Tomas Vondra
On 3/11/22 03:46, Amit Kapila wrote: > On Fri, Mar 11, 2022 at 12:44 AM Tomas Vondra > wrote: >> >> On 3/10/22 04:09, Amit Kapila wrote: >>> On Wed, Mar 9, 2022 at 3:33 PM Amit Kapila wrote: On Mon, Mar 7, 2022 at 8:48 PM Tomas Vondra wrote: > OK, I reworked this to do th

Re: wal_compression=zstd

2022-03-10 Thread Justin Pryzby
On Fri, Mar 11, 2022 at 12:23:59PM +0900, Michael Paquier wrote: > On Wed, Mar 09, 2022 at 07:14:11AM -0600, Justin Pryzby wrote: > > Anyway there's no compelling reason to not use the default. If we were to > > use > > a non-default default, we'd have to choose between 1 and 2 (or some negative

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-10 Thread Ashutosh Sharma
Thanks Dilip for working on the review comments. I'll take a look at the new version of patch and let you know my comments, if any. -- With Regards, Ashutosh Sharma. On Thu, Mar 10, 2022 at 8:38 PM Dilip Kumar wrote: > > On Thu, Mar 10, 2022 at 7:22 PM Ashutosh Sharma wrote: > > > > Here are so

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-10 Thread Ashutosh Sharma
On Thu, Mar 10, 2022 at 10:18 PM Robert Haas wrote: > > On Thu, Mar 10, 2022 at 6:02 AM Dilip Kumar wrote: > > I have completely changed the logic for this refactoring. Basically, > > write_relmap_file(), is already having parameters to control whether > > to write wal, send inval and we are alr

Re: WIP: WAL prefetch (another approach)

2022-03-10 Thread Thomas Munro
On Fri, Mar 11, 2022 at 6:31 PM Thomas Munro wrote: > Thanks for your review of 0001! It gave me a few things to think > about and some good improvements. And just in case it's useful, here's what changed between v21 and v22.. diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/a

Re: Add pg_freespacemap extension sql test

2022-03-10 Thread Michael Paquier
On Wed, Mar 09, 2022 at 08:13:15PM +0900, Dong Wook Lee wrote: > I agree with you, but I have no good idea how to deal with it. Well, my guess is that you basically just care about being able to detect if there is free space in the map or not, which goes down to detecting if pg_freespace() returns

Re: WIP: WAL prefetch (another approach)

2022-03-10 Thread Andres Freund
On March 10, 2022 9:31:13 PM PST, Thomas Munro wrote: > The other thing I need to change is that I should turn on >recovery_prefetch for platforms that support it (ie Linux and maybe >NetBSD only for now), in the tests. Could a setting of "try" make sense? -- Sent from my Android device wi

Re: Changing "Hot Standby" to "hot standby"

2022-03-10 Thread Michael Paquier
On Thu, Mar 10, 2022 at 05:58:05PM -0500, Robert Treat wrote: > Not sure why the previous emails didn't go through, and still doesn't > look like they were picked up. In the interest of progress though, > attaching an updated patch with some minor wordsmithing; lmk if you'd > prefer this differentl

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-10 Thread Dilip Kumar
On Thu, Mar 10, 2022 at 10:18 PM Robert Haas wrote: > > On Thu, Mar 10, 2022 at 6:02 AM Dilip Kumar wrote: > > I have completely changed the logic for this refactoring. Basically, > > write_relmap_file(), is already having parameters to control whether > > to write wal, send inval and we are alr

Re: Changing "Hot Standby" to "hot standby"

2022-03-10 Thread Daniel Westermann (DWE)
>Looks the same as v5 for me, that applies the same consistency rules >everywhere in the docs.  So applied this one. Thank you, Michael

Re: BufferAlloc: don't take two simultaneous locks

2022-03-10 Thread Kyotaro Horiguchi
At Thu, 03 Mar 2022 01:35:57 +0300, Yura Sokolov wrote in > В Вт, 01/03/2022 в 10:24 +0300, Yura Sokolov пишет: > > Ok, here is v4. > > And here is v5. > > First, there was compilation error in Assert in dynahash.c . > Excuse me for not checking before sending previous version. > > Second, I

Re: BufferAlloc: don't take two simultaneous locks

2022-03-10 Thread Kyotaro Horiguchi
At Fri, 11 Mar 2022 15:30:30 +0900 (JST), Kyotaro Horiguchi wrote in > Thanks! I looked into dynahash part. > > struct HASHHDR > { > - /* > - * The freelist can become a point of contention in high-concurrency > hash > > Why did you move around the freeList? > > > - long

RE: Column Filtering in Logical Replication

2022-03-10 Thread wangw.f...@fujitsu.com
On Fri, Mar 11, 2022 at 9:57 AM Tomas Vondra wrote: > Hi Tomas, Thanks for your patches. On Mon, Mar 9, 2022 at 9:53 PM Tomas Vondra wrote: >On Wed, Mar 9, 2022 at 6:04 PM Amit Kapila wrote: >>On Mon, Mar 7, 2022 at 11:18 PM Tomas Vondra >>wrote: >>>On Fri, Mar 4, 2022 at 6:43 PM Amit Kapil

  1   2   >