TDS (total dissolved solids) is not in itself relevant to the pH. TDS are all the dissolved solids occurring in given water. The GH (mineral hardness) is part of the TDS, but there is much more. I happened to have researched this for an article on another forum a couple years back, so to better answer your question I will cut/paste from that article and then comment on pH after. Some of this may already be known to you, but it is generally better to provide all rather than too little information.
Total Solids basically refers to organic and inorganic matter that is either suspended or dissolved in the aquarium water.
Total Suspended Solids (TSS) refers to the amount of solid waste, decaying fish and plant matter, etc. that can be captured and held by a filter.
Total Dissolved Solids (TDS) is a measure of the combined content of all organic and inorganic substances contained in the water in molecular, ionized or micro-granular (colloidal sol) suspended form. Generally the operational definition is that the solids must be small enough to survive filtration through a sieve the size of two micrometer.
Fresh water by definition contains no more than 1500 mg/l of TDS. Brackish water contains 1500-5000 mg/l, and marine (salt) water has more than 5000 mg/l of TDS. Note that mg/l is basically equal to parts per million (ppm), and also that this is not suggesting a level of 1500 ppm in an aquarium; these are just the approximate figures for the three categories.
TDS is connected to GH (general hardness) because like GH, TDS includes the calcium, magnesium and other “hard” mineral ions; these ions are what we measure with our GH test kits. But water hardness correctly considered is more than this; both GH and KH can affect hardness and TDS levels; however, the reverse is not necessarily true. Aquarium water can have a high TDS level but a low GH and KH (Jensen, 2009). The TDS for instance also includes sodium (salt) ions, chemical substances, etc. which are not reflected in the GH.
TDS is basically everything dissolved in the water: chlorine, chloramine, ammonia, phosphate, salt, hard minerals (GH), bicarbonates (KH), etc. And almost every substance added to the water will increase TDS: water conditioner, fish foods, plant fertilizers, calcareous substances, medications, water adjustment products, etc.
pH stands for pondus hydrogeni, Latin for “potential of hydrogen.” Water is made up of positively-charged hydrogen ions and negatively-charged hydroxyl ions, and pH is the measurement of the ratio of hydrogen and hydroxyl ions in a body of water. Acidic water contains more hydrogen ions, and basic (alkaline) water more hydroxyl ions; neutral water has an equal proportion. The pH is closely linked with the level of carbon dioxide (CO2) because CO2 produces carbonic acid. The hardness also impacts pH, since the carbonates bind to acids as they appear; as mentioned previously, this buffering will prevent or limit changes in pH.
The TDS affects fish, in some ways even more, than pH. This is why water changes are so crucial, they and only they can reduce the TDS. Soft water fish (like the discus, and most plecos) are naturally significantly impacted by TDS.
I am not a chemist, but if the above hasn't answered you, feel free to ask.
Byron.