Re: hot_standby_feedback vs excludeVacuum and snapshots

2018-08-03 Thread Thomas Munro
On Mon, Jul 9, 2018 at 6:51 AM, Noah Misch wrote: > On Fri, Jul 06, 2018 at 04:32:56PM +0100, Simon Riggs wrote: >> On 6 July 2018 at 03:30, Thomas Munro wrote: >> > On Thu, Jul 5, 2018 at 8:27 AM, Noah Misch wrote: >> >>> However, 49bff5300d527 also introduced a similar bug where >> >>>

Re: Ideas for a relcache test mode about missing invalidations

2018-08-03 Thread Peter Geoghegan
On Fri, Aug 3, 2018 at 12:34 AM, Kyotaro HORIGUCHI wrote: >> I reread through the thread and IUCC, drop_index() is sending >> inval on the owing relation and invalidation happens (that is, > > I finally understand that I was totally inept. This came from > *the result* of the original -bug

Re: Draft release notes are up

2018-08-03 Thread Peter Geoghegan
On Fri, Aug 3, 2018 at 3:15 PM, Tom Lane wrote: > First cut at release notes for next week's minor releases is up at > > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=c1455de2af2eb06ee493f9982f060ac7e571f656 I suppose that you should add an item for the relcache bug that I

Draft release notes are up

2018-08-03 Thread Tom Lane
First cut at release notes for next week's minor releases is up at https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=c1455de2af2eb06ee493f9982f060ac7e571f656 If you prefer not to read XML markup, they should appear in the devel docs on the website after guaibasaurus's next run,

Re: pg_dumpall --exclude-database option

2018-08-03 Thread Fabien COELHO
Among other use cases, this is useful where a database name is visible but the database is not dumpable by the user. Examples of this occur in some managed Postgres services. This looks like a reasonable feature. I will add this to the September CF. My 0.02€: Patch applies cleanly,

Re: Should contrib modules install .h files?

2018-08-03 Thread Andrew Gierth
> "Tom" == Tom Lane writes: Tom> On the other hand, if there's no very practical way to use the Tom> per-extension subdirectory layout, >> What constitutes "practical"? OK, after considerable experiment I think I can answer these points: the most "practical" way is to do this (or an

Re: Should contrib modules install .h files?

2018-08-03 Thread Michael Paquier
On Tue, Jul 31, 2018 at 01:22:27PM -0700, Peter Geoghegan wrote: > On Tue, Jul 31, 2018 at 1:17 PM, Andres Freund wrote: >> I'm a bit surprised that you decided to push to the 11 branch - the >> consensus in this thread seem to have gone the other way by my read? >> Given that that's the rule,

Re: Documentaion fix.

2018-08-03 Thread Michael Paquier
On Fri, Aug 03, 2018 at 04:37:05PM -0400, Alvaro Herrera wrote: > On 2018-Aug-03, Kyotaro HORIGUCHI wrote: >> That said, I don't object to reduce the columns. Please find the >> attached. > > Thanks, pushed. Thanks Alvaro for keeping the three-column version, I was going to look at the proposed

Re: pg_upgrade from 9.4 to 10.4

2018-08-03 Thread Bruce Momjian
On Fri, Aug 3, 2018 at 01:55:04PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > The comment at the top of src/port/system.c explains why we need those > > quotes. Spaces was not the issue. > > So, while starting to prepare the release notes, I looked at this patch > again and I'm still

Re: pg_default_acl missing 'n' case in doc

2018-08-03 Thread Alvaro Herrera
On 2018-Jul-30, Fabien COELHO wrote: > > While looking at ACL prettyprinting, I noticed that "pg_default_acl" > documentation does not say anything about type 'n' for schema (namespace), > which seems to be supported according to "\ddp" and the catalog code. > > Here is a small addition to add

Re: Standby trying "restore_command" before local WAL

2018-08-03 Thread Michael Paquier
On Tue, Jul 31, 2018 at 02:55:58PM +0200, Emre Hasegeli wrote: > == The Workarounds == > > We can possibly work around this inside the "restore_command" or > by delaying the archiving. Working around inside the "restore_command" > would involve checking whether the file exists under pg_wal/.

pg_dumpall --exclude-database option

2018-08-03 Thread Andrew Dunstan
PFA a patch to provide an --exclude-database option for pg_dumpall. The causes pg_dumpall to skip any database whose name matches the argument pattern. The option can be used multiple times. Among other use cases, this is useful where a database name is visible but the database is not

Re: pg_upgrade from 9.4 to 10.4

2018-08-03 Thread Tom Lane
Bruce Momjian writes: > The comment at the top of src/port/system.c explains why we need those > quotes. Spaces was not the issue. So, while starting to prepare the release notes, I looked at this patch again and I'm still wondering why it's designed this way. AFAICS, the current state of

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-03 Thread Robert Haas
On Fri, Aug 3, 2018 at 10:36 AM, Tom Lane wrote: > Anyway, what I'm basically suggesting is that we just disable support for > PWJ in the problematic cases in v11. As long as PWJ isn't even on by > default, that's not much of a loss. Obviously we'll want to fix it in the > future, but the hour

Re: Removing unneeded self joins

2018-08-03 Thread Alexander Kuzmenkov
On 07/29/2018 01:42 PM, Thomas Munro wrote: I think you need to disable the optimisation when there is a locking clause on one side. Maybe it could be allowed if it's on both sides? Not sure. Hi Thomas, Thanks for testing. I think it should be OK to remove the join if the row marks for

Re: Allow COPY's 'text' format to output a header

2018-08-03 Thread Cynthia Shang
> On Aug 2, 2018, at 3:30 PM, Simon Muller wrote: > > Sure, thanks both for the feedback. Attached is a patch with the error kept > as ERRCODE_FEATURE_NOT_SUPPORTED. > I was able to apply the patch (after resolving a merge conflict which was expected given an update in master). All looks

Re: Fallout from PQhost() semantics changes

2018-08-03 Thread Tom Lane
Haribabu Kommi writes: > On Fri, Aug 3, 2018 at 2:24 AM Tom Lane wrote: >> What I think we should do about it is change those internal calls to >> fetch connhost[].host directly instead of going through PQhost(), as >> in the attached libpq-internal-PQhost-usage-1.patch. This will restore >>

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-03 Thread Tom Lane
Robert Haas writes: > On Fri, Aug 3, 2018 at 10:07 AM, Tom Lane wrote: >> As far as I can see from the example that started this thread, >> postgres_fdw injects WRVs into a PWJ whether or not the query involves >> FOR UPDATE; that's why this bug is reproducible in a query without FOR >> UPDATE.

Re: Standby trying "restore_command" before local WAL

2018-08-03 Thread David Steele
On 8/2/18 4:08 PM, Robert Haas wrote: > On Wed, Aug 1, 2018 at 7:14 AM, Emre Hasegeli wrote: >>> There's still a question here, at least from my perspective, as to which >>> is actually going to be faster to perform recovery based off of. A good >>> restore command, which pre-fetches the WAL in

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-03 Thread Robert Haas
On Fri, Aug 3, 2018 at 10:07 AM, Tom Lane wrote: > Robert Haas writes: >> On Thu, Aug 2, 2018 at 4:25 PM, Tom Lane wrote: >>> Now, that's a bit of a problem for postgres_fdw, because it seems to >>> insist on injecting WRVs even when the query text does not require any. >>> Why is that, and

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-03 Thread Tom Lane
Robert Haas writes: > On Thu, Aug 2, 2018 at 4:25 PM, Tom Lane wrote: >> Now, that's a bit of a problem for postgres_fdw, because it seems to >> insist on injecting WRVs even when the query text does not require any. >> Why is that, and can't we get rid of it? > I don't quite know what you mean

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-03 Thread Robert Haas
On Thu, Aug 2, 2018 at 4:25 PM, Tom Lane wrote: > I do not trust Ashutosh's patch because of the point you noted that it > will kick in on ConvertRowtypeExprs that are not related to partitioning. I don't remember making that point -- can you clarify? > It's also got a rather fundamental

Re: Standby trying "restore_command" before local WAL

2018-08-03 Thread Simon Riggs
On 2 August 2018 at 21:08, Robert Haas wrote: > On Wed, Aug 1, 2018 at 7:14 AM, Emre Hasegeli wrote: >>> There's still a question here, at least from my perspective, as to which >>> is actually going to be faster to perform recovery based off of. A good >>> restore command, which pre-fetches

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-03 Thread Etsuro Fujita
(2018/08/03 22:18), Etsuro Fujita wrote: Here is a patch for refusing to generate PWJ paths when WRVs are involved: * We no longer need to handle WRVs, so I've simplified build_joinrel_tlist() and setrefs.c to what they were before partition-wise join went in, as in the previous patch. *

Re: Explain buffers wrong counter with parallel plans

2018-08-03 Thread Robert Haas
On Fri, Aug 3, 2018 at 4:39 AM, Amit Kapila wrote: > I have noticed that part of the comment atop ExecShutdownNode is now > redundant. See attached edit_comments_shutdown_node_v1, let me know > if you think otherwise. Oh, yes, that should be adjusted. -- Robert Haas EnterpriseDB:

Re: FailedAssertion on partprune

2018-08-03 Thread Robert Haas
On Thu, Aug 2, 2018 at 8:42 PM, David Rowley wrote: > Wouldn't that code have more flexibility to flatten the Append if it > were to, instead of looking at the Append's subpaths, look at the > subpath's Parent RelOptInfo paths and just use the Append and > MergeAppend as a container to identify

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-03 Thread Etsuro Fujita
(2018/08/03 5:25), Tom Lane wrote: What I'm thinking might be a more appropriate thing, at least for getting v11 out the door, is to refuse to generate partitionwise joins when any whole-row vars are involved. Agreed. (Perhaps that's not enough to dodge all the problems, though?) Now,

