{"record":{"id":"72f1a3f0e7d65c58","repo":"neondatabase/neon","slug":"neon-rmgr-has-no-known-compatibility-with-postgres","errorCode":null,"errorMessage":"Neon RMGR has no known compatibility with PostgreSQL version {}","messagePattern":"Neon RMGR has no known compatibility with PostgreSQL version (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"libs/wal_decoder/src/decoder.rs","lineNumber":576,"sourceCode":"                                size_of::<u16>() * xlrec.ntuples as usize\n                            };\n                        assert_eq!(offset_array_len, buf.remaining());\n\n                        if (xlrec.flags & pg_constants::XLH_INSERT_ALL_VISIBLE_CLEARED) != 0 {\n                            new_heap_blkno = Some(decoded.blocks[0].blkno);\n                        }\n                    }\n                    pg_constants::XLOG_NEON_HEAP_LOCK => {\n                        let xlrec = v17::rm_neon::XlNeonHeapLock::decode(buf);\n                        if (xlrec.flags & pg_constants::XLH_LOCK_ALL_FROZEN_CLEARED) != 0 {\n                            old_heap_blkno = Some(decoded.blocks[0].blkno);\n                            flags = pg_constants::VISIBILITYMAP_ALL_FROZEN;\n                        }\n                    }\n                    info => anyhow::bail!(\"Unknown WAL record type for Neon RMGR: {}\", info),\n                }\n            }\n            PgMajorVersion::PG15 | PgMajorVersion::PG14 => anyhow::bail!(\n                \"Neon RMGR has no known compatibility with PostgreSQL version {}\",\n                pg_version\n            ),\n        }\n\n        if new_heap_blkno.is_some() || old_heap_blkno.is_some() {\n            let vm_rel = RelTag {\n                forknum: VISIBILITYMAP_FORKNUM,\n                spcnode: decoded.blocks[0].rnode_spcnode,\n                dbnode: decoded.blocks[0].rnode_dbnode,\n                relnode: decoded.blocks[0].rnode_relnode,\n            };\n\n            Ok(Some(MetadataRecord::Neonrmgr(NeonrmgrRecord::ClearVmBits(\n                ClearVmBits {\n                    new_heap_blkno,\n                    old_heap_blkno,\n                    vm_rel,","sourceCodeStart":558,"sourceCodeEnd":594,"githubUrl":"https://github.com/neondatabase/neon/blob/8f60b04da47ffefe0e52bda2440134b42874eb75/libs/wal_decoder/src/decoder.rs#L558-L594","documentation":"`decode_neonmgr_record` only knows how to decode Neon-RMGR records for PostgreSQL 16 and 17; for PG14 and PG15 it bails unconditionally because Neon's postgres fork never emitted RM_NEON records on those versions. Seeing this error means an RM_NEON_ID record was decoded against a pg_version of PG14/PG15 — an inconsistent WAL/version combination.","triggerScenarios":"Decoding WAL that contains RM_NEON_ID records while `pg_version` says PG14 or PG15 — almost always the version argument not matching the cluster that actually wrote the WAL.","commonSituations":"Wrong pg_version passed to WalDecoder after a major-version upgrade mapping bug; version detection reading stale timeline metadata; experimental Neon builds backporting the Neon RMGR to older branches.","solutions":["Verify the pg_version passed to the decoder against the timeline metadata of the WAL source","If the WAL genuinely contains Neon RMGR records, the source must be PG16/PG17 — fix version detection","Restart ingestion from a point where version and WAL stream agree","Check how pg_version is derived (timeline info vs. config) and correct the source"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if decoded.xl_rmid == pg_constants::RM_NEON_ID\n    && matches!(pg_version, PgMajorVersion::PG14 | PgMajorVersion::PG15)\n{\n    anyhow::bail!(\"pg_version {pg_version} cannot produce Neon RMGR records; check version detection\");\n}","typeGuard":"fn neon_rmgr_supported(pg_version: PgMajorVersion) -> bool {\n    matches!(pg_version, PgMajorVersion::PG16 | PgMajorVersion::PG17)\n}","tryCatchPattern":null,"preventionTips":["Source pg_version from timeline metadata rather than configuration guesses","Assert version/WAL consistency on the first records of a stream","Re-check version maps after every PG major upgrade"],"tags":["rust","neon","wal-decoding","postgres","version-mismatch"],"backgroundTag":"postgres-version-incompatible","analyzedSha":"8f60b04da47ffefe0e52bda2440134b42874eb75","analyzedAt":"2026-08-16T23:39:28.135Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}