Re: [GENERAL] streaming replication and recovery

2014-04-14 Thread Michael Paquier
On Sat, Apr 12, 2014 at 3:12 PM, Anupama Ramaswamy anumr_0...@yahoo.com wrote: Lets suppose at this point there is 0 delivery lag but bytes of replay lag. All your answers are here: http://www.postgresql.org/docs/devel/static/warm-standby.html Standby mode is exited and the server switches

Re: [GENERAL] streaming replication + wal shipping

2014-04-14 Thread Albe Laurenz
Anupama Ramaswamy wrote: I would like to setup a 2 servers with streaming replication, one master and another hot standby. I want to use the standby for read-only queries. So I want the replication lag to be as small as possible. So I choose streaming replication over WAL shipping. When

Re: [GENERAL] CLOB BLOB limitations in PostgreSQL

2014-04-14 Thread Albe Laurenz
Jack.O'Sullivan wrote: I am working for a client who is interested in migrating from Oracle to Postgres. Their database is currently ~20TB in size, and is growing. The biggest table in this database is effectively a BLOB store and currently has around 1 billion rows. From reading around

Re: [GENERAL] efficient way to do fuzzy join

2014-04-14 Thread Rémi Cura
2014-04-12 15:04 GMT+02:00 Andy Colson a...@squeakycode.net: On 04/12/2014 06:29 AM, Rémi Cura wrote: (please note that this random string function is NOT the good way to do it, i should random int then use it as index to an array containing all the letter) Thanks a lot for this new

Re: [GENERAL] CLOB BLOB limitations in PostgreSQL

2014-04-14 Thread Ivan Voras
On 11/04/2014 16:45, Jack.O'sulli...@tessella.com wrote: With point two, does this mean that any table with a bytea datatype is limited to 4 billion rows (which would seem in conflict with the unlimited rows shown by http://www.postgresql.org/about)? If we had rows where the bytea was a null

Re: [GENERAL] encrypting data stored in PostgreSQL

2014-04-14 Thread Ivan Voras
On 09/04/2014 22:40, CS_DBA wrote: Hi All; We have a client with this requirement: At rest data must be encrypted with a unique client key Any thoughts on how to pull this off for PostgreSQL stored data? Some time ago I did this, mostly as an experiment but IIRC it works decently:

[GENERAL] CentOS 6 and Postgresql 9.3.4 from PGDG

2014-04-14 Thread Steve Clark
Hello, Don't know if this is better asked on the CentOS ML or here, but... CentOS 6 supplies 8.4.20 but I want to use hot standby - the issue is that the PGDG packages don't install into the usual place they are installed in version specific directories, including the data, binaries,

Re: [GENERAL] CentOS 6 and Postgresql 9.3.4 from PGDG

2014-04-14 Thread Moshe Jacobson
On Mon, Apr 14, 2014 at 8:24 AM, Steve Clark scl...@netwolves.com wrote: CentOS 6 supplies 8.4.20 but I want to use hot standby - the issue is that the PGDG packages don't install into the usual place they are installed in version specific directories, including the data, binaries, libraries

Re: [GENERAL] CentOS 6 and Postgresql 9.3.4 from PGDG

2014-04-14 Thread Steve Clark
On 04/14/2014 09:02 AM, Moshe Jacobson wrote: On Mon, Apr 14, 2014 at 8:24 AM, Steve Clark scl...@netwolves.com mailto:scl...@netwolves.com wrote: CentOS 6 supplies 8.4.20 but I want to use hot standby - the issue is that the PGDG packages don't install into the usual place they are

[GENERAL] lpgport issue while installing pg_bulkload utility on fedora 14 OS

2014-04-14 Thread chiru r
Hi, I am facing below *-lpgport *issue while installing pg_bulkload utility on fedora 14 OS. Details: *OS* : *Fedora 14* Linux localhost.localdomain 2.6.35.6-45.fc14.x86_64 #1 SMP Mon Oct 18 23:57:44 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux *PG* : PostgreSQL 8.4.9 *pg_bulkload* 3.1.4

