Re: TRAP: FailedAssertion("tabstat->trans == trans", File: "pgstat_relation.c", Line: 508
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Erik Rijkers <er@xs4all.nl>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, andres@anarazel.de, pgsql-hackers@lists.postgresql.org
Date: 2022-04-19T12:39:30Z
Lists: pgsql-hackers
On 2022-Apr-19, Erik Rijkers wrote:
> (gdb) p tabstat
> $1 = (PgStat_TableStatus *) 0x319e630
> (gdb) p *tabstat
> $2 = {t_id = 2139062143, t_shared = 127, trans = 0x7f7f7f7f7f7f7f7f,
> t_counts = {t_numscans = 9187201950435737471, t_tuples_returned =
> 9187201950435737471, t_tuples_fetched = 9187201950435737471,
> t_tuples_inserted = 9187201950435737471, t_tuples_updated =
> 9187201950435737471, t_tuples_deleted = 9187201950435737471,
> t_tuples_hot_updated = 9187201950435737471, t_truncdropped = 127,
> t_delta_live_tuples = 9187201950435737471, t_delta_dead_tuples =
> 9187201950435737471, t_changed_tuples = 9187201950435737471,
> t_blocks_fetched = 9187201950435737471, t_blocks_hit = 9187201950435737471},
> relation = 0x7f7f7f7f7f7f7f7f}
It looks like this struct is freed or is in a memory context that was
reset. Perhaps its lifetime wasn't carefully considered in the logical
replication code, which takes some shortcuts.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"El que vive para el futuro es un iluso, y el que vive para el pasado,
un imbécil" (Luis Adler, "Los tripulantes de la noche")
Commits
-
Don't report stats in LogicalRepApplyLoop() when in xact.
- 0cf16cb8ca48 15.0 landed