Re: PgBackrest questions

2018-03-14 Thread chiru r
Hi Stephen, Thank you very much for your quick reply. On Wed, Mar 14, 2018 at 6:17 PM, Stephen Frost wrote: > Greetings, > > * chiru r (chir...@gmail.com) wrote: > > I am testing Pgbackrest and I have few questions. > > Great! > > > 1. I used postures user to perform backups and restores with

Re: wiki Disk Usage, table size: ERROR: could not open relation with OID 0

2018-03-14 Thread Tom Lane
Michael Paquier writes: > On Wed, Mar 14, 2018 at 04:17:54PM +0100, Hans Schou wrote: >> I got the message >> ERROR: could not open relation with OID 0 >> when running the "General Table Size Information" from >> https://wiki.postgresql.org/wiki/Disk_Usage >> I'm running version 9.1.9 so it shoul

Re: wiki Disk Usage, table size: ERROR: could not open relation with OID 0

2018-03-14 Thread Michael Paquier
On Wed, Mar 14, 2018 at 04:17:54PM +0100, Hans Schou wrote: > I got the message > ERROR: could not open relation with OID 0 > when running the "General Table Size Information" from > https://wiki.postgresql.org/wiki/Disk_Usage I cannot see this failure on latest HEAD on a database running the re

Re: Extract elements from JSON array and return them as concatenated string