Re: [GENERAL] CentOS 6 and Postgresql 9.3.4 from PGDG

2014-04-14 Thread Moshe Jacobson
On Mon, Apr 14, 2014 at 9:13 AM, Steve Clark scl...@netwolves.com wrote: How did you deal with binaries and libraries, as well as third party apps like perl modules or php/apache modules? All of this is managed through the /etc/alternatives system. I'm honestly not sure how all of it works,

Re: [GENERAL] lpgport issue while installing pg_bulkload utility on fedora 14 OS

2014-04-14 Thread Adrian Klaver
On 04/14/2014 06:21 AM, chiru r wrote: Hi, I am facing below *-lpgport *issue while installing pg_bulkload utility on fedora 14 OS. Details: *OS* : *Fedora 14* Linux localhost.localdomain 2.6.35.6-45.fc14.x86_64 #1 SMP Mon Oct 18 23:57:44 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux *PG* :

Re: [GENERAL] lpgport issue while installing pg_bulkload utility on fedora 14 OS

2014-04-14 Thread chiru r
Actually Just what the docs say: http://pgbulkload.projects.pgfoundry.org/pg_bulkload.html#install $ cd pg_bulkload $ make USE_PGXS=1 $ su $ make USE_PGXS=1 install Thanks Adrian... USE_PGXS is already present in MAKEFILE. simple make and Make Install is working fine in Centos 5.9,i have

Re: [GENERAL] lpgport issue while installing pg_bulkload utility on fedora 14 OS

2014-04-14 Thread Adrian Klaver
On 04/14/2014 07:21 AM, chiru r wrote: Actually Just what the docs say: http://pgbulkload.projects.__pgfoundry.org/pg_bulkload.__html#install http://pgbulkload.projects.pgfoundry.org/pg_bulkload.html#install $ cd pg_bulkload $ make USE_PGXS=1 $ su $ make USE_PGXS=1

Re: [GENERAL] lpgport issue while installing pg_bulkload utility on fedora 14 OS

2014-04-14 Thread Adrian Klaver
On 04/14/2014 07:21 AM, chiru r wrote: Actually Just what the docs say: http://pgbulkload.projects.__pgfoundry.org/pg_bulkload.__html#install http://pgbulkload.projects.pgfoundry.org/pg_bulkload.html#install $ cd pg_bulkload $ make USE_PGXS=1 $ su $ make USE_PGXS=1

Re: [GENERAL] CentOS 6 and Postgresql 9.3.4 from PGDG

2014-04-14 Thread Alan Hodgson
On Monday, April 14, 2014 09:13:51 AM Steve Clark wrote: How did you deal with binaries and libraries, as well as third party apps like perl modules or php/apache modules? The 8.4 library package usually ends up installed to satisfy other package requirements. Binaries get handled through the

Re: [GENERAL] lpgport issue while installing pg_bulkload utility on fedora 14 OS

2014-04-14 Thread chiru r
Okay,installed postgresql-devel.x86_64 package on fedora14 OS. Google blogs says it seems Fedora Postgresql-devel package not supported libpgport. *http://www.postgresql.org/message-id/4ee2338f.1040...@dunslane.net http://www.postgresql.org/message-id/4ee2338f.1040...@dunslane.net* Is there

[GENERAL] Approach to Data Summary and Analysis

2014-04-14 Thread Robert DiFalco
I have several related tables that represent a call state. Let's think of these as phone calls to simplify things. Sometimes I need to determine the last time a user was called, the last time a user answered a call, or the last time a user completed a call. The basic schema is something like

[GENERAL] Querying all documents for a company and its projects etc

2014-04-14 Thread Andreas Joseph Krogh
Hi all.   I'm trying to make an efficient query to list all documents related to a company and also documents related to employees and projects for that company.   I have this sample-schema: create table entity( id integer primary key, entity_type varchar not null, check (entity_type IN

[GENERAL] Trouble installing Slony 2.0

