postgresql - How to decide whether to store binary data in Postgres or in files? -
i'm developing postgres-backed system, in many binary files stored.
i have @ least 2 choices:
- store them in postgres.
- store them files.
what criteria need consider make best possible decision?
i consider following:
- performance. storing binary files in file system performs better, both reading , writing.
- security. access files in file system controlled operating system, if store files in database, postgresql access rules apply.
- backup consistence. if store data separately (file system , database) difficult have consistent backup. file system backup , database backup out of sync.
- transactional properties. file system not transactional, postgresql is.
Comments
Post a Comment