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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 dba.stackexchange
scroll top