Tidy recent code bloat in pg_creatersubscriber::cleanup_objects_atexit - Mailing list pgsql-hackers

From Peter Smith
Subject Tidy recent code bloat in pg_creatersubscriber::cleanup_objects_atexit
Date
Msg-id CAHut+PtdBSVi4iH7BObDVwDNVwOpn+H3fezOBdSTtENx+rhNMw@mail.gmail.com
Whole thread Raw
Responses Re: Tidy recent code bloat in pg_creatersubscriber::cleanup_objects_atexit
List pgsql-hackers
During a recent review of pg_creatersubscriber I saw that commit
e117cfb introduced a common 'dbinfos' struct to contain the array of
individual 'dbinfo[i]' infos. But, this now means that getting to each
dbinfo[i] requires another level of referencing.

In some places, e.g. function cleanup_objects_atexit, this caused
unnecessary code bloat. IMO this function is crying out for a local
variable to simplify the code again.

Please see the attached patch that implements this suggestion.

======
Kind Regards,
Peter Smith
Fujitsu Australia

Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Printing window function OVER clauses in EXPLAIN
Next
From: John Naylor
Date:
Subject: Re: CRC32C Parallel Computation Optimization on ARM