Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbPartAdminByNumber

Performs an administrative partition operation on the partition specified by partition number.

Declaration

CTDBRET ctdbPartAdminByNumber(CTHANDLE handle,LONG partno,CTPART_MODE_E partmode,pCOUNT partstatus)

Description

ctdbPartAdminByNumber() manages the partitions for a table.

  • Handle [in] - a table handle.
  • partno [in] - partition number
  • partmode [in] - partition operation mode. partmode is one of:

     

    ptADMINpurge

    delete a partition

     

    ptADMINadd

    add a partition

     

    ptADMINarchive

    archive a partition

     

    ptADMINbase

    modify the lower limit partition number value

     

    ptADMINactivate

    activate an archived partition

     

    ptADMINstatus

    return the partition status in partstatus

  • partstatus [out] - status code of partition when partmode specifies ptADMINstatus. partstatus returns one of the following values:

     

    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

ctdbPartAdminByNumber() 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(), ctdbPartAdminByKey()

TOCIndex