Getting transaction details from the WAL?
Getting transaction details from the WAL?
От:
Bo Guo <bo.guo@gisticinc.com>
Дата:
Hello, PostgreSQL community! I am wondering if it is possible to get content changes to a particular table from a point-in-time by exploring the WAL or any other artifacts relating to transaction management. Any help or comment is appreciated! Cheers, Bo
Re: Getting transaction details from the WAL?
От:
Christophe Pettus <xof@thebuild.com>
Дата:
> On May 22, 2021, at 19:00, Bo Guo wrote: > > I am wondering if it is possible to get content changes to a particular table from a point-in-time by exploring the WAL or any other artifacts relating to transaction management. Perhaps the easiest way to do this is to use logical decoding, which you can use to capture changes from the WAL, converting them to other formats. While it forms the basis of logical replication, there are other plug-ins to the framework. You might look at wal2json: https://github.com/eulerto/wal2json or the test plugin in contrib/ https://www.postgresql.org/docs/current/test-decoding.html
Re: Getting transaction details from the WAL?
От:
Bo Guo <bo.guo@gisticinc.com>
Дата:
This is great, Thanks, Chrsitophe! Bo On 5/22/21 7:03 PM, Christophe Pettus wrote: > >> On May 22, 2021, at 19:00, Bo Guo wrote: >> >> I am wondering if it is possible to get content changes to a particular table from a point-in-time by exploring the WAL or any other artifacts relating to transaction management. > Perhaps the easiest way to do this is to use logical decoding, which you can use to capture changes from the WAL, converting them to other formats. While it forms the basis of logical replication, there are other plug-ins to the framework. You might look at wal2json: > > https://github.com/eulerto/wal2json > > or the test plugin in contrib/ > > https://www.postgresql.org/docs/current/test-decoding.html