Re: DB Files

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Andy Hartman <hartman60home(at)gmail(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: DB Files
Date: 2024-11-15 15:47:41
Message-ID: 3266a0a3-4de9-4214-8c4d-dd99b9074e40@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/15/24 06:27, Andy Hartman wrote:
> I created a  new table (V16) and then used SimplySql to take data from
> mssql to the new Postgres table. The table is 212gig in size. Myquestion
> comes from the files created on the OS(Windows2022 server) I can see
> lots of files with the last being:
>
> 2474695.143
>
> They are all 1,048,576kb
>
> Is this normal behaviour and could I have done something to use fewer
> files and larger ones?

Read:

https://www.postgresql.org/docs/current/storage-file-layout.html

[...]

"When a table or index exceeds 1 GB, it is divided into gigabyte-sized
segments. The first segment's file name is the same as the filenode;
subsequent segments are named filenode.1, filenode.2, etc. This
arrangement avoids problems on platforms that have file size
limitations. (Actually, 1 GB is just the default segment size. The
segment size can be adjusted using the configuration option
--with-segsize when building PostgreSQL.) In principle, free space map
and visibility map forks could require multiple segments as well, though
this is unlikely to happen in practice."

[...]

>
>
> This table is created in a separate tablespace on a dedicated drive on
> the windows file system.
>
>  I'm just getting involved in this PostgreSql instance
>
> THanks.

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

  • DB Files at 2024-11-15 14:27:36 from Andy Hartman

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-11-15 15:48:10 Re: Retrieve filename within a script
Previous Message Torsten Förtsch 2024-11-15 15:28:06 Re: Validating check constraints without a table scan?