Re: [HACKERS] StandbyRecoverPreparedTransactions recovers subtrans links incorrectly

2017-04-24 Thread Simon Riggs
On 23 April 2017 at 17:17, Tom Lane wrote: > Simon Riggs writes: >>> Also, when I fix that, it gets further but still crashes at the same >>> Assert in SubTransSetParent. The proximate cause this time seems to be >>> that RecoverPreparedTransactions's calculation of overwriteOK is wrong: >>> it'

[HACKERS] Separation walsender & normal backends

2017-04-24 Thread Andres Freund
Hi, I've for a while suspected that the separation & duplication of infrastructure between walsenders and normal backends isn't nice. But looking at the code changes in v10 drove that home quite a bit. The major changes in this area are 1) d1ecd539477fe640455dc890216a7c1561e047b4 - Add a SHOW co

Re: [HACKERS] Patch - Tcl 8.6 version support for PostgreSQL

2017-04-24 Thread Michael Paquier
On Tue, Apr 25, 2017 at 2:57 PM, Andres Freund wrote: > Any chance of formulating these in a version agnostic way, instead of > copying the same stanza for every version? E.g. using a wildcard or > such... Using glob() would be enough for this purpose. -- Michael -- Sent via pgsql-hackers ma

Re: [HACKERS] Adding support for Default partition in partitioning

2017-04-24 Thread Amit Langote
On 2017/04/25 14:20, Ashutosh Bapat wrote: > On Tue, Apr 25, 2017 at 1:46 AM, Robert Haas wrote: >> On Mon, Apr 24, 2017 at 8:14 AM, Ashutosh Bapat >> wrote: >>> On Mon, Apr 24, 2017 at 4:24 PM, Robert Haas wrote: On Mon, Apr 24, 2017 at 5:10 AM, Rahila Syed wrote: > Following ca

Re: [HACKERS] Patch - Tcl 8.6 version support for PostgreSQL

2017-04-24 Thread Andres Freund
Hi, On 2017-04-22 23:28:49 +0530, Sandeep Thakkar wrote: > diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm > index 304edf9..d3ef89f 100644 > --- a/src/tools/msvc/Mkvcbuild.pm > +++ b/src/tools/msvc/Mkvcbuild.pm > @@ -253,7 +253,12 @@ sub mkvcbuild > $solution

Re: [HACKERS] Patch - Tcl 8.6 version support for PostgreSQL

2017-04-24 Thread Sandeep Thakkar
On Tue, Apr 25, 2017 at 1:59 AM, Dave Page wrote: > > > On Mon, Apr 24, 2017 at 9:26 PM, Andres Freund wrote: > >> On 2017-04-24 16:18:30 -0400, Robert Haas wrote: >> > On Sat, Apr 22, 2017 at 1:58 PM, Sandeep Thakkar < >> > sandeep.thak...@enterprisedb.com> wrote: >> > >> > > Tcl8.6 is already

Re: [HACKERS] Unportable implementation of background worker start

2017-04-24 Thread Rémi Zara
> Le 25 avr. 2017 à 01:47, Tom Lane a écrit : > > I wrote: >> What I'm inclined to do is to revert the pselect change but not the other, >> to see if that fixes these two animals. If it does, we could look into >> blacklisting these particular platforms when choosing pselect. > > It looks like

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Michael Paquier
On Tue, Apr 25, 2017 at 10:54 AM, Bruce Momjian wrote: > On Tue, Apr 25, 2017 at 03:45:52AM +0200, Andreas Karlsson wrote: >> On 04/25/2017 03:31 AM, Bruce Momjian wrote: >> >I have committed the first draft of the Postgres 10 release notes. They >> >are current as of two days ago, and I will kee

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Ashutosh Bapat
Commit f9b1a0dd403ec0931213c66d5f979a3d3e8e7e30 mentions "Ashutosh Bapat" as author, which is not reflected in the release notes -- Allow explicit control over EXPLAIN's display of planning and execution time (Stephen Frost) By default planning and execution is display by EXPLAIN ANALYZE and not

Re: [HACKERS] OK, so culicidae is *still* broken

