I think anything interesting more cleaner route would be to create a plugin in postgres and introduce a type that upload the large file in s3.
It would reduce thr complexity.
Postgres plugins are very underrate and under utilized
It would reduce thr complexity.
Postgres plugins are very underrate and under utilized
The right place to manage this is either in the app or in a proxy, before the data touches Postgres.