How to decode value of ifx_replcheck
Posted in 2026
Milan Rafaj asked how to decode ifx_replcheck. Art Kagel explained it is a pseudo-timestamp that changes on every update, unlike VERCOLS columns. Andreas Legner gave dbinfo('UTC_TO_DATETIME', ifx_bit_rightshift(ifx_replcheck, 32)) for the update time and said the lower 4 bytes hold the updating server's group id and a version counter. Solved.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: Triggers, Constraints & Referential Integrity
Hello, can someone help with decoding value in ifx_replcheck? - I have read in docs it is timestamp plus row version but need more precisely. We re using ifx_replcheck to identify changed rows since last recorded values for rows. Currently we are looking for why ifx_replcheck is different on table row where it seems values in all columns are the same. Table has insert, delete, update trigger defined. And one explanation could be the row is updated a couple of times but finally has the same value as when its state was recently recorded. So we need to know when the change in ifx_replcheck was done Thank you ------------------------------ Milan ------------------------------
Milan: You are confusing the ifx_replcheck shadow column with the two VERCOLS shadow columns ifx_insert_checksum and ifx_row_version. The ifx_replcheck shadow column is a single column that just has a pseudo-timestamp in it. That value will always change when the row is updated whether with the same values or different values or even if it was deleted and re-inserted with the same values. Just for completeness, the VERCOLS column ifx_insert_checksum contains a checksum of the row as it was when the row was inserted and does not change when the row is updated. The ifx_row_version starts at 1 and is incremented whenever the row is updated. So, here are the scenarios describing the behavior of the VERCOLS shadow columns: Row was deleted and reinserted with the same values: The ifx_row_version will be 1 and the ifx_insert_checksum will be the same. Row was deleted and reinserted with different values: The ifx_row_version will be 1 and the ifx_insert_checksum will be different Row was updated to the same values: The ifx_row_version will have increased and the ifx_insert_checksum will be unchanged. Row was updated to different values in one or more columns: The ifx_row_version will have increased and the ifx_insert_checksum will be unchanged. Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------
Hi Milan,
try
dbinfo('UTC_TO_DATETIME', ifx_bit_rightshift(ifx_replcheck, 32)).
Yes, ifx_replcheck does contain last update time which also enables "cdr check --since" functionality.
(It does not for pre-existing, still unmodified data in case REPLCHECK got added using ALTER TABLE.)
HTH,
Andreas
------------------------------
Andreas Legner
Informix Dev
HCL Software
------------------------------
Thank you Art for explanation of VERCOLS, it is useful. We use only ifx_replcheck - so there no logic in its value, just values which is different on each update even with the same value. Milan Rafaj Senior Lead, Infrastructure/Cloud Architecture Kyndryl Consult +420 737 264 248 www.kyndryl.cz Planned absence/Plánovaná nepřítomnost: 5-8.6., 5-16.7, 31.7.-11.8.2026 Kyndryl Česká republika, spol. s r. o. Sídlo: Praha 4, Chodov, V Parku 2308/8, PSČ: 148 00, IČ: 14890992 Zapsaná v obchodním rejstříku, vedeném Městským soudem v Praze (oddíl C, vložka 339277) Registered address: Prague 4, Chodov, V Parku, 2308/8, Zip code: 148 00 Company ID: 14890992 Entered in the Commercial Register maintained by the Municipal Court in Prague (Part C, Entry 339277) --
Thank you Andreas, very useful. We got timestamps now. Milan Rafaj Senior Lead, Infrastructure/Cloud Architecture Kyndryl Consult +420 737 264 248 www.kyndryl.cz Planned absence/Plánovaná nepřítomnost: 5-8.6., 5-16.7, 31.7.-11.8.2026 Kyndryl Česká republika, spol. s r. o. Sídlo: Praha 4, Chodov, V Parku 2308/8, PSČ: 148 00, IČ: 14890992 Zapsaná v obchodním rejstříku, vedeném Městským soudem v Praze (oddíl C, vložka 339277) Registered address: Prague 4, Chodov, V Parku, 2308/8, Zip code: 148 00 Company ID: 14890992 Entered in the Commercial Register maintained by the Municipal Court in Prague (Part C, Entry 339277) --
Hello Andreas, One more question - has 2nd part of ifx_replcheck also some useful information which can be used for further investigation Thanks a lot. Milan Rafaj --
Hi Milan, the lower 4 bytes actually are 2 * 2 bytes, first one being the last updating server's id (group number), second one a version counter. HTH, Andreas ------------------------------ Andreas Legner Informix Dev HCL Software ------------------------------