Обсуждение: [HACKERS] How to read a value when it is VARATT EXTERNAL ONDISK from logicalreplication decoder

Поиск
Список
Период
Сортировка

[HACKERS] How to read a value when it is VARATT EXTERNAL ONDISK from logicalreplication decoder

От
Adam Dratwiński
Дата:
Hello everyone,

I am writing a custom logical replication decoder, and I took test decoder from Postgres sources as an example. 

Could anyone tell me how to read "unchanged toast datum" in case it is VARTT_IS_EXTERNAL_ONDISK. 

In the test decoder it is ignored:


Cheers
Adam

Re: [HACKERS] How to read a value when it is VARATT EXTERNAL ONDISKfrom logical replication decoder

От
Andres Freund
Дата:
Hi,

On 2017-02-20 11:44:58 +0100, Adam Dratwiński wrote:
> Hello everyone,
> 
> I am writing a custom logical replication decoder, and I took test decoder
> from Postgres sources as an example.
> 
> Could anyone tell me how to read "unchanged toast datum" in case it is
> VARTT_IS_EXTERNAL_ONDISK.

You can't by default. It's simply not available data - we'd have to log
a lot more data to make that fully available.  If you change the replica
identity settings to FULL, the full old data (including toasted data)
will be logged.

Regards,

Andres