Skip to content

Commit f889dfb

Browse files
hlinnakatristan957
authored andcommitted
Turn Assertion into elog(ERROR), to help with debugging.
This error is happening in the 'pg_regress' test in the CI, but not on my laptop. Turn it into an ERROR, so that we get the error context and backtrace of it.
1 parent d467462 commit f889dfb

File tree

1 file changed

+5
-1
lines changed
  • src/backend/storage/smgr

1 file changed

+5
-1
lines changed

src/backend/storage/smgr/smgr.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,11 @@ smgropen(RelFileNode rnode, BackendId backend, char relpersistence)
194194
if (reln->smgr_relpersistence == 0)
195195
reln->smgr_relpersistence = relpersistence;
196196
else
197-
Assert(relpersistence == 0 || reln->smgr_relpersistence == relpersistence);
197+
{
198+
if (!(relpersistence == 0 || reln->smgr_relpersistence == relpersistence))
199+
elog(ERROR, "relpersistence mismatch: smgropen %c vs SmgrRelation %c",
200+
relpersistence, reln->smgr_relpersistence);
201+
}
198202
}
199203

200204
return reln;

0 commit comments

Comments
 (0)