Re: [PATCH] Add regress test for pg_read_all_stats role

2018-08-03 Thread Alexandra Ryzhevich
Thank you for pointing to some problems of the patch. I've attached a modified version below. On Thu, Aug 2, 2018 at 8:38 PM Michael Paquier wrote: > On Thu, Aug 02, 2018 at 06:25:14PM +0100, Alexandra Ryzhevich wrote: > > I have noticed that there is no regression tests for default monitoring

Re: partition tree inspection functions

2018-08-03 Thread Jesper Pedersen
Hi, On 08/03/2018 08:59 AM, Robert Haas wrote: On Fri, Aug 3, 2018 at 8:35 AM, Jesper Pedersen wrote: If you are given a leaf partition as input, then you will have to keep executing the query until you find the root, and count those. So, I think it should be either be the level to the root,

Re: doc - add missing documentation for "acldefault"

2018-08-03 Thread Fabien COELHO
Here is a version of the patch which documents briefly all aclitem-related functions, in a separate table. -- Fabien.diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index edc9be92a6..c81e5aa1b4 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -16829,6

Re: Alter index rename concurrently to

2018-08-03 Thread Robert Haas
On Thu, Aug 2, 2018 at 4:44 PM, Andres Freund wrote: > ISTM, if you want to increase consistency in this area, you've to go > further. E.g. processing invalidations in StartTransactionCommand() in > all states, which'd give you a lot more consistency. Hmm, that seems like a pretty good idea. --

