What is commonly called "pH shock" actually very rarely is caused by pH. According to Evans, Piermarini, and Choe "The Multifunctional Fish Gill: Dominant Site of Gas Exchange, Osmoregulation, Acid-Base Regulation, and Excretion of Nitrogenous Waste"
Physiology Review 2005, the return of blood towards the control pH is primarily due to adjustments of blood bicarbonate concentrations via exchange of acid-base equivalents at the gills. Over 90% of the action occurs at the gills.
Basically, what it boils down to is that the fish exchanges CO2, Na+, and Cl- at the gills until the pH balance between the water and their internals is just the way they want it. Another quote from the above article: "Although variable with the type and extent of the acid-base disturbance, compensatory transport is usually activated within 20-30 min of the disturbance and can reach net-acid or net-base excretion rates of 1,000 micromol per kg per hour."
Just some "back of the envelope" calculations: If I just let the flux rate be 100 micromol per kg per hour, I think that that means that the fish can change its internal pH around 4 units per hour per kg of the fish or faster down to a pH of 4.0 (after that the time starts increasing exponentially, i.e. 10 hours to get down to 3.0) I actually don't know what the internal pH of a fish is... anyone?. So, smaller fish (smaller kg) can change their pH faster -- makes sense, smaller circulatory system, easy to change concentrations in a smaller volume.
What is really interesting is that the acid-base exchange rate is also dependent upon the salt (Na+ and Cl-) solution, so GH and KH play a much larger role than may be usually suspected. This thread
http
/www.fishforums.net/index.php?showtopic=123070 linked to a site whose author deduced this relationship from experience.
Nature shows how quickly fish can adapt to pH changes as well. Firstly, in ponds and lakes, the pH can change as much as 2.0 pH units throughout the day as the sun comes up, the aquatic plants activity changes, the body of water's temperature changes, etc. and again as the sun sets. More dramatically is what happens to fish during periods of high rain and runoff from the ground. There aren't massive fish kills everytime it rains hard, but the pH of the rainwater is rarely the same as the pH of the body of water it runs to.
Basically, in synopsis here, fish can adapt to a change in pH pretty quickly, if the ion exchanges are favorable. The measure we as fishkeepers use to know how much ion exchange is available is the hardness measurements, KH & GH. If the hardnesses of the store/bag water and your tank water are close, the fish will be able to exchange the ions it needs to balance its pH quickly. If the hardnesses are significantly different, the ions are either going to want to quickly leave the fish or quickly enter the fish -- either way it will be much harder to control and much harder for the fish to use the exchanges to balance its internal pH. Hence, "pH shock" should probably really be termed "hardness shock" since it is differences in hardness that are much harder for the fish to acclimate to than a large change in pH if conditions are right.