Skip site navigation (1) Skip section navigation (2)

Re: [BUGS] General Bug Report: Files greater than 1 GB are created while sorting

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Doug Mitchell <doug(at)mitchcraft(dot)com>
Cc: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: [BUGS] General Bug Report: Files greater than 1 GB are created while sorting
Date: 1999-07-01 05:23:28
Message-ID: 199907010523.BAA24175@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs

Nice analysis of a problem.  Probably psort code is not using those
routines because we never expected the sorts to get over 2Gigs.


> The backed is creating files bigger than 1 GB when sorting
> and it will break when the file gets to 2 GB.
> 
> Here are the biggest files:
> 
> 1049604 -rw-------   1 postgres postgres 1073741824 Jun 30 19:10 bigtable_pkey
> 1049604 -rw-------   1 postgres postgres 1073741824 Jun 30 19:36 pg_temp.2446.0
> 1049604 -rw-------   1 postgres postgres 1073741824 Jun 30 19:55 bigtable
> 1122136 -rw-------   1 postgres postgres 1147937412 Jun 30 21:39 pg_temp2769.3
> 1148484 -rw-------   1 postgres postgres 1174890288 Jun 30 21:26 pg_temp2769.4
> 
> I also have some smaller ".1" files that are the rest of the above
> files along with everything else you might expect to find in a 
> PG database directory.  It's those two last big ones that are
> troublesome.
> 
> Table and indicies are segmenting just fine at 1GB, but 
> some sort files just keep growing.  I did actually get a 
> back-end error one time when one exceeded 2 GB.
> 
> Thanks,
> Doug
>  
> 
> --------------------------------------------------------------------------
> 
> Test Case:
> ----------
> Just do:
> mydb=> select * into bigtable2 from bigtable order by custno;
> 
> You might want to decrease RELSEGSZ to see it faster.
> Mail be back if you can't reproduce it.
> (and please make the bug report form boxes bigger!)
> 
> --------------------------------------------------------------------------
> 
> Solution:
> ---------
> Something is not using the Magnetic Disk Storage Manager,
> but is writing a temp file out on its own during the sort.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist(at)candle(dot)pha(dot)pa(dot)us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-bugs by date

Next:From: PostmasterDate: 1999-07-01 13:11:26
Subject: FW: Notification: Inbound Mail Failure
Previous:From: Unprivileged userDate: 1999-07-01 04:57:51
Subject: General Bug Report: Files greater than 1 GB are created while sorting

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group