[GENERAL] master/master replication with load balancer in front

2015-08-21 Thread Florin Andrei
(I've used other DBs in the past, but I'm fairly new to PG.) Currently I have a single PG 9.3 instance in the cloud. A Python script run as a cron job is connecting to it over the network and is doing the batch updates every hour, usually in append mode. Users have various custom scripts which

Re: [GENERAL] ERROR: invalid input syntax for type date: IS IT A BUG here?

2015-08-21 Thread Adrian Klaver
On 08/21/2015 03:47 PM, AI Rumman wrote: Hi Adrian, Thanks for replying here. Actually, I modified the actual table name from my production where I forgot to change the subtr value. You can see the result "SELECT 558" in SQL 3 where it selected that many rows. Per Toms post, try the SQL 3 qu

Re: [GENERAL] ERROR: invalid input syntax for type date: IS IT A BUG here?

2015-08-21 Thread AI Rumman
Hi Adrian, Thanks for replying here. Actually, I modified the actual table name from my production where I forgot to change the subtr value. You can see the result "SELECT 558" in SQL 3 where it selected that many rows. Regards. On Fri, Aug 21, 2015 at 3:13 PM, Adrian Klaver wrote: > On 08/2

Re: [GENERAL]

2015-08-21 Thread Alvaro Herrera
Adrian Klaver wrote: > On 08/21/2015 02:14 PM, Ali Panjwani wrote: > >Unsubscribe > > > See here: > http://www.postgresql.org/mailpref/pgsql-general Already unsubscribed. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Ser

Re: [GENERAL] Problem with database connections timing out for long-running queries

2015-08-21 Thread Steve Crawford
You might check the stunnel settings. A quick search of "stunnel 12-hours" indicates that this is the stunnel default for idle connections. Cheers, Steve On Fri, Aug 21, 2015 at 11:16 AM, Rich Schaaf wrote: > I’m running into a problem where the connection between application its > database is

Re: [GENERAL] Problem with database connections timing out for long-running queries

2015-08-21 Thread Adrian Klaver
On 08/21/2015 11:16 AM, Rich Schaaf wrote: I’m running into a problem where the connection between application its database is timing out after 12 hours. Here’s the context: ·Two servers (one running the application and another hosting the database) in the Amazon AWS environment on different su

Re: [GENERAL]

2015-08-21 Thread Adrian Klaver
On 08/21/2015 02:14 PM, Ali Panjwani wrote: Unsubscribe See here: http://www.postgresql.org/mailpref/pgsql-general -- Adrian Klaver adrian.kla...@aklaver.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/

Re: [GENERAL] ERROR: invalid input syntax for type date: IS IT A BUG here?

2015-08-21 Thread Adrian Klaver
On 08/21/2015 02:32 PM, AI Rumman wrote: Hi All, I am using Postgresql 9.1 where have a partitioned table as below: events_20150101 events_20150102 events_20150103 ... events_overflow When I am running the following query it gives me result: *SQL 1: * select all rel

[GENERAL] Problem with database connections timing out for long-running queries

2015-08-21 Thread Rich Schaaf
I'm running into a problem where the connection between application its database is timing out after 12 hours. Here's the context: . Two servers (one running the application and another hosting the database) in the Amazon AWS environment on different subnets within a virtual private cl

Re: [GENERAL] ERROR: invalid input syntax for type date: IS IT A BUG here?

