Re: Is my database now too big?

From: Darren Reed <darrenr+postgres(at)fastmail(dot)net>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Is my database now too big?
Date: 2007-10-16 06:33:11
Message-ID: 47145B27.9030200@fastmail.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Scott Marlowe wrote:
> On 10/15/07, Darren Reed <darrenr+postgres(at)fastmail(dot)net> wrote:
> > Scott Marlowe wrote:
> > > ...
> > >
> > > Again, I'm kinda shooting in the dark here as you reveal more and more
> > > what you are doing a little at a time. A test case that can invoke
> > > this failure would be most useful.
> > >
> > After seeing this today:
> > ERROR: duplicate key violates unique constraint "ers_pkey"
> > ERROR: duplicate key violates unique constraint "foo_pkey"
> > ERROR: duplicate key violates unique constraint "foo_pkey"
> > ERROR: duplicate key violates unique constraint "foo_pkey"
> > ERROR: duplicate key violates unique constraint "foo_pkey"
> > ERROR: duplicate key violates unique constraint "foo_pkey"
> > ERROR: could not open segment 1 of relation 1663/10793/2659 (target
> > block 858862642): No such file or directory
> > ERROR: could not open segment 1 of relation 1663/10793/2659 (target
> > block 858862642): No such file or directory
> > ERROR: could not open segment 1 of relation 1663/10793/2659 (target
> > block 858862642): No such file or directory
> > ERROR: could not open segment 1 of relation 1663/10793/2659 (target
> > block 858862642): No such file or directory
> > ...
> >
> > ...there was little or no activity during this time, apart from
> > some inserts, maybe some selects, etc. Nothing that should
> > have caused this kind of upset.
> >
> > There is a file that matches this:
> > -rw------- 1 postgres wheel 57344 Oct 14 22:57
> > /data/db/second/base/10793/2659
> > but it isn't in the directory where I moved most of the indexes to:
> > ls /data/index/ext/10793/
> > 16390 16397 16399 16406 16407 16410 16414 16425 16434 16435
>
> How, exactly, did you move those indexes?
>

With "ALTER TABLE".

Since then I recreated the database and after merging a chunk of data, I
see this:
(various errors about duplicate keys and values too wide for fields...)
ERROR: duplicate key violates unique constraint "t_a_pkey"
LOG: unexpected EOF on client connection
ERROR: value too long for type character(12)
LOG: unexpected EOF on client connection
LOG: unexpected EOF on client connection
LOG: could not send data to client: Broken pipe
LOG: unexpected EOF on client connection
ERROR: relation "t_a" does not exist

I've attached the commands I've used to create the schema.
It's called sanitised because I've culled all of the fields that
aren't used. This script was used to create the database that
I then imported records into before seeing the above.

Darren

Attachment Content-Type Size
sanitised text/plain 2.6 KB

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jessica Richard 2007-10-16 11:56:00 Re: Is there a way to kill a connection from the pg_stat_activitly list?
Previous Message Tom Lane 2007-10-16 04:15:33 Re: Is my database now too big?