Re: [GENERAL] AutoVacuum Daemon

2014-01-07 Thread Michael Paquier
On Mon, Dec 30, 2013 at 11:02 PM, Leonardo M. Ramé wrote: > On 2013-12-30 13:45:43 +, Haribabu kommi wrote: >> On 30 December 2013 19:11 Leonardo M. Ramé wrote: >> > Hi, I want know if I should run the auto-vacuum daemon (from >> > /etc/init.d/) or it runs automatically and transparently if co

Re: [GENERAL] question on parallelism

2014-01-07 Thread Michael Paquier
On Thu, Jan 2, 2014 at 2:29 PM, Chris Travers wrote: > > > > On Wed, Jan 1, 2014 at 7:35 PM, Andrew McIntyre wrote: >> >> does postgres have this capability? specifically local intrapartition? >> >> http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.admin.partition.doc/doc/c0004

Re: [GENERAL] Do I have to free storage in a UDF if I raise an error?

2014-01-07 Thread Michael Paquier
On Tue, Jan 7, 2014 at 12:46 AM, Stephen Woodbridge wrote: > On 1/6/2014 10:00 AM, Pfuntner, John wrote: >> >> If I've done a palloc() to get storage inside a user-defined function and >> raise an error using ereport(), should I be using pfree() to release the >> storage before the ereport()? >>

Re: [GENERAL] Re: After dump/restoring from 32bit 8.4-windows to 64bit 9.2.4-linux experiencing 10x slowdown on queries

2014-01-07 Thread Sameer Kumar
CCing the group On Tue, Jan 7, 2014 at 9:29 PM, Sameer Kumar wrote: > > > On Fri, Dec 20, 2013 at 1:44 AM, jon@stylesage wrote: > >> Hi, did you find a resolution to this issue? I'm running into the same >> problem now! >> >> >> > DO a few checks: > >- Is the disk layout same on both the se

[GENERAL] problem with initdb

2014-01-07 Thread Susan Cassidy
I ran an initdb, but got a message that the Encoding I specified was invalid, so I tried to run it again, and now I get: initdb: directory "/var/lib/pgsql/data" exists but is not empty If you want to create a new database system, either remove or empty the directory "/var/lib/pgsql/data" or run in

Re: [GENERAL] problem with initdb

2014-01-07 Thread Adrian Klaver
On 01/07/2014 09:11 AM, Susan Cassidy wrote: I ran an initdb, but got a message that the Encoding I specified was invalid, so I tried to run it again, and now I get: initdb: directory "/var/lib/pgsql/data" exists but is not empty If you want to create a new database system, either remove or empt

Re: [GENERAL] problem with initdb

2014-01-07 Thread John McKown
If it were me, I'd probably do something like (my id is not root, but I can use sudo to run something as root) sudo mv -vn /var/lib/pgsql/data /var/lib/pgsql/data-old sudo su - postgres #change to user postgres initdb pg_ctl start exit #exit back to my id, from being postgres If you need to, afte

Re: [GENERAL] Sudden slow down and spike in system CPU causes max_connections to get exhausted

2014-01-07 Thread Anand Kumar, Karthik
The reason we're on ext2 is to get around http://www.postgresql.org/message-id/CED87E13.C57E7%karthik.anandkumar@memo rylane.com We had pretty severe index and table corruption that would occur randomly - this was on ext3, and centos 5.6, 2.6.18 kernel. The problems got fixed after we upgraded th

[GENERAL] Is there a way to return "true"/"false" string for boolean type?

2014-01-07 Thread ChoonSoo Park
Hello Gurus, I have several tables with lots of boolean columns. When I run select query for the tables, I always get 't' or 'f' for boolean types. Is there a way to return 'true' or 'false' string for boolean type except using CASE WHEN ... clause? I mean global postgres configuration setting to

Re: [GENERAL] Is there a way to return "true"/"false" string for boolean type?

