[PATCH] Add min() and max() aggregate functions for xid8

2022-02-02 Thread Ken Kato
Hi hackers, Unlike xid, xid8 increases monotonically and cannot be reused. This trait makes it possible to support min() and max() aggregate functions for xid8. I thought they would be useful for monitoring. So I made a patch for this. Best wishes, -- Ken Kato Advanced Computing Technology

Re: [PATCH] Accept IP addresses in server certificate SANs

2022-02-02 Thread Kyotaro Horiguchi
At Wed, 2 Feb 2022 19:46:13 +, Jacob Champion wrote in > On Mon, 2022-01-31 at 17:29 +0900, Kyotaro Horiguchi wrote: > > +#define PGSQL_AF_INET (AF_INET + 0) > > +#define PGSQL_AF_INET6 (AF_INET + 1) > > + > > > > Now we have the same definition thrice in frontend code. Coulnd't we > >

Re: support for CREATE MODULE

2022-02-02 Thread Pavel Stehule
čt 3. 2. 2022 v 5:46 odesílatel Julien Rouhaud napsal: > Hi, > > On Thu, Feb 03, 2022 at 05:25:27AM +0100, Pavel Stehule wrote: > > > > čt 3. 2. 2022 v 3:28 odesílatel Swaha Miller > > napsal: > > > > > Hi, > > > > > > I'm following up from Jim's POC for adding MODULE to PostgreSQL. [1] > > > >

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-02-02 Thread Kyotaro Horiguchi
At Thu, 3 Feb 2022 13:59:03 +0900, Fujii Masao wrote in > > > On 2022/02/02 23:46, Bharath Rupireddy wrote: > > On Tue, Feb 1, 2022 at 9:39 PM Fujii Masao > > wrote: > >> I found that CreateRestartPoint() already reported the redo lsn as > >> follows after emitting the restartpoint log

Re: XTS cipher mode for cluster file encryption

2022-02-02 Thread Sasasu
On 2022/2/2 01:50, Bruce Momjian wrote: > Well, I sent an email a week ago asking if people want to advance this > feature forward, and so far you are the only person to reply, which I > think means there isn't enough interest in this feature to advance it. I am still focus on this thread. and I

Re: Add header support to text format and matching feature

2022-02-02 Thread Peter Eisentraut
On 31.01.22 07:54, Peter Eisentraut wrote: On 30.01.22 23:56, Rémi Lapeyre wrote: I notice in the 0002 patch that there is no test case for the error "wrong header for column \"%s\": got \"%s\"", which I think is really the core functionality of this patch.  So please add that. I added a

Re: Doc: CREATE_REPLICATION_SLOT command requires the plugin name

2022-02-02 Thread Amit Kapila
On Wed, Feb 2, 2022 at 12:41 PM Antonin Houska wrote: > > Amit Kapila wrote: > > > On Tue, Feb 1, 2022 at 5:43 PM Antonin Houska wrote: > > > > > > Amit Kapila wrote: > > > > > > > On Tue, Feb 1, 2022 at 3:44 PM Antonin Houska wrote: > > > > > > > > > > I got a syntax error when using the

Re: Replace pg_controldata output fields with macros for better code manageability

2022-02-02 Thread Kyotaro Horiguchi
At Wed, 2 Feb 2022 18:02:39 -0500, Bruce Momjian wrote in > On Sat, Jan 29, 2022 at 08:00:53PM +0530, Bharath Rupireddy wrote: > > Hi, > > > > While working on another pg_control patch, I observed that the > > pg_controldata output fields such as "Latest checkpoint's > > TimeLineID:", "Latest

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-02 Thread Masahiko Sawada
On Thu, Feb 3, 2022 at 1:48 PM David G. Johnston wrote: > > On Wednesday, February 2, 2022, Masahiko Sawada wrote: >> >> and have other error >> information in pg_stat_subscription_workers view. > > > What benefit is there to keeping the existing collector-based > pg_stat_subscripiton_workers

Re: Extensible Rmgr for Table AMs

2022-02-02 Thread Julien Rouhaud
Hi, On Tue, Feb 01, 2022 at 03:38:32PM -0800, Jeff Davis wrote: > On Tue, 2022-02-01 at 20:45 +0800, Julien Rouhaud wrote: > > > > One last thing, did you do some benchmark with a couple custom rmgr > > to see how > > much the O(n) access is showing up in profiles? > > What kind of a test case

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-02-02 Thread Fujii Masao
On 2022/02/02 23:46, Bharath Rupireddy wrote: On Tue, Feb 1, 2022 at 9:39 PM Fujii Masao wrote: I found that CreateRestartPoint() already reported the redo lsn as follows after emitting the restartpoint log message. To avoid duplicated logging of the same information, we should update

Re: 2022-01 Commitfest

