Re: [GENERAL] How to speed up pg_trgm / gin index scan

2015-07-29 Thread Christian Ramseyer
On 28/07/15 16:42, Merlin Moncure wrote: Great stuff! Sorry Oleg I don't have your original message anymore and can't reply into the right place in the thread, so I took the liberty to CC: you. There are some more big optimizations (via Jeff Janes) coming down the pike for trigram

[GENERAL] Synchronous replication and read consistency

2015-07-29 Thread Ravi Krishna
Does sync replication guarantee that any inserted data on primary is immediately visible for read on standbys with no lag. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] instr detail

2015-07-29 Thread Ramesh T
Hi All, is instr available in postgres 9.3..? in oracle instr('12.32.42','.',-1) ,any help appreciated

Re: [GENERAL] instr detail

2015-07-29 Thread Karsten Hilbert
On Wed, Jul 29, 2015 at 10:03:56PM +0530, Ramesh T wrote: Hi All, is instr available in postgres 9.3..? in oracle instr('12.32.42','.',-1) , any ... http://www.postgresql.org/docs/9.3/static/index.html ... help appreciated You are welcome ! Karsten -- GPG key ID

Re: [GENERAL] Synchronous replication and read consistency

2015-07-29 Thread Thomas Kellerer
Kevin Grittner schrieb am 29.07.2015 um 23:10: No, it means that if the primary is hit by a meteor and you promote the standby, the data will not have been lost. The time between the successful return of the commit on the primary and the time at which the change becomes visible on the standby

Re: [GENERAL] instr detail

2015-07-29 Thread Melvin Davidson
Based om the definition of Oracle instr(), the equivalent PostgreSQL function would be position(substring in string). On Wed, Jul 29, 2015 at 3:11 PM, Igor Neyman iney...@perceptron.com wrote: *From:* pgsql-general-ow...@postgresql.org [mailto: pgsql-general-ow...@postgresql.org] *On

Re: [GENERAL] Synchronous replication and read consistency

2015-07-29 Thread Ravi Krishna
Not necessarily. There has been discussion of adding a new mode which will delay the commit on the primary until it is visible on a synchronous standby, but I don't recall where that left off. Joshua: THis essentially contradicts your statement to me. On Wed, Jul 29, 2015 at 5:10 PM, Kevin

[GENERAL] Question about copy from with timestamp format

2015-07-29 Thread Murali M
Hi, I wanted to copy a file from local file system to postgres. I have timestamp value specified as: MMDDHH24 format -- for example: 2015072913 -- is July 29, 2015 at 13:00 how do I import this data into a timestamp field? thanks, murali. PS: I believe if I need the hour, I need to use

Re: [GENERAL] Synchronous replication and read consistency

2015-07-29 Thread Joshua D. Drake
On 07/29/2015 02:27 PM, Ravi Krishna wrote: Not necessarily. There has been discussion of adding a new mode which will delay the commit on the primary until it is visible on a synchronous standby, but I don't recall where that left off. Joshua: THis essentially contradicts your statement

Re: [GENERAL] instr detail

2015-07-29 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Ramesh T Sent: Wednesday, July 29, 2015 12:34 PM To: pgsql-general@postgresql.org Subject: [GENERAL] instr detail Hi All, is instr available in postgres 9.3..? in oracle

Re: [GENERAL] Synchronous replication and read consistency

2015-07-29 Thread Kevin Grittner
Ravi Krishna sravikrish...@gmail.com wrote: As per this: http://www.postgresql.org/docs/current/static/warm-standby.html#SYNCHRONOUS-REPLICATION When requesting synchronous replication, each commit of a write transaction will wait until confirmation is received that the commit has been

Re: [GENERAL] Synchronous replication and read consistency

2015-07-29 Thread Chris Mair
Chris/Joshua I would like to know more details. As per this: http://www.postgresql.org/docs/current/static/warm-standby.html#SYNCHRONOUS-REPLICATION When requesting synchronous replication, each commit of a write transaction will wait until confirmation is received that the commit

Re: [GENERAL] Postgresql upgrade from 8.4 to latest

2015-07-29 Thread AI Rumman
Thanks for good suggestions. On Tue, Jul 28, 2015 at 3:13 PM, Joshua D. Drake j...@commandprompt.com wrote: On 07/28/2015 01:35 PM, AI Rumman wrote: But what I read, in-place upgrade has smaller outage, compared to dump/restore. Correct, in fact if you do it with the link option, it

[GENERAL] xmin horizon?

2015-07-29 Thread CS DBA
All; The documentation for pg_stat_activity lists this column: backend_xmin xid The current backend's xmin horizon. Can someone point me to a better understanding on xmin horizon? Thanks in advance -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Synchronous replication and read consistency

2015-07-29 Thread Chris Mair
Does sync replication guarantee that any inserted data on primary is immediately visible for read on standbys with no lag. Basically yes. Of course there is *some* latency, at the very least from the network. If I run a process on a standby machine that displays a value every 0.1 sec and

Re: [GENERAL] instr detail

