Re: JIT compiling with LLVM v9.0

2018-01-27 Thread Jeff Davis
On Sat, Jan 27, 2018 at 5:15 PM, Andres Freund wrote: >> Also, I'm sure you considered this, but I'd like to ask if we can try >> harder make the JIT itself happen in an extension. It has some pretty >> huge benefits: > > I'm very strongly against this. To the point that I'll

Re: Reorder C includes in partition.c

2018-01-27 Thread Bruce Momjian
On Thu, Jan 25, 2018 at 06:58:40PM +0900, Etsuro Fujita wrote: > Here is a small patch for $SUBJECT. > > Best regards, > Etsuro Fujita > diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c > index 8adc4ee..e69bbc0 100644 > --- a/src/backend/catalog/partition.c > +++

Cancelling parallel query leads to segfault

2018-01-27 Thread Andres Freund
Hi Peter (and others who mucked around with related code), While testing another patch I found that cancelling a parallel query on master segfaults the leader in an interesting manner: #0 0x5648721cb361 in tas (lock=0x7fbd8e025360 ) at

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

2018-01-27 Thread Amit Kapila
On Thu, Jan 25, 2018 at 7:29 PM, Alexander Korotkov wrote: > On Sat, Jan 20, 2018 at 4:24 PM, Amit Kapila > wrote: >> >> On Fri, Sep 29, 2017 at 8:20 PM, Alexander Korotkov >> wrote: >> > +1, >> > Very nice idea!

Re: JIT compiling with LLVM v9.0

2018-01-27 Thread Jeff Davis
On Sat, Jan 27, 2018 at 1:20 PM, Andres Freund wrote: > b) The optimizations to take advantage of the constants and make the >code faster with the constant tupledesc is fairly slow (you pretty >much need at least an -O2 equivalent), whereas the handrolled tuple >

Re: [HACKERS] GnuTLS support

2018-01-27 Thread Bruce Momjian
On Wed, Jan 17, 2018 at 10:02:35PM -0500, Tom Lane wrote: > That is a really good point. For precedent, note that darn near nobody > seems to know whether their psql contains readline or libedit. If we > force the issue by giving the settings different names, then they'll be > forced to figure

Re: Built-in connection pooling

2018-01-27 Thread Bruce Momjian
On Mon, Jan 22, 2018 at 06:51:08PM +0100, Tomas Vondra wrote: > > Yes, external connection pooling is more flexible. It allows to > > perform pooling either at client side either at server side (or even > > combine two approaches).> > > Also external connection pooling for PostgreSQL is not

Re: \describe*

2018-01-27 Thread David Fetter
On Sat, Jan 27, 2018 at 10:54:07PM +0100, Vik Fearing wrote: > On 01/27/2018 05:39 PM, David Fetter wrote: > > On Fri, Jan 26, 2018 at 04:28:24PM +0100, Vik Fearing wrote: > >> On 01/26/2018 03:49 PM, David Fetter wrote: > >>> I propose that we do what at least MySQL, Oracle, and DB2 do and > >>>

Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?

2018-01-27 Thread Tomas Vondra
On 01/27/2018 10:45 PM, Tom Lane wrote: > David Rowley writes: >> I'd offer to put it back to the order of the enum, but I want to >> minimise the invasiveness of the patch. I'm not sure yet if it should >> be classed as a bug fix or a new feature. > > FWIW, I'd

Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?

2018-01-27 Thread Tomas Vondra
Hi, On 01/27/2018 10:09 PM, David Rowley wrote: > On 27 January 2018 at 00:03, Tels wrote: >> Looking at the patch, at first I thought the order was sorted and you >> swapped STORAGE and STATISTICS by accident. But then, it seems the order >> is semi-random. Should

Re: Write lifetime hints for NVMe

