Corrosion in the marina
There are many good books on the subject of yachts and electical issues including electrolysis. Nigel Calder''s books come to mind.
In general, I think the main issue is stray currents, which when coupled with an un-isolated ac source on your boat spells trouble. For safety reasons, all of your grounds on your boat need to be common, whether ac or dc, and that is where the trouble begins. In a perfect world, there would never be any current "leaking" into the water and we wouldn''t have to worry. But seeing as we don''t have the "perfect" world, you have to protect yourself.
Use a galvanic isolator whenever you are plugged in. It breaks the leak to ground for your vessel, and isolates you from stray current in the water. For a battery to work, you have to complete a circuit, and your boat, the water (esp. salt water) and the shore power connection make a wonderful battery, so by using a galvanic isolator, you break that circuit.
Prior to my installing the Guest 30amp unit on my boat, I was going through shaft zinks at about two per month! I left myself plugged in all the time to keep everything topped off during the season. I had two bullets on the shaft and inspected them often. Now, with the isolator installed, my two zinks last an entire season, from May to November!
If your boat is completely bonded, and you are worrying about extra protection, you can hang a zink fish attached to your stern rail over the side while at dock.
I also carry a plug in circuit tester, and use it whenever I travel. I plug it in before I plug my boat in. As long as the lights come up green, I am good to go!
The Guest galvanic isolator also has a ground fault detection display built right in, and will break your circuit if it detects a fault.
The most important thing is to get your vessel out of the stray current circuit, in addition to giving any stray current something to feed on other than your valuable underwater metals. That is why zincs are called "sacrificials", the least noble metal goes first (zinc), then the next(bronze) then the next(steel). I guess if everything below the waterline was made of platinum (one of the most noble metals), we wouldn''t have to worry! If you always have a zinc out, it will go first. Be aware that if you have bronze through-hulls, they MUST be electrically bonded to your boat to protect them also.