Under Windows DBeaver is a solid (and free) tool for the casual database user. But under Linux you really learn to save your scripts often.