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

2024-03-18 Thread Yugo NAGATA
On Thu, 14 Mar 2024 11:10:42 -0500 Nathan Bossart wrote: > On Wed, Mar 13, 2024 at 01:09:18PM +0700, Yugo NAGATA wrote: > > On Tue, 12 Mar 2024 22:07:17 -0500 > > Nathan Bossart wrote: > >> I did some light editing to prepare this for commit. > > > > Thank you. I confirmed the test you

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

2024-03-14 Thread Nathan Bossart
On Wed, Mar 13, 2024 at 01:09:18PM +0700, Yugo NAGATA wrote: > On Tue, 12 Mar 2024 22:07:17 -0500 > Nathan Bossart wrote: >> I did some light editing to prepare this for commit. > > Thank you. I confirmed the test you improved and I am fine with that. Committed. -- Nathan Bossart Amazon Web

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

2024-03-13 Thread Yugo NAGATA
On Tue, 12 Mar 2024 22:07:17 -0500 Nathan Bossart wrote: > I did some light editing to prepare this for commit. Thank you. I confirmed the test you improved and I am fine with that. Regards, Yugo Nagata > > -- > Nathan Bossart > Amazon Web Services: https://aws.amazon.com -- Yugo NAGATA

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

2024-03-12 Thread Nathan Bossart
I did some light editing to prepare this for commit. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 38c78bd92a7b4d4600e6f0dbe58283c21ea87d50 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Tue, 12 Mar 2024 22:04:25 -0500 Subject: [PATCH v10 1/1] Add

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

2024-03-12 Thread Yugo NAGATA
On Sat, 9 Mar 2024 08:50:28 -0600 Nathan Bossart wrote: > On Sat, Mar 09, 2024 at 11:57:18AM +0900, Yugo NAGATA wrote: > > On Fri, 8 Mar 2024 16:17:58 -0600 > > Nathan Bossart wrote: > >> Is this guaranteed to be TOASTed for all possible page sizes? > > > > Should we use block_size? > > > >

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

2024-03-09 Thread Nathan Bossart
On Sat, Mar 09, 2024 at 11:57:18AM +0900, Yugo NAGATA wrote: > On Fri, 8 Mar 2024 16:17:58 -0600 > Nathan Bossart wrote: >> Is this guaranteed to be TOASTed for all possible page sizes? > > Should we use block_size? > > SHOW block_size \gset > INSERT INTO test_chunk_id(v1,v2) > VALUES

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

2024-03-08 Thread Yugo NAGATA
On Fri, 8 Mar 2024 16:17:58 -0600 Nathan Bossart wrote: > On Fri, Mar 08, 2024 at 03:31:55PM +0900, Yugo NAGATA wrote: > > On Thu, 7 Mar 2024 16:56:17 -0600 > > Nathan Bossart wrote: > >> to me. Do you think it's worth adding something like a > >> pg_column_toast_num_chunks() function that

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

2024-03-08 Thread Nathan Bossart
On Fri, Mar 08, 2024 at 03:31:55PM +0900, Yugo NAGATA wrote: > On Thu, 7 Mar 2024 16:56:17 -0600 > Nathan Bossart wrote: >> to me. Do you think it's worth adding something like a >> pg_column_toast_num_chunks() function that returns the number of chunks for >> the TOASTed value, too? > > If we

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

2024-03-07 Thread Yugo NAGATA
On Thu, 7 Mar 2024 16:56:17 -0600 Nathan Bossart wrote: > On Mon, Feb 05, 2024 at 04:28:23PM +0900, Yugo NAGATA wrote: > > On Thu, 1 Feb 2024 17:59:56 +0800 > > jian he wrote: > >> v6 patch looks good. > > > > Thank you for your review and updating the status to RwC! > > I think this one

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

2024-03-07 Thread Nathan Bossart
On Mon, Feb 05, 2024 at 04:28:23PM +0900, Yugo NAGATA wrote: > On Thu, 1 Feb 2024 17:59:56 +0800 > jian he wrote: >> v6 patch looks good. > > Thank you for your review and updating the status to RwC! I think this one needs a (pretty trivial) rebase. I spent a few minutes testing it out and

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

2024-02-04 Thread Yugo NAGATA
On Thu, 1 Feb 2024 17:59:56 +0800 jian he wrote: > On Thu, Feb 1, 2024 at 12:45 PM Yugo NAGATA wrote: > > > > Here is a updated patch, v6. > > v6 patch looks good. Thank you for your review and updating the status to RwC! Regards, Yugo Nagata -- Yugo NAGATA

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