2018-01-27 Thread Tomas Vondra
On 01/27/2018 08:06 PM, Dmitry Dolgov wrote: >> On 27 January 2018 at 16:03, Tomas Vondra >> wrote: >> >> Aren't those numbers far lower that you'd expect from NVMe storage? I do >> have a NVMe drive (Intel 750) in my machine, and I can do thousands of >>

Re: [HACKERS] generated columns

2018-01-27 Thread Peter Eisentraut
On 1/26/18 12:46, Robert Haas wrote: > On Thu, Jan 25, 2018 at 10:26 PM, Peter Eisentraut > wrote: >>> Does the SQL spec mention the matter? How do other systems >>> handle such cases? >> >> In Oracle you get the same overflow error. > > That seems awful. If a

Re: [HACKERS] GnuTLS support

2018-01-27 Thread Peter Eisentraut
On 1/25/18 09:07, Peter Eisentraut wrote: > On 1/19/18 13:43, Peter Eisentraut wrote: >> Comparing the existing {be,fe}-secure-openssl.c with the proposed >> {be,fe}-secure-gnutls.c, and with half an eye on the previously proposed >> Apple Secure Transport implementation, I have identified a few

Re: \describe*

2018-01-27 Thread Vik Fearing
On 01/27/2018 05:39 PM, David Fetter wrote: > On Fri, Jan 26, 2018 at 04:28:24PM +0100, Vik Fearing wrote: >> On 01/26/2018 03:49 PM, David Fetter wrote: >>> I propose that we do what at least MySQL, Oracle, and DB2 do and >>> implement DESCRIBE as its own command. >> Hard pass. > > Would you be

Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?

2018-01-27 Thread Tom Lane
David Rowley writes: > I'd offer to put it back to the order of the enum, but I want to > minimise the invasiveness of the patch. I'm not sure yet if it should > be classed as a bug fix or a new feature. FWIW, I'd call it a new feature. I think the ordering of

Re: JIT compiling with LLVM v9.0

2018-01-27 Thread Andres Freund
Hi, On 2018-01-26 22:52:35 -0800, Jeff Davis wrote: > The version of LLVM that I tried this against had a linker option > called "InternalizeLinkedSymbols" that would prevent the visibility > problem you mention (assuming I understand you correctly). I don't think they're fully solvable - you

Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?

2018-01-27 Thread David Rowley
On 27 January 2018 at 00:03, Tels wrote: > Looking at the patch, at first I thought the order was sorted and you > swapped STORAGE and STATISTICS by accident. But then, it seems the order > is semi-random. Should that list be sorted or is it already sorted by some >

Re: [HACKERS] Refactoring identifier checks to consistently use strcmp

2018-01-27 Thread Daniel Gustafsson
> On 27 Jan 2018, at 00:36, Tom Lane wrote: > > I've pushed this mostly as-is. Thanks! > I also took out the parser changes related to > allowing unquoted PARALLEL in old-style CREATE AGGREGATE, because that > is not a goal I consider worthy of adding extra grammar

Re: [HACKERS] PoC: custom signal handler for extensions

