Re: [GENERAL] Idle in transaction

2009-07-17 Thread Sharma, Sid
> That doesn't matter if any _other_ module is performing UPDATEs (or > inserts and deletes) to the tables your module operates on. Your > module's open transactions may still prevent PostgreSQL from reclaiming > space, because it needs to keep the old versions of tuples around. There are no updat

Re: [GENERAL] initdb failure on Windows XP

2009-07-17 Thread Serge Fonville
> I am using PostgreSQL 8.3 on Windows XP SP2. > > I am getting this strange error while initdb: > > Part of the error message i get, > > The database cluster will be initialized with locale English_United > States.1252. > > The default database encoding has accordingly been set to WIN1252. > The d

Re: [GENERAL] memory leak occur when disconnect database

2009-07-17 Thread Craig Ringer
Sorry for the reply-to-self, but I thought I'd take ecpg out of the equation: #include #include int main() { struct passwd p; struct passwd * r; char buf[500]; getpwuid_r(1000, &p, &buf[0], 500, &r); } ... produces the same leak report. Since you didn't include information li

Re: [GENERAL] initdb failure on Windows XP

2009-07-17 Thread Sachin Srivastava
On 07/18/2009 12:03 AM, Joshua D. Drake wrote: On Fri, 2009-07-17 at 23:42 +0530, Sachin Srivastava wrote: I am using PostgreSQL 8.3 on Windows XP SP2. I am getting this strange error while initdb: Part of the error message i get, The database cluster will be initialized with locale Engli

Re: [GENERAL] memory leak occur when disconnect database

2009-07-17 Thread Craig Ringer
Your test case doesn't build, but I've attached a trivially tweaked one that does. Valgrind's report (valgrind --leak-check=full ./test) on my Ubuntu 9.04 machine with Pg 8.3.7 is: ==23382== 156 (36 direct, 120 indirect) bytes in 1 blocks are definitely lost in loss record 1 of 4 ==23382==at

Re: [GENERAL] [PERFORM] Concurrency issue under very heay loads

2009-07-17 Thread Haszlakiewicz, Eric
>-Original Message- >From: pgsql-performance-ow...@postgresql.org > >We use a typical counter within a transaction to generate >order sequence number and update the next sequence number. >This is a simple next counter - nothing fancy about it. When >multiple clients are concurrently a

Re: [GENERAL] Idle in transaction

2009-07-17 Thread Craig Ringer
On Fri, 2009-07-17 at 12:09 -0400, Sharma, Sid wrote: > I'm sure it is outdated. When I suggested a new application I should > have said a new module within an existing application. In other words, > the db pre-exists. We are rewriting our entire application(s) and moving > our database to DB2 and

Re: [GENERAL] initdb failure on Windows XP

2009-07-17 Thread Joshua D. Drake
On Fri, 2009-07-17 at 23:42 +0530, Sachin Srivastava wrote: > I am using PostgreSQL 8.3 on Windows XP SP2. > > I am getting this strange error while initdb: > > Part of the error message i get, > > The database cluster will be initialized with locale English_United > States.1252. > > The defau

Re: [GENERAL] COPY command on windows???

2009-07-17 Thread Thomas Kellerer
Andreas wrote on 17.07.2009 20:06: Hi, I'd like to read a csv file into PG 8.4. COPY relations FROM E'd:\\relations.csv' CSV HEADER; It throws (translated): ERROR: can't open file >>d:\relations.csv<< for reading file or directory not found Try COPY relations FROM 'd:/relations.csv' CSV HEAD

[GENERAL] initdb failure on Windows XP

2009-07-17 Thread Sachin Srivastava
I am using PostgreSQL 8.3 on Windows XP SP2. I am getting this strange error while initdb: Part of the error message i get, The database cluster will be initialized with locale English_United States.1252. The default database encoding has accordingly been set to WIN1252. The default text sea

[GENERAL] COPY command on windows???

