Re: pgsql: Move tablespace path re-creation from the makefiles to pg_regres

2021-03-23 Thread Michael Paquier
On Tue, Mar 23, 2021 at 12:50:29PM +0100, Christoph Berg wrote: > I'm working around the problem now by running the tests as user > "postgres", but does completely break in environments where users want > to run the testsuite from a separate compilation user but don't have root. > > Old code: > h

Re: A reloption for partitioned tables - parallel_workers

2021-03-23 Thread David Rowley
On Fri, 19 Mar 2021 at 02:07, Amit Langote wrote: > Attached a new version rebased over c8f78b616, with the grouping > relation partitioning enhancements as a separate patch 0001. Sorry > about the delay. I had a quick look at this and wondered if the partitioned table's parallel workers shouldn

Re: New IndexAM API controlling index vacuum strategies

2021-03-23 Thread Peter Geoghegan
On Mon, Mar 22, 2021 at 6:40 AM Masahiko Sawada wrote: > I've looked at this 0001 patch and here are some review comments: > + * Since we might have to prune a second time here, the code is structured to > + * use a local per-page copy of the counters that caller accumulates. We add > + * our pe

Re: PostmasterIsAlive() in recovery (non-USE_POST_MASTER_DEATH_SIGNAL builds)

2021-03-23 Thread Fujii Masao
On 2021/03/23 14:49, Fujii Masao wrote: On 2021/03/23 10:52, Thomas Munro wrote: On Tue, Mar 23, 2021 at 2:44 PM Fujii Masao wrote: I found 0001 patch was committed in de829ddf23, and which added new wait event WalrcvExit. This name seems not consistent with other wait events. I'm thinkin

Re: Nicer error when connecting to standby with hot_standby=off

2021-03-23 Thread Fujii Masao
On 2021/03/24 5:59, Tom Lane wrote: Alvaro Herrera writes: FATAL: the database system is starting up DETAIL: WAL is being applied to recover from a system crash. or DETAIL: The system is applying WAL to recover from a system crash. or DETAIL: The startup process is applying WAL to recove

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2021-03-23 Thread Julien Rouhaud
On Tue, Mar 23, 2021 at 10:34:38AM -0400, Bruce Momjian wrote: > On Tue, Mar 23, 2021 at 02:36:27PM +0800, Julien Rouhaud wrote: > > > > Is that an oversight in ca3b37487be333a1d241dab1bbdd17a211a88f43, at least > > for > > non .po files? > > No, I don't think so. We don't change the Free Softw

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2021-03-23 Thread Julien Rouhaud
On Tue, Mar 23, 2021 at 12:27:10PM -0400, Bruce Momjian wrote: > > No, I was thinking of just doing a single commit. Should I do three > commits? I posted it as three patches since that is how it was posted > by the author, and reviewing is easier. It also will need a catversion > bump. Yes, I

Re: Add client connection check during the execution of the query

2021-03-23 Thread Thomas Munro
Going back a couple of years to something Konstantin said: On Sat, Aug 3, 2019 at 4:40 AM Konstantin Knizhnik wrote: > But I wonder why we can not perform just pool with POLLOUT flag and zero > timeout. > If OS detected closed connection, it should return POLLHUP, should not it? > I am not sure i

Re: 64-bit XIDs in deleted nbtree pages

2021-03-23 Thread Peter Geoghegan
On Tue, Mar 23, 2021 at 8:14 AM Masahiko Sawada wrote: > By this patch series, btree indexes became like hash indexes in terms > of amvacuumcleanup. We do an index scan at btvacuumcleanup() in the > two cases: metapage upgrading and more than 5% > deleted-but-not-yet-recycled pages. Both cases see

Re: New IndexAM API controlling index vacuum strategies

2021-03-23 Thread Masahiko Sawada
On Wed, Mar 24, 2021 at 11:44 AM Peter Geoghegan wrote: > > On Tue, Mar 23, 2021 at 4:02 AM Masahiko Sawada wrote: > > Here are review comments on 0003 patch: > > Attached is a new revision, v5. It fixes bit rot caused by recent > changes (your index autovacuum logging stuff). It has also been >

