We're planning on using the last 5.2 version of Alfresco community edition, with PostgreSQL. The supported version of the database is 9.4.
We'd like to know if there are known issues with using a more recent version of PostgreSQL, as 9.6 or 9.10. Or if there are already successful uses of these versions with Alfresco. To see how risky it could be (given that it's the same major version of PostgreSQL), as we might not have a choice.
Technically there is no supported version for Postgresql on Alfresco Community, although the included version in the installer should do fine. This would be the safest, more tested and preferential version. Alfresco 5.2 Content Services (Enterprise Edition) supports Postgresql 9.4.4, which is the reference again. In Alfresco 6, they upgrade until Postgresql 10.
Said that, it should work for Postgresql 9.6 or 9.10 (with the corresponding drivers for these database versions), it is not really a big risk in an open database, although I do not see exactly the benefits in this part, vs a more tested version. In case of Alfresco Enterprise I would not recommend this - because you will lose part of the Alfresco support. It is clear that if you detect SQL errors between Alfresco logs, change to the original 9.4 version.
I know partners that have been using a far newer version of PostgreSQL than the stated version for quite a while without any issues. If you look at the support policy of Alfresco with regards to the Enterprise version, they generally support you with any newer version of the same major release UNLESS there are known issues or you encounter an issue that can be directly linked back to a newer version (then they will recommend to downgrade to the supported version). So an Enterprise customer could always use 9.6 / 9.10 on Alfresco 5.2 and would be fully coverered by support, unless an issue can be proven to be caused by the newer version.
The same can generally be applied to Community as well, though as Cesar pointed out, there is no support with Community, so talking about "supported version" is technically not the right way to look at it.