Re: Improving the isolationtester: fewer failures, less delay

2021-06-15 Thread Andres Freund
Hi, Only halfway related: I wonder if we should remove the automatic permutation stuff - it's practically never useful. Probably not worth changing... On 2021-06-15 17:09:00 -0400, Tom Lane wrote: > +The general form of a permutation entry is > + > + "step_name" [ ( marker [ , marker ... ] )

Re: Improving the isolationtester: fewer failures, less delay

2021-06-15 Thread Tom Lane
Andres Freund writes: > Only halfway related: I wonder if we should remove the automatic > permutation stuff - it's practically never useful. Probably not worth > changing... Where it is useful, it saves a lot of error-prone typing ... > Minor suggestion: I think the folliwing would be a bit eas

Re: Improving isolationtester's data output

2021-06-15 Thread Andres Freund
Hi, On 2021-06-15 19:26:25 -0400, Tom Lane wrote: > Going forward it wouldn't be a problem, but back-patching isolation > test cases might find it annoying. On the other hand, my nearby > patch to improve isolation test stability is already going to create > issues of that sort. (Unless, dare I

Re: snapshot too old issues, first around wraparound and then more.

2021-06-15 Thread Thomas Munro
On Wed, Jun 16, 2021 at 7:17 AM Robert Haas wrote: > Progress has been pretty limited, but not altogether nonexistent. > 55b7e2f4d78d8aa7b4a5eae9a0a810601d03c563 fixed, or at least seemed to > fix, the time->XID mapping, which is one of the main things that > Andres said was broken originally. Als

Re: Improving isolationtester's data output

2021-06-15 Thread Tom Lane
Andres Freund writes: > On 2021-06-15 19:26:25 -0400, Tom Lane wrote: >> Going forward it wouldn't be a problem, but back-patching isolation >> test cases might find it annoying. On the other hand, my nearby >> patch to improve isolation test stability is already going to create >> issues of that

Re: disfavoring unparameterized nested loops

2021-06-15 Thread Peter Geoghegan
On Tue, Jun 15, 2021 at 6:15 PM David Rowley wrote: > On Wed, 16 Jun 2021 at 12:11, Peter Geoghegan wrote: > > Whether or not we throw the plan back at the planner or "really change > > our minds at execution time" seems like a distinction without a > > difference. > > What is "really change our

RE: [PATCH] expand the units that pg_size_pretty supports on output

2021-06-15 Thread Shinya11.Kato
>I had not really looked at the patch, but if there's a cleanup portion to the >same >patch as you're adding the YB too, then maybe it's worth separating those out >into another patch so that the two can be considered independently. I agree with this opinion. It seems to me that we should think a

Re: [PATCH] expand the units that pg_size_pretty supports on output

2021-06-15 Thread David Christensen
>> I had not really looked at the patch, but if there's a cleanup portion to >> the same >> patch as you're adding the YB too, then maybe it's worth separating those out >> into another patch so that the two can be considered independently. > > I agree with this opinion. It seems to me that we

Re: Duplicate history file?

2021-06-15 Thread Stephen Frost
Greetings, On Tue, Jun 15, 2021 at 21:11 Julien Rouhaud wrote: > On Tue, Jun 15, 2021 at 02:28:04PM -0400, Stephen Frost wrote: > > > > * Julien Rouhaud (rjuju...@gmail.com) wrote: > > > On Tue, Jun 15, 2021 at 11:33:10AM -0400, Stephen Frost wrote: > > > > > > The fact that this is such a compl

Re: Duplicate history file?

2021-06-15 Thread Kyotaro Horiguchi
Thanks for the opinions. At Tue, 15 Jun 2021 11:33:10 -0400, Stephen Frost wrote in > Greetings, > > * Kyotaro Horiguchi (horikyota@gmail.com) wrote: > > At Fri, 11 Jun 2021 16:08:33 +0900, Michael Paquier > > wrote in > > > On Fri, Jun 11, 2021 at 03:32:28PM +0900, Kyotaro Horiguchi wro

Re: Duplicate history file?

2021-06-15 Thread Kyotaro Horiguchi
At Wed, 16 Jun 2021 12:04:03 +0900 (JST), Kyotaro Horiguchi wrote in > Ok, if we follow the direction that we are responsible for ensuring > that every user has reliable backups, I don't come up with proper > description about that. > > We could list several "requirement" like "do sync after co

Re: disfavoring unparameterized nested loops

