Re: 9.6.9 Default configuration for a default installation but different with-krb-srvnam

2019-04-26 Thread Laurenz Albe
On Fri, 2019-04-26 at 20:25 +, Jean-Philippe Chenel wrote: > > > 1. So my question is, how can I compile this version of postgresql > > > (9.6.9) and have the same real things > > > of the default previously installed version, but with the > > > --with-krb-srvnam=POSTGRES_DEV to change the >

Re: Computed index on transformation of jsonb key set

2019-04-26 Thread Rob Sargent
On 4/26/19 3:53 PM, Steven Schlansker wrote: On Apr 26, 2019, at 2:33 PM, Rob Sargent wrote: On 4/26/19 3:25 PM, Steven Schlansker wrote: How can I efficiently implement the feature I've described? It seems difficult to use computed indexing with GIN. Storing the map in a child table

Re: Computed index on transformation of jsonb key set

2019-04-26 Thread Steven Schlansker
> On Apr 26, 2019, at 2:33 PM, Rob Sargent wrote: > > > On 4/26/19 3:25 PM, Steven Schlansker wrote: >> >> >> How can I efficiently implement the feature I've described? It seems >> difficult to use computed indexing with GIN. >> > Storing the map in a child table (parentId, UUID, int) i

Re: Computed index on transformation of jsonb key set

2019-04-26 Thread Rob Sargent
On 4/26/19 3:25 PM, Steven Schlansker wrote: Hi Postgres fans, We store a Java Map in Postgres as a jsonb column. As json does not have a UUID type, it is of course stored as text. A simple value might be: {"04e623c0-6940-542f-a0de-4c999c626dfe": 5000, "6d3e24b6-9e8c-5eb1-9e4c-f32cc40864

Re: Computed index on transformation of jsonb key set

2019-04-26 Thread David G. Johnston
On Fri, Apr 26, 2019 at 2:25 PM Steven Schlansker < stevenschlans...@gmail.com> wrote: > How can I efficiently implement the feature I've described? It seems > difficult to use computed indexing with GIN. > Don't use a computed index? Add a trigger to populate a physical column and index that.

Computed index on transformation of jsonb key set

2019-04-26 Thread Steven Schlansker
Hi Postgres fans, We store a Java Map in Postgres as a jsonb column. As json does not have a UUID type, it is of course stored as text. A simple value might be: {"04e623c0-6940-542f-a0de-4c999c626dfe": 5000, "6d3e24b6-9e8c-5eb1-9e4c-f32cc40864c9": 20825} I am trying to implement an effi

Re: TCP Resets when closing connection opened via SSL

2019-04-26 Thread Jeremy Harris
On 26/04/2019 18:19, Tom Lane wrote: > =?utf-8?Q?J=C4=81nis_P=C5=ABris?= writes: >> This is only reproducible with SSL connection. > > Seems like you might get more insight from OpenSSL experts, then. > (No idea where you find some, but they must exist.) List-Id: -- Cheers, Jeremy

Re: TCP Resets when closing connection opened via SSL

2019-04-26 Thread Tom Lane
=?utf-8?Q?J=C4=81nis_P=C5=ABris?= writes: > This is only reproducible with SSL connection. Seems like you might get more insight from OpenSSL experts, then. (No idea where you find some, but they must exist.) regards, tom lane

Re: TCP Resets when closing connection opened via SSL

2019-04-26 Thread Jānis Pūris
Thanks for the insight, Tom. > It's fairly obvious from the postmaster log that the client side > is not bothering to close the transaction it started Thats what I was also thinking, but I've managed to reproduce it with autocommit or commit before closing connection as well. This is only reprod

Re: TCP Resets when closing connection opened via SSL

2019-04-26 Thread Tom Lane
=?utf-8?Q?J=C4=81nis_P=C5=ABris?= writes: > I'm trying to do a simple health check for keepalived and other services via > a python script and psycopg2 library. All seems to be all right, until I > close the connection, at which point a packet with TCP reset is produced. Hm. It's fairly obviou

Re: Is _ a supported way to create a column of array type?

2019-04-26 Thread Tom Lane
Piotr Findeisen writes: > Do you have any plans to support arrays with different number of dimensions > in the type system? Mmm ... don't hold your breath. People have speculated about that, but I haven't seen any actual proposals, and it's hard to see how we could do it without creating compati

Re: 9.6.9 Default configuration for a default installation but different with-krb-srvnam

2019-04-26 Thread Laurenz Albe
On Fri, 2019-04-26 at 13:18 +, Jean-Philippe Chenel wrote: > 1. So my question is, how can I compile this version of postgresql (9.6.9) > and have the same real things > of the default previously installed version, but with the > --with-krb-srvnam=POSTGRES_DEV to change the > default user nam

9.6.9 Default configuration for a default installation but different with-krb-srvnam

2019-04-26 Thread Jean-Philippe Chenel
Hi, Currently, when I make select version(), this version is installed. PostgreSQL 9.6.9 on x86_64-pc-linux-gnu (Ubuntu 9.6.9-2.pgdg16.04+1), compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609, 64-bit The database is running on the installation of Ubuntu 16.04 x64 I've configure

Re: Inexplicable UPDATE...RETURNING behaviour

2019-04-26 Thread Joe Wildish
Hi Tom, > On 16 Apr 2019, at 00:58, Tom Lane wrote: > > Joe Wildish writes: >> We are seeing an inexplicable behaviour when issuing an "UPDATE..RETURNING" >> statement. I am unsure if it is a Postgres bug. Additional eyes-on would be >> much appreicated. > >> When issuing the following state

Re: Is _ a supported way to create a column of array type?

2019-04-26 Thread Joe Conway
On 4/26/19 6:50 AM, Piotr Findeisen wrote: > Presto type system however distinguishes array(integer), > array(array(integer))... > (using Presto therms). And execution is (expectedly) not as flexible. Fine point here -- Postgres does not actually have arrays-of-arrays, it has multi-dimension array

Re: Is _ a supported way to create a column of array type?

2019-04-26 Thread Piotr Findeisen
Hi Tom, I think I understand now. Postgres type system does not distinguish between array types with different number of dimensions. int[], int[][] and int[][][][][][] are all equivalent to the type system. Number of dimensions is part of the value though and execution takes care of it. If I sub

Re: TCP Resets when closing connection opened via SSL

2019-04-26 Thread Rainer Pruy
On 26.04.19 09:41, Jānis Pūris wrote: > /Resending the original message without any formatting./ > > Hello, > > I'm trying to do a simple health check for keepalived and other > services via a python script and psycopg2 library. All seems to be all > right, until I close the connection, at which po

Re: TCP Resets when closing connection opened via SSL

2019-04-26 Thread Jānis Pūris
Resending the original message without any formatting. Hello, I'm trying to do a simple health check for keepalived and other services via a python script and psycopg2 library. All seems to be all right, until I close the connection, at which point a packet with TCP reset is produced. This has

TCP Resets when closing connection opened via SSL

2019-04-26 Thread Jānis Pūris
Hello, I'm trying to do a simple health check for keepalived and other services via a python script and psycopg2 library. All seems to be all right, until I close the connection, at which point a packet with TCP reset is produced. This has become very problematic and creates extensive noise in m

Re: Is _ a supported way to create a column of array type?

2019-04-26 Thread Piotr Findeisen
Hi Tom, Thanks for your response. I think I need to provide some context for my question. I am maintaining Presto connector to Postgres ( https://github.com/prestosql/presto/tree/master/presto-postgresql). When accessing a table in Postgres, we need to map columns' types to appropriate types in