2015-07-29 Thread Devrim GÜNDÜZ
Hi, On Wed, 2015-07-29 at 22:03 +0530, Ramesh T wrote: is instr available in postgres 9.3..? in oracle instr('12.32.42','.',-1) ,any help appreciated Orafce extension includes instr function: https://github.com/orafce/orafce Regards, -- Devrim GÜNDÜZ Principal Systems

Re: [GENERAL] Synchronous replication and read consistency

2015-07-29 Thread Ravi Krishna
Chris/Joshua I would like to know more details. As per this: http://www.postgresql.org/docs/current/static/warm-standby.html#SYNCHRONOUS-REPLICATION When requesting synchronous replication, each commit of a write transaction will wait until confirmation is received that the commit has been

Re: [GENERAL] xmin horizon?

2015-07-29 Thread Michael Paquier
On Thu, Jul 30, 2015 at 4:13 AM, CS DBA cs_...@consistentstate.com wrote: The documentation for pg_stat_activity lists this column: backend_xmin xid The current backend's xmin horizon. Can someone point me to a better understanding on xmin horizon? This defines the oldest transaction

Re: [GENERAL] Question about copy from with timestamp format

2015-07-29 Thread Murali M
How do I specify that when I use copy from? this is what I am trying right now.. copy myTable (myTimeCol, col2) from myFile delimiter as '\t' I am not sure how to specify the time format.. thanks, murali. On Wed, Jul 29, 2015 at 3:49 PM, Adrian Klaver adrian.kla...@aklaver.com wrote: On

Re: [GENERAL] instr detail

2015-07-29 Thread Tom Lane
Melvin Davidson melvin6...@gmail.com writes: Based om the definition of Oracle instr(), the equivalent PostgreSQL function would be position(substring in string). See http://www.postgresql.org/docs/9.4/static/plpgsql-porting.html particularly the appendix at the bottom. I'm not sure that code

Re: [GENERAL] xmin horizon?

2015-07-29 Thread Torsten Förtsch
On 29/07/15 21:13, CS DBA wrote: The documentation for pg_stat_activity lists this column: backend_xmin xid The current backend's xmin horizon. Can someone point me to a better understanding on xmin horizon? https://momjian.us/main/writings/pgsql/mvcc.pdf you can find this talk

Re: [GENERAL] Question about copy from with timestamp format

2015-07-29 Thread Adrian Klaver
On 07/29/2015 03:42 PM, Murali M wrote: Hi, I wanted to copy a file from local file system to postgres. I have timestamp value specified as: MMDDHH24 format -- for example: 2015072913 -- is July 29, 2015 at 13:00 how do I import this data into a timestamp field? thanks, murali. PS: I

Re: [GENERAL] Question about copy from with timestamp format

2015-07-29 Thread Adrian Klaver
On 07/29/2015 03:55 PM, Murali M wrote: How do I specify that when I use copy from? this is what I am trying right now.. copy myTable (myTimeCol, col2) from myFile delimiter as '\t' Argh, missed that. I am not sure how to specify the time format.. Yeah, the time component prevents you

Re: [GENERAL] Question about copy from with timestamp format

2015-07-29 Thread Sherrylyn Branchaw
Based on your PS asking about data types and commenting that you don't want to put hour in a separate column, it sounds like this is a brand-new table you're creating. If so, and if this is a one-time COPY operation, you can create a text column for the initial import. Then after you're done

Re: [GENERAL] Question about timelines

2015-07-29 Thread Haribabu Kommi
On Wed, Jul 29, 2015 at 3:46 PM, Torsten Förtsch torsten.foert...@gmx.net wrote: Hi, we have a complex structure of streaming replication (PG 9.3) like: master -- replica1 | +- replica2 -- replica21 | +-- replica22 -- replica221 Now I want to

Re: [GENERAL] Lots of stuck queries after upgrade to 9.4

2015-07-29 Thread Heikki Linnakangas
On 07/28/2015 11:36 PM, Heikki Linnakangas wrote: A-ha, I succeeded to reproduce this now on my laptop, with pgbench! It seems to be important to have a very large number of connections: pgbench -n -c400 -j4 -T600 -P5 That got stuck after a few minutes. I'm using commit_delay=100. Now that I

Re: [GENERAL] Question about copy from with timestamp format

2015-07-29 Thread Adrian Klaver
On 07/29/2015 03:55 PM, Murali M wrote: How do I specify that when I use copy from? this is what I am trying right now.. copy myTable (myTimeCol, col2) from myFile delimiter as '\t' I am not sure how to specify the time format.. My previous post would have been more useful if I had added that

Re: [GENERAL] conn = PQconnectdb(conninfo);

2015-07-29 Thread Peter Kroon
I've found perhaps a bug. I've narrowed down my code and the problem is indeed at: conn = PQconnectdb(conninfo); My connection string: host=192.168.178.12 dbname=DATABASE user=foo password=bar When I remove key/value host=xxx then everything is OK. Valgrind mentions: no leaks are possible. When