mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Provide CatalogTupleDelete() as a wrapper around simple_heap_delete().
This extends the work done in commit 2f5c9d9c9
to provide a more nearly
complete abstraction layer hiding the details of index updating for catalog
changes. That commit only invented abstractions for catalog inserts and
updates, leaving nearby code for catalog deletes still calling the
heap-level routines directly. That seems rather ugly from here, and it
does little to help if we ever want to shift to a storage system in which
indexing work is needed at delete time.
Hence, create a wrapper function CatalogTupleDelete(), and replace calls
of simple_heap_delete() on catalog tuples with it. There are now very
few direct calls of [simple_]heap_delete remaining in the tree.
Discussion: https://postgr.es/m/462.1485902736@sss.pgh.pa.us
This commit is contained in:
@ -484,7 +484,7 @@ RemoveEventTriggerById(Oid trigOid)
|
||||
if (!HeapTupleIsValid(tup))
|
||||
elog(ERROR, "cache lookup failed for event trigger %u", trigOid);
|
||||
|
||||
simple_heap_delete(tgrel, &tup->t_self);
|
||||
CatalogTupleDelete(tgrel, &tup->t_self);
|
||||
|
||||
ReleaseSysCache(tup);
|
||||
|
||||
|
Reference in New Issue
Block a user