Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly

2020-04-11 Thread Michael Paquier
On Sat, Apr 11, 2020 at 08:33:52PM -0500, Justin Pryzby wrote: > On Tue, Apr 07, 2020 at 03:44:06PM -0500, Justin Pryzby wrote: >> That's the last known issue with the patch. I doubt anyone will elect to >> pick >> it up in the next 8 hours, but I think it's in very good shape for v14 :) > > I

Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly

2020-04-11 Thread Justin Pryzby
On Tue, Apr 07, 2020 at 03:44:06PM -0500, Justin Pryzby wrote: > > I mean to literally use vac_analyze_option_list for reindex and cluster as > > well. Please, check attached 0007. Now, vacuum, reindex and cluster filter > > options list and reject everything that is not supported, so it seems > >

Re: where should I stick that backup?

2020-04-11 Thread Jose Luis Tallon
On 10/4/20 21:38, Andres Freund wrote: Hi, On 2020-04-10 12:20:01 -0400, Robert Haas wrote: - We're only talking about writing a handful of tar files, and that's in the context of a full-database backup, which is a much heavier-weight operation than a query. - There is not really any state

Re: pg_validatebackup -> pg_verifybackup?

2020-04-11 Thread Isaac Morland
On Sat, 11 Apr 2020 at 19:36, Michael Paquier wrote: > Yeah, their stuff is nice. Another nice thing is that git has the > possibility to scan as well for custom scripts as long as they respect > the naming convention, like having a custom script called "git-foo", > that can be called as "git

Re: pg_validatebackup -> pg_verifybackup?

2020-04-11 Thread Michael Paquier
On Sat, Apr 11, 2020 at 05:50:56PM -0400, Alvaro Herrera wrote: > On 2020-Apr-11, Robert Haas wrote: >> I *would* like to find a way to address the proliferation of binaries, >> because I've got other things I'd like to do that would require >> creating still more of them, and until we come up

Re: pg_validatebackup -> pg_verifybackup?

2020-04-11 Thread Michael Paquier
On Fri, Apr 10, 2020 at 02:48:05PM -0700, Andres Freund wrote: > I don't agree with any of that. Combining the manifest validation with > checksum validation halves the IO. It allows to offload some of the > expense of verifying page level checksums from the primary. > > And all of the operations

Re: pg_basebackup, manifests and backends older than ~12

2020-04-11 Thread Michael Paquier
On Fri, Apr 10, 2020 at 04:44:34PM -0400, David Steele wrote: > On 4/10/20 4:41 PM, Stephen Frost wrote: >> It's only the default in v13.. Surely when we connect to a v12 or >> earlier system we should just keep working and accept that we don't get >> a manifest as part of that. > > Yeah, OK.

Re: sqlsmith crash incremental sort

2020-04-11 Thread Tomas Vondra
Hi, I've looked into this a bit, and at first I thought that maybe the issue is in how cost_incremental_sort picks the EC members. It simply does this: EquivalenceMember *member = (EquivalenceMember *) linitial(key->pk_eclass->ec_members); so I was speculating that maybe there

Re: pg_stat_statements issue with parallel maintenance (Was Re: WAL usage calculation patch)

2020-04-11 Thread Justin Pryzby
On Sat, Mar 28, 2020 at 04:17:21PM +0100, Julien Rouhaud wrote: > On Sat, Mar 28, 2020 at 02:38:27PM +0100, Julien Rouhaud wrote: > > On Sat, Mar 28, 2020 at 04:14:04PM +0530, Amit Kapila wrote: > > > > > > I see some basic problems with the patch. The way it tries to compute > > > WAL usage for

Re: Race condition in SyncRepGetSyncStandbysPriority

2020-04-11 Thread Tom Lane
Masahiko Sawada writes: > On Tue, 31 Mar 2020 at 23:16, Masahiko Sawada > wrote: >>> Therefore, the band-aid fix seems to be to set the lowest priority to >>> very large number at the beginning of SyncRepGetSyncStandbysPriority(). >> I think we can use max_wal_senders. > Sorry, that's not

Re: pg_validatebackup -> pg_verifybackup?

2020-04-11 Thread Alvaro Herrera
On 2020-Apr-11, Robert Haas wrote: > I *would* like to find a way to address the proliferation of binaries, > because I've got other things I'd like to do that would require > creating still more of them, and until we come up with a scalable > solution that makes everybody happy, there's going to

Re: sqlsmith crash incremental sort

