Updated on 2024-03-15 GMT+08:00

GAUSS-00531 -- GAUSS-00540

GAUSS-00531: "tablespace location must be an absolute path"

SQLSTATE: 42P17

Description: When the CREATE TABLESPACE tablespace_name ...LOCATION syntax is used to specify a tablespace directory, the location information strings indicate an incorrect path.

Solution: Specify an absolute path using the location information string.

GAUSS-00532: "tablespace location '%s' is too long"

SQLSTATE: 42P17

Description: When the CREATE TABLESPACE tablespace_name...LOCATION syntax is used to specify the length of a tablespace directory, the length value of the tablespace directory is greater than 1024.

Solution: Change the length value of the tablespace directory to a value less than or equal to 1024.

GAUSS-00533: "unacceptable tablespace name '%s'"

SQLSTATE: 42939

Description: When the CREATE TABLESPACE tablespace_name syntax is used to create a tablespace, the tablespace name is invalid.

Solution: Ensure that the tablespace name is unique in the database cluster and does not start with pg which is used to name system tablespaces.

GAUSS-00534: "tablespace '%s' already exists"

SQLSTATE: 42710

Description: The current tablespace name has been used, and the tablespace failed to be created.

Solution: Run the \db command to check uniqueness of the tablespace name. If the name used for the tablespace exists, rename the tablespace.

GAUSS-00535: "tablespaces are not supported on this platform"

SQLSTATE: 0A000

Description: Tablespaces are not supported.

Solution: Do not use tablespaces.

GAUSS-00536: "Tablespace '%s' does not exist."

SQLSTATE: 42704

Description: The tablespace deleted using DROP TABLESPACE does not exist.

Solution: Run the \db command to check whether the tablespace name exists. Only tablespaces that exist in the database can be deleted.

GAUSS-00537: "tablespace '%s' is used by partitioned table '%s'"

SQLSTATE: 0A000

Description: Attempting to delete the tablespace used by a partitioned table is invalid.

Solution: Check whether the tablespace to be deleted has been used by a partitioned table. Do not delete the tablespace that has been used by a partitioned table.

GAUSS-00538: "tablespace '%s' is not empty"

SQLSTATE: 55000

Description: The tablespace to be deleted is not empty.

Solution: Delete a tablespace only when it is empty.

GAUSS-00539: "directory '%s' does not exist"

SQLSTATE: 58P01

Description: When creating a tablespace, the tablespace directory $PGDATA/pg_tblspc/ does not exist.

Solution: Check whether the tablespace directory $PGDATA/pg_tblspc/ exists before creating a tablespace. If the directory does not exist, restart the cluster or a single node.

GAUSS-00540: "could not set permissions on directory '%s': %m"

SQLSTATE: XX000

Description: When creating a tablespace, read, write, and execute permissions failed to be set for the tablespace directory $PGDATA/pg_tblspc/.

Solution: Perform the following operations to resolve problems: 1. Check whether the current user is a database administrator or the database owner. 2. Check whether the file system is read-only. If yes, add the write and execute permissions for the file system. 3. Check whether the directory exists. If yes, do not create the tablespace.