PostgreSQL database segsize

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

PostgreSQL database segsize

Bill Glennon
Hi,

If you are building a Postgresql database from source and you use option --with-segsize=4, how do you verify that the database segsize is 4GB and not the default 1GB? Is there a query that you can run?

Or even if you come into a place to support an existing PostgreSQL database, how do you find out what the database segsize is?

Thanks in advance for your help.

-- Bill
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL database segsize

Magnus Hagander-2


On Tue, Jun 30, 2020 at 12:17 AM Bill Glennon <[hidden email]> wrote:
Hi,

If you are building a Postgresql database from source and you use option --with-segsize=4, how do you verify that the database segsize is 4GB and not the default 1GB? Is there a query that you can run?

Or even if you come into a place to support an existing PostgreSQL database, how do you find out what the database segsize is?


You can run the query "SHOW segment_size" to show the compiled-in value. 

--
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL database segsize

Bill Glennon
Awesome! That worked. Thank you Magnus!
I should have thought of that earlier. LOL

On Mon, Jun 29, 2020 at 6:33 PM Magnus Hagander <[hidden email]> wrote:


On Tue, Jun 30, 2020 at 12:17 AM Bill Glennon <[hidden email]> wrote:
Hi,

If you are building a Postgresql database from source and you use option --with-segsize=4, how do you verify that the database segsize is 4GB and not the default 1GB? Is there a query that you can run?

Or even if you come into a place to support an existing PostgreSQL database, how do you find out what the database segsize is?


You can run the query "SHOW segment_size" to show the compiled-in value. 

--
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL database segsize

Tom Lane-2
In reply to this post by Magnus Hagander-2
Magnus Hagander <[hidden email]> writes:
> On Tue, Jun 30, 2020 at 12:17 AM Bill Glennon <[hidden email]> wrote:
>> If you are building a Postgresql database from source and you use
>> option --with-segsize=4, how do you verify that the database segsize is 4GB
>> and not the default 1GB? Is there a query that you can run?

> You can run the query "SHOW segment_size" to show the compiled-in value.

pg_controldata will show it too, though a bit more opaquely:

Blocks per segment of large relation: 131072

This would be helpful if you have an on-disk database and no running
server.

                        regards, tom lane