2014-01-07 Thread Szymon Guz
On 7 January 2014 19:11, ChoonSoo Park wrote: > Hello Gurus, > > I have several tables with lots of boolean columns. > When I run select query for the tables, I always get 't' or 'f' for > boolean types. > > Is there a way to return 'true' or 'false' string for boolean type except > using CASE WH

Re: [GENERAL] Is there a way to return "true"/"false" string for boolean type?

2014-01-07 Thread ChoonSoo Park
On Tue, Jan 7, 2014 at 1:29 PM, Szymon Guz wrote: > On 7 January 2014 19:11, ChoonSoo Park wrote: > >> Hello Gurus, >> >> I have several tables with lots of boolean columns. >> When I run select query for the tables, I always get 't' or 'f' for >> boolean types. >> >> Is there a way to return 't

[GENERAL] Consistent file-level backup of pg data directory

2014-01-07 Thread gator_ml
Hi, On my site, we run rsync-based backups of all servers to a central backup server every night. Unfortunately, reading the postgres documentation I could not find any direct way how to ensure that the state of the postgres data directory stored on the backup server is in a consistent state.

[GENERAL] When starting postgres, it hangs like it is still connected to stdout

2014-01-07 Thread Susan Cassidy
When I start postgres using postgres -D $PGDATA, it hangs, and I see that postgres and all the other attendant processes are running, but I never get my prompt back. If I hit ctl/C, postgres ends running. I can't seem to figure out why. This is postgres 9.2. What am I doing wrong? Thanks, Susa

Re: [GENERAL] When starting postgres, it hangs like it is still connected to stdout

2014-01-07 Thread Shaun Thomas
> When I start postgres using postgres -D $PGDATA, it hangs, and I see that > postgres and all the other attendant processes are running, but I never > get my prompt back. Don't start PostgreSQL with the 'postgres' command. That's the name of the actual server process. You want to use the control

Re: [GENERAL] Is there a way to return "true"/"false" string for boolean type?

2014-01-07 Thread Joe Van Dyk
On Tue, Jan 7, 2014 at 10:41 AM, ChoonSoo Park wrote: > On Tue, Jan 7, 2014 at 1:29 PM, Szymon Guz wrote: > >> On 7 January 2014 19:11, ChoonSoo Park wrote: >> >>> Hello Gurus, >>> >>> I have several tables with lots of boolean columns. >>> When I run select query for the tables, I always get '

Re: [GENERAL] When starting postgres, it hangs like it is still connected to stdout

2014-01-07 Thread Raymond O'Donnell
On 07/01/2014 19:47, Susan Cassidy wrote: > When I start postgres using postgres -D $PGDATA, it hangs, and I see > that postgres and all the other attendant processes are running, but I > never get my prompt back. > > If I hit ctl/C, postgres ends running. > > I can't seem to figure out why. You

Re: [GENERAL] When starting postgres, it hangs like it is still connected to stdout

2014-01-07 Thread Joe Van Dyk
On Tue, Jan 7, 2014 at 11:47 AM, Susan Cassidy < susan.cass...@decisionsciencescorp.com> wrote: > When I start postgres using postgres -D $PGDATA, it hangs, and I see that > postgres and all the other attendant processes are running, but I never get > my prompt back. > > If I hit ctl/C, postgres e

Re: [GENERAL] When starting postgres, it hangs like it is still connected to stdout

2014-01-07 Thread Susan Cassidy
The initdb command said I could use that command, but pg_ctl works fine now. I should have tried that before. I have always used pg_ctl in the past, don't know why I just went with the postgres command. Thanks, Susan On Tue, Jan 7, 2014 at 11:50 AM, Shaun Thomas wrote: > > When I start postgr

[GENERAL] Server Crash: Issues Re-starting Postgres

2014-01-07 Thread Rich Shepard
While I was out of the office yesterday the server shut down unexpectedly. Now I'm having difficulties getting postgres restarted because it's been so long since I've done this. Based on error messages when trying to start postgres I killed the .pid file and /tmp/.s.PGSQL.5432. Obviously the

Re: [GENERAL] Is there a way to return "true"/"false" string for boolean type?