2018-01-27 Thread Arthur Zakirov
Hello, On Mon, Jan 22, 2018 at 02:34:58PM +0300, Maksim Milyutin wrote: > ... > I have attached a new version of patch and updated version of > remote_effective_user function implementation that demonstrates the usage of > custom signals API. Thank you. The patch is applied and build. > +/* >

Re: Write lifetime hints for NVMe

2018-01-27 Thread Dmitry Dolgov
> On 27 January 2018 at 16:03, Tomas Vondra > wrote: > > Aren't those numbers far lower that you'd expect from NVMe storage? I do > have a NVMe drive (Intel 750) in my machine, and I can do thousands of > transactions on it with two clients. Seems a bit suspicious.

Re: \describe*

2018-01-27 Thread David Fetter
On Fri, Jan 26, 2018 at 04:28:24PM +0100, Vik Fearing wrote: > On 01/26/2018 03:49 PM, David Fetter wrote: > > I propose that we do what at least MySQL, Oracle, and DB2 do and > > implement DESCRIBE as its own command. > Hard pass. Would you be so kind as to expand on this? "Pass" might indicate

Re: Add RANGE with values and exclusions clauses to the Window Functions

2018-01-27 Thread Tom Lane
Oliver Ford writes: > On Sat, Jan 27, 2018 at 7:40 AM, Erik Rijkers wrote: >> Regression tests only succeed for assert-disabled compiles; they fail when >> assert-enabled: > Problem seems to be with an existing Assert in catcache.c:1545: > Assert(nkeys > 0 &&

Re: Write lifetime hints for NVMe

2018-01-27 Thread Tomas Vondra
On 01/27/2018 02:20 PM, Dmitry Dolgov wrote: > Hi, > > From what I see some time ago the write lifetime hints support for NVMe multi > streaming was merged into Linux kernel [1]. Theoretically it allows data > written together on media so they can be erased together, which minimizes > garbage

Re: [HACKERS] proposal: psql command \graw

2018-01-27 Thread Pavel Stehule
2018-01-27 15:22 GMT+01:00 Daniel Verite : > Pavel Stehule wrote: > > > We are able to generate html/tex/markdown formats on client side. CSV is > > more primitive, but much more important data format, so it should not be > a > > problem. But I remember some

Re: [HACKERS] proposal: psql command \graw

2018-01-27 Thread Daniel Verite
Pavel Stehule wrote: > We are able to generate html/tex/markdown formats on client side. CSV is > more primitive, but much more important data format, so it should not be a > problem. But I remember some objections related to code duplication. While experimenting with adding csv as an

Write lifetime hints for NVMe

2018-01-27 Thread Dmitry Dolgov
Hi, >From what I see some time ago the write lifetime hints support for NVMe multi streaming was merged into Linux kernel [1]. Theoretically it allows data written together on media so they can be erased together, which minimizes garbage collection, resulting in reduced write amplification as

Re: Setting BLCKSZ 4kB

2018-01-27 Thread Tomas Vondra
On 01/27/2018 05:01 AM, Bruce Momjian wrote: > On Fri, Jan 26, 2018 at 11:53:33PM +0100, Tomas Vondra wrote: >> >> ... >> >> FWIW even if it's not save in general, it would be useful to >> understand what are the requirements to make it work. I mean, >> conditions that need to be met on various

Re: Add RANGE with values and exclusions clauses to the Window Functions

2018-01-27 Thread Erik Rijkers
On 2018-01-27 11:49, Oliver Ford wrote: On Sat, Jan 27, 2018 at 7:40 AM, Erik Rijkers wrote: On 2018-01-27 00:35, Oliver Ford wrote: Attached patch implements an extensible version of the RANGE with values clause. It doesn't actually add any more type support than was [...]

Re: General purpose hashing func in pgbench

2018-01-27 Thread Ildar Musin
Hello Fabien, 26/01/2018 09:28, Fabien COELHO пишет: > > Hello Ildar, > > Applies, compiles, runs. > > I still have a few very minor comments, sorry for this (hopefully) > last iteration from my part. I'm kind of iterative... > > The XML documentation source should avoid a paragraph on one very

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2018-01-27 Thread Amit Kapila
On Fri, Jan 26, 2018 at 12:36 PM, Amit Kapila wrote: > On Fri, Jan 26, 2018 at 12:00 PM, Peter Geoghegan wrote: >> On Thu, Jan 25, 2018 at 10:00 PM, Amit Kapila >> wrote: At this point, my preferred solution is for someone to

Wait for parallel workers to attach

2018-01-27 Thread Amit Kapila
During the recent development of parallel operation (parallel create index)[1], a need has been arised for $SUBJECT. The idea is to allow leader backend to rely on number of workers that are successfully started. This API allows leader to wait for all the workers to start or fail even if one of