Re: [GENERAL]

2015-06-24 Thread Albe Laurenz
Bruno Hass de Andrade wrote: Hi. My company have servers that run postgres for storing some logs and serving django web interfaces for management of the server itself. In the last days some servers stopped serving the web interface, and syslog show this error: Jun 23 04:40:19

[GENERAL] Include.d and warnings

2015-06-24 Thread Andomar
We've set up an include directory in postgresql.conf: include_dir = 'conf.d' The include directory has a file that changes the value of max_connections. Now when we reload Postgres, an error appears in the logs: - parameter max_connections cannot be changed without restarting the

Re: [GENERAL] Counting the occurences of a substring within a very large text

2015-06-24 Thread Albe Laurenz
Marc Mamin wrote: I'd like to count the number linebreaks within a string, but I get a memory allocation error when using regexp_matches or regexp_split_to_table. Any idea for an alternative to this problem ? select count(*)-1 from ( select regexp_split_to_table(full_message,'(\n)',

[GENERAL] Counting the occurences of a substring within a very large text

2015-06-24 Thread Marc Mamin
Hello, I'd like to count the number linebreaks within a string, but I get a memory allocation error when using regexp_matches or regexp_split_to_table. Any idea for an alternative to this problem ? select count(*)-1 from ( select regexp_split_to_table(full_message,'(\n)', 'g') from

Re: [GENERAL] Counting the occurences of a substring within a very large text

2015-06-24 Thread Chris Mair
Hello, I'd like to count the number linebreaks within a string, but I get a memory allocation error when using regexp_matches or regexp_split_to_table. Any idea for an alternative to this problem ? select count(*)-1 from ( select regexp_split_to_table(full_message,'(\n)', 'g')

[GENERAL] INSERT a real number in a column based on other columns OLD INSERTs

2015-06-24 Thread litu16
In PostgreSQL I have this table... (there is a primary key serial column in the most left side stmtserial which is not shown in this image) http://postgresql.nabble.com/file/n5854916/screenshot.jpg in the table above, all columns are entered via querrys, except the time_index which I is

Re: [GENERAL] INSERT a real number in a column based on other columns OLD INSERTs

2015-06-24 Thread Adrian Klaver
On 06/23/2015 11:20 PM, litu16 wrote: In PostgreSQL I have this table... (there is a primary key serial column in the most left side stmtserial which is not shown in this image) http://postgresql.nabble.com/file/n5854916/screenshot.jpg in the table above, all columns are entered via querrys,

Re: [GENERAL] INSERT a real number in a column based on other columns OLD INSERTs

2015-06-24 Thread David G. Johnston
On Wed, Jun 24, 2015 at 5:52 PM, Adrian Klaver adrian.kla...@aklaver.com wrote: On 06/23/2015 11:20 PM, litu16 wrote: So, this is what I have made so far... *CREATE OR REPLACE FUNCTION timelog() RETURNS trigger AS $BODY$ DECLARE t_ix real; n int;

Re: [GENERAL] Postgresql 9.2 has standby server lost data?

2015-06-24 Thread Paula Price
​The script I used to check the lag time between the primary and the standby would show that the standby server was not even close, right? Paula​ On Sat, Jun 20, 2015 at 9:51 AM, Jerry Sievers gsiever...@comcast.net wrote: Adrian Klaver adrian.kla...@aklaver.com writes: On 06/19/2015 01:05

[GENERAL] Re: pg_dump 8.4.9 failing after upgrade to openssl-1.0.1e-30.el6_6.11.x86_64 on redhat linux

2015-06-24 Thread Piotr Gackiewicz
Tom Lane t...@sss.pgh.pa.us wrote: I wrote: Piotr Gackiewicz ga...@intertele.pl writes: $ psql -h localhost -c SET ssl_renegotiation_limit='3kB'; SELECT repeat('0123456789', 1800); SSL error: unexpected message connection to server was lost BTW, are you using any nondefault SSL settings?

[GENERAL] Pgbouncer compile in VS2013

2015-06-24 Thread Yelai, Ramkumar IN BLR STS
Hi All, I wanted to compile pgbouncer in Visual studio 2013-64bit. I have not found any help in forums. Also, pgbouncer source file mentioned that, it is not tested in Visual studio. Please let me know, is it possible to compile in VS2013 and works fine? With best regards, Ramkumar Yelai

[GENERAL] DB access speeds, App(linux)-PG(linux) vs App(linux) -MSSql(Windows)

2015-06-24 Thread Gauthier, Dave
Hi: I'm trying to get a 10,000 ft understanding of the difference in DB access speeds for two different scenarios... Scenario 1: Apps are on linux. PG DB is on linux (different server than apps) Scenario 2: Apps are on linux. MSSql DB is on Windows (obviously a different server)

[GENERAL] mirroring a server and/or hot standby

