Re: [HACKERS] pg_class.relpages/allvisible probably shouldn't be a int4

2014-05-30 Thread Alvaro Herrera
Andres Freund wrote: > On 2014-05-11 23:30:37 +0200, Andres Freund wrote: > > Yea. I really don't like to take on such a major project to solve a > > minor problem. > > What I am thinking about right now is to expose a 'pg_blocknumber' > > type. That only does very basic operations and implicitly

Re: [HACKERS] pg_class.relpages/allvisible probably shouldn't be a int4

2014-05-30 Thread Andres Freund
On 2014-05-30 12:00:47 +0100, Simon Riggs wrote: > On 12 May 2014 08:15, Andres Freund wrote: > > >> But I concur that in practice, if you're dealing with 16TB tables, it's > >> time > >> to partition. > > > > Well, we need to improve our partitioning for that to be viable for all > > relations.

Re: [HACKERS] pg_class.relpages/allvisible probably shouldn't be a int4

2014-05-30 Thread Simon Riggs
On 12 May 2014 08:15, Andres Freund wrote: >> But I concur that in practice, if you're dealing with 16TB tables, it's time >> to partition. > > Well, we need to improve our partitioning for that to be viable for all > relations. Not having usable foreign and unique keys makes it a pita in > some

Re: [HACKERS] pg_class.relpages/allvisible probably shouldn't be a int4

2014-05-30 Thread Andres Freund
On 2014-05-11 23:30:37 +0200, Andres Freund wrote: > On 2014-05-11 12:24:30 -0400, Tom Lane wrote: > > Andres Freund writes: > > > On 2014-05-10 23:21:34 -0700, Peter Geoghegan wrote: > > >> On Fri, May 9, 2014 at 1:50 PM, Andres Freund > > >> wrote: > > >>> And adding a proper unsigned type doe

Re: [HACKERS] pg_class.relpages/allvisible probably shouldn't be a int4

2014-05-12 Thread Tom Lane
Andres Freund writes: > On 2014-05-12 10:07:29 +0300, Heikki Linnakangas wrote: >> But I concur that in practice, if you're dealing with 16TB tables, it's time >> to partition. > Well, we need to improve our partitioning for that to be viable for all > relations. Not having usable foreign and uni

Re: [HACKERS] pg_class.relpages/allvisible probably shouldn't be a int4

2014-05-12 Thread Andres Freund
On 2014-05-12 10:07:29 +0300, Heikki Linnakangas wrote: > On 05/12/2014 12:30 AM, Andres Freund wrote: > >>>So if I were to take Andres' > >>>complaint seriously at all, I'd be thinking in terms of "do we need to > >>>widen BlockNumber to int64?", not "how do we make this print as > >>>unsigned?".

Re: [HACKERS] pg_class.relpages/allvisible probably shouldn't be a int4

2014-05-12 Thread Heikki Linnakangas
On 05/12/2014 12:30 AM, Andres Freund wrote: >So if I were to take Andres' >complaint seriously at all, I'd be thinking in terms of "do we need to >widen BlockNumber to int64?", not "how do we make this print as >unsigned?". But I doubt such a proposal would fly, because of the >negative impact

Re: [HACKERS] pg_class.relpages/allvisible probably shouldn't be a int4

2014-05-11 Thread Andres Freund
On 2014-05-11 12:24:30 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2014-05-10 23:21:34 -0700, Peter Geoghegan wrote: > >> On Fri, May 9, 2014 at 1:50 PM, Andres Freund > >> wrote: > >>> And adding a proper unsigned type doesn't sound like a small amount of > >>> work. > > >> Perhaps

Re: [HACKERS] pg_class.relpages/allvisible probably shouldn't be a int4

2014-05-11 Thread Tom Lane
Andres Freund writes: > On 2014-05-10 23:21:34 -0700, Peter Geoghegan wrote: >> On Fri, May 9, 2014 at 1:50 PM, Andres Freund wrote: >>> And adding a proper unsigned type doesn't sound like a small amount of work. >> Perhaps not, but it's overdue. We ought to have one. > Maybe. But there's so m

Re: [HACKERS] pg_class.relpages/allvisible probably shouldn't be a int4

2014-05-11 Thread Andres Freund
On 2014-05-10 23:21:34 -0700, Peter Geoghegan wrote: > On Fri, May 9, 2014 at 1:50 PM, Andres Freund wrote: > > And adding a proper unsigned type doesn't sound like a small amount of work. > > Perhaps not, but it's overdue. We ought to have one. Maybe. But there's so many things to decide around

Re: [HACKERS] pg_class.relpages/allvisible probably shouldn't be a int4

2014-05-10 Thread Peter Geoghegan
On Fri, May 9, 2014 at 1:50 PM, Andres Freund wrote: > And adding a proper unsigned type doesn't sound like a small amount of work. Perhaps not, but it's overdue. We ought to have one. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to

Re: [HACKERS] pg_class.relpages/allvisible probably shouldn't be a int4

2014-05-09 Thread Andres Freund
On May 9, 2014 10:37:49 PM CEST, Tom Lane wrote: >Andres Freund writes: >> That's nothing for 9.4 anymore, but shouldn't we make >pg_class.relpages >> a int8 (sounds slightly better than float to me) or somesuch? > >No; those are really BlockNumbers, and have always been. float4 would >lose info

Re: [HACKERS] pg_class.relpages/allvisible probably shouldn't be a int4

2014-05-09 Thread Tom Lane
Andres Freund writes: > That's nothing for 9.4 anymore, but shouldn't we make pg_class.relpages > a int8 (sounds slightly better than float to me) or somesuch? No; those are really BlockNumbers, and have always been. float4 would lose information and float8 or int8 would waste space. If we had