pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PG 8 Out of memory issuing queries
2+ messages / 2 participants
[nested] [flat]

* PG 8 Out of memory issuing queries
@ 2005-02-04 21:39 Werner Bohl <WernerBohl@infutor.com>
  2005-02-05 01:36 ` Re: PG 8 Out of memory issuing queries Joshua D. Drake <jd@commandprompt.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Werner Bohl @ 2005-02-04 21:39 UTC (permalink / raw)
  To: pgsql-admin

Hi!

Hope anybody can help me with this issue. I have a fairly large table
(~75 million rows) that where imported without pk. Tried to create a pk
on a supposed unique field, but failed with duplicates. So i issued:
select oldid from table group by oldid having count(*) > 1
and it fails with Out of memory. Tried to create a new pk using: alter
table <table> add newid serial primary key; and it also fails with out
of memory error. 

Are there any settings on postgresql.conf that I may change to prevent
this error?

This is on Windows XP profesional with Postgresql 8.0


TIA,

-- 
Werner Bohl <WernerBohl@infutor.com>
Infutor de Costa Rica S.A.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: PG 8 Out of memory issuing queries
  2005-02-04 21:39 PG 8 Out of memory issuing queries Werner Bohl <WernerBohl@infutor.com>
@ 2005-02-05 01:36 ` Joshua D. Drake <jd@commandprompt.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Joshua D. Drake @ 2005-02-05 01:36 UTC (permalink / raw)
  To: WernerBohl@infutor.com; +Cc: pgsql-admin

Werner Bohl wrote:
> Hi!
> 
> Hope anybody can help me with this issue. I have a fairly large table
> (~75 million rows) that where imported without pk. Tried to create a pk
> on a supposed unique field, but failed with duplicates. So i issued:
> select oldid from table group by oldid having count(*) > 1
> and it fails with Out of memory. Tried to create a new pk using: alter
> table <table> add newid serial primary key; and it also fails with out
> of memory error. 

Use a cursor during your large count(*) query and you can find you bad 
entries.

J


> 
> Are there any settings on postgresql.conf that I may change to prevent
> this error?
> 
> This is on Windows XP profesional with Postgresql 8.0
> 
> 
> TIA,
> 


-- 
Command Prompt, Inc., your source for PostgreSQL replication,
professional support, programming, managed services, shared
and dedicated hosting. Home of the Open Source Projects plPHP,
plPerlNG, pgManage,  and pgPHPtoolkit.
Contact us now at: +1-503-667-4564 - http://www.commandprompt.com

Attachments:

jd.vcf (text/x-vcard, 638B) download begin:vcard fn:Joshua D. Drake n:Drake;Joshua D. org:Command Prompt, Inc. adr:;;PO Box 215;Cascade Locks;Oregon;97014;USA email;internet:jd@commandprompt.com title:Consultant tel;work:503-667-4564 tel;fax:503-210-0334 note:Command Prompt, Inc. is the largest and oldest US based commercial PostgreSQL support provider. We provide the only commercially viable integrated PostgreSQL replication solution, but also custom programming, and support. We authored the book Practical PostgreSQL, the procedural language plPHP, and adding trigger capability to plPerl. x-mozilla-html:FALSE url:http://www.commandprompt.com/ version:2.1 end:vcard
^ permalink raw reply [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-02-05 01:36 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-02-04 21:39 PG 8 Out of memory issuing queries Werner Bohl <WernerBohl@infutor.com>
2005-02-05 01:36 ` Joshua D. Drake <jd@commandprompt.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox