All fish have adapted to the pH of their native waters. However, the goldfish has lived in captivity for centuries -- at least. A goldfish will tolerate a huge pH range in captivity. However, the goldfish does not adapt well to very extreme or sudden changes in pH. You should try to change the pH of a goldfish's water only if the fish seems distressed.
Goldfish pH Range
Most experts list the survival range of goldfish as 6.0 to 8.0. The pH scale is logarithmic, meaning a value of 6.0 is 100 times less acidic than water with a pH of 8.0. Since this range includes water above and below 7, the neutral point of the pH scale, this means that goldfish can survive in water that is either somewhat acidic or somewhat alkaline. However, goldfish can survive beyond this range, particularly if the pH is lowered or raised gradually.
Water Problems and pH.
While goldfish can adapt to a huge pH range, a change in pH may indicate a separate problem. For example, the pH of water tends to drop when carbon dioxide levels rise, and goldfish do not tolerate this well. Additionally, using decorations rich in calcium, like tufa rock or coral sand, can push water pH up beyond the safe range for goldfish. A dropping pH also can indicate that something in the aquarium water is rotting, like dead fish or uneaten fish food. Since rotting also produces ammonia, this means you need to perform a water change. If you see a low pH, test for ammonia and nitrite. If the pH is high, make sure there are no decorations in the aquariums causing it to rise.
If the water pH changes throughout the day and you have plants, this indicates the issue is related to the amount of oxygen and carbon dioxide in aquarium water. Goldfish need well-oxygenated water. You can best counteract the buildup of carbon dioxide by adding water pumps or airstones to the aquarium or pond. Water movement improves the exchange of gases in water, and ups the amount of oxygen.
Changing the pH
You should change the pH of a goldfish's water only if the pH is extreme, the goldfish seems distressed and you've ruled out any other problems. If the pH is too low, it's easier to raise it than lower it. Raise aquarium water with buffering products, which you can purchase at pet shops. If the pH is too high, dilute the aquarium water with water purified through reverse osmosis. The specifics will vary based on your aquarium and how much you want to change the pH. Never change the pH by more than 0.2 -- pH values have no units -- per day. Sudden changes in pH are more dangerous than the "wrong" pH for a fish.