Compiling for your target is good, not using the PLT for mem* functions helps a ton, feedback-directed optimization and LTO and/or post-link optimization helps the most. For CPU-bound workloads of course.
Will native march option work in case of cloud where you're not in control of cpu?
I haven't used a cloud where you don't dictate the exact CPU you want. EC2, GCE, and Azure all provide specific guarantees. Even if you wanted a generic any-cloud binary you would probably compile with -march=skylake or, if truly paranoid, sandybridge.
Many distro packages are, by contrast, compiled for k8-generic. Freaking Opteron!
BTW "native" is not really recommendable. One really ought to target a particular platform.
Do google and AWS hosted postgres do this? I assume, but I am not sure how to check.
I don't know but it would be out-of-character for Google to have a C program that wasn't optimized to the hilt.