Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbPartAdminByName

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

Declaration

CTDBRET ctdbPartAdminByName(CTHANDLE handle, pTEXT partname, CTPART_MODE_E partmode, pCOUNT partstatus)

Description

ctdbPartAdminByName() manages the partitions for a table.

  • Handle [in] - a table handle.
  • partname [in] - partition name.
  • 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

ctdbPartAdminByName() returns CTDBRET_OK on success. BMOD_ERR (446) is returned with a bad partmode value. A FairCom DB API C API error on failure.

See also

ctdbPartAdminByKey(), ctdbPartAdminByNumber()

TOCIndex