Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-18 Thread Michael Paquier
On Thu, Jan 19, 2017 at 7:27 AM, Alvaro Herrera wrote: > I thought this part was odd -- I mean, why is SysLogger_Start() being > called if the collector is not enabled? Turns out we do it and return > early if not enabled. But not in all cases -- there is one callsite

Re: [HACKERS] pg_hba_file_settings view patch

2017-01-18 Thread Michael Paquier
On Thu, Jan 19, 2017 at 4:25 PM, Haribabu Kommi wrote: > Added the cleanup mechanism. But the tokenize_file() function call > present in many places, But in one flow still it is possible to have > file descriptor leak because of pg_hba_rules view. Because of this >

Re: [HACKERS] pg_hba_file_settings view patch

2017-01-18 Thread Haribabu Kommi
On Thu, Jan 19, 2017 at 4:08 PM, Michael Paquier wrote: > On Wed, Jan 18, 2017 at 4:11 PM, Haribabu Kommi > wrote: > > updated patch attached. > > Thanks for the new version. > > > Added tap tests patch also attached. > > This begins to look

Re: [HACKERS] PoC: Grouped base relation

2017-01-18 Thread Tomas Vondra
On 01/19/2017 04:09 AM, Ashutosh Bapat wrote: On Thu, Jan 19, 2017 at 12:02 AM, Robert Haas wrote: On Tue, Jan 17, 2017 at 11:33 PM, Ashutosh Bapat Also, the point is naming that kind of function as aggtransmultifn would mean that it's always supposed to multiply,

Re: [HACKERS] Causal reads take II

2017-01-18 Thread Ants Aasma
On Tue, Jan 3, 2017 at 3:43 AM, Thomas Munro wrote: > Here is a new version of my "causal reads" patch (see the earlier > thread from the 9.6 development cycle[1]), which provides a way to > avoid stale reads when load balancing with streaming replication. Thanks

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-01-18 Thread vinayak
On 2017/01/16 17:35, Masahiko Sawada wrote: On Fri, Jan 13, 2017 at 3:48 PM, Masahiko Sawada wrote: On Fri, Jan 13, 2017 at 3:20 PM, Ashutosh Bapat wrote: Long time passed since original patch proposed by Ashutosh, so I explain again

Re: [HACKERS] Add pgstathashindex() to get hash index table statistics.

2017-01-18 Thread Ashutosh Sharma
> However, I've some minor comments on the patch: > > +/* > + * HASH_ALLOCATABLE_PAGE_SZ represents allocatable > + * space (pd_upper - pd_lower) on a hash page. > + */ > +#define HASH_ALLOCATABLE_PAGE_SZ \ > + BLCKSZ - \ > + (SizeOfPageHeaderData +

[HACKERS] Review: GIN non-intrusive vacuum of posting tree

2017-01-18 Thread Jeff Davis
https://www.postgresql.org/message-id/CAJEAwVE4UAmm8fr%2BNW8XTnKV6M--ACoNhL3ES8yoKL2sKhbaiw%40mail.gmail.com Let me re-summarize what's been done here to make sure I understand: Each key in GIN has its own posting tree, which is itself a btree, holding all of the tuples that contain that key.

Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol

