Re: Read data from Postgres table pages

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: Read data from Postgres table pages
Дата
Msg-id CAPpHfdstG2Eu6XwfwWLQUcTu+2vLxSJ_u9v0WWyJHzs57BOi2Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Read data from Postgres table pages  (Sushrut Shivaswamy <sushrut.shivaswamy@gmail.com>)
Ответы Re: Read data from Postgres table pages  (Sushrut Shivaswamy <sushrut.shivaswamy@gmail.com>)
Список pgsql-hackers
On Tue, Mar 19, 2024 at 4:35 PM Sushrut Shivaswamy
<sushrut.shivaswamy@gmail.com> wrote:
> The binary I"m trying to create should automatically be able to read data from a postgres instance without users
havingto 
> 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: Possibility to disable `ALTER SYSTEM`
Следующее
От: Dmitry Koval
Дата:
Сообщение: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands