Selection of parent chain (IUPAC nomenclature) In the given compound, there are (apparently) two possibilities of choosing the parent (main) chain for its nomenclature in accordance with IUPAC rules:

(A) being the one containing 4 carbon atoms and the triple bond in the parent chain;

(B) being the one containing 6 carbon atoms and the hydroxyl group as a substituent in the parent chain.

Which one shall I choose while naming this compound? My book claims it to be (A), but I do not understand. (B) is clearly the longer chain and contains the hydroxyl group, which has a higher priority in nomenclature as compared to the triple bond. Where am I going wrong?
The most important simplified criteria for the choice of a principal chain are:

greater number of substituents corresponding to the suffix (principal characteristic group)
longest chain
greater number of multiple bonds
lower locants for suffixes
lower locants for multiple bonds
greater number of prefixes
lower locants for prefixes
lower locants for substituents cited first as a prefix in the name

The corresponding wording of the rules taken from Nomenclature of Organic Chemistry – IUPAC Recommendations and Preferred Names 2013 (Blue Book) is as follows.

P-44.1 SENIORITY ORDER FOR PARENT STRUCTURES
When there is a choice, the senior parent structure is chosen by applying the following criteria, in order, until a decision is reached. These criteria must always be applied before those applicable to rings and ring systems (see P-44.2) and to chains (see P-44.3). Then criteria applicable to both chains and rings or ring systems given in P-44.4 are considered.
P-44.1.1 The senior parent structure has the maximum number of substituents corresponding to the principal characteristic group (suffix) or senior parent hydride in accord with the seniority of classes (P-41) and the seniority of suffixes (P-43).
(…)
P-44.3.2 The principal chain has the greater number of skeletal atoms [criterion (b) in P-44.3].
(…)
P-44.4.1 If the criteria of P-44.1 through P-44.3, where applicable, do not effect a choice of a senior parent structure, the following criteria are applied successively until there are no alternatives remaining. These criteria are illustrated in P-44.4.1.1 through P-44.4.1.12.
The senior ring, ring system, or principal chain:
(a) has the greater number of multiple bonds (P-44.4.1.1);
(b) has the greater number of double bonds (P-44.4.1.2);
(…)
(h) has the lower locant for an attached group expressed as a suffix (P-44.4.1.8);
(…)
(j) has the lower locant(s) for endings or prefixes that express changes in the level of hydrogenation, i.e., for ‘ene’ and ‘yne’ endings and ‘hydro/dehydro’ prefixes (P-44.4.1.10);
(…)
P-45.2.1 The preferred IUPAC name is based on the senior parent structure that has the maximum number of substituents cited as prefixes (other than ‘hydro/dehydro’) to the parent structure.
P-45.2.2 The preferred IUPAC name is based on the senior parent structure that has the lower locant or set of locants for substituents cited as prefixes (other than ‘hydro/dehydro’) to the parent structure.
P-45.2.3 The preferred IUPAC name is based on the senior parent structure that has the lower locant or set of locants for substituents cited as prefixes to the parent structure (other than ‘hydro/dehydro’ prefixes) in their order of citation in the name.
(…)

According to Rule P-44.1.1, the priority list of substituent groups has to be considered first in order to decide the parent chain for this compound. Apparently, you have already done that in both of your suggested possibilities: The principal characteristic group that is expressed as a suffix is the aldehyde group ($\ce{-CHO}$).
The next rule (P-44.3.2) is looking at the longest chain. Therefore, the correct answer is B; the principal chain contains six carbon atoms and the hydroxyl group. Thus, the complete name is 2-ethynyl-5-hydroxyhexanal.

The next rule (P-44.4.1.1) would be looking at the multiple bond, but it is not needed since we already found the principal chain.
Note, however, that the IUPAC recommendations on this matter have been changed. In the current version, the order of seniority between unsaturation and length of chain given in earlier recommendations is reversed.

(…), the first criterion to be considered in choosing a preferred parent acyclic chain is the length of the chain; unsaturation is now the second criterion.

If your book is still using old nomenclature rules, it would expect the other answer A to be correct.