Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Sergei Kornilov <sk(at)zsrv(dot)org>
Cc: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>, Nikita Malakhov <hukutoc(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value
Date: 2023-11-06 00:00:00
Message-ID: CACJufxHG5iVGkCoARLMQypBUy_k0VmahPdHwRCk75Nm3NxcwZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

minor doc issues.
Returns the chunk id of the TOASTed value, or NULL if the value is not TOASTed.
Should it be "chunk_id"?

you may place it after pg_create_logical_replication_slot entry to
make it look like alphabetical order.

There is no test. maybe we can add following to src/test/regress/sql/misc.sql
create table val(t text);
INSERT into val(t) SELECT string_agg(
chr((ascii('B') + round(random() * 25)) :: integer),'')
FROM generate_series(1,2500);
select pg_column_toast_chunk_id(t) is not null from val;
drop table val;

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhijie Hou (Fujitsu) 2023-11-06 01:30:58 RE: Synchronizing slots from primary to standby
Previous Message David Rowley 2023-11-05 22:16:26 Re: Something seems weird inside tts_virtual_copyslot()