2020-04-11 Thread Justin Pryzby
Adding -hackers, originally forgotten. On Sat, Apr 11, 2020 at 10:26:39PM +0200, Tomas Vondra wrote: > Thanks! I'll investigate. > > On Sat, Apr 11, 2020 at 02:19:52PM -0500, Justin Pryzby wrote: > > frequent crash looks like: > > > > #0 __GI_raise (sig=sig@entry=6) at

Re: execExprInterp() questions / How to improve scalar array op expr eval?

2020-04-11 Thread Andres Freund
Hi, On 2020-04-11 15:53:11 -0400, James Coleman wrote: > On Sat, Apr 11, 2020 at 2:01 PM Andres Freund wrote: > > > - If not, is there a way in that framework to know if the array expr > > > has stayed the same through multiple evaluations of the expression > > > tree (i.e., so you could expand

Re: execExprInterp() questions / How to improve scalar array op expr eval?

2020-04-11 Thread Tom Lane
James Coleman writes: >>> It seems like this might be somewhat related to the currently-moribund >>> patch to allow caching of the values of stable subexpressions from >>> one execution to the next. > Is this the patch [1] you're thinking of? > [1]: >

Re: execExprInterp() questions / How to improve scalar array op expr eval?

2020-04-11 Thread James Coleman
On Sat, Apr 11, 2020 at 3:57 PM James Coleman wrote: > .. > > It seems like this might be somewhat related to the currently-moribund > > patch to allow caching of the values of stable subexpressions from > > one execution to the next. If we had that infrastructure you could > > imagine extending

Re: where should I stick that backup?

2020-04-11 Thread Robert Haas
On Fri, Apr 10, 2020 at 3:38 PM Andres Freund wrote: > Wouldn't there be state like a S3/ssh/https/... connection? And perhaps > a 'backup_id' in the backup metadata DB that'd one would want to update > at the end? Good question. I don't know that there would be but, uh, maybe? It's not obvious

Re: pg_validatebackup -> pg_verifybackup?

2020-04-11 Thread Robert Haas
On Fri, Apr 10, 2020 at 5:24 PM Tom Lane wrote: > Meh. I would argue that that's an actively BAD idea. The use-cases > are entirely different, the implementation is going to be quite a lot > different, the relevant options are going to be quite a lot different. > It will not be better for

Re: execExprInterp() questions / How to improve scalar array op expr eval?

2020-04-11 Thread James Coleman
On Sat, Apr 11, 2020 at 3:33 PM Tom Lane wrote: > > Andres Freund writes: > > On 2020-04-11 08:58:46 -0400, James Coleman wrote: > >> - Does the execExpr/execExprInterp framework allow a scalar array op > >> to get an already expanded array (unless I'm missing something we > >> can't easily

Re: execExprInterp() questions / How to improve scalar array op expr eval?

2020-04-11 Thread Andres Freund
Hi, On 2020-04-11 15:33:09 -0400, Tom Lane wrote: > For the most part it seems like this is asking the question at the wrong > level. It's not execExpr's job to determine the form of either values > coming in from "outside" (Vars from table rows, or Params from elsewhere) > or the results of

Re: execExprInterp() questions / How to improve scalar array op expr eval?

2020-04-11 Thread James Coleman
On Sat, Apr 11, 2020 at 2:01 PM Andres Freund wrote: > > Hi, > > > Tom, CCing you because of expanded datum question at bottom. > > > On 2020-04-11 08:58:46 -0400, James Coleman wrote: > > - Does the execExpr/execExprInterp framework allow a scalar array op > > to get an already expanded array

Re: Add A Glossary

2020-04-11 Thread Corey Huinker
> > > Term 'relation': A sequence is internally a table with one row - right? > Shall we extend the list of concrete relations by 'sequence'? Or is this > not necessary because 'table' is already there? > I wrote one for sequence, it was a bit math-y for Alvaro's taste, so we're going to try

Re: execExprInterp() questions / How to improve scalar array op expr eval?

2020-04-11 Thread Tom Lane
Andres Freund writes: > On 2020-04-11 08:58:46 -0400, James Coleman wrote: >> - Does the execExpr/execExprInterp framework allow a scalar array op >> to get an already expanded array (unless I'm missing something we >> can't easily lookup a given index in a flattened array)? > Well, I'm not

Re: execExprInterp() questions / How to improve scalar array op expr eval?

2020-04-11 Thread Andres Freund
Hi, Tom, CCing you because of expanded datum question at bottom. On 2020-04-11 08:58:46 -0400, James Coleman wrote: > - Does the execExpr/execExprInterp framework allow a scalar array op > to get an already expanded array (unless I'm missing something we > can't easily lookup a given index in

Re: cleaning perl code

2020-04-11 Thread Tom Lane
Mark Dilger writes: > I'm less concerned with which perlcritic features you enable than I am with > accidentally submitting perl which looks fine to me but breaks the build. I > mostly use perl from within TAP tests, which I run locally before submission > to the project. Can your changes be

Re: Complete data erasure

2020-04-11 Thread Tomas Vondra
On Fri, Apr 10, 2020 at 08:23:32AM +, asaba.takan...@fujitsu.com wrote: Hello, I was off the point. I want to organize the discussion and suggest feature design. There are two opinions. 1. COMMIT should not take a long time because errors are more likely to occur. I don't think it's a

Re: cleaning perl code

2020-04-11 Thread Tom Lane
Andrew Dunstan writes: > On 4/11/20 12:48 PM, Tom Lane wrote: >> Is there a way to modify the test so that it only complains when >> the final return is missing and there are other return(s) with values? >> That would seem like a more narrowly tailored check. > Not AFAICS: >

Re: cleaning perl code

2020-04-11 Thread Mark Dilger
> On Apr 11, 2020, at 9:47 AM, Andrew Dunstan > wrote: > > > On 4/11/20 12:28 PM, Mark Dilger wrote: >> >>> On Apr 11, 2020, at 9:13 AM, Andrew Dunstan >>> wrote: >> Hi Andrew. I appreciate your interest and efforts here. I hope you don't >> mind a few questions/observations about

Re: range_agg

2020-04-11 Thread Alvaro Herrera
On 2020-Apr-11, Paul A Jungwirth wrote: > On Sat, Apr 11, 2020 at 9:36 AM Paul A Jungwirth > wrote: > > Btw I'm working on typanalyze + selectivity, and it seems like the > > test suite doesn't run those things? > > Nevermind, I just had to add `analyze numrange_test` to >

Re: cleaning perl code

2020-04-11 Thread Tom Lane
Andrew Dunstan writes: > On 4/11/20 12:30 AM, Noah Misch wrote: >> In summary, among those warnings, I see non-negative value in "Code before >> warnings are enabled" only. While we're changing this, I propose removing >> Subroutines::RequireFinalReturn. Implicit return values were not a

Re: cleaning perl code

2020-04-11 Thread Andrew Dunstan
On 4/11/20 12:28 PM, Mark Dilger wrote: > >> On Apr 11, 2020, at 9:13 AM, Andrew Dunstan >> wrote: > Hi Andrew. I appreciate your interest and efforts here. I hope you don't > mind a few questions/observations about this effort: Not at all. > >> The >> last one fixes the mixture of

Re: range_agg

2020-04-11 Thread Paul A Jungwirth
On Sat, Apr 11, 2020 at 9:36 AM Paul A Jungwirth wrote: > Btw I'm working on typanalyze + selectivity, and it seems like the > test suite doesn't run those things? Nevermind, I just had to add `analyze numrange_test` to src/test/regress/sql/rangetypes.sql. :-) Do you want a separate patch for

Re: cleaning perl code

2020-04-11 Thread Mark Dilger
> On Apr 11, 2020, at 9:13 AM, Andrew Dunstan > wrote: Hi Andrew. I appreciate your interest and efforts here. I hope you don't mind a few questions/observations about this effort: > > The > last one fixes the mixture of high and low precedence boolean operators, I did not spot

Re: where should I stick that backup?

2020-04-11 Thread Jose Luis Tallon
On 10/4/20 15:49, Robert Haas wrote: On Thu, Apr 9, 2020 at 6:44 PM Bruce Momjian wrote: Good point, but if there are multiple APIs, it makes shell script flexibility even more useful. [snip] One thing I do think would be realistic would be to invent a set of tools that are perform certain

Re: cleaning perl code

2020-04-11 Thread Andrew Dunstan
On 4/11/20 12:30 AM, Noah Misch wrote: > On Thu, Apr 09, 2020 at 11:44:11AM -0400, Andrew Dunstan wrote: >> 39 Always unpack @_ first > Requiring a "my @args = @_" does not improve this code: > > sub CreateSolution > { > ... > if ($visualStudioVersion eq '12.00') > { >

Re: cleaning perl code

2020-04-11 Thread Tom Lane
Noah Misch writes: > In summary, among those warnings, I see non-negative value in "Code before > warnings are enabled" only. While we're changing this, I propose removing > Subroutines::RequireFinalReturn. If it's possible to turn off just that warning, then +several. It's routinely caused

Re: relcache leak warnings vs. errors

2020-04-11 Thread Tom Lane
Peter Eisentraut writes: > How about a compile-time option to turn all the warnings in resowner.c > into errors? This could be enabled automatically by --enable-cassert, > similar to other defines that that option enables. [ itch... ] Those calls occur post-commit; throwing an error there is

Re: WAL usage calculation patch

2020-04-11 Thread Julien Rouhaud
On Fri, Apr 10, 2020 at 9:37 PM Julien Rouhaud wrote: > > On Fri, Apr 10, 2020 at 8:17 AM Amit Kapila wrote: > > Would you like to send a consolidated patch that includes Euler's > > suggestion and Justin's patch (by making changes for points we > > discussed.)? I think we can keep the point

execExprInterp() questions / How to improve scalar array op expr eval?

2020-04-11 Thread James Coleman
Short version: In what I'm currently working on I had a few questions about arrays and the execExpr/execExprInterp framework that didn't seem obviously answered in the code or README. - Does the execExpr/execExprInterp framework allow a scalar array op to get an already expanded array (unless

Re: Add A Glossary

2020-04-11 Thread Jürgen Purtz
On 2020-Apr-05, Jürgen Purtz wrote: a) Some rearrangements of the sequence of terms to meet alphabetical order. Thanks, will get this pushed. b)   -->   in two cases. Or should it be a ? Ah, yeah, those should be linkend. Term 'relation': A sequence is internally a table with one row -

Re: proposal - psql - possibility to redirect only tabular output

2020-04-11 Thread Pavel Stehule
so 11. 4. 2020 v 11:04 odesílatel Erik Rijkers napsal: > On 2020-04-11 10:21, Pavel Stehule wrote: > > so 11. 4. 2020 v 8:54 odesílatel Pavel Stehule > > > > napsal: > > > [psql-status-target.patch] > > Hi Pavel, > > This looks interesting, and I built an instance with the patch to try > it,

Re: proposal - psql - possibility to redirect only tabular output

2020-04-11 Thread Erik Rijkers
On 2020-04-11 10:21, Pavel Stehule wrote: so 11. 4. 2020 v 8:54 odesílatel Pavel Stehule napsal: [psql-status-target.patch] Hi Pavel, This looks interesting, and I built an instance with the patch to try it, but I can't figure out how to use it. Can you perhaps give a few or even just

Re: relcache leak warnings vs. errors

2020-04-11 Thread Julien Rouhaud
On Sat, Apr 11, 2020 at 10:09:59AM +0200, Peter Eisentraut wrote: > I just fixed a relcache leak that I accidentally introduced (5a1d0c9925). > Because it was a TAP test involving replication workers, you don't see the > usual warning anywhere unless you specifically check the log files manually.

Re: proposal - psql - possibility to redirect only tabular output

2020-04-11 Thread Pavel Stehule
so 11. 4. 2020 v 8:54 odesílatel Pavel Stehule napsal: > Hi > > Now, the content of redirect output has two parts > > 1. tabular output > 2. cmd tags > > There is a problem with command tags, because it is specific kind of > information and can be nice if can be redirected to stdout every time

relcache leak warnings vs. errors

2020-04-11 Thread Peter Eisentraut
I just fixed a relcache leak that I accidentally introduced (5a1d0c9925). Because it was a TAP test involving replication workers, you don't see the usual warning anywhere unless you specifically check the log files manually. How about a compile-time option to turn all the warnings in

Re: cleaning perl code

2020-04-11 Thread Peter Eisentraut
On 2020-04-11 06:30, Noah Misch wrote: In summary, among those warnings, I see non-negative value in "Code before warnings are enabled" only. Now that you put it like this, that was also my impression when I first introduced the level 5 warnings and then decided to stop there. -- Peter

proposal - psql - possibility to redirect only tabular output

2020-04-11 Thread Pavel Stehule
Hi Now, the content of redirect output has two parts 1. tabular output 2. cmd tags There is a problem with command tags, because it is specific kind of information and can be nice if can be redirected to stdout every time like \h output. There can be new psql variable like REDIRECTED_OUTPUT