ctdbPartAdminByKey
Performs an administrative partition operation on the partition specified by key value.
Declaration
CTDBRET ctdbPartAdminByKey(CTHANDLE handle,pVOID keyval,CTPART_MODE_E partmode,pCOUNT partstatus)
Description
ctdbPartAdminByKey() manages the partitions for a table.
|
CTPART_PURGE |
delete a partition |
|
CTPART_ADD |
add a partition |
|
CTPART_ARCHIVE |
archive a partition |
|
CTPART_BASE |
modify the lower limit partition number value |
|
CTPART_ACTIVATE |
activate an archived partition |
|
CTPART_STATUS |
return the partition status in partstatus |
|
pmSTATUSnone |
0 |
partition member does not exist |
|
pmSTATUSexst |
1 |
partition member is active |
|
pmSTATUSopnd |
2 |
partition member is active and currently open |
|
pmSTATUSarhv |
3 |
partition member is archived |
|
pmSTATUSpurg |
4 |
partition member was purged |
|
pmSTATUSparc |
19 |
partition member is pending archive |
|
pmSTATUSppnd |
20 |
partition member is pending purge |
Returns
ctdbPartAdminByKey() returns CTDBRET_OK on success. BMOD_ERR (446) is returned with a bad partmode value. A c-treeDB API C API error on failure.
See also
ctdbPartAdminByName(), ctdbPartAdminByNumber()