There was a discussion similar to your question, can be useful
cc @Wenquan_Xing in case there is anything additional regarding MySQL vs PostgreSQL