2022-02-02 Thread Julien Rouhaud
On Wed, Feb 02, 2022 at 01:10:39PM -0500, Jaime Casanova wrote: > On Wed, Feb 02, 2022 at 01:00:18PM -0500, Tom Lane wrote: > > > > Anyway, thanks to Julien for doing this mostly-thankless task > > this time! > > > > Agreed, great work! Thanks a lot :)

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-02 Thread David G. Johnston
On Wednesday, February 2, 2022, Masahiko Sawada wrote: > and have other error > information in pg_stat_subscription_workers view. > What benefit is there to keeping the existing collector-based pg_stat_subscripiton_workers view? If we re-write it using shmem IPC then we might as well put

Re: support for CREATE MODULE

2022-02-02 Thread Julien Rouhaud
Hi, On Thu, Feb 03, 2022 at 05:25:27AM +0100, Pavel Stehule wrote: > > čt 3. 2. 2022 v 3:28 odesílatel Swaha Miller > napsal: > > > Hi, > > > > I'm following up from Jim's POC for adding MODULE to PostgreSQL. [1] > > > > My proposal implements modules as schema objects to be stored in a new >

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-02 Thread Masahiko Sawada
On Wed, Feb 2, 2022 at 4:36 PM David G. Johnston wrote: > > On Tue, Feb 1, 2022 at 11:55 PM Amit Kapila wrote: >> >> On Wed, Feb 2, 2022 at 9:41 AM David G. Johnston >> wrote: >> > >> > On Tue, Feb 1, 2022 at 8:07 PM Amit Kapila wrote: >> >> >> >> On Tue, Feb 1, 2022 at 11:47 AM Masahiko

Re: Unclear problem reports

2022-02-02 Thread Julien Rouhaud
Hi, On Wed, Feb 02, 2022 at 07:35:36PM -0500, Bruce Momjian wrote: > The Postgres community is great at diagnosing problems and giving users > feedback. In most cases, we can either diagnose a problem and give a > fix, or at least give users a hint at finding the cause. > > However, there is a

Re: support for CREATE MODULE

2022-02-02 Thread Pavel Stehule
Hi čt 3. 2. 2022 v 3:28 odesílatel Swaha Miller napsal: > Hi, > > I'm following up from Jim's POC for adding MODULE to PostgreSQL. [1] > > My proposal implements modules as schema objects to be stored in a new > system catalog pg_module with new syntax for CREATE [OR REPLACE] MODULE, > ALTER

Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work

2022-02-02 Thread Bharath Rupireddy
On Thu, Feb 3, 2022 at 12:07 AM Nathan Bossart wrote: > > On Wed, Feb 02, 2022 at 05:19:26PM +0530, Bharath Rupireddy wrote: > > On Wed, Feb 2, 2022 at 5:25 AM Nathan Bossart > > wrote: > >> However, I'm not sure about the change to ReadDirExtended(). That might be > >> okay for

Re: Adding CI to our tree

2022-02-02 Thread Justin Pryzby
On Tue, Jan 18, 2022 at 03:08:47PM -0600, Justin Pryzby wrote: > On Mon, Jan 17, 2022 at 12:16:19PM -0800, Andres Freund wrote: > > I think it might still be worth adding stopgap way of running all tap tests > > on > > windows though. Having a vcregress.pl function to find all directories with >

Re: psql tab completion versus Debian's libedit

2022-02-02 Thread Tom Lane
Andres Freund writes: > On 2022-02-02 22:28:31 -0500, Tom Lane wrote: >> I conclude that there are no extant versions of readline/libedit >> that don't have rl_completion_append_character, so we could >> drop that configure test and save a cycle or two. > Sounds good to me! On it now.

Re: psql tab completion versus Debian's libedit

2022-02-02 Thread Andres Freund
On 2022-02-02 22:28:31 -0500, Tom Lane wrote: > I conclude that there are no extant versions of readline/libedit > that don't have rl_completion_append_character, so we could > drop that configure test and save a cycle or two. Sounds good to me!

Re: psql tab completion versus Debian's libedit

2022-02-02 Thread Tom Lane
Andres Freund writes: > I think this is caused by the feature flag detection being broken in the meson > branch - unrelated to your commit - ending up with falsely believing that none > of the rl_* variables exist (below for more on that aspect). > Do we care that the tests would fail when using

Re: Bugs in pgoutput.c

2022-02-02 Thread Tom Lane
Amit Kapila writes: > Tom, is it okay for you if I go ahead with this patch after some testing? I've been too busy to get back to it, so sure. regards, tom lane

Re: Bugs in pgoutput.c

2022-02-02 Thread Amit Kapila
On Sat, Jan 29, 2022 at 8:32 AM Amit Kapila wrote: > > On Thu, Jan 6, 2022 at 3:42 AM Tom Lane wrote: > > > > Commit 6ce16088b caused me to look at pgoutput.c's handling of > > cache invalidations, and I was pretty appalled by what I found. > > > > * rel_sync_cache_relation_cb does the wrong

