Re: [HACKERS] pgbench tap tests & minor fixes

2017-04-24 Thread 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 still think that moving the pgbench scripts inside the test script is a bad idea (tm). Here is a v2 al

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

2017-04-24 Thread Kyotaro HORIGUCHI
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 Thu, 20 Apr 2017 13:21:14 +0900, Masahiko Sawada > >> wrote in > >>

Re: [HACKERS] visual studio 2017 build support

2017-04-24 Thread Ideriha, Takeshi
Hi I’ve noticed src/tools/msvc/README also needs some fix together with your patch. README discription haven’t updated since VS 2012. Regards Ideriha, Takeshi From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Haribabu Kommi Sent: Monday, April 24,

[HACKERS] an outdated comment for hash_seq_init.

2017-04-24 Thread Kyotaro HORIGUCHI
Hello. While I looked into dynahash.c, I found that the following sentense became outdated by 5dfc198. The commit removed the only usage of hash_freeze(). > * NOTE: it is possible to use hash_seq_init/hash_seq_search without any > * worry about hash_seq_term cleanup, if the hashtable is first loc

[HACKERS] Cached plans and statement generalization

2017-04-24 Thread Konstantin Knizhnik
Hi hackers, There were a lot of discussions about query plan caching in hackers mailing list, but I failed to find some clear answer for my question and the current consensus on this question in Postgres community. As far as I understand current state is the following: 1. We have per-connecti

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

2017-04-24 Thread Amit Kapila
On Fri, Apr 21, 2017 at 12:55 AM, Andres Freund wrote: > On 2017-04-20 16:57:03 +0530, Amit Kapila wrote: >> On Wed, Apr 19, 2017 at 9:01 PM, Andres Freund wrote: >> > On 2017-04-19 10:15:31 -0400, Tom Lane wrote: >> >> Amit Kapila writes: >> >> > On Sun, Apr 16, 2017 at 3:04 AM, Tom Lane wrote

[HACKERS] Incorrect use of ERRCODE_UNDEFINED_COLUMN in extended stats

2017-04-24 Thread David Rowley
The attached small patched fixes an incorrect usage of an error code in the extended stats code. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services ext_stats_duplicate_column_errorcode_fix.patch Description: Binary data --

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

2017-04-24 Thread Rahila Syed
Hello, Thank you for reviewing. >But that's not a good idea for several reasons. For one thing, you >can also write FOR VALUES IN (DEFAULT, 5) or which isn't sensible. >For another thing, this kind of syntax won't generalize to range >partitioning, which we've talked about making this feature su

Re: [HACKERS] subscription worker doesn't start immediately on eabled

2017-04-24 Thread Kyotaro HORIGUCHI
Hello, At Fri, 21 Apr 2017 10:15:20 -0400, Peter Eisentraut wrote in <77f75a90-a495-6661-68df-e4993bfac...@2ndquadrant.com> > On 4/6/17 08:24, Kyotaro HORIGUCHI wrote: > > Hello. I found dubious behavior while playing with logical > > replication. > > > > When we disable a subscription, replic

Re: [HACKERS] Cached plans and statement generalization

2017-04-24 Thread Alexander Korotkov
Hi, Konstantin! On Mon, Apr 24, 2017 at 11:46 AM, Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > There were a lot of discussions about query plan caching in hackers > mailing list, but I failed to find some clear answer for my question and > the current consensus on this question in Po

Re: [HACKERS] Declarative partitioning - another take

2017-04-24 Thread Amit Langote
Hi Rajkumar, Thanks for testing and the report. On 2017/04/21 17:00, Rajkumar Raghuwanshi wrote: > Hi, > > I have observed below with the statement triggers. > > I am able to create statement triggers at root partition, but these > triggers, not getting fired on updating partition. > > CREATE

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

2017-04-24 Thread Robert Haas
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 ...PARTITION OF...FOR VALUES DEFAULT; Yes, that could be done. But I don't think it's correct to say that the partition

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

2017-04-24 Thread Kyotaro HORIGUCHI
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 point. > >> COMMIT PREPARED 'g'; > >> > >> Even if we wake up the launc

Re: [HACKERS] Cached plans and statement generalization

2017-04-24 Thread Konstantin Knizhnik
On 24.04.2017 13:24, Alexander Korotkov wrote: Hi, Konstantin! On Mon, Apr 24, 2017 at 11:46 AM, Konstantin Knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: There were a lot of discussions about query plan caching in hackers mailing list, but I failed to find some clear answer for

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-04-24 Thread Ashutosh Bapat
On Sat, Apr 22, 2017 at 3:52 AM, Robert Haas wrote: > On Fri, Apr 21, 2017 at 8:41 AM, Ashutosh Bapat > wrote: >> I don't see how is that fixed. For a join relation we need to come up >> with one set of partition bounds by merging partition bounds of the >> joining relation and in order to unders

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-04-24 Thread Rajkumar Raghuwanshi
On Fri, Apr 21, 2017 at 7:59 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > Here's an updated patch set > Hi, I have applied v18 patches and got a crash in m-way joins when partition ranges differ, below are steps to reproduce this. CREATE TABLE prt1 (a int, b int, c varchar) PA

Re: [HACKERS] A note about debugging TAP failures

2017-04-24 Thread Daniel Gustafsson
> On 23 Apr 2017, at 15:05, Craig Ringer wrote: > > On 23 Apr. 2017 10:32, "Michael Paquier" > wrote: > On Sun, Apr 23, 2017 at 7:48 AM, Daniel Gustafsson > wrote: > > Skipping the tempdir and instead using ${testname}_data_${name} witho

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

2017-04-24 Thread Ashutosh Bapat
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 ...PARTITION OF...FOR VALUES DEFAULT; > > Yes, that could be do

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

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] 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] 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] 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] 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

[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] 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

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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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

[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] 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

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 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] 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] 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] 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 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] 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] 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] 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] 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] 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] 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] 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 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] 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] 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] 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] 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 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 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] 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] 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] 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] 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 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] 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 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] [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] [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] 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] 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] 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] 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] 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] 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] 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

[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] 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

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] 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

[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] 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

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 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'
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] 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 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] 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 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: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 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 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 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 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 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 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: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

[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

  1   2   >