Re: partition tree inspection functions

2018-08-03 Thread Robert Haas
On Fri, Aug 3, 2018 at 8:35 AM, Jesper Pedersen wrote: > If you are given a leaf partition as input, then you will have to keep > executing the query until you find the root, and count those. So, I think it > should be either be the level to the root, or there should be another column > that

Re: Standby trying "restore_command" before local WAL

2018-08-03 Thread Alexander Kukushkin
Hi, 2018-07-31 20:25 GMT+02:00 Stephen Frost : > > > There's still a question here, at least from my perspective, as to which > is actually going to be faster to perform recovery based off of. A good > restore command, which pre-fetches the WAL in parallel and gets it local > and on the same

Re: [PATCH] Improve geometric types

2018-08-03 Thread Tomas Vondra
On 08/03/2018 06:40 AM, Kyotaro HORIGUCHI wrote: ... I'm not confident on replacing double to float8 partially in gist code. After the 0002 patch applied, I see most of problematic usage of double or bare arithmetic on dimentional values in gistproc.c. static inline float non_negative(float

Re: partition tree inspection functions

2018-08-03 Thread Jesper Pedersen
Hi Amit, On 08/03/2018 04:28 AM, Amit Langote wrote: That's a good idea, thanks. Actually, by the time I sent the last version of the patch or maybe few versions before that, I too had started thinking if we shouldn't just have a SETOF RECORD function like you've outlined here, but wasn't sure

Re: Alter index rename concurrently to

2018-08-03 Thread Robert Haas
On Thu, Aug 2, 2018 at 4:51 PM, Tom Lane wrote: > Robert Haas writes: >> [ reasons why DDL under less than AEL sucks ] > > Unfortunately, none of these problems are made to go away with an > AcceptInvalidationMessages at statement start. That just makes the > window smaller. But DDL effects