2015-06-24 Thread John Bleichert
Hello All, I am looking for documentation pointers on how to move the contents of an existing/working single-instance server to a new instance. As in: I have a Postgres server running in a VM and I want to move it to a different OS in a different VM guest. Is there a way to gracefully do this?

Re: [GENERAL] DB access speeds, App(linux)-PG(linux) vs App(linux) -MSSql(Windows)

2015-06-24 Thread Adrian Klaver
On 06/24/2015 06:44 AM, Gauthier, Dave wrote: Hi: I'm trying to get a 10,000 ft understanding of the difference in DB access speeds for two different scenarios... Scenario 1: Apps are on linux. PG DB is on linux (different server than apps) Scenario 2: Apps are on linux. MSSql DB is

Re: [GENERAL] mirroring a server and/or hot standby

2015-06-24 Thread John Bleichert
I use pg_dumpall for regular backups and can definitely use one of those backups to kickstart the new server. Would I then configure that new server instance as a standby server as per doc section 18.6? Or should I just setup the standby server first? Having re-read 18.6 I think this is what I

Re: [GENERAL] Counting the occurences of a substring within a very large text

2015-06-24 Thread Marc Mamin
-Original Message- From: Chris Mair [mailto:ch...@1006.org] Sent: Mittwoch, 24. Juni 2015 13:26 To: Marc Mamin; Postgres General Subject: Re: [GENERAL] Counting the occurences of a substring within a very large text Hello, I'd like to count the number linebreaks within a

Re: [GENERAL] mirroring a server and/or hot standby

2015-06-24 Thread Holger.Friedrich-Fa-Trivadis
Hello John, Since you mentioned a different OS and want to copy the entire instance it would seem that pg_dumpall is the way to go. You would then import the dump into the new instance using psql. See: http://www.postgresql.org/docs/9.4/static/app-pg-dumpall.html

Re: [GENERAL] Include.d and warnings

2015-06-24 Thread Tom Lane
Andomar ando...@aule.net writes: We've set up an include directory in postgresql.conf: include_dir = 'conf.d' The include directory has a file that changes the value of max_connections. Now when we reload Postgres, an error appears in the logs: - parameter max_connections

Re: [GENERAL] mirroring a server and/or hot standby

2015-06-24 Thread Holger.Friedrich-Fa-Trivadis
John Bleichert wrote on Wednesday, June 24, 2015 4:21 PM: Ø Would I then configure that new server instance as a standby server as per doc section 18.6? Ø Or should I just setup the standby server first? Having re-read 18.6 I think this is what I want. I may be wrong but I’m not sure a

Re: [GENERAL] Counting the occurences of a substring within a very large text

2015-06-24 Thread Andy Colson
On 6/24/2015 5:55 AM, Marc Mamin wrote: Hello, I'd like to count the number linebreaks within a string, but I get a memory allocation error when using regexp_matches or regexp_split_to_table. Any idea for an alternative to this problem ? select count(*)-1 from ( select

Re: [GENERAL] Counting the occurences of a substring within a very large text

2015-06-24 Thread Geoff Winkless
On 24 June 2015 at 14:51, Marc Mamin m.ma...@intershop.de wrote: note that the 345MB text only contains 635 lines. This might be the issue... There's similar issue discussed here: http://www.postgresql.org/message-id/6046.1353874...@sss.pgh.pa.us Tom did seem to accept that the attempted

Re: [GENERAL] Counting the occurences of a substring within a very large text

2015-06-24 Thread Marc Mamin
On 24 June 2015 at 14:51, Marc Mamin m.ma...@intershop.de wrote: note that the 345MB text only contains 635 lines. This might be the issue... There's similar issue discussed here: http://www.postgresql.org/message-id/6046.1353874...@sss.pgh.pa.us Tom did seem to accept that the attempted

Re: [GENERAL] Counting the occurences of a substring within a very large text

2015-06-24 Thread Marc Mamin
-Original Message- From: Albe Laurenz [mailto:laurenz.a...@wien.gv.at] Sent: Mittwoch, 24. Juni 2015 13:44 To: Marc Mamin; Postgres General Subject: RE: Counting the occurences of a substring within a very large text Marc Mamin wrote: I'd like to count the number linebreaks

Re: [GENERAL] Include.d and warnings

2015-06-24 Thread Adrian Klaver
On 06/24/2015 02:01 AM, Andomar wrote: We've set up an include directory in postgresql.conf: include_dir = 'conf.d' The include directory has a file that changes the value of max_connections. Now when we reload Postgres, an error appears in the logs: - parameter max_connections

Re: [GENERAL] Counting the occurences of a substring within a very large text

2015-06-24 Thread Marc Mamin
I'd like to count the number linebreaks within a string, but I get a memory allocation error when using regexp_matches or regexp_split_to_table. Any idea for an alternative to this problem ? select count(*)-1 from ( select regexp_split_to_table(full_message,'(\n)', 'g')

Re: [GENERAL] DB access speeds, App(linux)-PG(linux) vs App(linux) -MSSql(Windows)

