I wouldn’t say 3.8.2 is very old (yes, it is a year or so old, but as releases are not so often, it’s not that bad). I can’t suggest upgrading to 3.9.2/3.9.3 right now, as there is a memory leak, which can make your server freeze too often https://community.igniterealtime.org/thread/52516 Actually 3.9.1 will leak too (or maybe even 3.8.2 had that problem, don’t remember exactly which version introduced this issue), but not as critical. If you still plan to upgrade, say to 3.9.1, then it should be straightforward. Running newer installer and upgrade on top (it should update database schema automatically). Or you can install newer version on the new server and then copy the configuration or replicate the same configuration during setup. Knowing what OS you are using and which install variant could help suggest better.
2/3. Yes, the database is installed separately. If the database is on another server and can stay there, then you don’t have anything to do with it. After installing Openfire on the new server and copying config files it should connect to the database (or you will have to run setup again and point to the database again). If you want to move the database, then i can’t help. Not a DB guy, especially have no experience with Postgre.