Question

Is it possible to allocate tables directly to tablespaces within a single database/schema in postgres? Based on the docs, tablespace is a create database argument, but are there any workarounds?

Was it helpful?

Solution

Yes it's possible.

As documented in the manual you can specify a tablespace when creating a table.

However, tablespaces are rarely used in Postgres as they don't really provide any advantage.

One of the few reasons to use them is, when you can't easily expand the size of your filesystem where the data directory is located.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top