2017-01-18 Thread Noah Misch
On Wed, Jan 18, 2017 at 02:30:38PM +0900, Michael Paquier wrote: > On Wed, Jan 18, 2017 at 2:23 PM, Noah Misch wrote: > > The latest versions document this precisely, but I agree with Peter's > > concern > > about plain "scram". Suppose it's 2025 and PostgreSQL support SASL

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-18 Thread Alvaro Herrera
Karl O. Pinc wrote: > @@ -511,10 +519,16 @@ int > SysLogger_Start(void) > { > pid_t sysloggerPid; > - char *filename; > > + /* > + * Logging collector is not enabled. We don't know where messages are > + * logged. Remove outdated file holding the

Re: [HACKERS] Declarative partitioning - another take

2017-01-18 Thread Amit Langote
On 2017/01/19 5:29, Robert Haas wrote: > On Wed, Jan 18, 2017 at 3:12 PM, Robert Haas wrote: >> On Tue, Jan 10, 2017 at 6:06 AM, Amit Langote >> wrote: >>> [ updated patches ] >> >> I committed 0004 and also fixed the related regression test

Re: [HACKERS] pg_hba_file_settings view patch

2017-01-18 Thread Michael Paquier
On Wed, Jan 18, 2017 at 4:11 PM, Haribabu Kommi wrote: > updated patch attached. Thanks for the new version. > Added tap tests patch also attached. This begins to look really nice. I am having fun torturing it :) Here are I think my last comments: + linecxt =

Re: [HACKERS] postgres_fdw bug in 9.6

2017-01-18 Thread Ashutosh Bapat
On Thu, Jan 19, 2017 at 2:14 AM, Robert Haas wrote: > On Fri, Jan 13, 2017 at 6:22 AM, Etsuro Fujita > wrote: >> My biggest concern about GetExistingLocalJoinPath is that might not be >> extendable to the case of foreign-join paths with

Re: [HACKERS] Parallel Index Scans

2017-01-18 Thread Haribabu Kommi
On Wed, Jan 18, 2017 at 6:55 PM, Rahila Syed wrote: > >+ /* Check if the scan for current scan keys is finished */ > >+ if (so->arrayKeyCount < btscan->btps_arrayKeyCount) > >+ *status = false; > > >I didn't clearly understand, in which scenario the arrayKeyCount is less

Re: [HACKERS] PoC: Grouped base relation

2017-01-18 Thread Ashutosh Bapat
On Thu, Jan 19, 2017 at 12:02 AM, Robert Haas wrote: > On Tue, Jan 17, 2017 at 11:33 PM, Ashutosh Bapat > wrote: >> I don't think aggcombinefn isn't there because we couldn't write it >> for array_agg() or string_agg(). I guess, it won't be

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Ryan Murphy
> The on-screen output isn't all that helpful for diagnosing what went > wrong. You might learn more by looking at the regression.diffs files. > Remember that errors tend to cascade, so the first one(s) in any > particular test suite are the most important --- the rest might just > be fallout. >

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-18 Thread Michael Paquier
On Thu, Jan 19, 2017 at 6:56 AM, Karl O. Pinc wrote: > On Wed, 18 Jan 2017 15:08:09 -0600 > "Karl O. Pinc" wrote: > >> I would like to see index entries for "current_logfiles" >> so this stuff is findable. > > Attached is a v27 of the patch. > > I polished some of

Re: [HACKERS] macaddr 64 bit (EUI-64) datatype support

2017-01-18 Thread Haribabu Kommi
On Sat, Jan 14, 2017 at 6:28 PM, Kuntal Ghosh wrote: > On Mon, Jan 9, 2017 at 1:45 PM, Haribabu Kommi > wrote: > > Updated patch is attached. > > > I've a few comments about the patch. > Thanks for the review. + This type can accept

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Tom Lane
Ryan Murphy writes: > So I ran "make -i installcheck-world" and it ran to completion. This is on > a freshly "git pull"ed postgres source tree. Certain tests failed, but > most succeeded. Those results look pretty broken :-( > There was no "overall" indication of

Re: [HACKERS] smallint out of range EXECUTEing prepared statement

2017-01-18 Thread Andrew Gierth
> "Justin" == Justin Pryzby writes: Justin> Is this expected behavior ? Justin> ts=# SELECT * FROM t WHERE site_id=32768 LIMIT 1; Justin> (0 rows) Justin> ts=# PREPARE x AS SELECT * FROM t WHERE site_id=$1 LIMIT 1; Justin> PREPARE Justin> ts=# EXECUTE x(32768);

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Ryan Murphy
> > Jim Nasby said I shouldn't necessarily need to build the docs / the whole > world in order to review patches. But the Review form needs a `make > installworld-check`. Do I need to install the whole world in order to meet > this requirement? Happy to do so if required, but in that case, I

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Ryan Murphy
> > > Ryan try to run 'make install-world' then 'make -i installcheck-world', -i > option will ignore the error and proceed. You can check if any other tests > fails. This is a separate issue, unrelated to this patch. I do not think > we should stop from changing the status because of this. > >

Re: [HACKERS] [PATCH] ALTER DEFAULT PRIVILEGES with GRANT/REVOKE ON SCHEMAS

2017-01-18 Thread Stephen Frost
* Petr Jelinek (petr.jeli...@2ndquadrant.com) wrote: > On 10/01/17 17:33, Matheus de Oliveira wrote: > > > > On Mon, Jan 9, 2017 at 10:58 AM, Ashutosh Sharma > > wrote: > > > > > Also, should I add translations for that error message in

Re: [HACKERS] [PATCH] ALTER DEFAULT PRIVILEGES with GRANT/REVOKE ON SCHEMAS

2017-01-18 Thread Petr Jelinek
On 10/01/17 17:33, Matheus de Oliveira wrote: > > On Mon, Jan 9, 2017 at 10:58 AM, Ashutosh Sharma > wrote: > > > Also, should I add translations for that error message in other > languages (I > > can do that without help of tools

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Tom Lane
Robert Haas writes: > So, one of the big reasons I use CASE is to avoid evaluating > expressions in cases where they might throw an ERROR. Like, you know: > CASE WHEN d != 0 THEN n / d ELSE NULL END > I guess it's not the end of the world if that only works for >

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Robert Haas
On Wed, Jan 18, 2017 at 7:00 PM, Andres Freund wrote: >>So, one of the big reasons I use CASE is to avoid evaluating >>expressions in cases where they might throw an ERROR. Like, you know: >> >>CASE WHEN d != 0 THEN n / d ELSE NULL END >> >>I guess it's not the end of the

Re: [HACKERS] PoC: Grouped base relation

2017-01-18 Thread Robert Haas
On Wed, Jan 18, 2017 at 5:14 PM, David Rowley wrote: > On 19 January 2017 at 07:32, Robert Haas wrote: >> On Tue, Jan 17, 2017 at 11:33 PM, Ashutosh Bapat >> wrote: >>> I don't think aggcombinefn isn't there

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
* Michael Paquier (michael.paqu...@gmail.com) wrote: > On Thu, Jan 19, 2017 at 5:01 AM, Peter Eisentraut > wrote: > > On 1/18/17 8:25 AM, Stephen Frost wrote: > >> I was actually thinking about it the other way- start out by changing > >> them to both be 5m and

Re: [HACKERS] Logical Replication WIP

2017-01-18 Thread Petr Jelinek
On 17/01/17 22:43, Robert Haas wrote: > On Tue, Jan 17, 2017 at 11:15 AM, Petr Jelinek > wrote: >>> Is there anything stopping anyone from implementing it? >> >> No, just didn't seem priority for the functionality right now. > > Why is it OK for this to not support

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
* Michael Paquier (michael.paqu...@gmail.com) wrote: > On Thu, Jan 19, 2017 at 6:20 AM, Stephen Frost wrote: > > On Wed, Jan 18, 2017 at 16:15 Robert Haas wrote: > >> On Wed, Jan 18, 2017 at 3:59 PM, Stephen Frost wrote: > >> > For

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Andres Freund
On January 18, 2017 3:59:00 PM PST, Robert Haas wrote: >On Wed, Jan 18, 2017 at 6:19 PM, Andres Freund >wrote: >>> SELECT x, CASE WHEN x > 0 THEN generate_series(1, 5) ELSE 0 END >FROM tab; >>> >>> It might seem that this should produce five

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Robert Haas
On Wed, Jan 18, 2017 at 6:19 PM, Andres Freund wrote: >> SELECT x, CASE WHEN x > 0 THEN generate_series(1, 5) ELSE 0 END FROM tab; >> >> It might seem that this should produce five repetitions of input rows >> that have x > 0, and a single repetition of those that do

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Michael Paquier
On Thu, Jan 19, 2017 at 5:01 AM, Peter Eisentraut wrote: > On 1/18/17 8:25 AM, Stephen Frost wrote: >> I was actually thinking about it the other way- start out by changing >> them to both be 5m and then document next to checkpoint_timeout (and >> max_wal_size,

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Michael Paquier
On Thu, Jan 19, 2017 at 6:20 AM, Stephen Frost wrote: > On Wed, Jan 18, 2017 at 16:15 Robert Haas wrote: >> On Wed, Jan 18, 2017 at 3:59 PM, Stephen Frost wrote: >> > For non-cold standby configurations, pg_ctl is going to return

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-18 Thread Michael Paquier
On Thu, Jan 19, 2017 at 6:08 AM, Karl O. Pinc wrote: > On Wed, 18 Jan 2017 15:52:36 -0500 > Robert Haas wrote: > >> On Wed, Jan 18, 2017 at 12:08 PM, Karl O. Pinc wrote: >> > Seems to me that the file format should >> > be documented if

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Andres Freund
On 2017-01-18 16:27:53 -0700, David G. Johnston wrote: > ​I'd rather fail now and allow for the possibility of future implementation > of the "it might seem that..." behavior.​ That's very unlikely to happen. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes

Re: [HACKERS] Performance improvement for joins where outer side is unique

2017-01-18 Thread David Rowley
On 19 January 2017 at 11:06, David Rowley wrote: > Old patch no longer applies, so I've attached a rebased patch. This > also re-adds a comment line which I mistakenly removed. (meanwhile Andres commits 69f4b9c) I should've waited a bit longer. Here's another that

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread David G. Johnston
On Wed, Jan 18, 2017 at 4:14 PM, Tom Lane wrote: > I wrote: > > I'll try to write something about the SRF-in-CASE issue too. Seeing > > whether we can document that adequately seems like an important part > > of making the decision about whether we need to block it. > >

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Andres Freund
On 2017-01-18 18:14:26 -0500, Tom Lane wrote: > I wrote: > > I'll try to write something about the SRF-in-CASE issue too. Seeing > > whether we can document that adequately seems like an important part > > of making the decision about whether we need to block it. > > Here's what I came up with:

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Tom Lane
I wrote: > I'll try to write something about the SRF-in-CASE issue too. Seeing > whether we can document that adequately seems like an important part > of making the decision about whether we need to block it. Here's what I came up with: This behavior also means that set-returning functions

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Andres Freund
On 2017-01-18 17:34:56 -0500, Tom Lane wrote: > Andres Freund writes: > > (I also noticed the previous patch should have had a catversion bump :(, > > will do after the meeting). > > Uh, why? It isn't touching any on-disk data structure. Forget what I said - I was rushing

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Tom Lane
Andres Freund writes: > (I also noticed the previous patch should have had a catversion bump :(, > will do after the meeting). Uh, why? It isn't touching any on-disk data structure. regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] smallint out of range EXECUTEing prepared statement

2017-01-18 Thread David G. Johnston
On Wed, Jan 18, 2017 at 3:15 PM, Justin Pryzby wrote: > Is this expected behavior ? ​​ > > ts=# SELECT * FROM t WHERE site_id=32768 LIMIT 1; > (0 rows) > > ts=# PREPARE x AS SELECT * FROM t WHERE site_id=$1 LIMIT 1; > PREPARE > ts=# EXECUTE x(32768); > ERROR: smallint out

[HACKERS] smallint out of range EXECUTEing prepared statement

2017-01-18 Thread Justin Pryzby
Is this expected behavior ? ts=# SELECT * FROM t WHERE site_id=32768 LIMIT 1; (0 rows) ts=# PREPARE x AS SELECT * FROM t WHERE site_id=$1 LIMIT 1; PREPARE ts=# EXECUTE x(32768); ERROR: smallint out of range ts=# PREPARE y AS SELECT * FROM t WHERE site_id::int=$1 LIMIT 1; PREPARE ts=# EXECUTE

Re: [HACKERS] PoC: Grouped base relation

2017-01-18 Thread David Rowley
On 19 January 2017 at 07:32, Robert Haas wrote: > On Tue, Jan 17, 2017 at 11:33 PM, Ashutosh Bapat > wrote: >> I don't think aggcombinefn isn't there because we couldn't write it >> for array_agg() or string_agg(). I guess, it won't be

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Andres Freund
On 2017-01-18 16:56:46 -0500, Tom Lane wrote: > Andres Freund writes: > I have not actually looked at 0003 at all yet. So yeah, please post > for review after you're done rebasing. Here's a rebased and lightly massaged version. I'm vanishing in a meeting for a bit, thought

Re: [HACKERS] Performance improvement for joins where outer side is unique

2017-01-18 Thread David Rowley
On 3 December 2016 at 10:26, Tom Lane wrote: > Robert Haas writes: >> On Dec 2, 2016, at 7:47 AM, Haribabu Kommi wrote: >>> Patch still applies fine to HEAD. >>> Moved to next CF with "ready for committer" status. > >> Tom,

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Tom Lane
Andres Freund writes: > There's one sgml comment you'd added: > "Furthermore, nested set-returning functions did not work at all." > I'm not quite sure what you're referring to there - it was previously > allowed to have one set argument to an SRF: Ooops ... that was composed

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-18 Thread Karl O. Pinc
On Wed, 18 Jan 2017 15:08:09 -0600 "Karl O. Pinc" wrote: > I would like to see index entries for "current_logfiles" > so this stuff is findable. Attached is a v27 of the patch. I polished some of the sentences in the documentation and added index entries. Also attached are a

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Andres Freund
Hi, On 2017-01-18 15:24:32 -0500, Tom Lane wrote: > Andres Freund writes: > > Yea, have something lying around. Let me push it then when I get back from > > lunch? > > Sure, no sweat. Pushed. Yay! There's one sgml comment you'd added: "Furthermore, nested set-returning

Re: [HACKERS] Typo in hashsearch.c

2017-01-18 Thread Robert Haas
On Fri, Jan 13, 2017 at 4:38 AM, Mithun Cy wrote: > There is a typo in comments of function _hash_first(); Adding a fix for same. Thanks. I pushed a commit including this fix and some other improvements to that comment. -- Robert Haas EnterpriseDB:

Re: [HACKERS] [PATCH] fix typo in commit a4523c5

2017-01-18 Thread Tom Lane
Nikita Glukhov writes: > Obviously, the last line should be > RESET enable_indexonlyscan; Yeah, I think you're right. Pushed, thanks! regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
On Wed, Jan 18, 2017 at 16:15 Robert Haas wrote: > On Wed, Jan 18, 2017 at 3:59 PM, Stephen Frost wrote: > > > For non-cold standby configurations, pg_ctl is going to return just as > > > soon as the database has finished crash recovery, which in most

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Robert Haas
On Wed, Jan 18, 2017 at 3:59 PM, Stephen Frost wrote: > For non-cold standby configurations, pg_ctl is going to return just as > soon as the database has finished crash recovery, which in most cases > will probably be on the order of a few seconds. /me is poleaxed. --

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-18 Thread Karl O. Pinc
On Wed, 18 Jan 2017 15:52:36 -0500 Robert Haas wrote: > On Wed, Jan 18, 2017 at 12:08 PM, Karl O. Pinc wrote: > > Seems to me that the file format should > > be documented if there's any intention that the end user > > look at or otherwise use the file's

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Wed, Jan 18, 2017 at 3:43 PM, Stephen Frost wrote: > > * Robert Haas (robertmh...@gmail.com) wrote: > >> I think we've changed the defaults to make things better for an > >> attended startup and worse for an unattended

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-18 Thread Robert Haas
On Wed, Jan 18, 2017 at 12:08 PM, Karl O. Pinc wrote: > Seems to me that the file format should > be documented if there's any intention that the end user > look at or otherwise use the file's content. > > It's fine with me if the content of current_logfiles > is supposed to be

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-18 Thread Robert Haas
On Wed, Jan 18, 2017 at 12:56 PM, Karl O. Pinc wrote: > If it were me I'd have the documentation mention > that the pg_current_logfiles() result is > supplied on a "best effort" basis and under > rare conditions may be outdated. The > sentence in the pg_current_logfles() docs >

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Robert Haas
On Wed, Jan 18, 2017 at 3:43 PM, Stephen Frost wrote: > * Robert Haas (robertmh...@gmail.com) wrote: >> On Tue, Jan 17, 2017 at 5:31 PM, Stephen Frost wrote: >> > If I'm understanding your concern correctly, you're worried about the >> > case of a cold

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Tue, Jan 17, 2017 at 5:31 PM, Stephen Frost wrote: > > If I'm understanding your concern correctly, you're worried about the > > case of a cold standby where the database is only replaying WAL but not > > configured to

Re: [HACKERS] postgres_fdw bug in 9.6

2017-01-18 Thread Robert Haas
On Fri, Jan 13, 2017 at 6:22 AM, Etsuro Fujita wrote: > My biggest concern about GetExistingLocalJoinPath is that might not be > extendable to the case of foreign-join paths with parameterization; in which > case, fdw_outerpath for a given foreign-join path would need

Re: [HACKERS] jsonb_delete with arrays

2017-01-18 Thread Magnus Hagander
On Wed, Jan 18, 2017 at 5:49 AM, Michael Paquier wrote: > On Tue, Jan 17, 2017 at 8:45 PM, Magnus Hagander > wrote: > > On Tue, Jan 17, 2017 at 8:25 AM, Michael Paquier < > michael.paqu...@gmail.com> > > wrote: > >> On Sun, Dec 18, 2016 at 1:27

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Robert Haas
On Tue, Jan 17, 2017 at 5:31 PM, Stephen Frost wrote: > If I'm understanding your concern correctly, you're worried about the > case of a cold standby where the database is only replaying WAL but not > configured to come up as a hot standby and therefore PQping() won't ever >

Re: [HACKERS] Declarative partitioning - another take

2017-01-18 Thread Robert Haas
On Wed, Jan 18, 2017 at 3:12 PM, Robert Haas wrote: > On Tue, Jan 10, 2017 at 6:06 AM, Amit Langote > wrote: >> [ updated patches ] > > I committed 0004 and also fixed the related regression test not to > rely on DROP .. CASCADE, which isn't

Re: [HACKERS] Declarative partitioning vs. BulkInsertState

2017-01-18 Thread Robert Haas
On Wed, Jan 11, 2017 at 10:53 PM, Amit Langote wrote: > On 2017/01/06 20:23, Amit Langote wrote: >> On 2017/01/05 3:26, Robert Haas wrote: >>> It's unclear to me why we need to do 0002. It doesn't seem like it >>> should be necessary, it doesn't seem like a good

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Tom Lane
Andres Freund writes: > Yea, have something lying around. Let me push it then when I get back from > lunch? Sure, no sweat. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
* Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 1/18/17 8:25 AM, Stephen Frost wrote: > > I was actually thinking about it the other way- start out by changing > > them to both be 5m and then document next to checkpoint_timeout (and > > max_wal_size, perhaps...) that if you go

Re: [HACKERS] Declarative partitioning - another take

2017-01-18 Thread Robert Haas
On Tue, Jan 10, 2017 at 6:06 AM, Amit Langote wrote: > [ updated patches ] I committed 0004 and also fixed the related regression test not to rely on DROP .. CASCADE, which isn't always stable. The remainder of this patch set needs a rebase, and perhaps you could

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Andres Freund
Hi, On January 18, 2017 12:00:12 PM PST, Tom Lane wrote: >Andres Freund writes: >> On 2017-01-18 14:24:12 -0500, Tom Lane wrote: >>> So I think we can push this patch now and get on with the downstream >>> patches. Do you want to do the honors, or shall

[HACKERS] [PATCH] fix typo in commit a4523c5

2017-01-18 Thread Nikita Glukhov
Attached patch fixes typo in regression test src/test/regress/sql/create_index.sql that was introduced in commit a4523c5 ("Improve planning of btree index scans using ScalarArrayOpExpr quals."). In this commit the following lines were added to create_index.sql: SET enable_indexonlyscan = OFF;

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Peter Eisentraut
On 1/18/17 8:25 AM, Stephen Frost wrote: > I was actually thinking about it the other way- start out by changing > them to both be 5m and then document next to checkpoint_timeout (and > max_wal_size, perhaps...) that if you go changing those parameters (eg: > bumping up checkpoint_timeout to 30

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Tom Lane
Andres Freund writes: > On 2017-01-18 14:24:12 -0500, Tom Lane wrote: >> So I think we can push this patch now and get on with the downstream >> patches. Do you want to do the honors, or shall I? > Whatever you prefer - either way, I'll go on to rebasing the cleanup > patch

Re: [HACKERS] Logical replication existing data copy

2017-01-18 Thread Petr Jelinek
On 18/01/17 17:35, Erik Rijkers wrote: > On 2017-01-18 14:46, Petr Jelinek wrote: > >> 0001-Logical-replication-support-for-initial-data-copy-v2.patch > > Applies and builds fine on top of the previous 5 patches. > > Two problems: > > 1. alter_subscription.sgml has an unpaired -tag, which

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Andres Freund
Hi, On 2017-01-18 14:24:12 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2017-01-18 08:43:24 -0500, Tom Lane wrote: > >> ... except for one thing. The more I look at it, > >> the more disturbed I am by the behavioral change shown in rangefuncs.out > >> --- that's the

Re: [HACKERS] Declarative partitioning vs. information_schema

2017-01-18 Thread Robert Haas
On Tue, Jan 10, 2017 at 4:17 AM, Amit Langote wrote: > On 2017/01/10 14:44, Keith Fiske wrote: >> Is there any reason for the exclusion of parent tables from the pg_tables >> system catalog view? They do not show up in information_schema.tables as >> well. I believe

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Tom Lane
Andres Freund writes: > On 2017-01-18 08:43:24 -0500, Tom Lane wrote: >> ... except for one thing. The more I look at it, >> the more disturbed I am by the behavioral change shown in rangefuncs.out >> --- that's the SRF-in-one-arm-of-CASE issue. > I'm fine with leaving it as

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Andres Freund
Hi, On 2017-01-18 08:43:24 -0500, Tom Lane wrote: > I did a review pass over 0001 and 0002. I think the attached updated > version is committable Cool. > ... except for one thing. The more I look at it, > the more disturbed I am by the behavioral change shown in rangefuncs.out > --- that's

Re: [HACKERS] Parallel Index Scans

2017-01-18 Thread Robert Haas
On Mon, Jan 16, 2017 at 7:11 AM, Amit Kapila wrote: > Fixed. With respect to the second patch (parallel_index_opt_exec_support_v4.patch), I'm hoping it can use the new function from Dilip's bitmap heap scan patch set. See commit 716c7d4b242f0a64ad8ac4dc48c6fed6557ba12c.

Re: [HACKERS] Parallel bitmap heap scan

2017-01-18 Thread Robert Haas
On Wed, Jan 18, 2017 at 12:14 AM, Dilip Kumar wrote: > On Fri, Jan 13, 2017 at 6:36 PM, Dilip Kumar wrote: >> >> Please verify with the new patch. > > Patch 0001 and 0003 required to rebase on the latest head. 0002 is > still the same. I've

Re: [HACKERS] PoC: Grouped base relation

2017-01-18 Thread Robert Haas
On Tue, Jan 17, 2017 at 11:33 PM, Ashutosh Bapat wrote: > I don't think aggcombinefn isn't there because we couldn't write it > for array_agg() or string_agg(). I guess, it won't be efficient to > have those aggregates combined across parallel workers. I think

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-18 Thread Karl O. Pinc
On Wed, 18 Jan 2017 11:08:23 -0600 "Karl O. Pinc" wrote: > Hi Micheal, > > On Wed, 18 Jan 2017 10:26:43 -0600 > "Karl O. Pinc" wrote: > > > > v26 patch attached which fixes this. > > I was glancing over the changes to the documentation > you made between the

Re: [HACKERS] Function transform optimizations versus reality

2017-01-18 Thread Robert Haas
On Wed, Jan 18, 2017 at 12:10 PM, Tom Lane wrote: > More generally, this is the second serious bug we've found in the last > month in the "transform" optimizations (see also bug #14479 and commit > f0774abde). I'm starting to get the feeling that that idea was an > attractive

Re: [HACKERS] increasing the default WAL segment size

2017-01-18 Thread Robert Haas
On Tue, Jan 17, 2017 at 8:54 PM, Michael Paquier wrote: > I think that we could get a committer look at that at the least. This is sort of awkward, because it would be nice to reuse the code for the existing SHOW command rather than reinventing the wheel, but it's not

[HACKERS] Function transform optimizations versus reality

2017-01-18 Thread Tom Lane
I looked into bug #14504, https://www.postgresql.org/message-id/20170118144828.1432.52...@wrigleys.postgresql.org The problem is that timestamp_zone_transform() has the cute idea that it can simplify timezone('UTC', timestamptzvalue) into a RelabelType that claims the timestamptzvalue is just

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-18 Thread Karl O. Pinc
Hi Micheal, On Wed, 18 Jan 2017 10:26:43 -0600 "Karl O. Pinc" wrote: > > v26 patch attached which fixes this. I was glancing over the changes to the documentation you made between the v22 and v25 and from looking at the diffs it seems the format of the current_logfiles file

Re: [HACKERS] Logical replication existing data copy

2017-01-18 Thread Erik Rijkers
On 2017-01-18 14:46, Petr Jelinek wrote: 0001-Logical-replication-support-for-initial-data-copy-v2.patch Applies and builds fine on top of the previous 5 patches. Two problems: 1. alter_subscription.sgml has an unpaired -tag, which breaks the doc-build: This is the offending patch-line:

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-18 Thread Karl O. Pinc
On Wed, 18 Jan 2017 10:11:20 -0600 "Karl O. Pinc" wrote: > You must write > errcode(ERRCODE_INTERNAL_ERROR) > instead of just > ERRCODE_INTERNAL_ERROR > > If you don't you get back 01000 for the error code. > v26 patch attached which fixes this. Attached are revised

Re: [HACKERS] PSQL commands: \quit_if, \quit_unless

2017-01-18 Thread Corey Huinker
On Wed, Jan 18, 2017 at 12:08 AM, Michael Paquier wrote: > On Wed, Jan 18, 2017 at 3:24 AM, Robert Haas > wrote: > > On Sat, Jan 14, 2017 at 12:22 AM, Tom Lane wrote: > >> > >> $ cat loop.sql > >> \if :x < 1000 > >> \echo

Re: [HACKERS] move collation import to backend

2017-01-18 Thread Tom Lane
Jeff Janes writes: > With this commit, I'm getting 'make check' fail at initdb with the error: > 2017-01-18 07:47:50.565 PST [43691] FATAL: collation "aa_ER@saaho" for > encoding "UTF8" already exists Yeah, so are large chunks of the buildfarm. Having now read the patch,

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-18 Thread Karl O. Pinc
On Wed, 18 Jan 2017 13:26:46 +0900 Michael Paquier wrote: > On Wed, Jan 18, 2017 at 11:36 AM, Karl O. Pinc wrote: > > On Wed, 18 Jan 2017 11:08:25 +0900 > > Michael Paquier wrote: > > > >> Our ideas rather map here,

Re: [HACKERS] Parallel Index Scans

2017-01-18 Thread Robert Haas
On Wed, Jan 18, 2017 at 8:03 AM, Amit Kapila wrote: > On Tue, Jan 17, 2017 at 11:27 PM, Robert Haas wrote: >> On Mon, Jan 16, 2017 at 7:11 AM, Amit Kapila wrote: >> WAIT_EVENT_PARALLEL_INDEX_SCAN is in fact btree-specific.

Re: [HACKERS] move collation import to backend

2017-01-18 Thread Jeff Janes
On Tue, Jan 17, 2017 at 9:05 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 1/9/17 10:04 PM, Euler Taveira wrote: > > On 18-12-2016 18:30, Peter Eisentraut wrote: > >> Updated patch with that fix. > >> > > Peter, I reviewed and improved your patch. > > > > * I document the

Re: [HACKERS] pageinspect: Hash index support

2017-01-18 Thread Jesper Pedersen
Hi, On 01/18/2017 04:54 AM, Ashutosh Sharma wrote: Is there a reason for keeping the input arguments for hash_bitmap_info() different from hash_page_items()? Yes, there are two reasons behind it. Firstly, we need metapage to identify the bitmap page that holds the information about the

Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal

2017-01-18 Thread Vladimir Rusinov
On Wed, Jan 18, 2017 at 12:28 PM, Michael Paquier wrote: > On Wed, Jan 18, 2017 at 8:15 PM, Vladimir Rusinov > wrote: > > On the topic of binaries, there's going to be another patch renaming > them. > > Those will have no aliases as it's trivial

Re: [HACKERS] References to arbitrary database objects that are suitable for pg_dump

2017-01-18 Thread Alvaro Herrera
Jim Nasby wrote: > Is there anything that will translate an object identity (as returned by > pg_event_trigger_ddl_commands) into class/object/subobject OIDs? If I had > that, I could use it to track objects by OID (like pg_depend does), as well > as storing the text representation. That way I

Re: [HACKERS] Improving RLS planning

2017-01-18 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> Thanks for the review. Attached is an updated patch that I believe >> addresses all of the review comments so far. The code is unchanged from >> v2, but I improved the README, some comments, and the regression

Re: [HACKERS] emergency outage requiring database restart

2017-01-18 Thread Merlin Moncure
On Wed, Jan 18, 2017 at 4:11 AM, Ants Aasma wrote: > On Wed, Jan 4, 2017 at 5:36 PM, Merlin Moncure wrote: >> Still getting checksum failures. Over the last 30 days, I see the >> following. Since enabling checksums FWICT none of the damage is >>

Re: [HACKERS] Parallel Index Scans

2017-01-18 Thread Amit Kapila
On Wed, Jan 18, 2017 at 6:25 AM, Haribabu Kommi wrote: > > > On Mon, Jan 16, 2017 at 11:11 PM, Amit Kapila > wrote: >> > > + * index_beginscan_parallel - join parallel index scan > > The name and the description doesn't sync properly, any better

Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

2017-01-18 Thread Tom Lane
I did a review pass over 0001 and 0002. I think the attached updated version is committable ... except for one thing. The more I look at it, the more disturbed I am by the behavioral change shown in rangefuncs.out --- that's the SRF-in-one-arm-of-CASE issue. (The changes in tsrf.out are fine

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
Michael, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Wed, Jan 18, 2017 at 10:35 AM, Michael Paquier > wrote: > > On Wed, Jan 18, 2017 at 7:31 AM, Stephen Frost wrote: > >> Perhaps we need a way for pg_ctl to realize a cold-standby

  1   2   >