Re: [GENERAL] pg_database_size differs from df -s

2012-06-07 Thread Vincent Veyron
Le mercredi 06 juin 2012 à 21:45 +0200, Frank Lanitz a écrit : > On Wed, 6 Jun 2012 20:31:36 +0200 > Alban Hertroys wrote: > > > On 6 Jun 2012, at 16:33, Frank Lanitz wrote: > > > > > > Is your du reporting sizes in Bytes or blocks or ...? > > Should be byte as its a linux. > Not sure abou

Re: [GENERAL] pg_database_size differs from df -s

2012-06-06 Thread Frank Lanitz
On Wed, 6 Jun 2012 20:31:36 +0200 Alban Hertroys wrote: > On 6 Jun 2012, at 16:33, Frank Lanitz wrote: > > > the result is much bigger than running a df -s over the postgres > > folder > > - Its about factor 5 to 10 depending on database. > > > Is your du reporting sizes in Bytes or blocks or

Re: [GENERAL] pg_database_size differs from df -s

2012-06-06 Thread Guillaume Lelarge
On Wed, 2012-06-06 at 18:46 +0200, Julien Rouhaud wrote: > On Wed, Jun 6, 2012 at 6:28 PM, Tom Lane wrote: > > > Frank Lanitz writes: > > > Am 06.06.2012 17:49, schrieb Tom Lane: > > >> For me, pg_database_size gives numbers that match up fairly well with > > >> what "du" says. I would not expe

Re: [GENERAL] pg_database_size differs from df -s

2012-06-06 Thread Alban Hertroys
On 6 Jun 2012, at 16:33, Frank Lanitz wrote: > the result is much bigger than running a df -s over the postgres folder > - Its about factor 5 to 10 depending on database. Is your du reporting sizes in Bytes or blocks or ...? Alban Hertroys -- The scale of a problem often equals the size of an

Re: [GENERAL] pg_database_size differs from df -s

2012-06-06 Thread Julien Rouhaud
On Wed, Jun 6, 2012 at 6:28 PM, Tom Lane wrote: > Frank Lanitz writes: > > Am 06.06.2012 17:49, schrieb Tom Lane: > >> For me, pg_database_size gives numbers that match up fairly well with > >> what "du" says. I would not expect an exact match, since du probably > >> knows about filesystem over

Re: [GENERAL] pg_database_size differs from df -s

2012-06-06 Thread Tom Lane
Frank Lanitz writes: > Am 06.06.2012 17:49, schrieb Tom Lane: >> For me, pg_database_size gives numbers that match up fairly well with >> what "du" says. I would not expect an exact match, since du probably >> knows about filesystem overhead (such as metadata) whereas >> pg_database_size does not

Re: [GENERAL] pg_database_size differs from df -s

2012-06-06 Thread Frank Lanitz
Am 06.06.2012 17:49, schrieb Tom Lane: > Frank Lanitz writes: >> I've got an issue I'm not sure I might have a misunderstanding. When >> calling > >> select sum(pg_database_size(datid)) as total_size from pg_stat_database > >> the result is much bigger than running a df -s over the postgres fold

Re: [GENERAL] pg_database_size differs from df -s

2012-06-06 Thread Tom Lane
Frank Lanitz writes: > I've got an issue I'm not sure I might have a misunderstanding. When > calling > select sum(pg_database_size(datid)) as total_size from pg_stat_database > the result is much bigger than running a df -s over the postgres folder > - Its about factor 5 to 10 depending on data