gp_inject_fault
Simulate faults in Greenplum-family databases for testing.
gp_inject_fault · Simulate faults in Greenplum-family databases for testing.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101385 | gp_inject_fault | gp_inject_fault | 1.0 | FEAT | Apache-2.0 | C |
Usage
Sources:
- Official upstream README
- Official extension control file (gp_inject_fault.control)
- Official extension SQL (gp_inject_fault–1.0.sql)
gp_inject_fault — infinite_loop loop until query cancel or terminate signal is received. Use it when an application needs this specific database capability. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.
Core Workflow
Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.
Important Objects
force_mirrors_to_catch_up()is an extension function and returnsVOID.gp_inject_fault(faultname text, type text, db_id int4)is an extension function and returnstext.gp_inject_fault(faultname text, type text, db_id int4, gp_session_id int4)is an extension function and returnstext.gp_inject_fault(faultname text, type text, ddl text, database text, tablename text, start_occurrence int4, end_occurrence int4, extra_arg int4, db_id int4)is an extension function and returnstext.gp_inject_fault(faultname text, type text, ddl text, database text, tablename text, start_occurrence int4, end_occurrence int4, extra_arg int4, db_id int4, gp_session_id int4)is an extension function and returnstext.gp_inject_fault_infinite(faultname text, type text, db_id int4)is an extension function and returnstext.gp_wait_until_triggered_fault(faultname text, numtimestriggered int4, db_id int4)is an extension function and returnstext.insert_noop_xlog_record()is an extension function and returnsVOID.
Requirements and Caveats
- The reviewed control file declares default version
1.0. - The control file marks the extension as relocatable.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.