2014-01-07 Thread ChoonSoo Park
On Tue, Jan 7, 2014 at 2:55 PM, Joe Van Dyk wrote: > On Tue, Jan 7, 2014 at 10:41 AM, ChoonSoo Park wrote: > >> On Tue, Jan 7, 2014 at 1:29 PM, Szymon Guz wrote: >> >>> On 7 January 2014 19:11, ChoonSoo Park wrote: >>> Hello Gurus, I have several tables with lots of boolean colu

Re: [GENERAL] Consistent file-level backup of pg data directory

2014-01-07 Thread Jeff Janes
On Tue, Jan 7, 2014 at 10:58 AM, wrote: > Hi, > > On my site, we run rsync-based backups of all servers to a central backup > server every night. Unfortunately, reading the postgres documentation I > could not find any direct way how to ensure that the state of the postgres > data directory store

Re: [GENERAL] Server Crash: Issues Re-starting Postgres [RESOLVED]

2014-01-07 Thread Rich Shepard
On Tue, 7 Jan 2014, Rich Shepard wrote: What is the process I follow to get postgres running again? Found the problem and fixed it. I had touched /tmp/.s.PGSQL.5432 as root and it was a regular file, not a socket. Stopping postgres, deleting that file, and restarting the server fixed the

Re: [GENERAL] Sudden slow down and spike in system CPU causes max_connections to get exhausted

2014-01-07 Thread Sergey Konoplev
On Mon, Jan 6, 2014 at 6:24 PM, Tom Lane wrote: > "Anand Kumar, Karthik" writes: >> We run postgres 9.1.11, on Centos 6.3, and an ext2 filesystem >> Everything will run along okay, and every few hours, for about a couple of >> minutes, postgres will slow way down. A "select 1" query takes betwee

Re: [GENERAL] Is there a way to return "true"/"false" string for boolean type?

2014-01-07 Thread Joe Van Dyk
On Tue, Jan 7, 2014 at 10:11 AM, ChoonSoo Park wrote: > Hello Gurus, > > I have several tables with lots of boolean columns. > When I run select query for the tables, I always get 't' or 'f' for > boolean types. > > Is there a way to return 'true' or 'false' string for boolean type except > using

[GENERAL] How to know server status variable in postgresql?

2014-01-07 Thread ambilalmca
Hai, I am developing a java application for performance counter. For that i want to collect all server status counter names with current value. i just did it for MySQl by, *"SHOW GLOBAL STATUS"*. is their any query similar this to collect those details from the database. I am new to postgresql, so

Re: [GENERAL] How to know server status variable in postgresql?

2014-01-07 Thread John R Pierce
On 1/7/2014 4:33 AM, ambilalmca wrote: Hai, I am developing a java application for performance counter. For that i want to collect all server status counter names with current value. i just did it for MySQl by, *"SHOW GLOBAL STATUS"*. is their any query similar this to collect those details from

Re: [GENERAL] Sudden slow down and spike in system CPU causes max_connections to get exhausted

2014-01-07 Thread Scott Marlowe
On Mon, Jan 6, 2014 at 6:06 PM, Anand Kumar, Karthik wrote: > Hi, > > We run postgres 9.1.11, on Centos 6.3, and an ext2 filesystem > > Everything will run along okay, and every few hours, for about a couple of > minutes, postgres will slow way down. A "select 1" query takes between 10 > and 15 se

Re: [GENERAL] Consistent file-level backup of pg data directory

2014-01-07 Thread Rajeev rastogi
On 08 January 2014, Gator wrote: > Hi, > > On my site, we run rsync-based backups of all servers to a central > backup server every night. Unfortunately, reading the postgres > documentation I could not find any direct way how to ensure that the > state of the postgres data directory stored on t

[GENERAL] table design and data type choice

2014-01-07 Thread Jayadevan M
Hi, We have a table to record the voteup/votedown by users of questions and answers (like on stackoverflow). So there will be a large number of inserts (voteup/down), some updates(user changes mind)and may be a few deletes. The queries will be mostly aggregates (count(*) where question_id= and vo