Informix Error -186: ISAM error: Cannot open partition. Online create/drop index in progress.
Cause and resolution
ISAM error: Cannot open partition. Online create/drop index in progress.
The current operation is trying to open a partition on which a online create/drop index is in progress. Wait a short time, and try again.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-186 is a brief, expected, transient condition — similar in spirit to -106 and -113 — that
occurs when something tries to open a partition while an online CREATE INDEX or DROP INDEX
operation is running against it. Online index operations are designed to minimize disruption, but
there's still a brief window where certain access needs to wait.
- An online
CREATE INDEXorDROP INDEXoperation currently in progress against the table or partition, briefly restricting other operations from opening it. - An application or query accessing the table at exactly the moment an online index build/drop is running — most access continues normally during an online operation, but a specific access pattern still needs exclusive partition access briefly.
- A schema-maintenance job running index builds during active business hours, without awareness that specific access patterns can briefly trigger -186 even though the operation is designed to be "online."
Solutions / Resolution
- Wait a short time and retry, per the official guidance — this is normally very brief and self-resolving.
- Build retry-with-backoff logic into applications for this specific condition, the same general pattern as for -106/-107.
- If this becomes disruptive, consider scheduling online index create/drop operations during lower-traffic windows, even though they're designed to minimize disruption generally.
- Monitor frequency if this recurs often enough to be an operational annoyance, to decide whether index-maintenance scheduling needs adjustment.
Examples
The expected transient wait
-- Session A: an online index build running against orders
CREATE INDEX orders_status_idx ON orders (status) ONLINE;
-- Session B, briefly during the build:
SELECT * FROM orders WHERE id = 1;
-- -186: wait briefly and retry
Retrying moments later succeeds without any other change — the online index operation completing (or reaching a point where this specific access pattern is no longer restricted) resolves it.
Retry logic
while (iserrno == -186) {
sleep(1);
retry_operation();
}
Diagnostic Checks
- Check for an active online index create/drop operation against the affected table:
onstat -g ddl - Correlate the timing with any scheduled index-maintenance jobs, if this recurs unexpectedly.
Related Errors / Related Topics
- -106 — "ISAM error: non-exclusive access." The general exclusivity-conflict family this belongs to.
- -113 — "ISAM error: the file is locked." Another transient access-conflict condition with the same "wait and retry" resolution shape.
Wait and retry first — this is normally brief and self-resolving, not something requiring investigation unless it recurs persistently against the same table.