Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-12-22 Thread Michael Paquier
On Fri, Dec 22, 2017 at 11:59 AM, Michael Paquier wrote: > I have looked at how things could be done in symmetry for both the frontend > and backend code, and I have produced the attached patch 0002, which > can be applied on top of 0001 implementing tls-server-end-point. This > simplifies the int

Re: [HACKERS] pow support for pgbench

2017-12-22 Thread Raúl Marín Rodríguez
Hi Fabien, Thanks for the review. If a double is always returned, I'm wondering whether keeping the ipow > version makes much sense: In case of double loss of precision, the > precision is lost, too bad, and casting back to int won't bring it back. I've kept it because knowing that both are ints

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

2017-12-22 Thread Rajkumar Raghuwanshi
On Wed, Dec 20, 2017 at 5:21 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > Thanks. Here are some comments > > Thanks Ashutosh for review and suggestions. > +-- test default partition behavior for range > +ALTER TABLE prt1 DETACH PARTITION prt1_p3; > +ALTER TABLE prt1 ATTACH PART

Suspicious call of initial_cost_hashjoin()

2017-12-22 Thread Antonin Houska
try_partial_hashjoin_path() passes constant true to for the parallel_hash argument of initial_cost_hashjoin(). Shouldn't it instead pass the parallel_hash argument that it receives? This is related to commit 1804284042e659e7d16904e7bbb0ad546394b6a3. -- Antonin Houska Cybertec Schönig & Schönig G

Re: [HACKERS] pow support for pgbench

2017-12-22 Thread Fabien COELHO
Hello, If a double is always returned, I'm wondering whether keeping the ipow version makes much sense: In case of double loss of precision, the precision is lost, too bad, and casting back to int won't bring it back. I've kept it because knowing that both are ints enables not making a lot of

Re: [HACKERS] pgbench more operators & functions

2017-12-22 Thread Teodor Sigaev
I've checked, but truexxx is not accepted as true. I have added a test case which fails on "malformed variable", i.e. it went up to scanning a double. When comparing ("truexxx", "true", 7) the fifth char is different, so it is != 0. Or I'm missing something. Oh, my fault. I've missed that. Than

Re: [HACKERS] pgbench more operators & functions

2017-12-22 Thread Fabien COELHO
Hello Teodor, replaced -1 by 0x so that the code is hopefully clearer. I changed 0xff constant to ~INT64CONST(0), seems, it's more consistent way. Also I remove some whitespaces in exprparse.y. Fixed version in attachment. Fine, quite readable this way. Actually, I prefer to see s

Re: General purpose hashing func in pgbench

2017-12-22 Thread Ildar Musin
21/12/2017 18:26, Fabien COELHO пишет: > >> I think it is not commitfest ready yet -- I need to add some >> documentation and tests first. > > Yes, doc & test are missing. > > From your figures, the murmur2 algorithm output looks way better. I'm > wondering whether it makes sense to provide a bad

Re: Suspicious call of initial_cost_hashjoin()

2017-12-22 Thread Thomas Munro
On Fri, Dec 22, 2017 at 10:45 PM, Antonin Houska wrote: > try_partial_hashjoin_path() passes constant true to for the parallel_hash > argument of initial_cost_hashjoin(). Shouldn't it instead pass the > parallel_hash argument that it receives? Thanks. Yeah. When initial_cost_hashjoin() calls ge

Should we nonblocking open FIFO files in COPY?