2021-06-15 Thread Peter Geoghegan
On Tue, Jun 15, 2021 at 5:00 PM David Rowley wrote: > Most of the time when I see that happen it's down to either the > selectivity of some correlated base-quals being multiplied down to a > number low enough that we clamp the estimate to be 1 row. The other > case is similar, but with join qual

Re: Duplicate history file?

2021-06-15 Thread Julien Rouhaud
On Tue, Jun 15, 2021 at 11:00:57PM -0400, Stephen Frost wrote: > > As I suggested previously- this is similar to the hooks that we provide. We > don’t extensively document them because if you’re writing an extension > which uses a hook, you’re going to be (or should be..) reading the code too. I

RE: [bug?] Missed parallel safety checks, and wrong parallel safety

2021-06-15 Thread houzj.f...@fujitsu.com
On Tuesday, June 15, 2021 10:01 PM Robert Haas wrote: > On Tue, Jun 15, 2021 at 7:05 AM Amit Kapila wrote: > > Yeah, dealing with partitioned tables is tricky. I think if we don't > > want to check upfront the parallel safety of all the partitions then > > the other option as discussed could be t

Re: Improving isolationtester's data output

2021-06-15 Thread Noah Misch
On Tue, Jun 15, 2021 at 09:43:31PM -0400, Tom Lane wrote: > Andres Freund writes: > > On 2021-06-15 19:26:25 -0400, Tom Lane wrote: > >> Going forward it wouldn't be a problem, but back-patching isolation > >> test cases might find it annoying. On the other hand, my nearby > >> patch to improve i

Re: Duplicate history file?

2021-06-15 Thread Kyotaro Horiguchi
At Wed, 16 Jun 2021 11:20:55 +0800, Julien Rouhaud wrote in > On Tue, Jun 15, 2021 at 11:00:57PM -0400, Stephen Frost wrote: > > > > As I suggested previously- this is similar to the hooks that we provide. We > > don’t extensively document them because if you’re writing an extension > > which u

Re: Duplicate history file?

2021-06-15 Thread Julien Rouhaud
On Wed, Jun 16, 2021 at 01:10:16PM +0900, Kyotaro Horiguchi wrote: > > I agree to Julien, however, I want to discuss (also) on what to do for > 14 now. If we decide not to touch the document for the version. that > discussion would end. What do you think about that? I think it's > impossible to

Re: snapshot too old issues, first around wraparound and then more.

2021-06-15 Thread Noah Misch
On Tue, Jun 15, 2021 at 02:32:11PM -0700, Peter Geoghegan wrote: > What I had in mind was this: a committer adopting the feature > themselves. The committer would be morally obligated to maintain the > feature on an ongoing basis, just as if they were the original > committer. This seems like the o

Re: Duplicate history file?

2021-06-15 Thread Stephen Frost
Greetings, On Tue, Jun 15, 2021 at 23:21 Julien Rouhaud wrote: > On Tue, Jun 15, 2021 at 11:00:57PM -0400, Stephen Frost wrote: > > > > As I suggested previously- this is similar to the hooks that we provide. > We > > don’t extensively document them because if you’re writing an extension > > whi

Re: Race condition in recovery?

2021-06-15 Thread Kyotaro Horiguchi
At Tue, 15 Jun 2021 07:54:49 -0400, Andrew Dunstan wrote in > > On 6/15/21 2:16 AM, Kyotaro Horiguchi wrote: > > At Fri, 11 Jun 2021 10:46:45 -0400, Tom Lane wrote in > >> I think jacana uses msys[2?], so this likely indicates a problem > >> in path sanitization for the archive command. Andr

Re: [bug?] Missed parallel safety checks, and wrong parallel safety

2021-06-15 Thread Amit Kapila
On Tue, Jun 15, 2021 at 7:31 PM Robert Haas wrote: > > On Tue, Jun 15, 2021 at 7:05 AM Amit Kapila wrote: > > Okay, but I think if we go with your suggested model where whenever > > there is a change in parallel-safety of any function, we need to send > > the new invalidation then I think it won'

Re: [bug?] Missed parallel safety checks, and wrong parallel safety

2021-06-15 Thread Amit Kapila
On Tue, Jun 15, 2021 at 8:11 PM Amit Kapila wrote: > > On Mon, Jun 14, 2021 at 9:08 PM Robert Haas wrote: > > > > On Mon, Jun 14, 2021 at 2:32 AM Amit Kapila wrote: > > > > > Yeah, this could be one idea but I think even if we use pg_proc OID, > > > we still need to check all the rel cache entri

