Re: Read data from Postgres table pages

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Sushrut Shivaswamy <sushrut(dot)shivaswamy(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Read data from Postgres table pages
Date: 2024-03-19 15:15:23
Message-ID: CAPpHfdthek979Q9K7GOKHf2-2joE6NdZ3q6bZ_c=QV8dnDgOtQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 19, 2024 at 4:48 PM Sushrut Shivaswamy
<sushrut(dot)shivaswamy(at)gmail(dot)com> wrote:
>
> If we query the DB directly, is it possible to know which new rows have been added since the last query?
> Is there a change pump that can be latched onto?

Please, check this.
https://www.postgresql.org/docs/current/logicaldecoding.html

> I’m assuming the page data structs are encapsulated in specific headers which can be used to list / read pages.
> Why would Postgres need to be stopped to read the data? The read / query path in Postgres would also be reading these pages when the instance is running?

I think this would be a good point to start studying.
https://www.interdb.jp/
The information there should be more than enough to forget this idea forever :)

------
Regards,
Alexander Korotkov

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2024-03-19 15:20:18 Re: POC: Lock updated tuples in tuple_update() and tuple_delete()
Previous Message Heikki Linnakangas 2024-03-19 15:04:53 Re: Streaming I/O, vectored I/O (WIP)