On Tue, Mar 19, 2024 at 4:35 PM Sushrut Shivaswamy <sushrut.shivasw...@gmail.com> wrote: > The binary I"m trying to create should automatically be able to read data > from a postgres instance without users having to > run commands for backup / pg_dump etc. > Having access to the appropriate source headers would allow me to read the > data.
Please, avoid the top-posting. https://en.wikipedia.org/wiki/Posting_style#Top-posting If you're looking to have a separate binary, why can't your binary just *connect* to the postgres database and query the data? This is what pg_dump does, you can just do the same directly. pg_dump doesn't access the raw data. Trying to read raw postgres data from the separate binary looks flat wrong for your purposes. First, you would have to replicate pretty much postgres internals inside. Second, you can read the consistent data only when postgres is stopped or didn't do any modifications since the last checkpoint. ------ Regards, Alexander Korotkov