2017-12-22 Thread Adam Lee
Hi, I have an issue that COPY from a FIFO, which has no writers, could not be canceled, because COPY invokes AllocateFile() -> fopen() -> blocking open(). ``` [postgres@s1 ~]$ mkfifo /tmp/test0 [postgres@s1 ~]$ /usr/local/pgsql/bin/psql test psql (11devel) Type "help" for help. test=# create tab

Re: After dropping the rule - Not able to insert / server crash (one time ONLY)

2017-12-22 Thread Dilip Kumar
On Mon, Dec 11, 2017 at 4:33 PM, Dilip Kumar wrote: > On Mon, Dec 11, 2017 at 3:54 PM, tushar > wrote: > >> Hi, >> >> While testing something , I found that even after rule has dropped not >> able to insert data and in an another scenario , there is a Crash/ >> >> Please refer this scenario's

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-12-22 Thread Sergei Kornilov
Hello I think limit wal in replication slots is useful in some cases. But first time i was confused with proposed terminology secured/insecured/broken/unknown state. patch -p1 gives some "Stripping trailing CRs from patch" messages for me, but applied to current HEAD and builds. After little tes

[HACKERS] PoC: custom signal handler for extensions

2017-12-22 Thread Maksim Milyutin
Hi, hackers! I want to propose the patch that allows to define custom signals and their handlers on extension side. It is based on ProcSignal module, namely it defines the fixed set (number is specified by constant) of custom signals that could be reserved on postgres initialization stage (i

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-22 Thread Maksim Milyutin
On 19.12.2017 16:54, Pavel Stehule wrote: Hi 2017-12-19 14:44 GMT+01:00 Craig Ringer >: On 18 December 2017 at 10:05, Robert Haas mailto:robertmh...@gmail.com>> wrote: On Thu, Dec 14, 2017 at 9:34 PM, Craig Ringer mailto:cr...@2ndquadrant.com

Huge backend memory footprint

2017-12-22 Thread Konstantin Knizhnik
While my experiments with pthreads version of Postgres I find out that I can not create more than 100k backends even at the system with 4Tb of RAM. I do not want to discuss now the idea of creating so large number of backends - yes, most of the real production systems are using pgbouncer or simi

Re: Huge backend memory footprint

2017-12-22 Thread Claudio Freire
On Fri, Dec 22, 2017 at 10:07 AM, Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > While my experiments with pthreads version of Postgres I find out that I > can not create more than 100k backends even at the system with 4Tb of RAM. > I do not want to discuss now the idea of creating so l

Re: Huge backend memory footprint

2017-12-22 Thread Andres Freund
Hi, On 2017-12-22 16:07:23 +0300, Konstantin Knizhnik wrote: > While my experiments with pthreads version of Postgres I find out that I can > not create more than 100k backends even at the system with 4Tb of RAM. I don't think this is a problem we need to address at this point. Would you care to

Re: Huge backend memory footprint

2017-12-22 Thread Konstantin Knizhnik
On 22.12.2017 16:13, Claudio Freire wrote: On Fri, Dec 22, 2017 at 10:07 AM, Konstantin Knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: While my experiments with pthreads version of Postgres I find out that I can not create more than 100k backends even at the system with 4Tb

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-22 Thread Craig Ringer
On 22 December 2017 at 20:50, Maksim Milyutin wrote: > On 19.12.2017 16:54, Pavel Stehule wrote: > > Hi > > 2017-12-19 14:44 GMT+01:00 Craig Ringer : > >> On 18 December 2017 at 10:05, Robert Haas wrote: >> >>> On Thu, Dec 14, 2017 at 9:34 PM, Craig Ringer >>> wrote: >>> > On 15 December 2017 a

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-22 Thread Pavel Stehule
2017-12-22 13:50 GMT+01:00 Maksim Milyutin : > On 19.12.2017 16:54, Pavel Stehule wrote: > > Hi > > 2017-12-19 14:44 GMT+01:00 Craig Ringer : > >> On 18 December 2017 at 10:05, Robert Haas wrote: >> >>> On Thu, Dec 14, 2017 at 9:34 PM, Craig Ringer >>> wrote: >>> > On 15 December 2017 at 09:24,

Observations in Parallel Append

2017-12-22 Thread Amit Kapila
Few observations in Parallel Append commit (ab727167) 1. +++ b/src/include/nodes/execnodes.h @@ -21,6 +21,7 @@ #include "lib/pairingheap.h" #include "nodes/params.h" #include "nodes/plannodes.h" +#include "storage/spin.h" .. There doesn't seem to be any need for including spin.h. I think some

Re: WIP: a way forward on bootstrap data

2017-12-22 Thread Alvaro Herrera
Robert Haas wrote: > On Thu, Dec 21, 2017 at 5:32 PM, Alvaro Herrera > wrote: > > Hmm, patch 0008 removes data lines from the .h but leaves the dependent > > OID define lines around: > > Just a question here -- do we actually have consensus on doing the > stuff that these patches do? Because I'

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-12-22 Thread Alvaro Herrera
Hello Jesper, Jesper Pedersen wrote: > Passes check-world here too w/ TAP + cassert. Great, thanks for checking. > index.c: > [and a few other comments] I believe these are all fixed by the attached delta patch. If you have wording suggestions for the doc changes, please send them along. Th

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-22 Thread Maksim Milyutin
On 22.12.2017 16:56, Craig Ringer wrote: On 22 December 2017 at 20:50, Maksim Milyutin > wrote: On 19.12.2017 16:54, Pavel Stehule wrote: sorry for small offtopic. Can be used this mechanism for log of executed plan or full query? That's a really go

Re: [HACKERS] Runtime Partition Pruning

2017-12-22 Thread Robert Haas
On Thu, Dec 21, 2017 at 8:37 PM, David Rowley wrote: >> No, I don't think comparing to previous custom plans is a workable >> approach. I was thinking, rather, that if we know for example that >> we've doing pruning on partition_column = $1, then we know that only >> one partition will match. Th

Re: pgsql: Get rid of copy_partition_key

2017-12-22 Thread Alvaro Herrera
I believe this patch (which also fixes a comment I neglected to fix in the previous one) should satisfy your concerns. It's still running a few relevant tests (create_function_1 create_type point polygon circle create_table copy create_misc create_index alter_table partition_join partition_prune h

Re: pgsql: Get rid of copy_partition_key

2017-12-22 Thread Alvaro Herrera
Seems I misremembered the whole opfuncid getting reset thing (it applies to reading a node from string, not copying) and it was undone by 9f1255ac8593 anyway. I don't think it makes much of a difference, but I mention this in case you're wondering why I changed the fix_opfuncids() call. -- Álvar

Unique indexes & constraints on partitioned tables

2017-12-22 Thread Alvaro Herrera
Hello, I'm giving this patch its own thread for mental sanity, but this is essentially what already posted in [1], plus some doc fixes. This patch depends on the main "local partitioned indexes" in that thread, last version of which is at [2]. I also added a mechanism to set the constraints in p

Re: AS OF queries

2017-12-22 Thread Greg Stark
On 20 December 2017 at 12:45, Konstantin Knizhnik wrote: > It seems to me that it will be not so difficult to implement them in > Postgres - we already have versions of tuples. > Looks like we only need to do three things: > 1. Disable autovacuum (autovacuum = off) "The Wheel of Time turns, and

Re: genomic locus

2017-12-22 Thread Gene Selkov
> On Dec 22, 2017, at 1:53 AM, Teodor Sigaev wrote: > > Hmm, would you try to implement separate type for querying? Similar to > tsquery, lquery (for ltree), jsquery etc. That sounds like a good idea if I want to make an app that will only be accessed through a purpose-built front end. Now I’

Re: AS OF queries

2017-12-22 Thread Michael Paquier
On Fri, Dec 22, 2017 at 11:08:02PM +, Greg Stark wrote: > On 20 December 2017 at 12:45, Konstantin Knizhnik > wrote: > > > It seems to me that it will be not so difficult to implement them in > > Postgres - we already have versions of tuples. > > Looks like we only need to do three things: >

Re: [HACKERS] [PATCH] Lockable views

2017-12-22 Thread Michael Paquier
On Fri, Dec 22, 2017 at 04:19:46PM +0900, Yugo Nagata wrote: > I was busy for and I could not work on this patch. After reading the > previous discussion, I still think the behavior of this patch would > be right. So, I would like to reregister to CF 2018-1. Do I need to > create a new entry on CF?

PATCH: logical_work_mem and logical streaming of large in-progress transactions

2017-12-22 Thread Tomas Vondra
Hi all, Attached is a patch series that implements two features to the logical replication - ability to define a memory limit for the reorderbuffer (responsible for building the decoded transactions), and ability to stream large in-progress transactions (exceeding the memory limit). I'm submittin

Re: User defined data types in Logical Replication

2017-12-22 Thread Dang Minh Huong
On 2017/12/21 10:05, Masahiko Sawada wrote: On Wed, Dec 20, 2017 at 5:39 PM, Huong Dangminh wrote: Hi Sawada-san, Thank you for quick response. The changes look good to me. But I wonder if the following changes needs some comments to describe what each checks does for. -if (errarg->attn