2015-08-21 Thread Tom Lane
AI Rumman writes: > But when I run the following one, it gives me error: > *SQL 2: * >> select * as ts >> from >> ( >> select relname, pg_total_relation_size(relname::text) as s, >> substr(relname,18)::date as dt from pg_stat_user_tables where schemaname = >> 'partitions' and relname not like '%o

[GENERAL] ERROR: invalid input syntax for type date: IS IT A BUG here?

2015-08-21 Thread AI Rumman
Hi All, I am using Postgresql 9.1 where have a partitioned table as below: > events_20150101 > events_20150102 > events_20150103 > ... > events_overflow When I am running the following query it gives me result: *SQL 1: * > select all relname, pg_total_relation_size(relname::text) as s, > subs

[GENERAL]

2015-08-21 Thread Ali Panjwani
Unsubscribe

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-21 Thread Adrian Klaver
On 08/21/2015 08:38 AM, Igor Sosa Mayor wrote: Adrian Klaver writes: Are you talking about getting data into the procedure, or out of it, or both? [...] (I reduce your email only to this question in order to be clearer; sorry for this). thanks for your answer. To your questions: my setup i

Re: [GENERAL] 9.5 beta pg_upgrade documentation

2015-08-21 Thread Alvaro Herrera
Andy Colson wrote: > On a side note, I'm confusing myself by the step numbers. There's two step > 7's. Can we renumber the step 9 sub steps to be 9.1, 9.2, etc? I've had this lying about for a while, which does more or less what you want, numbering the substeps "a, b, c" instead of "1, 2, 3".

[GENERAL] 9.5 beta pg_upgrade documentation

2015-08-21 Thread Andy Colson
Hi All. I setup two test VM's with my PG93 database to test upgrading to PG95. I have a primary and standby using wal shipping. The database is about 150Gig, and the two servers (the real servers) are far apart. The vm's are both running on my desktop. I would love to use pg_upgrade on both

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-21 Thread Igor Sosa Mayor
Adrian Klaver writes: > Are you talking about getting data into the procedure, or out of it, > or both? [...] (I reduce your email only to this question in order to be clearer; sorry for this). thanks for your answer. To your questions: my setup is very easy and primitive: 1. postgres is in my

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-21 Thread Igor Sosa Mayor
John R Pierce writes: > listen_addresses should only affect the interfaces that the postgres > server is listening to connections from. as long as your app is on > the same machine, and uses localhost:someport to connect to the > postgres server, then the default listen_addresses='localhost' sh

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-21 Thread Adrian Klaver
On 08/21/2015 12:34 AM, John R Pierce wrote: listen_addresses should only affect the interfaces that the postgres server is listening to connections from. as long as your app is on the same machine, and uses localhost:someport to connect to the postgres server, then the default listen_addresses

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-21 Thread Adrian Klaver
On 08/20/2015 10:30 PM, Igor Sosa Mayor wrote: Hi, I'm a beginner with pgsql and have the following problem. I have written a pl/python procedure to query geolocations (with the library geopy). It inserts them into a table. All this works perfectly. The problem is the configuration with the net

Re: [GENERAL] hot backup with zfs ?

2015-08-21 Thread Laurent Laborde
On Thu, Aug 20, 2015 at 4:57 PM, Joseph Kregloh wrote: > > > On Thu, Aug 20, 2015 at 9:50 AM, Laurent Laborde > wrote: > >> Friendly greetings ! >> >> I'm wondering if anyone tried the following hot backup process, and if it >> works : >> pg_start_backup() >> zfs snapshop >> pg_stop_backup() >>

Re: [GENERAL] Re: Postgresql 9.3 hotstandby replication error, icorrect checksome in control file

2015-08-21 Thread Amit Bondwal
Michael, Thanks for your reply, I found the issue, the person who setup OS mix up some 64 and 32 bit package. I am starting it again. Thanks again. On Fri, Aug 21, 2015 at 5:12 PM, Michael Paquier wrote: > > > On Fri, Aug 21, 2015 at 7:56 PM, Amit Bondwal > wrote: > >> 2015-08-21 15:35:03 IST

Re: [GENERAL] Re: Postgresql 9.3 hotstandby replication error, icorrect checksome in control file

2015-08-21 Thread Michael Paquier
On Fri, Aug 21, 2015 at 7:56 PM, Amit Bondwal wrote: > 2015-08-21 15:35:03 IST [21507-2] DETAIL: The primary's identifier is > 6185381639353264094, the standby's identifier is 6185382953613258663. > > It gives the error "database system identifier differs between the primary > and standby". > T

[GENERAL] Re: Postgresql 9.3 hotstandby replication error, icorrect checksome in control file

2015-08-21 Thread Amit Bondwal
Detailed logs in log file DETAIL: The primary's identifier is 6185381639353264094, the standby's identifier is 6185382953613258663. 2015-08-21 15:34:16 IST [21447-1] FATAL: database system identifier differs between the primary and standby 2015-08-21 15:34:16 IST [21447-2] DETAIL: The primary's

[GENERAL] Postgresql 9.3 hotstandby replication error, icorrect checksome in control file

2015-08-21 Thread Amit Bondwal
Hi everyone, I am trying to setup postgresql 9.3 hotstandby replication server. I am getting error incorrect checksome in control file. both server have below version and pg package version and both are 64 bit processor. OS is : Debian squeeze PG version:- postgresql-9.3 Only difference is re

Re: [GENERAL] Problem with pl/python procedure connecting to the internet

2015-08-21 Thread John R Pierce
listen_addresses should only affect the interfaces that the postgres server is listening to connections from. as long as your app is on the same machine, and uses localhost:someport to connect to the postgres server, then the default listen_addresses='localhost' should be sufficient.' if you

Re: [GENERAL] Dangers of mislabelled immutable functions

2015-08-21 Thread Albe Laurenz
Jeff Janes wrote: > I want to index the textual representations of a table's rows. > > You can cast a row to text by using the name of the table where you would > usually use the name of a > column, like "table_name::text". But this is not immutable and so can't be > used in an expression > ind