/lock/table

URL: https://<aws.fqdn>/<aws.cluster.name>/gpudb-0/lock/table

Manages global access to a table's data. By default a table has a input parameter lock_type of read_write, indicating all operations are permitted. A user may request a read_only or a write_only lock, after which only read or write operations, respectively, are permitted on the table until the lock is removed. When input parameter lock_type is no_access then no operations are permitted on the table. The lock status can be queried by setting input parameter lock_type to status.

Input Parameter Description

NameTypeDescription
table_namestringName of the table to be locked, in [schema_name.]table_name format, using standard name resolution rules. It must be a currently existing table or view.
lock_typestring

The type of lock being applied to the table. Setting it to status will return the current lock status of the table without changing it. The default value is status.

Supported ValuesDescription
statusShow locked status
no_accessAllow no read/write operations
read_onlyAllow only read operations
write_onlyAllow only write operations
read_writeAllow all read/write operations
optionsmap of string to stringsOptional parameters. The default value is an empty map ( {} ).

Output Parameter Description

The GPUdb server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query. Here is a description of the various fields of the wrapper:

NameTypeDescription
statusString'OK' or 'ERROR'
messageStringEmpty if success or an error message
data_typeString'lock_table_response' or 'none' in case of an error
dataStringEmpty string
data_strJSON or String

This embedded JSON represents the result of the /lock/table endpoint:

NameTypeDescription
lock_typestringReturns the lock state of the table.
infomap of string to stringsAdditional information.

Empty string in case of an error.