Should we remove unused code?

From: Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Should we remove unused code?
Date: 2016-04-18 15:07:11
Message-ID: 20160418180711.55ac82c0@fujitsu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

Today I've read this post:

http://blog.2ndquadrant.com/code-coverage/

I think its great and that everyone in this mailing list should
familiarize themselves with it.

Reading the coverage report, I discovered that some code is never
executed. Sometimes its OK (error reporting in out-of-memory cases),
sometimes its not (not enough tests). But there are also cases I'm not
sure about.

For instance there are two flags - HASH_SEGMENT and HASH_FFACTOR that
are in fact never used (see attachment). I wonder whether we should
keep code like this or not.

What do you think?

--
Best regards,
Aleksander Alekseev
http://eax.me/

Attachment Content-Type Size
remove-unused-code.patch text/x-patch 1.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2016-04-18 15:15:36 Re: Spinlocks and semaphores in 9.2 and 9.3
Previous Message Tom Lane 2016-04-18 15:07:08 Re: Spinlocks and semaphores in 9.2 and 9.3