diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2022-06-30 19:10:13 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2022-06-30 19:10:13 +0100 |
commit | 8cd61d288adfabe1b7f83359eb0abd27382eec08 (patch) | |
tree | ff481e866047be8aba143a55a8a6070bd35857b6 | |
parent | d31d30973a190f69d414f7fc7b670771ac346a59 (diff) | |
download | postgresql-8cd61d288adfabe1b7f83359eb0abd27382eec08.tar.gz postgresql-8cd61d288adfabe1b7f83359eb0abd27382eec08.zip |
Avoid unnecessary MemSet call
The variable in question was changed from a struct to a pointer some
time ago (77947c51c08). Using MemSet to zero it still works but is
obviously unidiomatic and confusing, so change it to a straight
assignment.
Author: Ranier Vilela <ranier.vf@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAEudQApCeq4JjW1BdnwU=m=-DvG5WyUik0Yfn3p6UNphiHjj+w@mail.gmail.com
-rw-r--r-- | src/backend/utils/cache/relcache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 0e8fda97f86..f502df91dca 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -6258,7 +6258,7 @@ load_relcache_init_file(bool shared) rel->rd_firstRelfilenodeSubid = InvalidSubTransactionId; rel->rd_droppedSubid = InvalidSubTransactionId; rel->rd_amcache = NULL; - MemSet(&rel->pgstat_info, 0, sizeof(rel->pgstat_info)); + rel->pgstat_info = NULL; /* * Recompute lock and physical addressing info. This is needed in |