Additive backup and restore?

2023-05-08 Thread Age Apache
I am designing a database for a web application. In the near future I will
require past data for Audit, Security and Analysis purpose. But storing all
that data will increase the database size. What are some well known
approaches to archiving data for later use without increasing the database
size?

One approach I am thinking of is compressed additive backup and restore
i.e. copy the rows of the tables that will be required later and store them
in a compressed form, and then delete those rows from the table. And when
the data is required then restore them from the backup files in an additive
way.

Is there an easy way to achieve this, say via pg_dump?


What is the best setup for distributed and fault-tolerant PG database?

2023-01-04 Thread Age Apache
Dear PG experts,

I am new to postgres, and I am also not a DBA. I am a solo developer who is
trying to evaluate what database to use for my hybrid multi-tenancy
sub-apps i.e. users of the application will be authorised to use part or
whole of the application based on their authorisation levels. This
delineation of user access has to also be supported by the database, if
possible. Also, for audit purposes the data is append only. And the design
is based on just two tables(vertices and edges) to emulate a
document-oriented(jsonb) graph structure.

Postgres is the database I am leaning towards for this project. But as I am
not a DBA and also a solo developer, I am trying to understand how I can
spend less time managing the DB and more time developing the application. I
would like to have a distributed and fault-tolerant DB setup with multiple
read and write nodes with little to no configuration on my part, if
possible. I am looking for a self-hosted open source solution.

Is this possible with PG? What is the best way to achieve this for a
non-DBA solo developer like me?

Thanks and kind regards