2017-04-24 Thread Heikki Linnakangas
On 04/24/2017 09:50 PM, Andres Freund wrote: On 2017-04-24 14:43:11 -0400, Tom Lane wrote: (We have accepted that kind of overhead for DSM segments, but the intention I think is to allow only very trivial data structures in the DSM segments. Losing compiler pointer type checking for data struct

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-24 Thread Ashutosh Bapat
On Tue, Apr 25, 2017 at 8:20 AM, Peter Eisentraut wrote: > On 4/14/17 00:24, Ashutosh Bapat wrote: >> This looks better. Here are patches for master and 9.6. >> Since join pushdown was supported in 9.6 the patch should be >> backported to 9.6 as well. Attached is the patch (_96) for 9.6, >> create

Re: [HACKERS] Adding support for Default partition in partitioning

2017-04-24 Thread Ashutosh Bapat
On Tue, Apr 25, 2017 at 1:46 AM, Robert Haas wrote: > On Mon, Apr 24, 2017 at 8:14 AM, Ashutosh Bapat > wrote: >> On Mon, Apr 24, 2017 at 4:24 PM, Robert Haas wrote: >>> On Mon, Apr 24, 2017 at 5:10 AM, Rahila Syed wrote: Following can also be considered as it specifies more clearly that t

Re: [HACKERS] scram and \password

2017-04-24 Thread Michael Paquier
On Sat, Apr 22, 2017 at 7:20 AM, Michael Paquier wrote: > Do we really want to add a new function or have a hard failure? Any > application calling PQencryptPassword may trap itself silently if the > server uses scram as hba key or if the default is switched to that, > from this point of view exte

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Petr Jelinek
On 25/04/17 03:31, Bruce Momjian wrote: > I have committed the first draft of the Postgres 10 release notes. They > are current as of two days ago, and I will keep them current. Please > give me any feedback you have. > Cool! > The only unusual thing is that this release has ~180 items while m

Re: [HACKERS] walsender & parallelism

2017-04-24 Thread Petr Jelinek
On 25/04/17 01:25, Andres Freund wrote: > Hi, > > On 2017-04-24 07:31:18 +0200, Petr Jelinek wrote: >> The previous coding tried to run the unknown string throur lexer which >> could fail for some valid SQL statements as the replication command >> parser is too simple to handle all the complexitie

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Amit Langote
On 2017/04/25 10:31, Bruce Momjian wrote: > I have committed the first draft of the Postgres 10 release notes. They > are current as of two days ago, and I will keep them current. Please > give me any feedback you have. > > The only unusual thing is that this release has ~180 items while most >

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Rafia Sabih
On Tue, Apr 25, 2017 at 9:15 AM, Tom Lane wrote: > Andres Freund writes: >> On 2017-04-24 23:37:42 -0400, Bruce Momjian wrote: >>> I remember seeing those and those are normally details I do not put in >>> the release notes as there isn't a clear user experience change except >>> "Postgres is fas

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread David Rowley
..On 25 April 2017 at 13:31, Bruce Momjian wrote: > The only unusual thing is that this release has ~180 items while most > recent release have had ~220. The pattern I see that there are more > large features in this release than previous ones. Thanks for drafting this up. I understand that it

[HACKERS] Link to commits in PG 10 release notes

2017-04-24 Thread Andres Freund
Hi, I wonder if there's a reasonable way that allows to add links to the more crucial commits for changelog entries. The source e.g. has Support parallel bitmap heap scans (Dilip Kumar) This allows a single index scan to dispatch parallel workers to process different areas of the heap. f

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Andres Freund
On 2017-04-24 23:45:06 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-04-24 23:37:42 -0400, Bruce Momjian wrote: > >> I remember seeing those and those are normally details I do not put in > >> the release notes as there isn't a clear user experience change except > >> "Postgres is fas

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Tom Lane
Andres Freund writes: > On 2017-04-24 23:37:42 -0400, Bruce Momjian wrote: >> I remember seeing those and those are normally details I do not put in >> the release notes as there isn't a clear user experience change except >> "Postgres is faster". Yeah, a bummer, and I can change my filter, but >

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Andres Freund
On 2017-04-24 23:37:42 -0400, Bruce Momjian wrote: > On Mon, Apr 24, 2017 at 08:36:00PM -0700, Andres Freund wrote: > > On 2017-04-24 21:31:44 -0400, Bruce Momjian wrote: > > > I have committed the first draft of the Postgres 10 release notes. They > > > are current as of two days ago, and I will

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Bruce Momjian
On Mon, Apr 24, 2017 at 08:36:00PM -0700, Andres Freund wrote: > On 2017-04-24 21:31:44 -0400, Bruce Momjian wrote: > > I have committed the first draft of the Postgres 10 release notes. They > > are current as of two days ago, and I will keep them current. Please > > give me any feedback you hav

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Andres Freund
On 2017-04-24 21:31:44 -0400, Bruce Momjian wrote: > I have committed the first draft of the Postgres 10 release notes. They > are current as of two days ago, and I will keep them current. Please > give me any feedback you have. > > The only unusual thing is that this release has ~180 items whil

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Amit Kapila
On Tue, Apr 25, 2017 at 8:35 AM, Bruce Momjian wrote: > On Tue, Apr 25, 2017 at 08:30:50AM +0530, Amit Kapila wrote: >> On Tue, Apr 25, 2017 at 7:01 AM, Bruce Momjian wrote: >> > I have committed the first draft of the Postgres 10 release notes. They >> > are current as of two days ago, and I wi

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Bruce Momjian
On Mon, Apr 24, 2017 at 11:05:41PM -0400, Bruce Momjian wrote: > > I think the above commit needs a separate mention, as this is a really > > huge step forward to control the size of hash indexes. > > Yes, it is unfotunate that the item is in the incompatibility item. I > wonder if I should split

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 08:36:38AM +0530, Amit Kapila wrote: > On Tue, Apr 25, 2017 at 8:30 AM, Amit Kapila wrote: > > On Tue, Apr 25, 2017 at 7:01 AM, Bruce Momjian wrote: > >> I have committed the first draft of the Postgres 10 release notes. They > >> are current as of two days ago, and I wil

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Amit Kapila
On Tue, Apr 25, 2017 at 8:30 AM, Amit Kapila wrote: > On Tue, Apr 25, 2017 at 7:01 AM, Bruce Momjian wrote: >> I have committed the first draft of the Postgres 10 release notes. They >> are current as of two days ago, and I will keep them current. Please >> give me any feedback you have. >> > >

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 08:30:50AM +0530, Amit Kapila wrote: > On Tue, Apr 25, 2017 at 7:01 AM, Bruce Momjian wrote: > > I have committed the first draft of the Postgres 10 release notes. They > > are current as of two days ago, and I will keep them current. Please > > give me any feedback you h

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Amit Kapila
On Tue, Apr 25, 2017 at 7:01 AM, Bruce Momjian wrote: > I have committed the first draft of the Postgres 10 release notes. They > are current as of two days ago, and I will keep them current. Please > give me any feedback you have. > Some of the items which I feel could be added: 5e6d8d2bbbcac

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-04-24 Thread Peter Eisentraut
On 4/14/17 00:24, Ashutosh Bapat wrote: > This looks better. Here are patches for master and 9.6. > Since join pushdown was supported in 9.6 the patch should be > backported to 9.6 as well. Attached is the patch (_96) for 9.6, > created by rebasing on 9.6 branch and removing conflict. _v6 is > appl

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread 'Bruce Momjian'
All fixed, thanks. --- On Tue, Apr 25, 2017 at 02:40:23AM +, Tsunakawa, Takayuki wrote: > Hello, Bruce > > > From: pgsql-hackers-ow...@postgresql.org > > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Bruce Mo

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Tsunakawa, Takayuki
Hello, Bruce > From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Bruce Momjian > I have committed the first draft of the Postgres 10 release notes. They > are current as of two days ago, and I will keep them current. Please give > me any feedback

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Bruce Momjian
On Tue, Apr 25, 2017 at 03:45:52AM +0200, Andreas Karlsson wrote: > On 04/25/2017 03:31 AM, Bruce Momjian wrote: > >I have committed the first draft of the Postgres 10 release notes. They > >are current as of two days ago, and I will keep them current. Please > >give me any feedback you have. >

Re: [HACKERS] PG 10 release notes

2017-04-24 Thread Andreas Karlsson
On 04/25/2017 03:31 AM, Bruce Momjian wrote: I have committed the first draft of the Postgres 10 release notes. They are current as of two days ago, and I will keep them current. Please give me any feedback you have. This item is incorrectly attributed to me. I was only the reviewer, Peter i

[HACKERS] PG 10 release notes

2017-04-24 Thread Bruce Momjian
I have committed the first draft of the Postgres 10 release notes. They are current as of two days ago, and I will keep them current. Please give me any feedback you have. The only unusual thing is that this release has ~180 items while most recent release have had ~220. The pattern I see that

Re: [HACKERS] pgrowlocks relkind check

2017-04-24 Thread Amit Langote
Hi Stephen, On 2017/04/11 22:17, Stephen Frost wrote: >> create extension pgrowlocks; >> create view one as select 1; >> select pgrowlocks('one'); >> -- ERROR: could not open file "base/68730/68748": No such file or directory >> >> With the attached patch: >> >> select pgrowlocks('one'); >> ERROR

Re: [HACKERS] some review comments on logical rep code

2017-04-24 Thread Masahiko Sawada
On Mon, Apr 24, 2017 at 7:57 PM, Kyotaro HORIGUCHI wrote: > Hello, > > At Mon, 24 Apr 2017 11:18:32 +0900, Masahiko Sawada > wrote in >> >> BEGIN; >> >> ALTER SUBSCRIPTION hoge_sub ENABLE; >> >> PREPARE TRANSACTION 'g'; >> >> BEGIN; >> >> SELECT 1; >> >> COMMIT; -- wake up the launcher at this

Re: [HACKERS] PG_GETARG_GISTENTRY?

2017-04-24 Thread Noah Misch
On Mon, Apr 24, 2017 at 09:25:25AM -0700, Mark Dilger wrote: > Here is a small patch for the next open commitfest which handles a case > that Noah's commits 9d7726c2ba06b932f791f2d0cc5acf73cc0b4dca and > 3a0d473192b2045cbaf997df8437e7762d34f3ba apparently missed. The scope for those commits was wr

[HACKERS] warning in twophase.c

2017-04-24 Thread Amit Langote
Been seeing this warning recently: twophase.c: In function ‘RecoverPreparedTransactions’: twophase.c:1916:9: warning: variable ‘overwriteOK’ set but not used [-Wunused-but-set-variable] bool overwriteOK = false; ^~~ As the message says, the value of overwriteOK is not used an

Re: [HACKERS] Adding support for Default partition in partitioning

2017-04-24 Thread Amit Langote
On 2017/04/25 5:16, Robert Haas wrote: > On Mon, Apr 24, 2017 at 8:14 AM, Ashutosh Bapat > wrote: >> On Mon, Apr 24, 2017 at 4:24 PM, Robert Haas wrote: >>> On Mon, Apr 24, 2017 at 5:10 AM, Rahila Syed wrote: Following can also be considered as it specifies more clearly that the partit

Re: [HACKERS] Quorum commit for multiple synchronous replication.

2017-04-24 Thread Masahiko Sawada
On Tue, Apr 25, 2017 at 12:56 AM, Fujii Masao wrote: > On Mon, Apr 24, 2017 at 9:02 AM, Noah Misch wrote: >> On Thu, Apr 20, 2017 at 11:34:34PM -0700, Noah Misch wrote: >>> On Fri, Apr 21, 2017 at 01:20:05PM +0900, Masahiko Sawada wrote: >>> > On Fri, Apr 21, 2017 at 12:02 PM, Noah Misch wrote:

Re: [HACKERS] OK, so culicidae is *still* broken

2017-04-24 Thread Craig Ringer
On 25 Apr. 2017 02:51, "Andres Freund" wrote: On 2017-04-24 11:08:48 -0700, Andres Freund wrote: > On 2017-04-24 23:14:40 +0800, Craig Ringer wrote: > > In the long run we'll probably be forced toward threading or far pointers. > > I'll vote for removing the windows port, before going for that.

Re: [HACKERS] Unportable implementation of background worker start

2017-04-24 Thread Tom Lane
I wrote: > What I'm inclined to do is to revert the pselect change but not the other, > to see if that fixes these two animals. If it does, we could look into > blacklisting these particular platforms when choosing pselect. It looks like coypu is going to need manual intervention (ie, kill -9 on

Re: [HACKERS] walsender & parallelism

2017-04-24 Thread Andres Freund
Hi, On 2017-04-24 07:31:18 +0200, Petr Jelinek wrote: > The previous coding tried to run the unknown string throur lexer which > could fail for some valid SQL statements as the replication command > parser is too simple to handle all the complexities of SQL language. > > Instead just fall back to

Re: [HACKERS] snapbuild woes

2017-04-24 Thread Petr Jelinek
On 25/04/17 00:59, Andres Freund wrote: > Hi, > > On 2017-04-15 05:18:49 +0200, Petr Jelinek wrote: >> Hi, here is updated patch (details inline). > > I'm not yet all that happy, sorry: > > Looking at 0001: > - GetOldestSafeDecodingTransactionId() only guarantees to return an xid > safe for d

Re: [HACKERS] snapbuild woes

2017-04-24 Thread Andres Freund
Hi, On 2017-04-15 05:18:49 +0200, Petr Jelinek wrote: > Hi, here is updated patch (details inline). I'm not yet all that happy, sorry: Looking at 0001: - GetOldestSafeDecodingTransactionId() only guarantees to return an xid safe for decoding (note how procArray->replication_slot_catalog_xmin

Re: [HACKERS] [COMMITTERS] pgsql: Replication lag tracking for walsenders

2017-04-24 Thread Andres Freund
On 2017-04-24 15:41:25 -0700, Mark Dilger wrote: > The recent fix in 546c13e11b29a5408b9d6a6e3cca301380b47f7f has local variable > overwriteOK > assigned but not used in twophase.c RecoverPreparedTransactions(void). I'm > not sure if that's > future-proofing or an oversight. It seems to be used

Re: [HACKERS] [COMMITTERS] pgsql: Replication lag tracking for walsenders

2017-04-24 Thread Mark Dilger
> On Apr 23, 2017, at 7:53 PM, Tom Lane wrote: > > Thomas Munro writes: >> On Sun, Apr 23, 2017 at 6:01 PM, Tom Lane wrote: >>> Fair enough. But I'd still like an explanation of why only about >>> half of the population is showing a failure here. Seems like every >>> machine should be seeing

Re: [HACKERS] Unportable implementation of background worker start

2017-04-24 Thread Tom Lane
Andres Freund writes: > On 2017-04-24 18:14:41 -0400, Tom Lane wrote: >> A bit of googling establishes that NetBSD 5.1 has a broken pselect >> implementation: >> >> http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=43625 > Yikes. Do I understand correctly that they effectively just mapp

Re: [HACKERS] Unportable implementation of background worker start

2017-04-24 Thread Andres Freund
On 2017-04-24 18:14:41 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-04-24 17:33:39 -0400, Tom Lane wrote: > >> coypu's problem is unrelated: > > > Note I was linking the 9.6 report form coypu, not HEAD. Afaics the 9.6 > > failure is the same as gharial's mode of failure. > > [ look

Re: [HACKERS] Unportable implementation of background worker start

2017-04-24 Thread Tom Lane
Andres Freund writes: > On 2017-04-24 17:33:39 -0400, Tom Lane wrote: >> coypu's problem is unrelated: > Note I was linking the 9.6 report form coypu, not HEAD. Afaics the 9.6 > failure is the same as gharial's mode of failure. [ looks closer... ] Oh: the 9.6 run occurred first, and the failure

Re: [HACKERS] walsender & parallelism

2017-04-24 Thread Petr Jelinek
On 24/04/17 20:00, Andres Freund wrote: > On 2017-04-24 18:29:51 +0200, Petr Jelinek wrote: >> On 24/04/17 07:42, Andres Freund wrote: >>> >>> >>> On April 23, 2017 10:31:18 PM PDT, Petr Jelinek >>> wrote: On 24/04/17 04:31, Petr Jelinek wrote: So actually maybe running regression tests

Re: [HACKERS] Unportable implementation of background worker start

2017-04-24 Thread Andres Freund
On 2017-04-24 17:33:39 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-04-24 13:16:44 -0700, Andres Freund wrote: > >> Unclear if related, but > >> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=gharial&dt=2017-04-24%2019%3A30%3A42 > >> has a suspicious timing of failing in a w

Re: [HACKERS] Unportable implementation of background worker start

2017-04-24 Thread Tom Lane
Andres Freund writes: > On 2017-04-24 13:16:44 -0700, Andres Freund wrote: >> Unclear if related, but >> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=gharial&dt=2017-04-24%2019%3A30%3A42 >> has a suspicious timing of failing in a weird way. > Given that gharial is also failing on 9.6 (

Re: [HACKERS] DELETE and UPDATE with LIMIT and ORDER BY

2017-04-24 Thread Jeff Janes
On Mon, Apr 24, 2017 at 8:09 AM, Surafel Temesgen wrote: > the necessity of allowing limit and order by clause to be used with delete > and > update statement is discussed in the past and added to the todo list > > preveouse mailing list descissions > > http://archives.postgresql.org/pgadmin-hac

Re: [HACKERS] to-do item for explain analyze of hash aggregates?

2017-04-24 Thread Andres Freund
On 2017-04-24 21:13:16 +0200, Tomas Vondra wrote: > On 04/24/2017 08:52 PM, Andres Freund wrote: > > On 2017-04-24 11:42:12 -0700, Jeff Janes wrote: > > > The explain analyze of the hash step of a hash join reports something like > > > this: > > > > > >-> Hash (cost=458287.68..458287.68 rows=

Re: [HACKERS] to-do item for explain analyze of hash aggregates?

2017-04-24 Thread Andres Freund
On 2017-04-24 13:55:57 -0700, Jeff Janes wrote: > On Mon, Apr 24, 2017 at 12:13 PM, Tomas Vondra I've added it to the wiki Todo page. (Hopefully that has not doomed it to > be forgotten about) The easiest way to avoid that fate is to implement it yourself ;) -- Sent via pgsql-hackers mailing

Re: [HACKERS] to-do item for explain analyze of hash aggregates?

2017-04-24 Thread Tomas Vondra
On 04/24/2017 10:55 PM, Jeff Janes wrote: On Mon, Apr 24, 2017 at 12:13 PM, Tomas Vondra mailto:tomas.von...@2ndquadrant.com>> wrote: On 04/24/2017 08:52 PM, Andres Freund wrote: ... I've wanted that too. It's not impossible at all. Why wouldn't that be possible? We probably

Re: [HACKERS] to-do item for explain analyze of hash aggregates?

2017-04-24 Thread Jeff Janes
On Mon, Apr 24, 2017 at 12:13 PM, Tomas Vondra wrote: > On 04/24/2017 08:52 PM, Andres Freund wrote: > >> On 2017-04-24 11:42:12 -0700, Jeff Janes wrote: >> >>> The explain analyze of the hash step of a hash join reports something >>> like >>> this: >>> >>>-> Hash (cost=458287.68..458287.68

Re: [HACKERS] pgbench tap tests & minor fixes

2017-04-24 Thread Nikolay Shaplov
В письме от 24 апреля 2017 09:01:18 пользователь Fabien COELHO написал: > > To sum up: > > > > - I agree to add a generic command TestLib & a wrapper in PostgresNode, > > > > instead of having pgbench specific things in the later, then call > > them from pgbench test script. > > > > - I stil

Re: [HACKERS] Patch - Tcl 8.6 version support for PostgreSQL

2017-04-24 Thread Dave Page
On Mon, Apr 24, 2017 at 9:26 PM, Andres Freund wrote: > On 2017-04-24 16:18:30 -0400, Robert Haas wrote: > > On Sat, Apr 22, 2017 at 1:58 PM, Sandeep Thakkar < > > sandeep.thak...@enterprisedb.com> wrote: > > > > > Tcl8.6 is already supported in PostgreSQL. > > > > > > > What commit added support

Re: [HACKERS] Patch - Tcl 8.6 version support for PostgreSQL

2017-04-24 Thread Andres Freund
On 2017-04-24 16:18:30 -0400, Robert Haas wrote: > On Sat, Apr 22, 2017 at 1:58 PM, Sandeep Thakkar < > sandeep.thak...@enterprisedb.com> wrote: > > > Tcl8.6 is already supported in PostgreSQL. > > > > What commit added support for it? I don't think the main build mechanism requires explicit sup

Re: [HACKERS] Unportable implementation of background worker start

2017-04-24 Thread Andres Freund
On 2017-04-24 13:16:44 -0700, Andres Freund wrote: > Unclear if related, but > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=gharial&dt=2017-04-24%2019%3A30%3A42 > has a suspicious timing of failing in a weird way. Given that gharial is also failing on 9.6 (same set of commits) and coypu

Re: [HACKERS] Patch - Tcl 8.6 version support for PostgreSQL

2017-04-24 Thread Robert Haas
On Sat, Apr 22, 2017 at 1:58 PM, Sandeep Thakkar < sandeep.thak...@enterprisedb.com> wrote: > Tcl8.6 is already supported in PostgreSQL. > What commit added support for it? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] Adding support for Default partition in partitioning

2017-04-24 Thread Robert Haas
On Mon, Apr 24, 2017 at 8:14 AM, Ashutosh Bapat wrote: > On Mon, Apr 24, 2017 at 4:24 PM, Robert Haas wrote: >> On Mon, Apr 24, 2017 at 5:10 AM, Rahila Syed wrote: >>> Following can also be considered as it specifies more clearly that the >>> partition holds default values. >>> >>> CREATE TABLE

Re: [HACKERS] Unportable implementation of background worker start

2017-04-24 Thread Andres Freund
On 2017-04-21 23:50:41 -0400, Tom Lane wrote: > I wrote: > > Attached is a lightly-tested draft patch that converts the postmaster to > > use a WaitEventSet for waiting in ServerLoop. I've got mixed emotions > > about whether this is the direction to proceed, though. > > Attached are a couple of

Re: [HACKERS] pgbench tap tests & minor fixes

2017-04-24 Thread Nikolay Shaplov
В письме от 23 апреля 2017 22:02:25 пользователь Fabien COELHO написал: > Hello Nikolay, > > >> Hmmm. The pre-existing TAP test in pgbench is about concurrent commits, > >> it > >> is not to test pgbench itself. Pgbench allows to run some programmable > >> clients in parallel very easily, which ca

Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

2017-04-24 Thread Claudio Freire
On Sun, Apr 23, 2017 at 12:41 PM, Robert Haas wrote: >> That's after inlining the compare on both the linear and sequential >> code, and it seems it lets the compiler optimize the binary search to >> the point where it outperforms the sequential search. >> >> That's not the case when the compare i

Re: [HACKERS] DELETE and UPDATE with LIMIT and ORDER BY

2017-04-24 Thread Jeevan Ladhe
Hi Surafel, IIUC, the requirement of the feature also had one of the consideration where one needs to delete large data and that takes long time, and adding LIMIT should reduce the overhead by allowing to delete the data in batches. I did a quick performance test, and in following example you can

Re: [HACKERS] to-do item for explain analyze of hash aggregates?

2017-04-24 Thread Tomas Vondra
On 04/24/2017 08:52 PM, Andres Freund wrote: On 2017-04-24 11:42:12 -0700, Jeff Janes wrote: The explain analyze of the hash step of a hash join reports something like this: -> Hash (cost=458287.68..458287.68 rows=24995368 width=37) (actual rows=24995353 loops=1) Buckets: 33554432

Re: [HACKERS] StandbyRecoverPreparedTransactions recovers subtrans links incorrectly

2017-04-24 Thread Andres Freund
On 2017-04-24 13:29:11 +0100, Simon Riggs wrote: > On 24 April 2017 at 00:25, Andres Freund wrote: > > if the subxid->xid mapping doesn't actually exist - as it's the case > > with this bug afaics - we'll not get the correct toplevel > > transaction. > > The nature of the corruption is that in so

Re: [HACKERS] to-do item for explain analyze of hash aggregates?

2017-04-24 Thread Andres Freund
On 2017-04-24 11:42:12 -0700, Jeff Janes wrote: > The explain analyze of the hash step of a hash join reports something like > this: > >-> Hash (cost=458287.68..458287.68 rows=24995368 width=37) (actual > rows=24995353 loops=1) > Buckets: 33554432 Batches: 1 Memory Usage: 2019630k

Re: [HACKERS] OK, so culicidae is *still* broken

2017-04-24 Thread Andres Freund
On 2017-04-24 11:08:48 -0700, Andres Freund wrote: > On 2017-04-24 23:14:40 +0800, Craig Ringer wrote: > > In the long run we'll probably be forced toward threading or far pointers. > > I'll vote for removing the windows port, before going for that. And I'm > not even joking. Just to clarify: I'

Re: [HACKERS] OK, so culicidae is *still* broken

2017-04-24 Thread Andres Freund
On 2017-04-24 14:43:11 -0400, Tom Lane wrote: > (We have accepted that kind of overhead for DSM segments, but the > intention I think is to allow only very trivial data structures in > the DSM segments. Losing compiler pointer type checking for data > structures like the lock or PGPROC tables woul

Re: [HACKERS] Cached plans and statement generalization

2017-04-24 Thread Andres Freund
Hi, On 2017-04-24 11:46:02 +0300, Konstantin Knizhnik wrote: > So what I am thinking now is implicit query caching. If the same query with > different literal values is repeated many times, then we can try to > generalize this query and replace it with prepared query with > parameters. That's not

Re: [HACKERS] OK, so culicidae is *still* broken

2017-04-24 Thread Tom Lane
Andres Freund writes: > On 2017-04-24 23:14:40 +0800, Craig Ringer wrote: >> In the long run we'll probably be forced toward threading or far pointers. > I'll vote for removing the windows port, before going for that. And I'm > not even joking. Me too. We used to *have* that kind of code, ie r

[HACKERS] to-do item for explain analyze of hash aggregates?

2017-04-24 Thread Jeff Janes
The explain analyze of the hash step of a hash join reports something like this: -> Hash (cost=458287.68..458287.68 rows=24995368 width=37) (actual rows=24995353 loops=1) Buckets: 33554432 Batches: 1 Memory Usage: 2019630kB Should the HashAggregate node also report on Buckets and

Re: [HACKERS] Adding support for Default partition in partitioning

2017-04-24 Thread Jeevan Ladhe
On Mon, Apr 24, 2017 at 5:44 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Mon, Apr 24, 2017 at 4:24 PM, Robert Haas > wrote: > > On Mon, Apr 24, 2017 at 5:10 AM, Rahila Syed > wrote: > >> Following can also be considered as it specifies more clearly that the > >> partition h

Re: [HACKERS] Adding support for Default partition in partitioning

2017-04-24 Thread Jeevan Ladhe
Hi Rahila, I tried to go through your v7 patch, and following are my comments: 1. With -Werrors I see following compilation failure: parse_utilcmd.c: In function ‘transformPartitionBound’: parse_utilcmd.c:3309:4: error: implicit declaration of function ‘isDefaultPartitionBound’ [-Werror=implicit

Re: [HACKERS] OK, so culicidae is *still* broken

2017-04-24 Thread Andres Freund
Hi, On 2017-04-24 14:25:34 +0530, Amit Kapila wrote: > Error code 87 means "invalid parameter". Some googling [1] indicates > such an error occurs if we pass the out-of-range address to > MapViewOfFileEx. Another possible theory is that we must pass the > address as multiple of the system's memor

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-04-24 Thread Robert Haas
On Mon, Apr 24, 2017 at 9:17 AM, Stephen Frost wrote: > I wonder why the restriction is there, which is probably part of the > reason that I'm thinking of phrasing the documentation that way. > > Beyond a matter of round to-its, is there a reason why it couldn't (or > shouldn't) be supported? I'm

Re: [HACKERS] walsender & parallelism

2017-04-24 Thread Andres Freund
On 2017-04-24 18:29:51 +0200, Petr Jelinek wrote: > On 24/04/17 07:42, Andres Freund wrote: > > > > > > On April 23, 2017 10:31:18 PM PDT, Petr Jelinek > > wrote: > >> On 24/04/17 04:31, Petr Jelinek wrote: > >> So actually maybe running regression tests through it might be > >> reasonable appr

Re: [HACKERS] Interval for launching the table sync worker

2017-04-24 Thread Masahiko Sawada
On Tue, Apr 25, 2017 at 1:42 AM, Petr Jelinek wrote: > On 24/04/17 17:52, Masahiko Sawada wrote: >> On Mon, Apr 24, 2017 at 4:41 PM, Kyotaro HORIGUCHI >> wrote: >> + /* >> + * Remove entries no longer necessary. The flag signals nothing if >> + * subrel_local_state is not updated above. We can re

Re: [HACKERS] Interval for launching the table sync worker

2017-04-24 Thread Petr Jelinek
On 24/04/17 17:52, Masahiko Sawada wrote: > On Mon, Apr 24, 2017 at 4:41 PM, Kyotaro HORIGUCHI > wrote: > + /* > + * Remove entries no longer necessary. The flag signals nothing if > + * subrel_local_state is not updated above. We can remove entries in > + * frozen hash safely. > + */ > + if (loca

Re: [HACKERS] Remove dead interfaces added by mistake in 7c4f52409

2017-04-24 Thread Fujii Masao
On Sun, Apr 23, 2017 at 8:15 AM, Petr Jelinek wrote: > Hi, > > Seems like couple of declarations for couple of functions we never > actually implemented and are not used got past review of logical > replication support for initial copy path (commit 7c4f52409). > > Attached patch gets rid of them.

Re: [HACKERS] walsender & parallelism

2017-04-24 Thread Petr Jelinek
On 24/04/17 07:42, Andres Freund wrote: > > > On April 23, 2017 10:31:18 PM PDT, Petr Jelinek > wrote: >> On 24/04/17 04:31, Petr Jelinek wrote: >> So actually maybe running regression tests through it might be >> reasonable approach if we add new make target for it. > > That sounds like a goo

Re: [HACKERS] PG_GETARG_GISTENTRY?

2017-04-24 Thread Mark Dilger
> On Apr 5, 2017, at 1:27 PM, Mark Dilger wrote: > > >> On Apr 5, 2017, at 1:12 PM, Tom Lane wrote: >> >> Mark Dilger writes: >>> I have written a patch to fix these macro definitions across src/ and >>> contrib/. >>> Find the patch, attached. All regression tests pass on my Mac laptop. >>

Re: [HACKERS] Quorum commit for multiple synchronous replication.

2017-04-24 Thread Fujii Masao
On Mon, Apr 24, 2017 at 2:55 PM, Masahiko Sawada wrote: > On Thu, Apr 20, 2017 at 9:31 AM, Kyotaro HORIGUCHI > wrote: >> Ok, I got the point. >> >> At Wed, 19 Apr 2017 17:39:01 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI >> wrote in >> <20170419.173901.16598616.horiguchi.kyot...@lab.ntt.co.

Re: [HACKERS] Quorum commit for multiple synchronous replication.

2017-04-24 Thread Fujii Masao
On Mon, Apr 24, 2017 at 9:02 AM, Noah Misch wrote: > On Thu, Apr 20, 2017 at 11:34:34PM -0700, Noah Misch wrote: >> On Fri, Apr 21, 2017 at 01:20:05PM +0900, Masahiko Sawada wrote: >> > On Fri, Apr 21, 2017 at 12:02 PM, Noah Misch wrote: >> > > On Wed, Apr 19, 2017 at 01:52:53PM +0900, Masahiko S

Re: [HACKERS] Interval for launching the table sync worker

2017-04-24 Thread Masahiko Sawada
On Mon, Apr 24, 2017 at 4:41 PM, Kyotaro HORIGUCHI wrote: > Hello, > > At Sun, 23 Apr 2017 00:51:52 +0900, Masahiko Sawada > wrote in >> On Fri, Apr 21, 2017 at 11:19 PM, Masahiko Sawada >> wrote: >> > On Fri, Apr 21, 2017 at 5:33 PM, Kyotaro HORIGUCHI >> > wrote: >> >> Hello, >> >> >> >> At

Re: [HACKERS] A note about debugging TAP failures

2017-04-24 Thread Craig Ringer
On 24 April 2017 at 20:01, Daniel Gustafsson wrote: > I’m np Perl expert though so there might be better/cleaner ways to achieve > this, in testing it seems to work though. rmtree() is supported at least > since > Perl 5.6 from what I can see. I'd rather just have the 'make' target nuke the re

Re: [HACKERS] OK, so culicidae is *still* broken

2017-04-24 Thread Craig Ringer
On 24 April 2017 at 16:55, Amit Kapila wrote: > Another thing I have tried is to just start the server by setting > RandomizedBaseAddress="TRUE". I have tried about 15-20 times but > could not reproduce the problem related to shared memory attach. We > have tried the same on one of my colleague

[HACKERS] DELETE and UPDATE with LIMIT and ORDER BY

2017-04-24 Thread Surafel Temesgen
the necessity of allowing limit and order by clause to be used with delete and update statement is discussed in the past and added to the todo list preveouse mailing list descissions http://archives.postgresql.org/pgadmin-hackers/2010-04/msg00078.php http://archives.postgresql.org/pgsql-hackers

Re: [HACKERS] StandbyRecoverPreparedTransactions recovers subtrans links incorrectly

2017-04-24 Thread Nikhil Sontakke
> > Also, when I fix that, it gets further but still crashes at the same > Assert in SubTransSetParent. The proximate cause this time seems to > be > that RecoverPreparedTransactions's calculation of overwriteOK is > wrong: > it's computing that as "false", but in reality the s

Re: [HACKERS] Incorrect use of ERRCODE_UNDEFINED_COLUMN in extended stats

2017-04-24 Thread Tom Lane
David Rowley writes: > The attached small patched fixes an incorrect usage of an error code > in the extended stats code. Hmm, looks like all of that could do with an editorial pass (e.g., "duplicity" does not mean what the comments author seems to think). regards, tom la

Re: [HACKERS] Incorrect use of ERRCODE_UNDEFINED_COLUMN in extended stats

2017-04-24 Thread Alvaro Herrera
David Rowley wrote: > The attached small patched fixes an incorrect usage of an error code > in the extended stats code. Thanks for the report. I'm on vacation starting today until May 2nd. If nobody commits this in the meantime, I'll get to it when I'm back. -- Álvaro Herreraht

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-04-24 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Fri, Apr 21, 2017 at 1:43 AM, Stephen Frost wrote: > >> + Once > >> + partitions exist, we do not support using ONLY > >> to > >> + add or drop constraints on only the partitioned table. > >> > >> I wonder if the following sou

Re: [HACKERS] OK, so culicidae is *still* broken

2017-04-24 Thread Craig Ringer
On 16 April 2017 at 05:18, Andres Freund wrote: > Because of ASLR of the main executable (i.e. something like PIE). It'll > supposedly become harder (as in only running in compatibility modes) if > binaries don't enable that. It's currently disabled somewhere in the VC > project generated. I t

Re: [HACKERS] StandbyRecoverPreparedTransactions recovers subtrans links incorrectly

2017-04-24 Thread Simon Riggs
On 24 April 2017 at 00:25, Andres Freund wrote: >> >> It's not clear to me how much potential this has to create user data >> >> corruption, but it doesn't look good at first glance. Discuss. >> > >> > Hm. I think it can cause wrong tqual.c results in some edge cases. >> > During HS, lastOverflo

  1   2   >