diff options
Diffstat (limited to 'contrib/tcn/tcn.c')
-rw-r--r-- | contrib/tcn/tcn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/tcn/tcn.c b/contrib/tcn/tcn.c index 6a8a96f6033..c9594f68ad4 100644 --- a/contrib/tcn/tcn.c +++ b/contrib/tcn/tcn.c @@ -141,8 +141,8 @@ triggered_change_notification(PG_FUNCTION_ARGS) if (!HeapTupleIsValid(indexTuple)) /* should not happen */ elog(ERROR, "cache lookup failed for index %u", indexoid); index = (Form_pg_index) GETSTRUCT(indexTuple); - /* we're only interested if it is the primary key */ - if (index->indisprimary) + /* we're only interested if it is the primary key and valid */ + if (index->indisprimary && IndexIsValid(index)) { int numatts = index->indnatts; |