Re: Windows crash / abort handling

2022-02-02 Thread Andres Freund
Hi, On 2022-02-02 11:24:19 +1300, Thomas Munro wrote: > On Sun, Jan 30, 2022 at 10:02 AM Andres Freund wrote: > > 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

Re: Unclear problem reports

2022-02-02 Thread David G. Johnston
On Wed, Feb 2, 2022 at 5:35 PM Bruce Momjian wrote: > I consider these as problems that need digging to find the cause, and > users are usually unable to do sufficient digging, and we don't have > time to give them instructions, so they never get a reply. > > Is there something we can do to

Re: psql tab completion versus Debian's libedit

2022-02-02 Thread Andres Freund
Hi, On 2022-02-01 16:30:11 -0500, Tom Lane wrote: > I chased down the failure that kittiwake has been showing since > 02b8048ba [1]. I just rebased my meson branch across the commit d33a81203e9. And on freebsd the meson based build failed in the expanded tests, while autoconf succeeded. The

Re: ci/cfbot: run windows tests under a timeout

2022-02-02 Thread Andres Freund
Hi, On 2022-02-02 10:31:07 -0800, Andres Freund wrote: > The attached test adds a timeout (using git's timeout binary) to all vcregress > invocations. I've not re-added it to the other OSs, but I'm on the fence about > doing so. I've pushed this now. Greetings, Andres Freund

Unclear problem reports

2022-02-02 Thread Bruce Momjian
The Postgres community is great at diagnosing problems and giving users feedback. In most cases, we can either diagnose a problem and give a fix, or at least give users a hint at finding the cause. However, there is a class of problems that are very hard to help with, and I have perhaps seen an

Re: Replace pg_controldata output fields with macros for better code manageability

2022-02-02 Thread Bruce Momjian
On Sat, Jan 29, 2022 at 08:00:53PM +0530, Bharath Rupireddy wrote: > 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,

Re: Server-side base backup: why superuser, not pg_write_server_files?

2022-02-02 Thread Tom Lane
I wrote: > The Windows animals don't like this: > pg_basebackup: error: connection to server at "127.0.0.1", port 59539 failed: > FATAL: SSPI authentication failed for user "backupuser" > Not sure whether we have a standard method to get around that. Ah, right, we do. Looks like adding

Re: archive modules

2022-02-02 Thread Nathan Bossart
Thanks for the review! On Wed, Feb 02, 2022 at 01:42:55PM -0500, Robert Haas wrote: > I think avoiding ERROR is going to be impractical. Catching it in the > contrib module seems OK. Catching it in the generic code is probably > also possible to do in a reasonable way. Not catching the error also

Re: Server-side base backup: why superuser, not pg_write_server_files?

2022-02-02 Thread Tom Lane
=?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= writes: > Here's a follow-on patch that adds a test for non-superuser server-side > basebackup, which crashes without your patch and passes with it. The Windows animals don't like this: # Running: pg_basebackup --no-sync -cfast -U backupuser --target

Re: [PATCH] Add extra statistics to explain for Nested Loop

2022-02-02 Thread Ekaterina Sokolova
Hi, hackers. I apply the new version of patch. Justin Pryzby wrote: I'm curious to hear what you and others think of the refactoring. Thank you so much. With your changes, the patch has become more understandable and readable. It'd be nice if there's a good way to add a test case for

Re: Support for NSS as a libpq TLS backend

2022-02-02 Thread Bruce Momjian
On Tue, Feb 1, 2022 at 01:52:09PM -0800, Andres Freund wrote: > There's https://hg.mozilla.org/projects/nspr/file/tip/pr/src - which is I > think the upstream source. > > A project without even a bare-minimal README at the root does have a "internal > only" feel to it... I agree --- it is a

Re: CREATEROLE and role ownership hierarchies

2022-02-02 Thread Robert Haas
On Wed, Feb 2, 2022 at 3:23 PM Mark Dilger wrote: > It's perfectly reasonable (in my mind) that Robert, acting as superuser, may > want to create a creator who acts like a superuser over the sandbox, while at > the same time Stephen, acting as superuser, may want to create a creator who > acts

Re: Why is INSERT-driven autovacuuming based on pg_class.reltuples?

2022-02-02 Thread Peter Geoghegan
On Tue, Feb 1, 2022 at 3:02 PM David Rowley wrote: > If we wanted a more current estimate for the number of tuples in a > relation then we could use reltuples / relpages * > RelationGetNumberOfBlocks(r). However, I still don't see why an > INSERT driven auto-vacuums are a particularly special

Re: CREATEROLE and role ownership hierarchies

2022-02-02 Thread Mark Dilger
> On Feb 2, 2022, at 11:52 AM, Stephen Frost wrote: > > The question that we need to solve is how to give > users the ability to choose what roles have which of the privileges that > we've outlined above and agreed should be separable. Ok, there are really two different things going on here,

Re: speed up text_position() for utf-8

2022-02-02 Thread John Naylor
I wrote: > I tried this test on a newer CPU, and 0003 had no regression. Both > systems used gcc 11.2. Rather than try to figure out why an experiment > had unexpected behavior, I plan to test 0001 and 0002 on a couple > different compilers/architectures and call it a day. It's also worth >

Re: CREATEROLE and role ownership hierarchies

2022-02-02 Thread Stephen Frost
Greetings, * Mark Dilger (mark.dil...@enterprisedb.com) wrote: > > On Jan 31, 2022, at 10:50 AM, Stephen Frost wrote: > > Supporting that through ADMIN is one option, another would be a > > 'DROPROLE' attribute, though we'd want a way to curtail that from being > > able to be used for just any

Re: Refactoring SSL tests

2022-02-02 Thread Daniel Gustafsson
> On 2 Feb 2022, at 17:09, Andrew Dunstan wrote: > On 2/2/22 08:26, Daniel Gustafsson wrote: >> Thoughts? I'm fairly sure there are many crimes against Perl in this patch, >> I'm happy to take pointers on how to improve that. > > It feels a bit odd to me from a perl POV. I think it needs to

Re: Server-side base backup: why superuser, not pg_write_server_files?

2022-02-02 Thread Tom Lane
Daniel Gustafsson writes: >> On 2 Feb 2022, at 19:58, Robert Haas wrote: >> And one thing that concretely stinks about is the progress reporting >> you get while the tests are running: >> >> t/010_pg_basebackup.pl ... 142/? >> >> That's definitely less informative than 142/330 or whatever. >

Re: [PATCH] Accept IP addresses in server certificate SANs

2022-02-02 Thread Jacob Champion
On Mon, 2022-01-31 at 17:29 +0900, Kyotaro Horiguchi wrote: > However, 0002, > > +/* > + * In a frontend build, we can't include inet.h, but we still need to have > + * sensible definitions of these two constants. Note that pg_inet_net_ntop() > + * assumes that PGSQL_AF_INET is equal to AF_INET.

Re: [PoC] Delegating pg_ident to a third party

2022-02-02 Thread Jacob Champion
On Mon, 2022-01-10 at 15:09 -0500, Stephen Frost wrote: > Greetings, Sorry for the delay, the last few weeks have been insane. > * Jacob Champion (pchamp...@vmware.com) wrote: > > On Tue, 2022-01-04 at 22:24 -0500, Stephen Frost wrote: > > > On Tue, Jan 4, 2022 at 18:56 Jacob Champion wrote: >

Re: Server-side base backup: why superuser, not pg_write_server_files?

2022-02-02 Thread Daniel Gustafsson
> On 2 Feb 2022, at 19:58, Robert Haas wrote: > > On Wed, Feb 2, 2022 at 1:50 PM Robert Haas wrote: >> On Wed, Feb 2, 2022 at 1:46 PM Tom Lane wrote: >>> Well, if someone wants to step up and provide a patch that changes 'em >>> all at once, that'd be great. But we've discussed this before

Re: Server-side base backup: why superuser, not pg_write_server_files?

2022-02-02 Thread Robert Haas
On Wed, Feb 2, 2022 at 1:50 PM Robert Haas wrote: > On Wed, Feb 2, 2022 at 1:46 PM Tom Lane wrote: > > Well, if someone wants to step up and provide a patch that changes 'em > > all at once, that'd be great. But we've discussed this before and > > nothing's happened. > > I mean, I don't

Re: Server-side base backup: why superuser, not pg_write_server_files?

2022-02-02 Thread Robert Haas
On Wed, Feb 2, 2022 at 1:46 PM Tom Lane wrote: > Well, if someone wants to step up and provide a patch that changes 'em > all at once, that'd be great. But we've discussed this before and > nothing's happened. I mean, I don't understand why it's even better. And I would go so far as to say that

Re: Deparsing rewritten query

2022-02-02 Thread Pavel Stehule
st 2. 2. 2022 v 15:18 odesílatel Julien Rouhaud napsal: > Hi, > > On Tue, Feb 01, 2022 at 08:35:00PM +0100, Pavel Stehule wrote: > > > > I tested your patch, and it looks so it is working without any problem. > All > > tests passed. > > > > There is just one question. If printalias = true will

Re: Server-side base backup: why superuser, not pg_write_server_files?

2022-02-02 Thread Tom Lane
Robert Haas writes: > On Wed, Feb 2, 2022 at 12:55 PM Tom Lane wrote: >> Actually, it seemed that the consensus in the nearby thread [1] >> was to start doing exactly that, rather than try to convert them >> all in one big push. > Urk. Well, OK then. > Such an approach seems to me to have

Re: Server-side base backup: why superuser, not pg_write_server_files?

2022-02-02 Thread Robert Haas
On Wed, Feb 2, 2022 at 12:55 PM Tom Lane wrote: > Robert Haas writes: > > This seems like a good idea, but I'm not going to slip a change from > > an exact test count to done_testing() into a commit on some other > > topic... > > Actually, it seemed that the consensus in the nearby thread [1] >

Re: archive modules

2022-02-02 Thread Robert Haas
On Mon, Jan 31, 2022 at 8:36 PM Nathan Bossart wrote: > If basic_archive is to be in contrib, we probably want to avoid restarting > the archiver every time the module ERRORs. I debated trying to add a > generic exception handler that all archive modules could use, but I suspect > many will have

Re: A qsort template

2022-02-02 Thread John Naylor
I wrote: > > 0010 - Thresholds on my TODO list. > > I did some basic tests on the insertion sort thresholds, and it looks > like we could safely and profitably increase the current value from 7 > to 20 or so, in line with other more recent implementations. I've > attached an addendum on top of

Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work

2022-02-02 Thread Nathan Bossart
On Wed, Feb 02, 2022 at 05:19:26PM +0530, Bharath Rupireddy wrote: > On Wed, Feb 2, 2022 at 5:25 AM Nathan Bossart > wrote: >> However, I'm not sure about the change to ReadDirExtended(). That might be >> okay for CheckPointSnapBuild(), which is just trying to remove old files, >> but

ci/cfbot: run windows tests under a timeout

2022-02-02 Thread Andres Freund
Hi, On windows cfbot currently regularly hangs / times out. Presumably this is due to the issues discussed in https://postgr.es/m/CA%2BhUKG%2BG5DUNJfdE-qusq5pcj6omYTuWmmFuxCvs%3Dq1jNjkKKA%40mail.gmail.com which lead to reverting [1] some networking related changes everywhere but master. But

Re: 2022-01 Commitfest

2022-02-02 Thread Jaime Casanova
On Wed, Feb 02, 2022 at 01:00:18PM -0500, Tom Lane wrote: > > Anyway, thanks to Julien for doing this mostly-thankless task > this time! > Agreed, great work! -- Jaime Casanova Director de Servicios Profesionales SystemGuards - Consultores de PostgreSQL

Re: 2022-01 Commitfest

2022-02-02 Thread Tom Lane
Jaime Casanova writes: > On Thu, Feb 03, 2022 at 01:28:53AM +0800, Julien Rouhaud wrote: >> If we close all patches that had a review just because they weren't perfect >> in >> their initial submission, we're just going to force everyone to re-register >> their patch for every single commit

Re: 2022-01 Commitfest

2022-02-02 Thread Julien Rouhaud
On Wed, Feb 02, 2022 at 12:45:40PM -0500, Jaime Casanova wrote: > On Thu, Feb 03, 2022 at 01:28:53AM +0800, Julien Rouhaud wrote: > > > > My understanding of "Returned with Feedback" is that the patch implements > > something wanted, but as proposed won't be accepted without a major > > redesign

Re: Server-side base backup: why superuser, not pg_write_server_files?

2022-02-02 Thread Tom Lane
Robert Haas writes: > This seems like a good idea, but I'm not going to slip a change from > an exact test count to done_testing() into a commit on some other > topic... Actually, it seemed that the consensus in the nearby thread [1] was to start doing exactly that, rather than try to convert

Re: 2022-01 Commitfest

2022-02-02 Thread Jaime Casanova
On Thu, Feb 03, 2022 at 01:28:53AM +0800, Julien Rouhaud wrote: > > My understanding of "Returned with Feedback" is that the patch implements > something wanted, but as proposed won't be accepted without a major redesign > or > something like that. Not patches that are going through normal

Re: 2022-01 Commitfest

2022-02-02 Thread Julien Rouhaud
Hi, On Wed, Feb 02, 2022 at 12:09:06PM -0500, Greg Stark wrote: > I gave two reviews and received one review but the patches have been > "Moved to next CF". For now I only moved to the next commit fest the patches that were in "Needs Review" or "Ready for Committer". I'm assuming that you

Re: [PATCH] Add reloption for views to enable RLS

2022-02-02 Thread Christoph Heiss
Hi Laurenz, thank you again for the review! On 1/20/22 15:20, Laurenz Albe wrote: [..] I gave the new patch a spin, and got a surprising result: [..] INSERT INTO v VALUES (1); INSERT 0 1 Huh? "duff" has no permission to insert into "tab"! That really should not happen, thanks for

Re: 2022-01 Commitfest

2022-02-02 Thread Greg Stark
I gave two reviews and received one review but the patches have been "Moved to next CF". Should I update them to "Returned with Feedback" given they all did get feedback? I was under the impression "Moved to next CF" was only for patches that didn't get feedback in a CF and were still waiting for

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

2022-02-02 Thread Greg Stark
Additionally I've looked at the tests and I'm not sure but I don't think this arrangement is going to work. I don't have the time to run CLOBBER_CACHE and CLOBBER_CACHE_ALWAYS tests but I know they run *really* slowly. So the test can't just do a CHECKPOINT and then trust that the next few

Re: CREATEROLE and role ownership hierarchies

2022-02-02 Thread Robert Haas
On Tue, Feb 1, 2022 at 6:38 PM Andrew Dunstan wrote: > > In existing postgresql releases, having CREATEROLE means you can give away > > most attributes, including ones you yourself don't have (createdb, login). > > So we already have the concept of NOFOO WITH ADMIN OPTION, we just don't > >

Re: autovacuum prioritization

2022-02-02 Thread Robert Haas
On Wed, Jan 26, 2022 at 6:46 PM Greg Stark wrote: > One thing I've been wanting to do something about is I think > autovacuum needs to be a little cleverer about when *not* to vacuum a > table because it won't do any good. I agree. > I was thinking of just putting a check in before kicking off

Re: Ensure that STDERR is empty during connect_ok

2022-02-02 Thread Alvaro Herrera
On 2022-Feb-02, Andrew Dunstan wrote: > On 2/2/22 11:01, Dagfinn Ilmari Mannsåker wrote: > > Rather than waiting for Someone™ to find a suitably-shaped tuit to do a > > whole sweep converting everything to done_testing(), I think we should > > make a habit of converting individual scripts

Re: 2022-01 Commitfest

2022-02-02 Thread Julien Rouhaud
Hi, It's now at least Feb. 1st anywhere on earth, so the commit fest is now over. Since last week 5 entries were committed, 1 withdrawn, 3 returned with feedback, 2 already moved to the next commitfest and 1 rejected. This gives a total of 211 patches still alive, most of them ready for the

Re: Ensure that STDERR is empty during connect_ok

2022-02-02 Thread Andrew Dunstan
On 2/2/22 11:01, Dagfinn Ilmari Mannsåker wrote: > Tom Lane writes: > >> Daniel Gustafsson writes: >> >>> While I prefer to not plan at all and instead run done_testing(), >>> doing that consistently is for another patch, keeping this with the >>> remainder of the suites. >> +1 to that too,

Re: Refactoring SSL tests

2022-02-02 Thread Andrew Dunstan
On 2/2/22 08:26, Daniel Gustafsson wrote: > Thoughts? I'm fairly sure there are many crimes against Perl in this patch, > I'm happy to take pointers on how to improve that. It feels a bit odd to me from a perl POV. I think it needs to more along the lines of standard OO patterns. I'll take a

Re: Ensure that STDERR is empty during connect_ok

2022-02-02 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > Daniel Gustafsson writes: > >> While I prefer to not plan at all and instead run done_testing(), >> doing that consistently is for another patch, keeping this with the >> remainder of the suites. > > +1 to that too, counting the tests is a pretty useless exercise. Rather

Re: pg_receivewal - couple of improvements

2022-02-02 Thread Julien Rouhaud
On Wed, Feb 02, 2022 at 09:14:03PM +0530, Bharath Rupireddy wrote: > > FYI that thread is closed, it committed the change (f61e1dd [1]) that > pg_receivewal can read from its replication slot restart lsn. > > I know that providing the start pos as an option came up there [2], > but I wanted to

Re: Server-side base backup: why superuser, not pg_write_server_files?

2022-02-02 Thread Robert Haas
On Wed, Feb 2, 2022 at 10:42 AM Dagfinn Ilmari Mannsåker wrote: > Here's a follow-on patch that adds a test for non-superuser server-side > basebackup, which crashes without your patch and passes with it. This seems like a good idea, but I'm not going to slip a change from an exact test count to

Re: refactoring basebackup.c

2022-02-02 Thread Robert Haas
On Tue, Jan 18, 2022 at 1:55 PM Robert Haas wrote: > 0001 adds "server" and "blackhole" as backup targets. It now has some > tests. This might be more or less ready to ship, unless somebody else > sees a problem, or I find one. I played around with this a bit and it seems quite easy to extend

Re: Ensure that STDERR is empty during connect_ok

2022-02-02 Thread Alvaro Herrera
On 2022-Feb-02, Daniel Gustafsson wrote: > Making this a subtest in order to not having to change the callers, turns the > patch into the attached. For this we must group the new test with one already > existing test, if we group more into it (which would make more sense) then we > need to

Re: pg_receivewal - couple of improvements

2022-02-02 Thread Bharath Rupireddy
On Wed, Feb 2, 2022 at 9:05 PM Julien Rouhaud wrote: > > Hi, > > On Wed, Feb 02, 2022 at 08:53:13PM +0530, Bharath Rupireddy wrote: > > > > Here are some improvements we can make to pg_receivewal that were > > emanated after working with it in production environments: > > > > 1) As a user, I,

Re: Ensure that STDERR is empty during connect_ok

2022-02-02 Thread Daniel Gustafsson
> On 2 Feb 2022, at 16:01, Alvaro Herrera wrote: > > On 2022-Feb-02, Daniel Gustafsson wrote: > >> As part of the NSS patchset, quite a few bugs (and NSS quirks) were found by >> inspecting STDERR in connect_ok and require it to be empty. This is not >> really >> NSS specific, and could

Re: Server-side base backup: why superuser, not pg_write_server_files?

2022-02-02 Thread Dagfinn Ilmari Mannsåker
Robert Haas writes: > On Fri, Jan 28, 2022 at 12:35 PM Dagfinn Ilmari Mannsåker > wrote: >> On Fri, 28 Jan 2022, at 17:33, Robert Haas wrote: >> > LGTM. Committed. >> >> Thanks! > > It appears that neither of us actually tested that this works. Oops! > For me, it works when I test as a

Re: warn if GUC set to an invalid shared library

2022-02-02 Thread David G. Johnston
On Tue, Feb 1, 2022 at 11:06 PM Maciek Sakrejda wrote: > I tried running ALTER SYSTEM and got the warnings as expected: > > postgres=# alter system set shared_preload_libraries = > no_such_library,not_this_one_either; > WARNING: could not access file "$libdir/plugins/no_such_library" > WARNING:

Re: pg_receivewal - couple of improvements

2022-02-02 Thread Julien Rouhaud
Hi, On Wed, Feb 02, 2022 at 08:53:13PM +0530, Bharath Rupireddy wrote: > > Here are some improvements we can make to pg_receivewal that were > emanated after working with it in production environments: > > 1) As a user, I, sometimes, want my pg_receivewal to start streaming > from the LSN that

pg_receivewal - couple of improvements

2022-02-02 Thread Bharath Rupireddy
Hi, Here are some improvements we can make to pg_receivewal that were emanated after working with it in production environments: 1) As a user, I, sometimes, want my pg_receivewal to start streaming from the LSN that I provide as an input i.e. startpos instead of it calculating the stream start

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-02 Thread David G. Johnston
On Wed, Feb 2, 2022 at 5:08 AM Amit Kapila wrote: > On Wed, Feb 2, 2022 at 1:06 PM David G. Johnston > wrote: > > ... > > > > I already explained that the concept of err_cnt is not useful. The fact > that you include it here makes me think you are still thinking that this > all somehow is

Re: Server-side base backup: why superuser, not pg_write_server_files?

2022-02-02 Thread Robert Haas
On Fri, Jan 28, 2022 at 12:35 PM Dagfinn Ilmari Mannsåker wrote: > On Fri, 28 Jan 2022, at 17:33, Robert Haas wrote: > > LGTM. Committed. > > Thanks! It appears that neither of us actually tested that this works. For me, it works when I test as a superuser, but if I test as a non-superuser with

Re: Ensure that STDERR is empty during connect_ok

2022-02-02 Thread Tom Lane
Daniel Gustafsson writes: > As part of the NSS patchset, quite a few bugs (and NSS quirks) were found by > inspecting STDERR in connect_ok and require it to be empty. This is not > really > NSS specific, and could help find issues in other libraries as well so I > propose to apply it regardless

Re: Ensure that STDERR is empty during connect_ok

2022-02-02 Thread Alvaro Herrera
On 2022-Feb-02, Daniel Gustafsson wrote: > As part of the NSS patchset, quite a few bugs (and NSS quirks) were found by > inspecting STDERR in connect_ok and require it to be empty. This is not > really > NSS specific, and could help find issues in other libraries as well so I > propose to

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-02-02 Thread Bharath Rupireddy
On Tue, Feb 1, 2022 at 9:39 PM Fujii Masao wrote: > I found that CreateRestartPoint() already reported the redo lsn as follows > after emitting the restartpoint log message. To avoid duplicated logging of > the same information, we should update this code? > > ereport((log_checkpoints ?

Ensure that STDERR is empty during connect_ok

2022-02-02 Thread Daniel Gustafsson
As part of the NSS patchset, quite a few bugs (and NSS quirks) were found by inspecting STDERR in connect_ok and require it to be empty. This is not really NSS specific, and could help find issues in other libraries as well so I propose to apply it regardless of the fate of the NSS patchset.

Re: Deparsing rewritten query

2022-02-02 Thread Julien Rouhaud
Hi, On Tue, Feb 01, 2022 at 08:35:00PM +0100, Pavel Stehule wrote: > > I tested your patch, and it looks so it is working without any problem. All > tests passed. > > There is just one question. If printalias = true will be active for all > cases or just with some flag? Sorry, as I just

Re: Deparsing rewritten query

2022-02-02 Thread Julien Rouhaud
Hi, On Wed, Feb 02, 2022 at 07:09:35PM +0530, Bharath Rupireddy wrote: > On Tue, Feb 1, 2022 at 9:08 AM Julien Rouhaud wrote: > > > > Hi, > > Thanks. +1 for this work. Some comments on v3: > > 1) How about pg_get_rewritten_query()? Argh, I just realized that I sent the patch from the wrong

Re: Schema variables - new implementation for Postgres 15

2022-02-02 Thread Julien Rouhaud
Hi, On Sun, Jan 30, 2022 at 08:09:18PM +0100, Pavel Stehule wrote: > > rebase after 02b8048ba5dc36238f3e7c3c58c5946220298d71 Here are a few comments, mostly about pg_variable.c and sessionvariable.c. I stopped before reading the whole patch as I have some concern about the sinval machanism,

Re: Deparsing rewritten query

2022-02-02 Thread Bharath Rupireddy
On Tue, Feb 1, 2022 at 9:08 AM Julien Rouhaud wrote: > > Hi, Thanks. +1 for this work. Some comments on v3: 1) How about pg_get_rewritten_query()? 2) Docs missing? 3) How about allowing only the users who are explicitly granted to use this function like pg_log_backend_memory_contexts,

Re: Make relfile tombstone files conditional on WAL level

2022-02-02 Thread Dilip Kumar
On Wed, Feb 2, 2022 at 6:57 PM Robert Haas wrote: > > On Mon, Jan 31, 2022 at 9:37 AM Dilip Kumar wrote: > > I agree that we are using 8 bytes unsigned int multiple places in code > > as uint64. But I don't see it as an exposed data type and not used as > > part of any exposed function. But we

Re: Make relfile tombstone files conditional on WAL level

2022-02-02 Thread Robert Haas
On Mon, Jan 31, 2022 at 9:37 AM Dilip Kumar wrote: > I agree that we are using 8 bytes unsigned int multiple places in code > as uint64. But I don't see it as an exposed data type and not used as > part of any exposed function. But we will have to use the relfilenode > in the exposed c function

Refactoring SSL tests

2022-02-02 Thread Daniel Gustafsson
As part of the NSS patchset (and Secure Transport before that), I had to refactor the SSL tests to handle different SSL libraries. The current tests and test module is quite tied to how OpenSSL works wrt setting up the server, the attached refactors this and abstracts the OpenSSL specifics more

Re: make MaxBackends available in _PG_init

2022-02-02 Thread Robert Haas
On Tue, Feb 1, 2022 at 5:36 PM Nathan Bossart wrote: > I can work on a new patch if this is the direction we want to go. There > were a couple of functions that called GetMaxBackends() repetitively that I > should probably fix before the patch should be seriously considered. Sure, that sort of

Re: ICU for global collation

2022-02-02 Thread Peter Eisentraut
On 27.01.22 09:10, Peter Eisentraut wrote: On 21.01.22 17:13, Julien Rouhaud wrote: On Fri, Jan 21, 2022 at 03:24:02PM +0100, Peter Eisentraut wrote: On 21.01.22 14:51, Julien Rouhaud wrote: Is that change intended?  There isn't any usage of the collversionstr before the possible error when

Re: RFC: Logging plan of the running query

2022-02-02 Thread torikoshia
2022-02-01 01:51, Fujii Masao wrote: Thanks for reviewing and suggestions!   +    Note that there is the case where the request to log a query   +    plan is skipped even while the target backend is running a   +    query due to lock conflict avoidance.   +    If this

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

2022-02-02 Thread kuroda.hay...@fujitsu.com
Dear Fujii-san, Thank you for good suggestions. > This logic sounds complicated to me. I'm afraid that FDW developers may a bit > easily misunderstand the logic and make the bug in their FDW. > Isn't it simpler to just disable the timeout in core whenever the transaction > ends > whether

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-02 Thread Amit Kapila
On Wed, Feb 2, 2022 at 1:06 PM David G. Johnston wrote: > > On Tue, Feb 1, 2022 at 11:55 PM Amit Kapila wrote: >> >> On Wed, Feb 2, 2022 at 9:41 AM David G. Johnston >> wrote: >> > >> > On Tue, Feb 1, 2022 at 8:07 PM Amit Kapila wrote: >> >> >> >> On Tue, Feb 1, 2022 at 11:47 AM Masahiko

Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work

2022-02-02 Thread Bharath Rupireddy
On Wed, Feb 2, 2022 at 5:25 AM Nathan Bossart wrote: > > On Mon, Jan 31, 2022 at 10:42:54AM +0530, Bharath Rupireddy wrote: > > After an off-list discussion with Andreas, proposing here a patch that > > basically replaces ReadDir call with ReadDirExtended and gets rid of > > lstat entirely. With

Re: CREATE TABLE ( .. STORAGE ..)

2022-02-02 Thread Teodor Sigaev
Hi! Are they both set to name or ColId? Although they are the same. Thank you, fixed, that was just an oversight. 2 For ColumnDef new member storage_name, did you miss the function _copyColumnDef() _equalColumnDef()? Thank you, fixed Regards Wenjing 2021年12月27日 15:51,Teodor

  1   2   >