Where I run mysqldump or pg_dump, Both services (mysql or postgres) freeze?
MySQL answer because I don't know pg_dump.
To allow SQL to continue with mysql during a mysql dump the following is required:

Tables needs to be innodb. Check with show create table {tablename}, change with alter table {tablename} Engine=innodb if it isn't (will cause the table to be unavailable during the change).

Use mysqldump with --single-transaction --master-data=2. Single transaction is the main point to get a consistent snapshot. --master-data enables a point in time recovery if you have binary logs enabled.


The transactional dump will enable the website to continue to read and update date while the mysqldump is occurring. The data in the mysqldump will be the data on the server at the point the backup began.
Note you cannot modify tables during a mysqldump. In MySQL table structure changes aren't transactional.