2018-03-14 Thread Alexander Farber
Thank you - On Wed, Mar 14, 2018 at 8:41 PM, Ivan E. Panchenko < i.panche...@postgrespro.ru> wrote: > Yes, here x is the alias for the record, not for the json field. So you > need to write the query like > > select string_agg(x->>'letter', ' ') > from ( >select jsonb_array_elements(tiles) x

Re: PgBackrest questions

2018-03-14 Thread Stephen Frost
Greetings, * chiru r (chir...@gmail.com) wrote: > I am testing Pgbackrest and I have few questions. Great! > 1. I used postures user to perform backups and restores with Pgbackrest > tool. > The Trust authentication in pg_hba.conf file is working without issues. Please don't use 'trust'. > If

Re: JDBC connectivity issue

2018-03-14 Thread Adrian Klaver
On 03/14/2018 01:47 PM, chris wrote: Oh sorry for getting the wrong information. At this point not sure whether it is wrong information or not. How would I get the information on what driver is currently installed? I am not a Java programmer, so I am not the best person to answer this. St

PgBackrest questions

2018-03-14 Thread chiru r
Hi, I am testing Pgbackrest and I have few questions. please help if any one has tested these cases. 1. I used postures user to perform backups and restores with Pgbackrest tool. The Trust authentication in pg_hba.conf file is working without issues. If I use md5 authentication in pg_hba_conf f

Re: JDBC connectivity issue

2018-03-14 Thread chris
Oh sorry for getting the wrong information. How would I get the information on what driver is currently installed? On 03/14/2018 09:44 AM, Adrian Klaver wrote: On 03/14/2018 07:51 AM, chris wrote: I believe its Postgresql-9.4.1208.jre7.jar Pretty sure solving this is going to require knowi

Re: Need followup setup instructions to postgresql-10.3-1-linux-x64.run

2018-03-14 Thread pinker
you probably need to change pg_hba.conf. set the authentication method to trust for your user, reload the server with pg_ctl, go to psql and change the passwords. more details you will find here: https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html -- Sent from: http://www.postg

Re: Best options for new PG instance

2018-03-14 Thread pinker
Bugzilla from scher...@proteus-tech.com wrote > Oh - and lots of memory is always good no matter what as others have said. I'm probably "the others" here. I have seen already really large instalations like with 6TB of RAM. Dealing with it is like completely other universe of problems, because of N

Re: Primary key gist index?

2018-03-14 Thread Jeremy Finzel
On Wed, Mar 14, 2018 at 1:29 PM Paul Jungwirth wrote: > On 03/14/2018 06:19 AM, Jeremy Finzel wrote: > > Hello! From all that I can tell, it is not possible using a btree_gist > > index as a primary key. If so, why not? I have a table with this gist > > index which truly ought to be its primar

Re: Extract elements from JSON array and return them as concatenated string

2018-03-14 Thread Ivan E. Panchenko
14.03.2018 20:02, Alexander Farber пишет: Thank you, Ivan! I am trying to apply your suggestion to my table - On Wed, Mar 14, 2018 at 5:34 PM, Ivan E. Panchenko mailto:i.panche...@postgrespro.ru>> wrote: Hi Alex, SELECT  string_agg(x->>'letter','') FROM json_array_elements( '[{"

Re: Primary key gist index?

2018-03-14 Thread Paul Jungwirth
On 03/14/2018 11:44 AM, Tom Lane wrote:> Also, as you mention, extrapolating behavior that's not really equality to situations like foreign keys gets pretty interesting pretty fast. An exclusion constraint using && might ensure that no two values in the column are identical, but it would not be e

Re: Primary key gist index?

2018-03-14 Thread Steven Lembark
On Wed, 14 Mar 2018 11:28:59 -0700 Paul Jungwirth wrote: > > EXCLUDE USING gist (id WITH =, as_of_date WITH &&) > null), but maybe there are other primary-key duties it doesn't meet, > like defining foreign keys that reference it. I've been on-and-off The PK does provide a unique index. It

Re: Primary key gist index?

2018-03-14 Thread Adrian Klaver
On 03/14/2018 11:10 AM, Jeremy Finzel wrote: On Wed, Mar 14, 2018 at 8:33 AM, Adrian Klaver mailto:adrian.kla...@aklaver.com>> wrote: On 03/14/2018 06:19 AM, Jeremy Finzel wrote: Hello!  From all that I can tell, it is not possible using a btree_gist index as a primary ke

Re: Primary key gist index?

2018-03-14 Thread Tom Lane
Paul Jungwirth writes: > On 03/14/2018 06:19 AM, Jeremy Finzel wrote: >> Hello! From all that I can tell, it is not possible using a btree_gist >> index as a primary key. If so, why not? I have a table with this gist >> index which truly ought to be its primary key. as_of_date is of range >

Re: Primary key gist index?

2018-03-14 Thread Paul Jungwirth
On 03/14/2018 06:19 AM, Jeremy Finzel wrote: Hello!  From all that I can tell, it is not possible using a btree_gist index as a primary key.  If so, why not?  I have a table with this gist index which truly ought to be its primary key.  as_of_date is of range date type: EXCLUDE USING gist (id

Re: Primary key gist index?

2018-03-14 Thread Jeremy Finzel
On Wed, Mar 14, 2018 at 8:33 AM, Adrian Klaver wrote: > On 03/14/2018 06:19 AM, Jeremy Finzel wrote: > >> Hello! From all that I can tell, it is not possible using a btree_gist >> index as a primary key. If so, why not? I have a table with this gist >> > > https://www.postgresql.org/docs/10/st

Re: Extract elements from JSON array and return them as concatenated string

2018-03-14 Thread Adrian Klaver
On 03/14/2018 10:12 AM, Adrian Klaver wrote: On 03/14/2018 10:02 AM, Alexander Farber wrote: Thank you, Ivan! I am trying to apply your suggestion to my table - On Wed, Mar 14, 2018 at 5:34 PM, Ivan E. Panchenko mailto:i.panche...@postgrespro.ru>> wrote:     Hi Alex,     SELECT  string_agg(

Re: Extract elements from JSON array and return them as concatenated string

2018-03-14 Thread Adrian Klaver
On 03/14/2018 10:02 AM, Alexander Farber wrote: Thank you, Ivan! I am trying to apply your suggestion to my table - On Wed, Mar 14, 2018 at 5:34 PM, Ivan E. Panchenko mailto:i.panche...@postgrespro.ru>> wrote: Hi Alex, SELECT  string_agg(x->>'letter','') FROM json_array_elements(

Re: Extract elements from JSON array and return them as concatenated string

2018-03-14 Thread Alexander Farber
Thank you, Ivan! I am trying to apply your suggestion to my table - On Wed, Mar 14, 2018 at 5:34 PM, Ivan E. Panchenko < i.panche...@postgrespro.ru> wrote: > Hi Alex, > > SELECT string_agg(x->>'letter','') FROM json_array_elements( > > '[{"col": 7, "row": 12, "value": 3, "letter": "A"}, {"col":

Re: Extract elements from JSON array and return them as concatenated string

2018-03-14 Thread Ivan E. Panchenko
Hi Alex, SELECT  string_agg(x->>'letter','') FROM json_array_elements( '[{"col": 7, "row": 12, "value": 3, "letter": "A"}, {"col": 8, "row": 12, "value": 10, "letter": "B"}, {"col": 9, "row": 12, "value": 1, "letter": "C"}, {"col": 10, "row": 12, "value": 2, "letter": "D"}]'::json ) x; Rega

Extract elements from JSON array and return them as concatenated string

2018-03-14 Thread Alexander Farber
Good afternoon, A PostgreSQL 10.3 table contains JSON data like: [{"col": 7, "row": 12, "value": 3, "letter": "A"}, {"col": 8, "row": 12, "value": 10, "letter": "B"}, {"col": 9, "row": 12, "value": 1, "letter": "C"}, {"col": 10, "row": 12, "value": 2, "letter": "D"}] Please suggest, how to extra

Re: JDBC connectivity issue

2018-03-14 Thread Adrian Klaver
On 03/14/2018 07:51 AM, chris wrote: I believe its Postgresql-9.4.1208.jre7.jar Pretty sure solving this is going to require knowing exactly what driver is in use. The failover syntax looks to be fairly recent, so being off by a little on the driver version can make a big difference. Or yo

wiki Disk Usage, table size: ERROR: could not open relation with OID 0

2018-03-14 Thread Hans Schou
Hi I got the message ERROR: could not open relation with OID 0 when running the "General Table Size Information" from https://wiki.postgresql.org/wiki/Disk_Usage This patch gives some system tables @@ -12,5 +12,6 @@ FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.rel

Re: JDBC connectivity issue

2018-03-14 Thread chris
I believe its Postgresql-9.4.1208.jre7.jar On 03/13/2018 05:48 PM, Adrian Klaver wrote: On 03/13/2018 04:46 PM, chris wrote: I'm sorry that took a few days but I am running; Postgresql-9.4 and jre7.jar What we are looking for is the JDBC driver you are using? Thanks in advance. On 03

Re: Primary key gist index?

2018-03-14 Thread Adrian Klaver
On 03/14/2018 06:19 AM, Jeremy Finzel wrote: Hello!  From all that I can tell, it is not possible using a btree_gist index as a primary key.  If so, why not?  I have a table with this gist https://www.postgresql.org/docs/10/static/btree-gist.html "In general, these operator classes will not o

Primary key gist index?

2018-03-14 Thread Jeremy Finzel
Hello! From all that I can tell, it is not possible using a btree_gist index as a primary key. If so, why not? I have a table with this gist index which truly ought to be its primary key. as_of_date is of range date type: EXCLUDE USING gist (id WITH =, as_of_date WITH &&) Any direction here w