Re: Explain buffers wrong counter with parallel plans

2018-08-03 Thread Adrien NAYRAT
On 08/03/2018 10:39 AM, Amit Kapila wrote: Thanks. I have pushed those two patches. Thanks!

Re: doc - add missing documentation for "acldefault"

2018-08-03 Thread Fabien COELHO
Hello, However, the point of having hidden and/or undocumented functions fails me: they are hard/impossible to find if you do not know they exist from the start, and if you ever find one you do not know what they do without reading the source code in detail, eg to know what to give arguments

Re: Explain buffers wrong counter with parallel plans

2018-08-03 Thread Amit Kapila
On Thu, Aug 2, 2018 at 11:14 PM, Robert Haas wrote: > On Thu, Aug 2, 2018 at 5:41 AM, Amit Kapila wrote: >> I have created three patches (a) move InstrStartParallelQuery from its >> original location so that we perform it just before ExecutorRun (b) >> patch to fix the gather stats by calling

Re: Ideas for a relcache test mode about missing invalidations

2018-08-03 Thread Kyotaro HORIGUCHI
At Wed, 1 Aug 2018 09:25:18 -0700, Andres Freund wrote in <20180801162518.jnb2ql5dfmgwp...@alap3.anarazel.de> > Hi, > > The issue at [1] is caused by missing invalidations, and [2] seems like > a likely candidate too. I wonder if it'd be good to have a relcache test > mode akin to

Re: partition tree inspection functions

2018-08-03 Thread Amit Langote
On 2018/08/01 22:21, Robert Haas wrote: > On Thu, Jul 26, 2018 at 4:47 AM, Amit Langote > wrote: >> Alright, I have replaced pg_partition_tree_tables with >> pg_partition_children with an 'include_all' argument, as you suggested, >> but I implemented it as an optional argument. So, one would use

Re: Fallout from PQhost() semantics changes

2018-08-03 Thread Haribabu Kommi
On Fri, Aug 3, 2018 at 2:24 AM Tom Lane wrote: > Traditionally (prior to v10), PQhost() returned the "host" connection > parameter if that was nonempty, otherwise the default host name > (DEFAULT_PGSOCKET_DIR or "localhost" depending on platform). > > That got whacked around to a state of

Re: [PATCH] pg_hba.conf : new auth option : clientcert=verify-full

2018-08-03 Thread Julian Markwort
On 03.08.2018 at 08:09 David Fetter wrote: I've rebased the patch atop master so it applies and passes 'make check-world'. I didn't make any other changes. Best, David. Much appreciated!

Re: Ideas for a relcache test mode about missing invalidations

2018-08-03 Thread Kyotaro HORIGUCHI
Hello. At Fri, 03 Aug 2018 10:54:46 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20180803.105446.155966888.horiguchi.kyot...@lab.ntt.co.jp> > I reread through the thread and IUCC, drop_index() is sending > inval on the owing relation and invalidation happens (that is, I finally

Re: Documentaion fix.

2018-08-03 Thread Kyotaro HORIGUCHI
At Fri, 3 Aug 2018 04:13:56 +0900, Michael Paquier wrote in <20180802191356.gb2...@paquier.xyz> > On Wed, Aug 01, 2018 at 01:04:37PM +0900, Kyotaro HORIGUCHI wrote: > > The query and the result with four columns fit the current width. > > Just wondering, what is your reason behind the addition

Re: Problem while updating a foreign table pointing to a partitioned table on foreign server

2018-08-03 Thread Ashutosh Bapat
On Fri, Aug 3, 2018 at 9:43 AM, Kyotaro HORIGUCHI wrote: > > Something-like-but-other-hanVar node? I'm not sure it is needed, > because whatever node we add to the relation-tlist, we must add > the correspondence to the relation descriptor. And if we do that, > a Var works to point it. (Am I

Re: [PATCH] pg_hba.conf : new auth option : clientcert=verify-full

2018-08-03 Thread David Fetter
On Mon, Jul 30, 2018 at 02:20:43PM +0200, Julian Markwort wrote: > On 07/19/2018 03:00 AM, Thomas Munro wrote: > >Some more comments: > > > > if (parsedline->auth_method == uaCert) > > { > >- parsedline->clientcert = true; > >+ parsedline->clientcert =