{"Entry":{"collection":"func","key":"pg-tablespace-size","name":"pg_tablespace_size","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"8.0","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"8.1"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"14","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"15"},{"descriptions_changed":true,"doc_overhaul":false,"from":"18","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"19"}],"content_hash":"f0d7f26ee2ce80a839d8f0a43666fb0a3e4baee670355aaa759cbb94b9b2a365","derived_content_hash":"88b7d8461ec11aab02e4d566eaef6c284579b649bf37edebbc7e1275e6f4826c","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:e32c4d61b462af607db9d8d14923a8401890ecf52432ef0f8922bc388afd5888","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"8.1","group":"admin","group_label":"System Administration Functions","groups":["admin"],"imported_at":"2026-09-27T17:57:29.684901+08:00","last_version":"20","name":"pg_tablespace_size","name_key":"pg_tablespace_size","position":29106,"present_in":["8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"wiki-repair-20261023:c7b3d5acabbbeef6212d1fa0c0ba112a1d2efca1c1ca871b57670ba443be86a1","receipt_sha256":"bb1fa2e115d3d40033017c4bbcc0a7100fdcc6d572f20fdc84136366d02e0005","repair":"wiki-repair-20261023"},"signature":"pg_tablespace_size ( name ) → bigint","signature_count":2,"slug":"pg-tablespace-size","source_rev":"wiki-repair-20261023:e32c4d61b462af607db9d8d14923a8401890ecf52432ef0f8922bc388afd5888","summary":"Computes the total disk space used in the tablespace with the specified name or OID.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-tablespace-size","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-tablespace-size","SourceRevision":"wiki-repair-20261023:e32c4d61b462af607db9d8d14923a8401890ecf52432ef0f8922bc388afd5888","Facts":{"description":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have CREATE privilege on the specified tablespace or have privileges of the pg_read_all_stats role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_html":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e privilege on the specified tablespace or have privileges of the \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_zh":"计算具有指定名称或 OID 的表空间中使用的总磁盘空间。要使用此函数，您必须对指定的表空间具有 CREATE 权限，或者具有 pg_read_all_stats 角色的权限，除非它是当前数据库的默认表空间。如果表空间不存在，则抛出错误。","description_zh_html":"计算具有指定名称或 OID 的表空间中使用的总磁盘空间。要使用此函数，您必须对指定的表空间具有 \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e 权限，或者具有 \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e 角色的权限，除非它是当前数据库的默认表空间。如果表空间不存在，则抛出错误。","doc":{"anchor":"FUNCTIONS-ADMIN-DBSIZE","file":"functions-admin.html","sha256":"885561d57facd49c33b44a50e320a002197d700d118784cc87d6410efadbd1f6","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-admin.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"885561d57facd49c33b44a50e320a002197d700d118784cc87d6410efadbd1f6","version":"18.7"},{"file":"functions-admin.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"830e894d29fec30b7c350c915fcaed4a63b24d57f2c96150bf25fa07fb43849c","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"admin","group_label":"系统管理函数","lang":"en","layout":"table-new","pages":["functions-admin.html"],"prose_only":false,"signatures":[{"description":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have CREATE privilege on the specified tablespace or have privileges of the pg_read_all_stats role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_html":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e privilege on the specified tablespace or have privileges of the \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_zh":"计算具有指定名称或 OID 的表空间中使用的总磁盘空间。要使用此函数，您必须对指定的表空间具有 CREATE 权限，或者具有 pg_read_all_stats 角色的权限，除非它是当前数据库的默认表空间。如果表空间不存在，则抛出错误。","description_zh_html":"计算具有指定名称或 OID 的表空间中使用的总磁盘空间。要使用此函数，您必须对指定的表空间具有 \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e 权限，或者具有 \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e 角色的权限，除非它是当前数据库的默认表空间。如果表空间不存在，则抛出错误。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_tablespace_size\u003c/code\u003e ( \u003ccode class=\"type\"\u003ename\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"pg_tablespace_size ( name ) → bigint","zh_from":"same-version-manual"},{"description":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have CREATE privilege on the specified tablespace or have privileges of the pg_read_all_stats role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_html":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e privilege on the specified tablespace or have privileges of the \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_zh":"计算具有指定名称或 OID 的表空间中使用的总磁盘空间。要使用此函数，您必须对指定的表空间具有 CREATE 权限，或者具有 pg_read_all_stats 角色的权限，除非它是当前数据库的默认表空间。如果表空间不存在，则抛出错误。","description_zh_html":"计算具有指定名称或 OID 的表空间中使用的总磁盘空间。要使用此函数，您必须对指定的表空间具有 \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e 权限，或者具有 \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e 角色的权限，除非它是当前数据库的默认表空间。如果表空间不存在，则抛出错误。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_tablespace_size\u003c/code\u003e ( \u003ccode class=\"type\"\u003eoid\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"pg_tablespace_size ( oid ) → bigint","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-admin.html","sha256":"b4fab9daceb7883fd75b32b6eb5398f2bbbfbbed5c83d1b2bf99cc8d842cdaf7"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-ADMIN-DBSIZE","file":"functions-admin.html","sha256":"885561d57facd49c33b44a50e320a002197d700d118784cc87d6410efadbd1f6","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-tablespace-size","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_tablespace_size","Summary":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have CREATE privilege on the specified tablespace or have privileges of the pg_read_all_stats role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","BodyHTML":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have \u003ccode\u003eCREATE\u003c/code\u003e privilege on the specified tablespace or have privileges of the \u003ccode\u003epg_read_all_stats\u003c/code\u003e role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","SourceRevision":"wiki-repair-20261023:e32c4d61b462af607db9d8d14923a8401890ecf52432ef0f8922bc388afd5888","ContentHash":"a5b100d07d50bca303d5dfad5bd32bbe6ee42a5ec799c3fdc18af34e61cebe78","Payload":{"description":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have CREATE privilege on the specified tablespace or have privileges of the pg_read_all_stats role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_html":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e privilege on the specified tablespace or have privileges of the \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","signatures":[{"description":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have CREATE privilege on the specified tablespace or have privileges of the pg_read_all_stats role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_html":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e privilege on the specified tablespace or have privileges of the \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_zh":"计算具有指定名称或 OID 的表空间中使用的总磁盘空间。要使用此函数，您必须对指定的表空间具有 CREATE 权限，或者具有 pg_read_all_stats 角色的权限，除非它是当前数据库的默认表空间。如果表空间不存在，则抛出错误。","description_zh_html":"计算具有指定名称或 OID 的表空间中使用的总磁盘空间。要使用此函数，您必须对指定的表空间具有 \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e 权限，或者具有 \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e 角色的权限，除非它是当前数据库的默认表空间。如果表空间不存在，则抛出错误。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_tablespace_size\u003c/code\u003e ( \u003ccode class=\"type\"\u003ename\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"pg_tablespace_size ( name ) → bigint","zh_from":"same-version-manual"},{"description":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have CREATE privilege on the specified tablespace or have privileges of the pg_read_all_stats role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_html":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e privilege on the specified tablespace or have privileges of the \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_zh":"计算具有指定名称或 OID 的表空间中使用的总磁盘空间。要使用此函数，您必须对指定的表空间具有 CREATE 权限，或者具有 pg_read_all_stats 角色的权限，除非它是当前数据库的默认表空间。如果表空间不存在，则抛出错误。","description_zh_html":"计算具有指定名称或 OID 的表空间中使用的总磁盘空间。要使用此函数，您必须对指定的表空间具有 \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e 权限，或者具有 \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e 角色的权限，除非它是当前数据库的默认表空间。如果表空间不存在，则抛出错误。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_tablespace_size\u003c/code\u003e ( \u003ccode class=\"type\"\u003eoid\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"pg_tablespace_size ( oid ) → bigint","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"29e4fa5c9503a2828a1821838db745c76f2ebbae7f9b271c536c281e06fde45d","Text":"pg_tablespace_size ( name ) → bigint","Returns":"bigint","Payload":{"description":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have CREATE privilege on the specified tablespace or have privileges of the pg_read_all_stats role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_html":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e privilege on the specified tablespace or have privileges of the \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_zh":"计算具有指定名称或 OID 的表空间中使用的总磁盘空间。要使用此函数，您必须对指定的表空间具有 CREATE 权限，或者具有 pg_read_all_stats 角色的权限，除非它是当前数据库的默认表空间。如果表空间不存在，则抛出错误。","description_zh_html":"计算具有指定名称或 OID 的表空间中使用的总磁盘空间。要使用此函数，您必须对指定的表空间具有 \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e 权限，或者具有 \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e 角色的权限，除非它是当前数据库的默认表空间。如果表空间不存在，则抛出错误。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_tablespace_size\u003c/code\u003e ( \u003ccode class=\"type\"\u003ename\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"pg_tablespace_size ( name ) → bigint","zh_from":"same-version-manual"}},{"Version":"18","Ordinal":1,"Hash":"d1e3e445d07a2b09c6c6aaf32cda727a2b5bb00fa6b72a7072c87060c7dd0f5a","Text":"pg_tablespace_size ( oid ) → bigint","Returns":"bigint","Payload":{"description":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have CREATE privilege on the specified tablespace or have privileges of the pg_read_all_stats role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_html":"Computes the total disk space used in the tablespace with the specified name or OID. To use this function, you must have \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e privilege on the specified tablespace or have privileges of the \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e role, unless it is the default tablespace for the current database. Throws an error if the tablespace does not exist.","description_zh":"计算具有指定名称或 OID 的表空间中使用的总磁盘空间。要使用此函数，您必须对指定的表空间具有 CREATE 权限，或者具有 pg_read_all_stats 角色的权限，除非它是当前数据库的默认表空间。如果表空间不存在，则抛出错误。","description_zh_html":"计算具有指定名称或 OID 的表空间中使用的总磁盘空间。要使用此函数，您必须对指定的表空间具有 \u003ccode class=\"literal\"\u003eCREATE\u003c/code\u003e 权限，或者具有 \u003ccode class=\"literal\"\u003epg_read_all_stats\u003c/code\u003e 角色的权限，除非它是当前数据库的默认表空间。如果表空间不存在，则抛出错误。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_tablespace_size\u003c/code\u003e ( \u003ccode class=\"type\"\u003eoid\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"pg_tablespace_size ( oid ) → bigint","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