2009-07-17 Thread Andreas
Hi, I'd like to read a csv file into PG 8.4. COPY relations FROM E'd:\\relations.csv' CSV HEADER; It throws (translated): ERROR: can't open file >>d:\relations.csv<< for reading file or directory not found The PG doc doesn't describe the path-syntax for windows. With google I only find referenc

Re: [GENERAL] Please help

2009-07-17 Thread Craig Ringer
On Thu, 2009-07-16 at 04:47 -0700, Roseller A. Romanos wrote: > Please help me with this. I really need your advice as to how to > retrieve the data in my postgresql database. > > I have postgresql installed in Windows XP platform five months ago. > Just yesterday my OS bugged down and saying NTDL

Re: [GENERAL] memory leak occur when disconnect database

2009-07-17 Thread Walton Hoops
8.1.8 is pretty old. Also you'll have better luck getting help if you actually include the output from Valgrind. -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of tanjunhua Sent: Friday, July 17, 2009 8:12 AM To: Postgres G

Re: [GENERAL] Working around spurious unique constraint errors due to SERIALIZABLE bug

2009-07-17 Thread Craig Ringer
On Thu, 2009-07-16 at 14:13 +, Florian Weimer wrote: > The drawback is that some of the side effects of the INSERT occur > before the constraint check fails, so it seems to me that I still need > to perform the select. I was about to foolishly suggest: Instead of: SELECT 1 FROM x WHERE a = 4

Re: [GENERAL] Concurrency issue under very heay loads

2009-07-17 Thread Raji Sridar (raji)
Thanks for everyone's inputs and here is an update on the issue: The problem source is that autocommit is not getting unset. The code does the following ( and source code or copyright does not belong to Cisco): . unsets autocommit . starts transaction . SQL for select for update . SQL for upda

Re: [GENERAL] Idle in transaction

2009-07-17 Thread Sharma, Sid
Thx for all your response @Bill Moran > You mention that you're using PG 8.1.3, which is very old. You'll save > yourself a lot of headaches if you at least upgrade to the latest 8.1. > But that is not part of your issue, it's just a side note. I'm sure it is outdated. When I suggested a new app

Re: [GENERAL] psql \du [PATCH] extended \du with [+] - was missing

2009-07-17 Thread Andreas Wenk
Peter Eisentraut schrieb: On Thursday 16 July 2009 02:12:05 ANdreas Wenk wrote: Hi, I recognized in psql using the internal help (\?) that the *+* sign is missing for the shortcut \du: # \du List of roles Role name | Attributes | Member of --+--+--

Re: [GENERAL] Asking for assistance in determining storage requirements

2009-07-17 Thread Scott Marlowe
On Thu, Jul 9, 2009 at 9:15 AM, Chris Barnes wrote: > You assistance is appreciated. > > I have question regarding disk storage for postgres servers > > We are thinking long term about scalable storage and performance and would > like some advise or feedback about what other people are using. > > W

Re: [GENERAL] change database

2009-07-17 Thread Florian Chis
Since there is no other way, I'll close it then reopen it again. Thank you for your time. Regards, Florian Chis 2009/7/15 Bill Moran > In response to Florian Chis : > > > > I'm working on a port from mysql to postgres. I have a function which > > connect's to the database, checks for database

Re: [GENERAL] Idle in transaction

2009-07-17 Thread Scott Marlowe
On Fri, Jul 17, 2009 at 8:17 AM, Sharma, Sid wrote: > Sorry. Forgot to mention the postgres version > > PostgreSQL 8.1.3 on i686-pc-linux-gnu, compiled by GCC 2.96 Oh, and update to the latest 8.1.x version. There are some nasty bugs in 8.1.3 if I recall. Won't fix this issue, but why run old un

Re: [GENERAL] Idle in transaction

2009-07-17 Thread Scott Marlowe
On Fri, Jul 17, 2009 at 8:05 AM, Sharma, Sid wrote: > Hi > > I’m a postgres newbie. I just implemented a new web application using > postgres. > > When I look at the db connections (via ps), I notice that all existing > connections are in ‘Idle in Transaction’ state. > > They never go to idle state