2015-06-24 Thread Andy Colson
On 6/24/2015 8:44 AM, Gauthier, Dave wrote: Hi: I'm trying to get a 10,000 ft understanding of the difference in DB access speeds for two different scenarios... Scenario 1: Apps are on linux. PG DB is on linux (different server than apps) Scenario 2: Apps are on linux. MSSql DB is

Re: [GENERAL] DB access speeds, App(linux)-PG(linux) vs App(linux) -MSSql(Windows)

2015-06-24 Thread Gauthier, Dave
1) The same schema, data on both DB servers? Yes, identical 2) Are they the same apps? Yes, the same. The only diff is the db connect. 3) What are the apps doing? The vast, vast majority are small queries, often run inside large programming loops. If you fire off lots and lots of small querys

Re: [GENERAL] DB access speeds, App(linux)-PG(linux) vs App(linux) -MSSql(Windows)

2015-06-24 Thread Andy Colson
-Original Message- From: Andy Colson [mailto:a...@squeakycode.net] Sent: Wednesday, June 24, 2015 10:10 AM To: Gauthier, Dave; Postgres General Subject: Re: [GENERAL] DB access speeds, App(linux)-PG(linux) vs App(linux) -MSSql(Windows) On 6/24/2015 8:44 AM, Gauthier, Dave wrote: Hi:

Re: [GENERAL] Counting the occurences of a substring within a very large text

2015-06-24 Thread Tom Lane
Marc Mamin m.ma...@intershop.de writes: I'd like to count the number linebreaks within a string, but I get a memory allocation error when using regexp_matches or regexp_split_to_table. Anything involving a regexp is going to have a maximum input string length of about 256MB, as a result of

Re: [GENERAL] DB access speeds, App(linux)-PG(linux) vs App(linux) -MSSql(Windows)

2015-06-24 Thread Francisco Olarte
Hi Dave: On Wed, Jun 24, 2015 at 3:44 PM, Gauthier, Dave dave.gauth...@intel.com wrote: Hi: I'm trying to get a 10,000 ft understanding of the difference in DB access speeds for two different scenarios... Scenario 1: Apps are on linux. PG DB is on linux (different server than apps)

Re: [GENERAL] checking for NULLS in aggregate

2015-06-24 Thread David G. Johnston
On Wed, Jun 24, 2015 at 12:54 PM, Seb splu...@gmail.com wrote: Hello, I've defined a function to calculate standard deviation of angular values: CREATE AGGREGATE public.stddev(angle_vectors) ( SFUNC=array_append, STYPE=angle_vectors[], FINALFUNC=angle_vectors_stddev_yamartino );

[GENERAL] pgbouncer issue

2015-06-24 Thread Sheena, Prabhjot
Guys can anyone please explain or point me to a link where i can understand this output for pgbouncer. What does each column of this table mean? pgbouncer=# show mem; name | size | used | free | memtotal --+--+--+--+-- user_cache | 184 | 12 | 77

Re: [GENERAL] Counting the occurences of a substring within a very large text

2015-06-24 Thread Albe Laurenz
Marc Mamin wrote: I'd like to count the number linebreaks within a string, but I get a memory allocation error when using regexp_matches or regexp_split_to_table. Does any of these two work: [...] no, they both yeld the same error. a new string functions for this would be nice, as it

Re: [GENERAL] native api or odbc?

2015-06-24 Thread Merlin Moncure
On Tue, Jun 23, 2015 at 5:56 PM, Ted Toth txt...@gmail.com wrote: What are peoples experiences with either/both, pluses/minuses? If you're coding at the C level, I would definitely choose libpq unless you were worried about cross database portability. libpq is a bit clunky but easy to code

Re: [GENERAL] DB access speeds, App(linux)-PG(linux) vs App(linux) -MSSql(Windows)

2015-06-24 Thread Gauthier, Dave
OK, so there is a DBD for sybase that you are leveraging to interface with the MSSql DB. And that would be roughly equivilent to the DBD for PG in terms of performance. I mentioned odbc because I thought that was the common thread to use to bridge perl to the MSSql DB. ANd I saw that has

[GENERAL] checking for NULLS in aggregate

2015-06-24 Thread Seb
Hello, I've defined a function to calculate standard deviation of angular values: CREATE AGGREGATE public.stddev(angle_vectors) ( SFUNC=array_append, STYPE=angle_vectors[], FINALFUNC=angle_vectors_stddev_yamartino ); The type angle_vectors is simply an array: CREATE TYPE

Re: [GENERAL] Include.d and warnings

2015-06-24 Thread Adrian Klaver
On 06/24/2015 07:43 AM, Tom Lane wrote: Andomar ando...@aule.net writes: We've set up an include directory in postgresql.conf: include_dir = 'conf.d' The include directory has a file that changes the value of max_connections. Now when we reload Postgres, an error appears in the