2024-02-01 Thread jian he
On Thu, Feb 1, 2024 at 12:45 PM Yugo NAGATA wrote: > > Here is a updated patch, v6. v6 patch looks good.

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

2024-01-31 Thread Yugo NAGATA
On Tue, 30 Jan 2024 14:57:20 +0800 jian he wrote: > On Tue, Jan 30, 2024 at 1:56 PM Yugo NAGATA wrote: > > > > I attached the correct one, v4. > > > > +-- Test pg_column_toast_chunk_id: > +-- Check if the returned chunk_id exists in the TOAST table > +CREATE TABLE test_chunk_id (v1 text, v2

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

2024-01-29 Thread Yugo NAGATA
On Tue, 30 Jan 2024 13:47:45 +0800 jian he wrote: > On Tue, Jan 30, 2024 at 12:35 PM Yugo NAGATA wrote: > > > > > > Sorry, I also attached a wrong file. > > Attached is the correct one. > I think you attached the wrong file again. also please name it as v4. Opps..sorry, again. I attached the

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

2024-01-29 Thread jian he
On Tue, Jan 30, 2024 at 12:35 PM Yugo NAGATA wrote: > > > Sorry, I also attached a wrong file. > Attached is the correct one. I think you attached the wrong file again. also please name it as v4.

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

2024-01-29 Thread Yugo NAGATA
On Tue, 30 Jan 2024 12:12:31 +0800 jian he wrote: > On Fri, Jan 26, 2024 at 8:42 AM Yugo NAGATA wrote: > > > > On Tue, 2 Jan 2024 08:00:00 +0800 > > jian he wrote: > > > > > On Mon, Nov 6, 2023 at 8:00 AM jian he > > > wrote: > > > > > > > > minor doc issues. > > > > Returns the chunk id of

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

2024-01-29 Thread jian he
On Fri, Jan 26, 2024 at 8:42 AM Yugo NAGATA wrote: > > On Tue, 2 Jan 2024 08:00:00 +0800 > jian he wrote: > > > On Mon, Nov 6, 2023 at 8:00 AM jian he wrote: > > > > > > minor doc issues. > > > Returns the chunk id of the TOASTed value, or NULL if the value is not > > > TOASTed. > > > Should

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

2024-01-25 Thread Yugo NAGATA
On Tue, 2 Jan 2024 08:00:00 +0800 jian he wrote: > On Mon, Nov 6, 2023 at 8:00 AM jian he wrote: > > > > minor doc issues. > > Returns the chunk id of the TOASTed value, or NULL if the value is not > > TOASTed. > > Should it be "chunk_id"? Thank you for your suggestion. As you pointed out, it

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

2024-01-01 Thread jian he
On Mon, Nov 6, 2023 at 8:00 AM jian he wrote: > > 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. > >

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

2023-11-05 Thread jian he
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

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

2023-07-10 Thread Sergei Kornilov
Hello My +1 to have such a function in core or in some contrib at least (pg_surgery? amcheck?). In the past, more than once I needed to find a damaged tuple knowing only chunk id and toastrelid. This feature would help a lot. regards, Sergei

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

2023-07-07 Thread Yugo NAGATA
On Fri, 7 Jul 2023 17:21:36 +0900 Yugo NAGATA wrote: > Hi Nikita, > > On Wed, 5 Jul 2023 17:49:20 +0300 > Nikita Malakhov wrote: > > > Hi! > > > > I like the idea of having a standard function which shows a TOAST value ID > > for a row. I've used my own to handle TOAST errors. Just, maybe,

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

2023-07-07 Thread Yugo NAGATA
Hi Nikita, On Wed, 5 Jul 2023 17:49:20 +0300 Nikita Malakhov wrote: > Hi! > > I like the idea of having a standard function which shows a TOAST value ID > for a row. I've used my own to handle TOAST errors. Just, maybe, more > correct > name would be "...value_id", because you actually

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

2023-07-05 Thread Nikita Malakhov
Hi! I like the idea of having a standard function which shows a TOAST value ID for a row. I've used my own to handle TOAST errors. Just, maybe, more correct name would be "...value_id", because you actually retrieve valueid field from the TOAST pointer, and chunk ID consists of valueid +

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

2023-03-28 Thread Yugo NAGATA
Hello, Attached patch introduces a function pg_column_toast_chunk_id that returns a chunk ID of a TOASTed value. Recently, one of our clients needed a way to show which columns are actually TOASTed because they would like to know how much updates on the original table affects to its toast table