Re: Duplicate history file?

2021-06-15 Thread Julien Rouhaud
On Wed, Jun 16, 2021 at 01:17:11AM -0400, Stephen Frost wrote: > > The archive command is technically invoked using the shell, but the > interpretation of the exit code, for example, is only discussed in the C > code, but it’s far from the only consideration that someone developing an > archive co

Re: snapshot too old issues, first around wraparound and then more.

2021-06-15 Thread Peter Geoghegan
On Tue, Jun 15, 2021 at 9:59 PM Noah Misch wrote: > Hackers are rather wise, but the variety of PostgreSQL use is enormous. We > see that, among other ways, when regression fixes spike in each vN.1. The > $SUBJECT feature was born in response to a user experience; a lack of hacker > interest doe

Re: A qsort template

2021-06-15 Thread Thomas Munro
On Mon, Mar 15, 2021 at 1:09 PM Thomas Munro wrote: > On Sun, Mar 14, 2021 at 5:03 PM Zhihong Yu wrote: > > + * Remove duplicates from an array. Return the new size. > > + */ > > +ST_SCOPE size_t > > +ST_UNIQUE(ST_ELEMENT_TYPE *array, > > > > The array is supposed to be sorted, right ? > > The c

Re: Question about StartLogicalReplication() error path

2021-06-15 Thread Amit Kapila
On Tue, Jun 15, 2021 at 3:21 AM Jeff Davis wrote: > > On Mon, 2021-06-14 at 13:13 -0400, Robert Haas wrote: > > I'm happy to hear other opinions, but I think I would be inclined to > > vote in favor of #1 and/or #2 but against #3. > > What about upgrading it to, say, LOG? It seems like it would ha

Re: snapshot too old issues, first around wraparound and then more.

2021-06-15 Thread Noah Misch
On Tue, Jun 15, 2021 at 10:47:45PM -0700, Peter Geoghegan wrote: > On Tue, Jun 15, 2021 at 9:59 PM Noah Misch wrote: > > Hackers are rather wise, but the variety of PostgreSQL use is enormous. We > > see that, among other ways, when regression fixes spike in each vN.1. The > > $SUBJECT feature w

Re: 回复:Re: Cache relation sizes?

2021-06-15 Thread Thomas Munro
No change yet, just posting a rebase to keep cfbot happy. One thing I'm wondering about is whether it'd be possible, and if so, a good idea, to make a kind of tiny reusable cache replacement algorithm, something modern, that can be used to kill several birds with one stone (SLRUs, this object pool

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

2021-06-15 Thread Kyotaro Horiguchi
At Tue, 15 Jun 2021 22:07:32 +0800, Julien Rouhaud wrote in > On Tue, Jun 15, 2021 at 9:31 PM Andrew Dunstan wrote: > > > > Rather than use size, I'd be inclined to say use this if the source > > database is marked as a template, and use the copydir approach for > > anything that isn't. > > Lo

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

2021-06-15 Thread Julien Rouhaud
On Wed, Jun 16, 2021 at 03:27:21PM +0900, Kyotaro Horiguchi wrote: > > If we are willing to maintain the two methods. > Couldn't we just skip the checkpoints if the database is known to > "clean", which means no page has been loaded for the database since > startup? We can use the "template" mark

Re: snapshot too old issues, first around wraparound and then more.

2021-06-15 Thread Peter Geoghegan
On Tue, Jun 15, 2021 at 11:24 PM Noah Misch wrote: > When I say "some hackers", I don't mean that specific people think such > thoughts right now. I'm saying that the expected cost of future cooperation > with the feature is nonzero, and bugs in the feature raise that cost. I see. > > > A hacke

Re: SQLSTATE for replication connection failures

2021-06-15 Thread Masahiko Sawada
On Mon, Jun 14, 2021 at 6:18 PM Amit Kapila wrote: > > On Sat, Jun 12, 2021 at 9:12 PM Tom Lane wrote: > > > > So far as I can find, just about everyplace that deals with replication > > connections has slipshod error reporting. An example from worker.c is > > > > LogRepWorkerWalRcvConn

Re: Error on pgbench logs

2021-06-15 Thread Fabien COELHO
Michaël-san, Yugo-san, I am fine with this version, but I think it would be better if we have a comment explaining what "tx" is for. Yes. Done. Also, how about adding Assert(tx) instead of using "else if (tx)" because we are assuming that tx is always true when agg_interval is not used, rig

<    1   2