Re: pgbench - allow to specify scale as a size

2018-03-04 Thread Fabien COELHO
Now the overhead is really 60-65%. Although the specification is unambiguous, but we still need some maths to know whether it fits in buffers or memory... The point of Karel regression is to take this into account. Also, whether this option would be more admissible to Tom is still an open

Re: [HACKERS] Removing LEFT JOINs in more cases

2018-03-04 Thread David Rowley
On 4 March 2018 at 18:35, David Rowley wrote: > drop table if exists t1; > > create table t1 (a int); > insert into t1 values(1); > > create or replace function notice(pn int) returns int as $$ > begin > raise notice '%', pn; > return pn; > end; > $$ volatile

Re: select_parallel test failure: gather sometimes losing tuples (maybe during rescans)?

2018-03-04 Thread Thomas Munro
On Sun, Mar 4, 2018 at 5:40 PM, Thomas Munro wrote: > Could shm_mq_detach_internal() need a pg_write_barrier() before it > writes mq_detached = true, to make sure that anyone who observes that > can also see the most recent increase of mq_bytes_written? I can

Re: [HACKERS] Small improvement to compactify_tuples

2018-03-04 Thread Yura Sokolov
01.03.2018 22:22, Andres Freund пишет: > Hi, > > On 2018-02-25 21:39:46 +0300, Yura Sokolov wrote: >>> If that's the case then does it really make sense to make this change..? >> >> I don't think it is really necessary to implement generic version >> through templated. > > Why? It is better to

Re: All Taxi Services need Index Clustered Heap Append

2018-03-04 Thread Ants Aasma
On Sat, Mar 3, 2018 at 4:53 PM, David Rowley wrote: > On 3 March 2018 at 05:30, Darafei "Komяpa" Praliaskouski > wrote: >> Our options were: >> >> - partitioning. Not entirely trivial when your id is uuid. To get visible >> gains, we need to make

Re: select_parallel test failure: gather sometimes losing tuples (maybe during rescans)?

2018-03-04 Thread Magnus Hagander
On Sun, Mar 4, 2018 at 3:51 AM, Thomas Munro wrote: > On Sun, Mar 4, 2018 at 3:48 PM, Thomas Munro > wrote: > > I've seen it several times on Travis CI. (So I would normally have > > been able to tell you about this problem before

Re: [PATCH] Verify Checksums during Basebackups

2018-03-04 Thread Magnus Hagander
On Fri, Mar 2, 2018 at 7:04 PM, Robert Haas wrote: > On Fri, Mar 2, 2018 at 6:23 AM, Magnus Hagander > wrote: > > Another quick note -- we need to assert that the size of the buffer is > > actually divisible by BLCKSZ. I don't think it's a common

Re: All Taxi Services need Index Clustered Heap Append

2018-03-04 Thread Ants Aasma
On Fri, Mar 2, 2018 at 6:30 PM, Darafei "Komяpa" Praliaskouski wrote: > I gave this all some thought and it looks like it all could have not > happened if Postgres was able to cluster heap insertions by (id, ts) index. > We're ok with synchronuous_commit=off, so amplified write

