Skip to content

Monitoring ‚Äč

We provide a view pg_vector_index_stat to monitor the progress of indexing.

ColumnTypeDescription
tablerelidoidThe oid of the table.
indexrelidoidThe oid of the index.
tablenamenameThe name of the table.
indexnamenameThe name of the index.
idx_statustextIts value is NORMAL or UPGRADE. Whether this index is normal or needs upgrade.
idx_indexingboolNot null if idx_status is NORMAL. Whether the background thread is indexing.
idx_tuplesint8Not null if idx_status is NORMAL. The number of tuples.
idx_sealedint8[]Not null if idx_status is NORMAL. The number of tuples in each sealed segment.
idx_growingint8[]Not null if idx_status is NORMAL. The number of tuples in each growing segment.
idx_writeint8Not null if idx_status is NORMAL. The number of tuples in write buffer.
idx_sizeint8Not null if idx_status is NORMAL. The byte size for all the segments.
idx_optionstextNot null if idx_status is NORMAL. The configuration of the index.
idx_options Details

The idx_options is a JSON string that includes vector, segment, optimization, and indexing options. Examples below:

json
{
    "vector": {
        "dimensions": 256,
        "distance": "L2",
        "kind": "F32"
    },
    "segment": {
        "max_growing_segment_size": 20000,
        "max_sealed_segment_size": 1000000
    },
    "optimizing": {
        "sealing_secs": 60,
        "sealing_size": 1,
        "delete_threshold": 0.2,
        "optimizing_threads": 2
    },
    "indexing": {
        "hnsw": {
            "m": 12,
            "ef_construction": 300,
            "quantization": {
                "trivial": {}
            }
        }
    }
}

If there are no more insertions and you wait for all indexing to be finished, you can check the field idx_indexing every 60 seconds util it's true.