Re: [HACKERS] Custom compression methods

2020-12-26 Thread Andrey Borodin
> 25 дек. 2020 г., в 14:34, Dilip Kumar написал(а): > > > > > > > Maybe add Lz4\Zlib WAL FPI compression on top of this patchset? I'm not insisting on anything, it just would be so cool to have it... BTW currently there are Oid collisions in original patchset. Best regards, Andre

possible replacement for llvm JIT

2020-12-26 Thread Pavel Stehule
Hi maybe interesting project for decreasing overhead of JIT https://developers.redhat.com/blog/2020/01/20/mir-a-lightweight-jit-compiler-project/ Regards Pavel

Re: Wrong comment in tuptable.h

2020-12-26 Thread Andres Freund
Hi, On 2020-12-26 18:00:49 -0800, Jeff Davis wrote: > /* >* Return a copy of heap tuple representing the contents of the slot. > The >* copy needs to be palloc'd in the current memory context. The slot >* itself is expected to remain unaffected. It is *not* expected to > have >*

Wrong comment in tuptable.h

2020-12-26 Thread Jeff Davis
/* * Return a copy of heap tuple representing the contents of the slot. The * copy needs to be palloc'd in the current memory context. The slot * itself is expected to remain unaffected. It is *not* expected to have * meaningful "system columns" in the copy. The copy is not be "own

Re: SQL/JSON: JSON_TABLE

2020-12-26 Thread Zhihong Yu
For new files introduced in the patches: + * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group 2021 is a few days ahead. It would be good to update the year range. For transformJsonTableColumn: + jfexpr->op = + jtc->coltype == JTC_REGULAR ? IS_JSON_VALUE : + jt

Re: Better client reporting for "immediate stop" shutdowns

2020-12-26 Thread Andres Freund
Hi, On 2020-12-26 13:37:15 -0500, Tom Lane wrote: > I suppose a compromise position could be to let the postmaster export its > "Shutdown" state variable, and then let backends assume that SIGTERM means > fast shutdown or pg_terminate_backend depending on the state of that one > global variable.

Re: SQL/JSON: functions

2020-12-26 Thread Zhihong Yu
Hi, For ExecEvalJsonExprSubtrans(), if you check !subtrans first, + /* No need to use subtransactions. */ + return func(op, econtext, res, resnull, p, error); The return statement would allow omitting the else keyword and left-indent the code in the current if block. For ExecEvalJson

Re: Better client reporting for "immediate stop" shutdowns

2020-12-26 Thread Tom Lane
Andres Freund writes: > On 2020-12-21 16:43:33 -0500, Tom Lane wrote: >> * I chose to report the same message for immediate shutdown as we >> already use for SIGTERM (fast shutdown or pg_terminate_backend()). >> Should it be different, and if so what? [ per upthread, I did already change the SIGQ

Re: [HACKERS] [PATCH] Generic type subscripting

2020-12-26 Thread Tom Lane
Dmitry Dolgov <9erthali...@gmail.com> writes: >> On Tue, Dec 22, 2020 at 02:21:22PM -0500, Tom Lane wrote: >> We do have precedent for this, it's the rules about resolving argument >> types for overloaded functions. But the conclusion that that precedent >> leads to is that we should check whether

Re: pglz compression performance, take two

2020-12-26 Thread Tom Lane
Tomas Vondra writes: > On 12/26/20 8:06 AM, Andrey Borodin wrote: >> I'm still in doubt should I register this patch on CF or not. I'm willing to >> work on this, but it's not clear will it hit PGv14. And I hope for PGv15 we >> will have lz4 or something better for WAL compression. > I'd sugges

Re: Rethinking plpgsql's assignment implementation

2020-12-26 Thread Pavel Stehule
Hi I repeated tests. I wrote a set of simple functions. It is a synthetical test, but I think it can identify potential problems well. I calculated the average of 3 cycles and I checked the performance of each function. I didn't find any problem. The total execution time is well too. Patched code

Re: pg_stat_statements and "IN" conditions

2020-12-26 Thread Zhihong Yu
Hi, A few comments. + "After this number of duplicating constants start to merge them.", duplicating -> duplicate + foreach(lc, (List *) expr) + { + Node * subExpr = (Node *) lfirst(lc); + + if (!IsA(subExp

Re: Parallel Inserts in CREATE TABLE AS

2020-12-26 Thread vignesh C
On Thu, Dec 24, 2020 at 1:07 PM Bharath Rupireddy wrote: > > On Thu, Dec 24, 2020 at 10:25 AM vignesh C wrote: > > You could change intoclause_len = strlen(intoclausestr) to > > strlen(intoclausestr) + 1 and use intoclause_len in the remaining > > places. We can avoid the +1 in the other places.

Re: Parallel copy

2020-12-26 Thread vignesh C
On Wed, Dec 23, 2020 at 3:05 PM Hou, Zhijie wrote: > > Hi > > > Yes this optimization can be done, I will handle this in the next patch > > set. > > > > I have a suggestion for the parallel safety-check. > > As designed, The leader does not participate in the insertion of data. > If User use (PARA

Re: Added missing copy related data structures to typedefs.list

2020-12-26 Thread vignesh C
On Thu, Dec 17, 2020 at 4:28 AM Bruce Momjian wrote: > > On Mon, Dec 7, 2020 at 01:56:50PM +0530, vignesh C wrote: > > Hi, > > > > Added missing copy related data structures to typedefs.list, these > > data structures were added while copy files were split during the > > recent commit. I found th

Re: pglz compression performance, take two

2020-12-26 Thread Tomas Vondra
On 12/26/20 8:06 AM, Andrey Borodin wrote: 12 дек. 2020 г., в 22:47, Andrey Borodin написал(а): I've cleaned up comments, checked that memory alignment stuff actually make sense for 32-bit ARM (according to Godbolt) and did some more code cleanup. PFA v2 patch. I'm still in doubt sh

Re: pgsql: Add key management system

2020-12-26 Thread Bruce Momjian
On Sat, Dec 26, 2020 at 02:38:40PM +, Shinoda, Noriyoshi (PN Japan FSIP) wrote: > Hi, > > Thank you for developing a great feature. I tested it immediately. > The attached patch changes the value of the --file-encryption-keylen option > of the initdb command to mandatory. No value is current

RE: pgsql: Add key management system

2020-12-26 Thread Shinoda, Noriyoshi (PN Japan FSIP)
Hi, Thank you for developing a great feature. I tested it immediately. The attached patch changes the value of the --file-encryption-keylen option of the initdb command to mandatory. No value is currently required. I also changed the help message and the manual. Regards, Noriyoshi Shinoda -

Re: pg_stat_statements and "IN" conditions

2020-12-26 Thread Dmitry Dolgov
> On Wed, Nov 18, 2020 at 05:04:32PM +0100, Dmitry Dolgov wrote: > > On Wed, Aug 12, 2020 at 06:19:02PM +0200, Dmitry Dolgov wrote: > > > > I would like to start another thread to follow up on [1], mostly to bump up > > the > > topic. Just to remind, it's about how pg_stat_statements jumbling Arra