Thread: Does standalone postfrsql have autogrowth/ manual growth on table space?
In other databases, there is a way to preallocate the table space to allow bulk loading of data in a well packed and continuous space.
Does psql have that auto/manual growth?
On 10/20/22 12:19, Vince McMahon wrote: > In other databases, there is a way to preallocate the table space to allow > bulk loading of data in a well packed and continuous space. > > > Does psql have that auto/manual growth? There's no pre-allocation in Postgresql. When you run CREATE TABLE, an (I think) 8KiB file is created; it grows as you add more data. When it hits 1GiB in size, another table is created. And then another and another and another, etc. -- Angular momentum makes the world go 'round.
On 10/20/22 11:29, Ron wrote:
On 10/20/22 12:19, Vince McMahon wrote:Another "file" is created, I think you meanIn other databases, there is a way to preallocate the table space to allow bulk loading of data in a well packed and continuous space.
Does psql have that auto/manual growth?
There's no pre-allocation in Postgresql. When you run CREATE TABLE, an (I think) 8KiB file is created; it grows as you add more data. When it hits 1GiB in size, another table is created. And then another and another and another, etc.
On 10/20/22 12:31, Rob Sargent wrote:
Yes :D
On 10/20/22 11:29, Ron wrote:On 10/20/22 12:19, Vince McMahon wrote:Another "file" is created, I think you meanIn other databases, there is a way to preallocate the table space to allow bulk loading of data in a well packed and continuous space.
Does psql have that auto/manual growth?
There's no pre-allocation in Postgresql. When you run CREATE TABLE, an (I think) 8KiB file is created; it grows as you add more data. When it hits 1GiB in size, another table is created. And then another and another and another, etc.
Yes :D
--
Angular momentum makes the world go 'round.
Angular momentum makes the world go 'round.
Re: Does standalone postfrsql have autogrowth/ manual growth on table space?
From
Christophe Pettus
Date:
> On Oct 20, 2022, at 10:29, Ron <ronljohnsonjr@gmail.com> wrote: > There's no pre-allocation in Postgresql. This is correct in that you can't say "please allocate 3GB for this table for me now." The number of pages that are addedto the end of a file isn't always one though; it can allocate more based on recent activity.
Re: Does standalone postfrsql have autogrowth/ manual growth on table space?
From
Vince McMahon
Date:
Thanks. I guess it is time for vacuum. 😂
On Thu, Oct 20, 2022, 13:34 Christophe Pettus <xof@thebuild.com> wrote:
> On Oct 20, 2022, at 10:29, Ron <ronljohnsonjr@gmail.com> wrote:
> There's no pre-allocation in Postgresql.
This is correct in that you can't say "please allocate 3GB for this table for me now." The number of pages that are added to the end of a file isn't always one though; it can allocate more based on recent activity.
Re: Does standalone postfrsql have autogrowth/ manual growth on table space?
From
Christophe Pettus
Date:
> On Oct 20, 2022, at 11:45, Vince McMahon <sippingonesandzeros@gmail.com> wrote: > > Thanks. I guess it is time for vacuum. 😂 Ironically, vacuum is the main issue. The main reason that you can't just slap a few gigabytes onto the end of a table isthat the next time vacuum runs, it will happily truncate it all away.