2014-04-14 Thread sparikh
I have been struggling to install slony 2.0 for past few days. Linux server detail : Linux vmbndbdev01 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux I have 2 versions of postgresql installed 8.4.18 and 9.1.12, but only 9.x is in use. I get following

Re: [GENERAL] lpgport issue while installing pg_bulkload utility on fedora 14 OS

2014-04-14 Thread Adrian Klaver
On 04/14/2014 07:56 AM, chiru r wrote: Okay,installed postgresql-devel.x86_64 package on fedora14 OS. Google blogs says it seems Fedora Postgresql-devel package not supported libpgport. _http://www.postgresql.org/message-id/4ee2338f.1040...@dunslane.net The bigger issue is that the RedHat

Re: [GENERAL] Approach to Data Summary and Analysis

2014-04-14 Thread Vincent Veyron
On Mon, 14 Apr 2014 09:27:29 -0700 Robert DiFalco robert.difa...@gmail.com wrote: I have several related tables that represent a call state. And so on for calls_connected, calls_completed, call_errors, etc. So for my question -- is the choice between these a personal preference sort of

Re: [GENERAL] CentOS 6 and Postgresql 9.3.4 from PGDG

2014-04-14 Thread Devrim GÜNDÜZ
Hi, On Mon, 2014-04-14 at 09:13 -0400, Steve Clark wrote: How did you deal with binaries and libraries, as well as third party apps like perl modules or php/apache modules? I added Provides: to each package, along with a ldconfig file, so that the dependencies are satisfied. Regards, --

Re: [GENERAL] Approach to Data Summary and Analysis

2014-04-14 Thread Robert DiFalco
But then I lose a bunch of data like the TIMESTAMPTZ of the call, answer, connection, etc. Btw, currently these tables never need to be UPDATEd. They are immutable in the current design. And in the end I'm not sure how the proposal of one table and a state that is updatable changes the basic

Re: [GENERAL] Approach to Data Summary and Analysis

2014-04-14 Thread Rob Sargent
On 04/14/2014 04:22 PM, Robert DiFalco wrote: But then I lose a bunch of data like the TIMESTAMPTZ of the call, answer, connection, etc. Btw, currently these tables never need to be UPDATEd. They are immutable in the current design. And in the end I'm not sure how the proposal of one table and

Re: [GENERAL] streaming replication and recovery

2014-04-14 Thread Anupama Ramaswamy
Thanks so much. That clarifies. -Anupama On Monday, April 14, 2014 12:09 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Sat, Apr 12, 2014 at 3:12 PM, Anupama Ramaswamy anumr_0...@yahoo.com wrote: Lets suppose at this point there is 0 delivery lag but bytes of replay lag. All

Re: [GENERAL] streaming replication + wal shipping

2014-04-14 Thread Anupama Ramaswamy
Thanks for your response. So are you saying that if I setup the following in my recovery.conf restore_command =. It will it be used only when the streaming replication falls behind more than ( wal_keep_segments ) or replication stream is not available (master goes down) ? Thanks for your

[GENERAL] Unrecognized service

2014-04-14 Thread Augori
Hi Folks, I set up postgresql on a CentOS 5 Linux months ago. I had a process that ran every night and connected to the database. Everything was working fine until a few days ago when my process tried to connect and failed. Now I'm getting: # service postgresql status postgresql: unrecognized

Re: [GENERAL] Unrecognized service

2014-04-14 Thread Adrian Klaver
On 04/14/2014 05:33 PM, Augori wrote: Hi Folks, I set up postgresql on a CentOS 5 Linux months ago. I had a process that ran every night and connected to the database. Everything was working fine until a few days ago when my process tried to connect and failed. Now I'm getting: # service

Re: [GENERAL] Unrecognized service

2014-04-14 Thread Augori
Here's what the ps command gives: root@server# ps ax | grep post 9165 pts/1S+ 0:00 grep post Does this mean it's not running? It's certainly possible that software updates have occurred. There are a lot of people working on this machine, so I'm not aware of which changes have been

Re: [GENERAL] Unrecognized service