Re: [GENERAL] Idle in transaction

2009-07-17 Thread Richard Huxton
Sharma, Sid wrote: Sorry. Forgot to mention the postgres version PostgreSQL 8.1.3 on i686-pc-linux-gnu, compiled by GCC 2.96 Why on earth are you using that version? At the very least upgrade to 8.1.17 and if this is a new app, why not use 8.4? When I look at the db connections (via ps), I

Re: [GENERAL] Asking for assistance in determining storage requirements

2009-07-17 Thread Craig Ringer
On Thu, 2009-07-09 at 11:15 -0400, Chris Barnes wrote: > > We would like to get as much performance from our file systems > as possible. Then avoid RAID 5. Raid 10 is a pretty good option for most loads. Actually, RAID 5 is quite decent for read-mostly large volume stor

Re: [GENERAL] Idle in transaction

2009-07-17 Thread John
On Friday 17 July 2009 07:17:15 am Sharma, Sid wrote: > Sorry. Forgot to mention the postgres version > > PostgreSQL 8.1.3 on i686-pc-linux-gnu, compiled by GCC 2.96 > > > > > > From: Sharma, Sid > Sent: Friday, July 17, 2009 10:05 AM > To: pgsql-general@postgresql.

Re: [GENERAL] Idle in transaction

2009-07-17 Thread Bill Moran
In response to "Sharma, Sid" : > > I'm a postgres newbie. I just implemented a new web application using > postgres. You mention that you're using PG 8.1.3, which is very old. You'll save yourself a lot of headaches if you at least upgrade to the latest 8.1. But that is not part of your issue, i

Re: [GENERAL] [PERFORM] Concurrency issue under very heay loads

2009-07-17 Thread Craig Ringer
On Thu, 2009-07-16 at 00:11 -0600, Scott Marlowe wrote: > As others have said, a serial is a good idea, HOWEVER, if you can't > have gaps in sequences, or each customer needs their own sequence, > then you get to lock the rows / table / etc that you're mucking with > to make sure you don't issue t

Re: [GENERAL] something to suggest indexes

2009-07-17 Thread John
On Friday 17 July 2009 12:29:59 am Richard Huxton wrote: > John wrote: > > Hi, > > > > Is there something built-in to Postgres that would suggest what indexes I > > might add to improve performance? I created my required tables (they > > only contain small amounts of test data) and the performance

Re: [GENERAL] Concurrency issue under very heay loads

2009-07-17 Thread Craig Ringer
On Wed, 2009-07-15 at 22:34 -0700, John R Pierce wrote: > sounds like you should be using a SERIAL (which is implemented as an > INTEGER or BIGINT field with an associated SEQUENCE), as these DO work > just fine under heavy concurrency without any gotchas. There is one gotcha, though we're all

[GENERAL] memory leak occur when disconnect database

2009-07-17 Thread tanjunhua
I'm running postgres 8.1.8 on Debian and I think memory leak occur when disconnect database. 1. environment setting 1.1 postgresql version: version -

[GENERAL] Idle in transaction

2009-07-17 Thread Sharma, Sid
Hi I'm a postgres newbie. I just implemented a new web application using postgres. When I look at the db connections (via ps), I notice that all existing connections are in 'Idle in Transaction' state. They never go to idle state. The application itself remains functional and responsive. It has

Re: [GENERAL] Idle in transaction

2009-07-17 Thread Sharma, Sid
Sorry. Forgot to mention the postgres version PostgreSQL 8.1.3 on i686-pc-linux-gnu, compiled by GCC 2.96 From: Sharma, Sid Sent: Friday, July 17, 2009 10:05 AM To: pgsql-general@postgresql.org Subject: Idle in transaction Hi I'm a postgres newbie. I jus

Re: [GENERAL] something to suggest indexes

2009-07-17 Thread Richard Huxton
John wrote: Hi, Is there something built-in to Postgres that would suggest what indexes I might add to improve performance? I created my required tables (they only contain small amounts of test data) and the performance is great. But as the data starts growing I'm betting that creating a fe