(Clearly none of you have passed your starfleet pool safety training course, so you will not be allowed in the pool and therefore will not die)
Although the death and mayhem described by others provides a better story here is what will happen.
(Starfleet of course will have rules, regulations, and advanced safety gear.)
(Protocol demands at least triple (3 levels) redundancy for every system.)
Emergency teleports will activate and beam the people to safety.
If you have a ship that advanced the safety computers are going to be hay we are going to loose gravity, start draining the pools NOW! They will need pumps to suck it out, but drains all sides of the pool meaning whatever direction the water goes in those drains will open.
The pools will have independent gravity field generates for this very emergency. In the Star Trek world you be trained and it would be in your safety procedures guide padd(manual).
There will be redundant sensors all over the pool to detect a massive increase in pressure on any side of the pool. Once detected, drains will open up and allow all the water to be evacuated. The drains, of course, will have safety measures like grates and etc to prevent people from being sucked in.
In the end a bunch of people, who were once swimming will be on the bottom or against a side of the pool wondering what happened. Sure accidents are possible, and some will get injured. Every once and a while someone will die. Most likely the medical staff will be able to evacuate the water from the people lungs and CPR them.
Addenum: We will probably have rebreathers that can suck the oxygen from the water and/or people will have to carry small tanks of oxygen to provide enough air to survive a full evacuation of water plus a safety margin.
There will be safety drills just like we have fire,tornado, or etc. Which will prepare people for this very type of thing. You will have to pass ## (whatever is approved by regulation of starfleet command) of drills with trained life guards before you can go in alone.