Re: Autovacuum worker doesn't immediately exit on postmaster death

2021-03-23 Thread Michael Paquier
On Mon, Mar 22, 2021 at 04:07:12PM -0400, Robert Haas wrote: > On Mon, Mar 22, 2021 at 1:48 PM Stephen Frost wrote: >> Thanks for that. Attached is just a rebased version with a commit >> message added. If there aren't any other concerns, I'll commit this in >> the next few days and back-patch i

Re: Support for NSS as a libpq TLS backend

2021-03-23 Thread Michael Paquier
On Tue, Mar 23, 2021 at 12:38:50AM +0100, Daniel Gustafsson wrote: > Thanks again for reviewing, another version which addresses the remaining > issues will be posted soon but I wanted to get this out to give further > reviews > something that properly works. I have been looking at the infrastruc

Re: SQL-standard function body

2021-03-23 Thread Jaime Casanova
On Fri, Mar 19, 2021 at 8:49 AM Peter Eisentraut wrote: > > Right. Here is a new patch with that fix added and a small conflict > resolved. Great. It seems print_function_sqlbody() is not protected to avoid receiving a function that hasn't a standard sql body in src/backend/utils/adt/ruleutils.

Re: Allow matching whole DN from a client certificate

2021-03-23 Thread Michael Paquier
On Fri, Mar 05, 2021 at 04:01:38PM -0500, Andrew Dunstan wrote: > Yeah, fixed this, added a bit more docco, and got rid of some bitrot. I had a look at this patch. What you have here looks in good shape, and I have come comments. > + This option is probably best used in conjunction with a

Re: Add client connection check during the execution of the query

2021-03-23 Thread Andres Freund
Hi, On 2021-03-24 16:08:13 +1300, Thomas Munro wrote: > ... Andres just asked me the same question, when we were discussing > the pq_peekmessage() patch (v7). I had remembered that POLLHUP didn't > work for this type of thing, from some earlier attempt at something > similar, and indeed on my fir

Re: Failed assertion on standby while shutdown

2021-03-23 Thread Maxim Orlov
On 2021-03-22 16:40, Fujii Masao wrote: On 2021/03/20 2:25, Maxim Orlov wrote: Hi, haсkers! Recently, I was doing some experiments with primary/standby instances interaction. In certain conditions I’ve got and was able to reproduce crash on failed assertion. The scenario is the following: 1

Re: Protect syscache from bloating with negative cache entries

2021-03-23 Thread Kyotaro Horiguchi
At Mon, 22 Mar 2021 13:12:10 -0400, Bruce Momjian wrote in > On Thu, Jan 28, 2021 at 05:16:52PM +0900, Kyotaro Horiguchi wrote: > > At Thu, 28 Jan 2021 16:50:44 +0900 (JST), Kyotaro Horiguchi > > wrote in > > > I was going to write in the doc something like "you can inspect memory > > > consum

Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb

2021-03-23 Thread Amul Sul
On Tue, Mar 23, 2021 at 8:59 PM Tom Lane wrote: > > I wrote: > > Michael Paquier writes: > >> One bisect later, the winner is: > >> commit: 3d351d916b20534f973eda760cde17d96545d4c4 > >> author: Tom Lane > >> date: Sun, 30 Aug 2020 12:21:51 -0400 > >> Redefine pg_class.reltuples to be -1 before t

Re: pg_amcheck contrib application

2021-03-23 Thread Mark Dilger
> On Mar 17, 2021, at 9:00 PM, Mark Dilger wrote: > > Of the toast pointer fields: > >int32 va_rawsize; /* Original data size (includes header) */ >int32 va_extsize; /* External saved size (doesn't) */ >Oid va_valueid; /* Unique ID of value within TO

Re: PoC/WIP: Extended statistics on expressions

2021-03-23 Thread Justin Pryzby
Most importantly, it looks like this forgets to update catalog documentation for stxexprs and stxkind='e' It seems like you're preferring to use pluralized "statistics" in a lot of places that sound wrong to me. For example: > Currently the first statistics wins, which seems silly. I can write mo

<    1   2