Re: 2018-03 Commitfest Summary (Andres #1)

2018-03-04 Thread Fabien COELHO
Hello Andres, [...] I find that is a fairly absurd, and frankly insulting, ascription of motives. I do not thought that I was insulting anyone, and I apologise if anyone felt insulted by my message. I didn't "veto" the patch or anything, nor did Tom. Good. My past experience is that

Re: select_parallel test failure: gather sometimes losing tuples (maybe during rescans)?

2018-03-04 Thread Thomas Munro
On Sun, Mar 4, 2018 at 10:46 PM, Magnus Hagander wrote: > Um. Have you actually seen the "mail archive app" cut long threads off in > other cases? Because it's certainly not supposed to do that... Hi Magnus, I mean the "flat" thread view:

Re: 2018-03 Commitfest Summary (Andres #1)

2018-03-04 Thread Fabien COELHO
Fine by me so long as it remains a manageable scope, rather than incrementally turning into some horror scripting language. Pavel's description of what is needed is really the deal. The target is "cpp" level simple scripting: expressions, variables, conditions, echoing, quitting on error...

Re: [HACKERS] plpgsql - additional extra checks

2018-03-04 Thread Pavel Stehule
2018-03-04 2:46 GMT+01:00 Tomas Vondra : > On 03/02/2018 10:30 PM, Pavel Stehule wrote: > > Hi > > > > 2018-03-01 21:14 GMT+01:00 David Steele > >: > > > > Hi Pavel, > > > > On 1/7/18 3:31 AM, Pavel Stehule

Re: constraint exclusion and nulls in IN (..) clause

2018-03-04 Thread Emre Hasegeli
> Yeah, the patch in its current form is wrong, because it will give wrong > answers if the operator being used in a SAOP is non-strict. I modified > the patch to consider operator strictness before doing anything with nulls. I tried to review this patch without any familiarity to the code.

Re: Online enabling of checksums

2018-03-04 Thread Michael Banck
Hi, On Sat, Mar 03, 2018 at 07:23:31PM +0100, Magnus Hagander wrote: > diff --git a/src/bin/pg_verify_checksums/pg_verify_checksums.c > b/src/bin/pg_verify_checksums/pg_verify_checksums.c > new file mode 100644 > index 00..a4bfe7284d > --- /dev/null > +++

Re: [PATCH] Verify Checksums during Basebackups

2018-03-04 Thread Stephen Frost
Greetings Magnus, all, * Magnus Hagander (mag...@hagander.net) wrote: > I think it would also be a good idea to have this a three-mode setting, > with "no check", "check and warning", "check and error". Where "check and > error" should be the default, but you could turn off that in "save whatever

Re: [HACKERS] Removing LEFT JOINs in more cases

2018-03-04 Thread Tom Lane
David Rowley writes: > On 10 January 2018 at 08:44, Tom Lane wrote: >> select distinct nextval('foo') from a left join b ... >> The presence of the DISTINCT again doesn't excuse changing how often >> nextval() gets called. > While working on the

Re: Parallel Aggregates for string_agg and array_agg

2018-03-04 Thread Tomas Vondra
Hi, I've looked at the rebased patch you sent yesterday, and I do have a couple of comments. 1) There seems to be forgotten declaration of initArrayResultInternal in arrayfuncs.c. I suppose you've renamed it to initArrayResultWithSize and moved it to a header file, and forgotten to remove this

Re: select_parallel test failure: gather sometimes losing tuples (maybe during rescans)?

2018-03-04 Thread Tomas Vondra
On 03/04/2018 10:27 AM, Thomas Munro wrote: > On Sun, Mar 4, 2018 at 5:40 PM, Thomas Munro > wrote: >> Could shm_mq_detach_internal() need a pg_write_barrier() before it >> writes mq_detached = true, to make sure that anyone who observes that >> can also see the

Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.

2018-03-04 Thread Jeff Janes
On Wed, Jan 17, 2018 at 4:49 PM, David Gould wrote: > > Please add the attached patch and this discussion to the open commit fest. > The > original bugs thread is here: 2018011254.1408.8342@wrigl > eys.postgresql.org. > > Bug reference: 15005 > Logged by: David

Re: Fwd: automatic disable unicode line style when terminal is not unicode

2018-03-04 Thread Tom Lane
Pavel Stehule writes: > I have to return back to 8bit encoding, and in this old world, the unicode > borders doesn't work. Sure. It can be simply disabled and forced to ascii. > What do you think about it? I don't think we should assume we know what the terminal code

Re: Function to track shmem reinit time

2018-03-04 Thread Tomas Vondra
On 02/28/2018 02:39 PM, Grigory Smolkin wrote: > It can be used to accurately calculate server uptime, since you can`t > rely on pg_postmaster_start_time() in this. > Can you please explain why pg_postmaster_start_time can't be used for this purpose? It seems like a pretty good match,

Re: Function to track shmem reinit time

2018-03-04 Thread Tomas Vondra
On 02/28/2018 01:11 PM, Anastasia Lubennikova wrote: > Attached patch introduces a new function pg_shmem_init_time(), > which returns the time shared memory was last (re)initialized. > It is created for use by monitoring tools to track backend crashes. > > Currently, if the 'restart_after_crash'

Re: 2018-03 Commitfest Summary (Andres #1)

2018-03-04 Thread Fabien COELHO
Hello Craig, I still haven't really grasped why this isn't done by embedding a client-side scripting language interpreter, giving us vastly greater capabilities with only the maintenance of the glue instead of writing our own ad-hoc scripting tool. Something confine-able like JavaScript or

Re: All Taxi Services need Index Clustered Heap Append

2018-03-04 Thread David Rowley
On 4 March 2018 at 23:05, Ants Aasma wrote: > On Sat, Mar 3, 2018 at 4:53 PM, David Rowley >> It's a good job someone invented HASH partitioning then. >> >> It would be interesting to hear how your benchmarks go using current >> master + the faster partition pruning patchset

Re: Function to track shmem reinit time

2018-03-04 Thread Tom Lane
Tomas Vondra writes: > On 02/28/2018 02:39 PM, Grigory Smolkin wrote: >> It can be used to accurately calculate server uptime, since you can`t >> rely on pg_postmaster_start_time() in this. > Can you please explain why pg_postmaster_start_time can't be used for >

Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type

2018-03-04 Thread Tomas Vondra
On 03/04/2018 05:59 PM, Tom Lane wrote: > Tomas Vondra writes: >> On 03/04/2018 02:37 AM, Tom Lane wrote: >>> I was kind of underwhelmed with these test cases, too, so I didn't >>> commit them. But they were good for proving that the bytea bug >>> wasn't

Re: PATCH: psql tab completion for SELECT

2018-03-04 Thread Tom Lane
Edmund Horner writes: > On 26 January 2018 at 13:44, Vik Fearing wrote: >> On 01/26/2018 01:28 AM, Edmund Horner wrote: >>> The patch mentioned attempts to put savepoints around the tab >>> completion query where appropriate. >> I am -1 on this

Re: Function to track shmem reinit time

2018-03-04 Thread Tomas Vondra
On 02/28/2018 01:11 PM, Anastasia Lubennikova wrote: > > This new function can be periodiacally called by a monitoring agent, > and, if /shmem_init_time/ doesn't match /pg_postmaster_start_time,/ > we know that server crashed-restarted, and also know the exact time, > when. > Actually, after

Re: Fwd: automatic disable unicode line style when terminal is not unicode

2018-03-04 Thread Pavel Stehule
2018-03-04 16:53 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > I have to return back to 8bit encoding, and in this old world, the > unicode > > borders doesn't work. Sure. It can be simply disabled and forced to > ascii. > > What do you think about

Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type

2018-03-04 Thread Tom Lane
Tomas Vondra writes: > On 03/04/2018 02:37 AM, Tom Lane wrote: >> I was kind of underwhelmed with these test cases, too, so I didn't >> commit them. But they were good for proving that the bytea bug >> wasn't hypothetical :-) > Underwhelmed in what sense? Should

Re: [PATCH] Verify Checksums during Basebackups

2018-03-04 Thread Magnus Hagander
On Sun, Mar 4, 2018 at 3:49 PM, Stephen Frost wrote: > Greetings Magnus, all, > > * Magnus Hagander (mag...@hagander.net) wrote: > > I think it would also be a good idea to have this a three-mode setting, > > with "no check", "check and warning", "check and error". Where

Re: IndexJoin memory problem using spgist and boxes

2018-03-04 Thread Anton Dignös
Hi Alexander, thanks for the feedback. > I can reproduce the high memory consumption with your queries. > > Looking at the patch, I see that you changed the lifetime of the temporary > context from per-tuple to per-index-scan. It is not obvious that this change > is correct. Could you explain,

Re: [HACKERS] plpgsql - additional extra checks

2018-03-04 Thread Pavel Stehule
2018-03-04 13:37 GMT+01:00 Pavel Stehule : > > > 2018-03-04 2:46 GMT+01:00 Tomas Vondra : > >> On 03/02/2018 10:30 PM, Pavel Stehule wrote: >> > Hi >> > >> > 2018-03-01 21:14 GMT+01:00 David Steele > >

Re: [HACKERS] Removing useless DISTINCT clauses

2018-03-04 Thread David Rowley
On 10 January 2018 at 09:26, Tom Lane wrote: > 1. Once you don't have all the tlist items shown in DISTINCT, it really is > more like DISTINCT ON, seems like. I am not sure it's a good idea to set > hasDistinctOn, because that engages some planner behaviors we probably >

Fwd: automatic disable unicode line style when terminal is not unicode

2018-03-04 Thread Pavel Stehule
Hi I have to return back to 8bit encoding, and in this old world, the unicode borders doesn't work. Sure. It can be simply disabled and forced to ascii. What do you think about it? Regards Pavel

Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type

2018-03-04 Thread Tomas Vondra
On 03/04/2018 09:46 PM, Tom Lane wrote: > Tomas Vondra writes: >> On 03/04/2018 08:37 PM, Tom Lane wrote: >>> Oh, well, that was another problem I had with it: those tests do basically >>> nothing to ensure that we won't add another such problem in the future. > >>

Re: select_parallel test failure: gather sometimes losing tuples (maybe during rescans)?

2018-03-04 Thread Thomas Munro
On Mon, Mar 5, 2018 at 4:05 AM, Tomas Vondra wrote: > On 03/04/2018 10:27 AM, Thomas Munro wrote: >> I can fix it with the following patch, which writes XXX out to the log >> where it would otherwise miss a final message sent just before >> detaching with

Re: IndexJoin memory problem using spgist and boxes

2018-03-04 Thread Tom Lane
=?UTF-8?Q?Anton_Dign=C3=B6s?= writes: >> Looking at the patch, I see that you changed the lifetime of the temporary >> context from per-tuple to per-index-scan. It is not obvious that this change >> is correct. > The problem before this patch was that the

slow array(subselect)

2018-03-04 Thread Pavel Stehule
Hi Just curious postgres=# explain analyze select array_upper(array_agg(i),1) from generate_series(1,10) g(i); QUERY PLAN

Re: perltidy version

2018-03-04 Thread Andrew Dunstan
On Sun, Mar 4, 2018 at 9:33 AM, Tom Lane wrote: > Magnus Hagander writes: >> Ah yeah, if I apply that one first, the diff from using 20140328 is much >> smaller. Attached is that one, which means the difference between the two >> perltidy versions. > >

Re: slow array(subselect)

2018-03-04 Thread Pavel Stehule
2018-03-04 21:36 GMT+01:00 Tomas Vondra : > > > On 03/04/2018 09:19 PM, Pavel Stehule wrote: > > Hi > > > > Just curious > > > > postgres=# explain analyze select array_upper(array_agg(i),1) from > > generate_series(1,10) g(i); > >

Re: perltidy version

2018-03-04 Thread Daniel Gustafsson
> On 04 Mar 2018, at 00:03, Tom Lane wrote: > > Magnus Hagander writes: >> Ah yeah, if I apply that one first, the diff from using 20140328 is much >> smaller. Attached is that one, which means the difference between the two >> perltidy versions. > >

Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type

2018-03-04 Thread Tom Lane
Tomas Vondra writes: > FWIW I originally constructed the tests merely to verify that the fix > actually fixes the issue, but I think we should add some tests to make > sure it does not get broken in the future. It took quite a bit of time > until someone even hit the

Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type

2018-03-04 Thread Tomas Vondra
On 03/04/2018 08:37 PM, Tom Lane wrote: > Tomas Vondra writes: >> FWIW I originally constructed the tests merely to verify that the fix >> actually fixes the issue, but I think we should add some tests to make >> sure it does not get broken in the future. It took

Re: Server won't start with fallback setting by initdb.

2018-03-04 Thread Tom Lane
Robert Haas writes: > On Fri, Feb 9, 2018 at 3:08 AM, Kyotaro HORIGUCHI > wrote: >> I think that we can safely increase the fallback value to 20 with >> which regtests are known not to fail. > I propose an alternative fix: let's instead

Re: slow array(subselect)

2018-03-04 Thread Tomas Vondra
On 03/04/2018 09:19 PM, Pavel Stehule wrote: > Hi > > Just curious > > postgres=# explain analyze select array_upper(array_agg(i),1) from > generate_series(1,10) g(i); >    QUERY > PLAN  

Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type

2018-03-04 Thread Tom Lane
Tomas Vondra writes: > On 03/04/2018 08:37 PM, Tom Lane wrote: >> Oh, well, that was another problem I had with it: those tests do basically >> nothing to ensure that we won't add another such problem in the future. > I don't follow. How would adding new custom

Re: Rewriting the test of pg_upgrade as a TAP test - take two

2018-03-04 Thread Andrew Dunstan
On Sun, Mar 4, 2018 at 2:34 PM, Andrew Dunstan wrote: > On Sun, Mar 4, 2018 at 12:42 AM, Peter Eisentraut > wrote: >> On 1/26/18 03:00, Michael Paquier wrote: >>> As promised on a recent thread, here is a second tentative to

Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative

2018-03-04 Thread Daniel Gustafsson
> On 02 Mar 2018, at 03:10, Andres Freund wrote: > On 2018-01-26 23:30:08 +0100, Daniel Gustafsson wrote: >> And another rebase and update after the refactoring in c1869542b3a4da4b12ca. >> Also fixed some typos in comments. The other patches originally posted in >> this >>

34

2018-03-04 Thread Fabiano Machado Dias

Re: Online enabling of checksums

2018-03-04 Thread Daniel Gustafsson
> On 04 Mar 2018, at 15:24, Michael Banck wrote: >> +csum = pg_checksum_page(buf, blockno + segmentno*RELSEG_SIZE); >> +if (csum != header->pd_checksum) >> +{ >> +if (ControlFile->data_checksum_version == >>

Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.

2018-03-04 Thread David Gould
On Sun, 4 Mar 2018 07:49:46 -0800 Jeff Janes wrote: > On Wed, Jan 17, 2018 at 4:49 PM, David Gould wrote: > > # analyze verbose pg_attribute; > > INFO: "pg_attribute": scanned 3 of 24519424 pages, containing 6475 > > live rows and 83 dead rows; 6475

Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.

2018-03-04 Thread David Gould
On Sun, 4 Mar 2018 07:49:46 -0800 Jeff Janes wrote: > In any event, I agree with your analysis that ANALYZE should set the number > of tuples from scratch. After all, it sets the other estimates, such as > MCV, from scratch, and those are much more fragile to sampling than

Re: Incorrect use of "an" and "a" in code comments and docs

2018-03-04 Thread Thomas Munro
On Mon, Mar 5, 2018 at 6:51 PM, Abhijit Menon-Sen wrote: > At 2018-03-05 14:42:14 +0900, mich...@paquier.xyz wrote: >> > - sinval is a signal invalidation, so it seems to me that "a" is >> > correct, not "an". > > I guess it depends on whether you read it as "sin-val" or

Re: [HACKERS] Removing LEFT JOINs in more cases

2018-03-04 Thread David Rowley
On 5 March 2018 at 04:19, Tom Lane wrote: > select * from t1, t2 where notice(t2.a) = t1.a; > select * from t1, t2 where notice(t2.a) = t2.b; > > With our current implementation, the first will result in executing > notice() for every row pair in the cross product, while the

Re: Incorrect use of "an" and "a" in code comments and docs

2018-03-04 Thread Abhijit Menon-Sen
At 2018-03-05 14:42:14 +0900, mich...@paquier.xyz wrote: > > > - sinval is a signal invalidation, so it seems to me that "a" is > > correct, not "an". I guess it depends on whether you read it as "sin-val" or "ess-inval". > diff --git a/src/backend/access/gin/ginvacuum.c >

Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently

2018-03-04 Thread Masahiko Sawada
On Fri, Mar 2, 2018 at 10:50 PM, Claudio Freire wrote: > On Fri, Mar 2, 2018 at 10:47 AM, Claudio Freire > wrote: >> On Fri, Mar 2, 2018 at 7:38 AM, Masahiko Sawada >> wrote: >>> Thank you for updating the patches! >>> >>>

Re: non-bulk inserts and tuple routing

2018-03-04 Thread Amit Langote
On 2018/03/03 13:38, Andres Freund wrote: > Hi, > > On 2018-02-22 11:10:57 -0500, Robert Haas wrote: >> On Tue, Feb 20, 2018 at 8:06 PM, Amit Langote >> wrote: Attached is an updated version for that. >>> >>> Thanks for updating the patch. >> >> Committed with

Incorrect use of "an" and "a" in code comments and docs

2018-03-04 Thread Michael Paquier
Hi all, While looking at something else, I have one one occurence of $subject. Looking more deeply at the code I have found 10 more of them, like: - sinval is a signal invalidation, so it seems to me that "a" is correct, not "an". - I bumped into "an" being used instead of "and" in the GIN code.

Re: postgres_fdw: perform UPDATE/DELETE .. RETURNING on a join directly

2018-03-04 Thread Ashutosh Bapat
On Mon, Mar 5, 2018 at 8:51 AM, Etsuro Fujita wrote: > (2018/03/03 5:01), Robert Haas wrote: >> >> On Fri, Mar 2, 2018 at 1:20 PM, Robert Haas wrote: >>> >>> On Fri, Mar 2, 2018 at 5:35 AM, Etsuro Fujita >>>

Re: JIT compiling with LLVM v11

2018-03-04 Thread Andres Freund
Hi, On 2018-03-05 17:32:09 +1300, Thomas Munro wrote: > I tried out your "jit" branch on my macOS 10.13.3 system. Vendor "cc" > and "c++" are version "Apple LLVM version 9.0.0 (clang-900.0.39.2)". > I used MacPorts (whereas Peter E is using HomeBrew) to install LLVM > with "sudo port install

Re: Server won't start with fallback setting by initdb.

2018-03-04 Thread Tom Lane
Michael Paquier writes: > On Sun, Mar 04, 2018 at 03:31:31PM -0500, Tom Lane wrote: >> ... But what I would argue is that >> of those three choices, the least defensible one is max_wal_senders = 10. >> Where did that come from? What fraction of real-world installations will

Re: [HACKERS] Creating backup history files for backups taken from standbys

2018-03-04 Thread Michael Paquier
On Fri, Mar 02, 2018 at 03:41:57PM -0500, David Steele wrote: > On 3/2/18 1:03 PM, Fujii Masao wrote: >> On Fri, Mar 2, 2018 at 1:07 PM, Michael Paquier wrote: >>> We would talk about two backups running >>> simultaneously on a standby, which would overlap with each other to

Re: Incorrect use of "an" and "a" in code comments and docs

2018-03-04 Thread David Rowley
On 5 March 2018 at 18:42, Michael Paquier wrote: > On Mon, Mar 05, 2018 at 01:58:54PM +0900, Michael Paquier wrote: >> Attached is a proposal of patch to fix all those things. > > And of course I forgot to attach the actual patch. (Thanks Thomas for > telling me off-list).

Re: Typo in src/backend/access/hash/README

2018-03-04 Thread Amit Kapila
On Mon, Mar 5, 2018 at 9:10 AM, Justin Pryzby wrote: > On Mon, Mar 05, 2018 at 04:30:28PM +1300, Thomas Munro wrote: >> Hi, >> >> Not sure what word was missed here, but I guess "count": >> >> our the number of buckets stored in our cached copy of the metapage. If >> -so,

Re: constraint exclusion and nulls in IN (..) clause

2018-03-04 Thread Amit Langote
Hi. On 2018/03/04 22:12, Emre Hasegeli wrote: >> Yeah, the patch in its current form is wrong, because it will give wrong >> answers if the operator being used in a SAOP is non-strict. I modified >> the patch to consider operator strictness before doing anything with nulls. > > I tried to

Re: Incorrect use of "an" and "a" in code comments and docs

2018-03-04 Thread Michael Paquier
On Mon, Mar 05, 2018 at 07:42:40PM +1300, Thomas Munro wrote: > $ git grep ' a SQL ' | wc -l > 642 > $ git grep ' an SQL ' | wc -l > 219 > > /me grabs popcorn ess-queue-el, sir. -- Michael signature.asc Description: PGP signature

Re: Server won't start with fallback setting by initdb.

2018-03-04 Thread Michael Paquier
On Sun, Mar 04, 2018 at 03:31:31PM -0500, Tom Lane wrote: > Then, seeing that the factory defaults are ReservedBackends = 3 and > max_wal_senders = 10, something's got to give; there's no way that > max_connections = 10 can work with those. But what I would argue is that > of those three choices,

Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.

2018-03-04 Thread David Gould
On Sun, 4 Mar 2018 07:49:46 -0800 Jeff Janes wrote: > I don't see how it could have caused the problem in the first place. In > your demonstration case, you had to turn off autovac in order to get it to > happen, and then when autovac is turned back on, it is all primed

Re: postgres_fdw: perform UPDATE/DELETE .. RETURNING on a join directly

2018-03-04 Thread Etsuro Fujita
(2018/03/03 5:01), Robert Haas wrote: On Fri, Mar 2, 2018 at 1:20 PM, Robert Haas wrote: On Fri, Mar 2, 2018 at 5:35 AM, Etsuro Fujita wrote: Agreed. Better safe than sorry, so I disabled autovacuum for all the tables created in the

Re: [HACKERS] GSoC 2017: weekly progress reports (week 4) and patch for hash index

2018-03-04 Thread Thomas Munro
On Sun, Mar 4, 2018 at 12:53 AM, Amit Kapila wrote: > On Fri, Mar 2, 2018 at 9:27 AM, Thomas Munro > wrote: >> Hmm. I notice that this calls PredicateLockPageSplit() after both >> calls to _hash_splitbucket() (the one in

Typo in src/backend/access/hash/README

2018-03-04 Thread Thomas Munro
Hi, Not sure what word was missed here, but I guess "count": our the number of buckets stored in our cached copy of the metapage. If -so, the bucket has certainly been split, because the must originally +so, the bucket has certainly been split, because the count must originally have been less

Re: Typo in src/backend/access/hash/README

2018-03-04 Thread Justin Pryzby
On Mon, Mar 05, 2018 at 04:30:28PM +1300, Thomas Munro wrote: > Hi, > > Not sure what word was missed here, but I guess "count": > > our the number of buckets stored in our cached copy of the metapage. If > -so, the bucket has certainly been split, because the must originally > +so, the bucket

Re: Parallel Aggregates for string_agg and array_agg

2018-03-04 Thread David Rowley
On 5 March 2018 at 04:54, Tomas Vondra wrote: > 1) There seems to be forgotten declaration of initArrayResultInternal in > arrayfuncs.c. I suppose you've renamed it to initArrayResultWithSize and > moved it to a header file, and forgotten to remove this bit. Oops.

Re: non-bulk inserts and tuple routing

2018-03-04 Thread Amit Langote
On 2018/03/03 13:48, Andres Freund wrote: > On 2018-02-22 11:10:57 -0500, Robert Haas wrote: >> On Tue, Feb 20, 2018 at 8:06 PM, Amit Langote >> wrote: Attached is an updated version for that. >>> >>> Thanks for updating the patch. >> >> Committed with a few

Re: JIT compiling with LLVM v11

2018-03-04 Thread Thomas Munro
On Sun, Mar 4, 2018 at 8:39 AM, Andres Freund wrote: > On 2018-03-03 09:37:35 -0500, Peter Eisentraut wrote: >> [discussion of making this work on a Mac] I tried out your "jit" branch on my macOS 10.13.3 system. Vendor "cc" and "c++" are version "Apple LLVM version 9.0.0

Re: postgres_fdw: perform UPDATE/DELETE .. RETURNING on a join directly

2018-03-04 Thread Tom Lane
Ashutosh Bapat writes: > On Mon, Mar 5, 2018 at 8:51 AM, Etsuro Fujita > wrote: >> Totally outdated stats used in query planning causes the failures? ANALYZE >> right before the plan-changing queries would fix the failures? > I think

Re: [HACKERS] path toward faster partition pruning

2018-03-04 Thread Amit Langote
On 2018/03/02 21:43, Robert Haas wrote: > On Fri, Mar 2, 2018 at 1:22 AM, Amit Langote > wrote: >> But I realized we don't need the coercion. Earlier steps would have >> determined that the clause from which the expression originated contains >> an operator that is

Re: Incorrect use of "an" and "a" in code comments and docs

2018-03-04 Thread Michael Paquier
On Mon, Mar 05, 2018 at 11:21:18AM +0530, Abhijit Menon-Sen wrote: > At 2018-03-05 14:42:14 +0900, mich...@paquier.xyz wrote: >> >>> - sinval is a signal invalidation, so it seems to me that "a" is >>> correct, not "an". > > I guess it depends on whether you read it as "sin-val" or "ess-inval".

Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently

2018-03-04 Thread Masahiko Sawada
On Mon, Mar 5, 2018 at 10:21 AM, Masahiko Sawada wrote: > On Fri, Mar 2, 2018 at 10:50 PM, Claudio Freire > wrote: >> On Fri, Mar 2, 2018 at 10:47 AM, Claudio Freire >> wrote: >>> On Fri, Mar 2, 2018 at 7:38 AM, Masahiko

Re: Incorrect use of "an" and "a" in code comments and docs

2018-03-04 Thread Andres Freund
On 2018-03-05 11:21:18 +0530, Abhijit Menon-Sen wrote: > At 2018-03-05 14:42:14 +0900, mich...@paquier.xyz wrote: > > > > > - sinval is a signal invalidation, so it seems to me that "a" is > > > correct, not "an". > > I guess it depends on whether you read it as "sin-val" or "ess-inval". It

Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative

2018-03-04 Thread Michael Paquier
On Sun, Mar 04, 2018 at 11:15:58PM +0100, Daniel Gustafsson wrote: > Commitfest Status > = > Do I think this patch is realistic to target for v11? Well. Given where we > are in the cycle, I don’t think any new TLS implementation going in is > realistic at this point since none of

Re: [HACKERS] GUC for cleanup indexes threshold.

2018-03-04 Thread Masahiko Sawada
On Sun, Mar 4, 2018 at 8:59 AM, Alexander Korotkov wrote: > On Fri, Mar 2, 2018 at 10:53 AM, Masahiko Sawada > wrote: >> >> > 2) In the append-only case, index statistics can lag indefinitely. >> >> The original proposal proposed a new GUC that

Re: Contention preventing locking

2018-03-04 Thread Konstantin Knizhnik
On 03.03.2018 16:44, Amit Kapila wrote: On Thu, Mar 1, 2018 at 1:22 PM, Konstantin Knizhnik wrote: On 28.02.2018 16:32, Amit Kapila wrote: On Mon, Feb 26, 2018 at 8:26 PM, Konstantin Knizhnik wrote: Yes, but two notices: 1. Tuple lock

Re: ON CONFLICT DO UPDATE for partitioned tables

2018-03-04 Thread Amit Langote
On 2018/03/03 0:36, Alvaro Herrera wrote: > Amit Langote wrote: > >> Actually, after your comment on my original patch [1], I did make it work >> for multiple levels by teaching the partition initialization code to find >> a given partition's indexes that are inherited from the root table (that

Re: [HACKERS] PoC: full merge join on comparison clause

2018-03-04 Thread Ashutosh Bapat
On Fri, Mar 2, 2018 at 8:02 PM, Alexander Kuzmenkov wrote: > On 22.02.2018 21:42, Alexander Kuzmenkov wrote: >> >> >> Some basic joins work, but I couldn't properly test all the corner cases >> with different orderings, because they depend on a bug in vanilla merge >>

Re: Incorrect use of "an" and "a" in code comments and docs

2018-03-04 Thread Michael Paquier
On Mon, Mar 05, 2018 at 01:58:54PM +0900, Michael Paquier wrote: > While looking at something else, I have one one occurence of $subject. > Looking more deeply at the code I have found 10 more of them, like: > - sinval is a signal invalidation, so it seems to me that "a" is > correct, not "an". >

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

2018-03-04 Thread Rajkumar Raghuwanshi
On Wed, Feb 7, 2018 at 2:00 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Fri, Dec 22, 2017 at 3:00 PM, Rajkumar Raghuwanshi > wrote: > > updated test patch attached. > Changed partition-wise statement to partitionwise. Attached re-based