2014-04-14 Thread Tom Lane
Augori aug...@gmail.com writes: Here's what the ps command gives: root@server# ps ax | grep post 9165 pts/1S+ 0:00 grep post Does this mean it's not running? Sure looks that way. It's certainly possible that software updates have occurred. There are a lot of people working on

Re: [GENERAL] Unrecognized service

2014-04-14 Thread John R Pierce
On 4/14/2014 5:33 PM, Augori wrote: # service postgresql status postgresql: unrecognized service Does this mean it's gone? Does anyone have any suggestions? the 'service' command on rhel/centos/etc runs /etc/rc.d/init.d/$1 $2 so, ls -l /etc/rc.d/init.d/postgres*and see what the service

Re: [GENERAL] Approach to Data Summary and Analysis

2014-04-14 Thread Robert DiFalco
Things like this. AVG ring time before answer, average connected call duration. % of calls never answered. % of calls that are answered that are connected. Number of times John has answered a call versus how many times we've called him.That sort of stuff. On Mon, Apr 14, 2014 at 3:34 PM, Rob

Re: [GENERAL] Unrecognized service

2014-04-14 Thread John R Pierce
On 4/14/2014 7:17 PM, Augori wrote: Here's what the ps command gives: root@server# ps ax | grep post 9165 pts/1S+ 0:00 grep post Does this mean it's not running? It's certainly possible that software updates have occurred. There are a lot of people working on this machine, so I'm

Re: [GENERAL] Unrecognized service

2014-04-14 Thread John R Pierce
On 4/14/2014 7:34 PM, Tom Lane wrote: Augoriaug...@gmail.com writes: Here's what the ps command gives: root@server# ps ax | grep post 9165 pts/1S+ 0:00 grep post Does this mean it's not running? Sure looks that way. It's certainly possible that software updates have occurred.

Re: [GENERAL] Unrecognized service

2014-04-14 Thread Adrian Klaver
On 04/14/2014 07:17 PM, Augori wrote: Here's what the ps command gives: root@server# ps ax | grep post 9165 pts/1S+ 0:00 grep post Does this mean it's not running? Yes, it is not running. It's certainly possible that software updates have occurred. There are a lot of people

Re: [GENERAL] Unrecognized service

2014-04-14 Thread Adrian Klaver
On 04/14/2014 07:52 PM, John R Pierce wrote: On 4/14/2014 7:34 PM, Tom Lane wrote: Augoriaug...@gmail.com writes: Here's what the ps command gives: root@server# ps ax | grep post 9165 pts/1S+ 0:00 grep post Does this mean it's not running? Sure looks that way. It's certainly

Re: [GENERAL] Unrecognized service

2014-04-14 Thread Augori
Hi all, woohoo! service postgresql-9.2 status (pid 9924) is running... It seems that I was looking for the service by the wrong name, as John guessed correcty.Also, Tom, it's good to know that the data won't necessarily go away if I need to reinstall at some point. thank you so much

Re: [GENERAL] Unrecognized service

2014-04-14 Thread Adrian Klaver
On 04/14/2014 08:25 PM, Augori wrote: Hi all, woohoo! service postgresql-9.2 status (pid 9924) is running... It seems that I was looking for the service by the wrong name, as John guessed correcty.Also, Tom, it's good to know that the data won't necessarily go away if I need to

[GENERAL] Non-deterministic 100% CPU hang on postgres 9.3

2014-04-14 Thread Fenn Bailey
Hi all, I'm experiencing an issue where certain queries appear to non-deterministically hang, with a CPU pinned at 100%. I say hang, where really I've given up after ~12 hours execution. The exact same query can then be terminated and run in 90 seconds, with none of the underlying data changing.

Re: [GENERAL] Non-deterministic 100% CPU hang on postgres 9.3

2014-04-14 Thread Tom Lane
Fenn Bailey fenn.bai...@gmail.com writes: I'm experiencing an issue where certain queries appear to non-deterministically hang, with a CPU pinned at 100%. I say hang, where really I've given up after ~12 hours execution. The exact same query can then be terminated and run in 90 seconds, with