2007-03-20

PostgreSQL 表格空間(Tablespace)功能與未來特點

更新:2007-03-21
對映章節:

內容:
表格空間, 是整個系統的資料主體
PostgreSQL 使用 pg_global 來存放和系統有關的物件
使用 pg_default 表格空間來存放使用者建立的資料庫物件

表格空間決定著DBMS整體效能的重點調校之一
在以下的情況 DBA 就有必要考量 Tablespace 的分割與配置

  • 資料間具有競爭系統效能.
  • 大型物件資料表與小型物件資料表應該分別在不同的 Tablespace.
  • 分離資料和索引的存放空間是不錯的效能強化.
PostgreSQL 開發團隊對下個版本的工作目標:

Tablespaces
  • Allow a database in tablespace t1 with tables created in tablespace t2 to be used as a template for a new database created with default tablespace t2
    All objects in the default database tablespace must have default tablespace specifications. This is because new databases are created by copying directories. If you mix default tablespace tables and tablespace-specified tables in the same directory, creating a new database from such a mixed directory would create a new database with tables that had incorrect explicit tablespaces. To fix this would require modifying pg_class in the newly copied database, which we don't currently do.
  • Allow reporting of which objects are in which tablespaces
    This item is difficult because a tablespace can contain objects from multiple databases. There is a server-side function that returns the databases which use a specific tablespace, so this requires a tool that will call that function and connect to each database to find the objects in each database for that tablespace.
  • -Add a GUC variable to control the tablespace for temporary objects and sort files
    It could start with a random tablespace from a supplied list and cycle through the list.
  • Allow WAL replay of CREATE TABLESPACE to work when the directory structure on the recovery computer is different from the original
    (類似 Oracle 的 重作日誌表格空間的功能)
  • 允許對每個表格空間配額(quotas)
  • 允許 ALTER TABLESPACE 來移動表格空間到不同的目錄(directories)
  • 允許資料庫被移動到不同的表格空間
  • 允許移動系統表(global system tables)到其它的表格空間, where possible
    Currently non-global system tables must be in the default database tablespace. Global system tables can never be moved.

沒有留言:

網誌存檔

PostgreSQL & Google-Analytics Running...

::Planet PostgreSQL::

PostgreSQL Information Page

PostgreSQL日記(日本 石井達夫先生Blog)

PostgreSQL News

黑喵的家 - 資料庫相關

Google 網上論壇
PostgreSQL 8 DBA 專業指南中文版
書籍內容討論與更多下載區(造訪此群組)
目錄下載: PostgreSQL_8 _DBA_Index_zh_TW.pdf (更新:2007-05-18)

全球訪客分佈圖(Google)

全球訪客分佈圖(Google)