Subject: Re: generalized conveyor belt storage

From: Dilip Kumar <[email-masked]>
Date: Wed, 26 Jan 2022 17:59:50 +0530

On Wed, Jan 5, 2022 at 1:13 AM Robert Haas <[email-masked]> wrote:
>
>
> Updated patch attached, also with a fix for the mistake in the readme
> that Matthias found, and a few other bug fixes.

Rebased over the current master.  Basically, I rebased for other patch
sets I am planning to post for heap and index vacuum decoupling.

-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

---

From: Alvaro Herrera <[email-masked]>
Date: Wed, 20 Apr 2022 14:01:54 +0200

What's with the free text in cbstorage.h?  I would guess that this
wouldn't even compile, and nobody has noticed because the file is not
included by anything yet ...

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
#error "Operator lives in the wrong universe"
  ("Use of cookies in real-time system development", M. Gleixner, M. Mc Guire)

---

From: Thom Brown <[email-masked]>
Date: Wed, 20 Apr 2022 13:32:01 +0100

> included by anything yet ...

I'm not able to compile:

cbfsmpage.c: In function ‘cb_fsmpage_initialize’:
cbfsmpage.c:34:11: warning: unused variable ‘fsm_block_spacing’
[-Wunused-variable]
  unsigned fsm_block_spacing = cb_fsm_block_spacing(pages_per_segment);
           ^
cbfsmpage.c:33:14: warning: unused variable ‘first_fsm_block’
[-Wunused-variable]
  BlockNumber first_fsm_block = cb_first_fsm_block(pages_per_segment);
...
cbxlog.c: In function ‘cb_xlog_allocate_payload_segment’:
cbxlog.c:70:24: error: void value not ignored as it ought to be
  bool  have_fsm_page = XLogRecGetBlockTag(record, 1, NULL, NULL, NULL);
                        ^
cbxlog.c: In function ‘cb_xlog_allocate_index_segment’:
cbxlog.c:123:17: error: void value not ignored as it ought to be
  have_prev_page = XLogRecGetBlockTag(record, 2, NULL, NULL, NULL);
                 ^
cbxlog.c:124:16: error: void value not ignored as it ought to be
  have_fsm_page = XLogRecGetBlockTag(record, 3, NULL, NULL, NULL);
                ^
cbxlog.c: In function ‘cb_xlog_recycle_payload_segment’:
cbxlog.c:311:16: error: void value not ignored as it ought to be
  have_metapage = XLogRecGetBlockTag(record, 0, NULL, NULL, NULL);
                ^
cbxlog.c:312:18: error: void value not ignored as it ought to be
  have_index_page = XLogRecGetBlockTag(record, 1, NULL, NULL, NULL);
                  ^
cbxlog.c:313:16: error: void value not ignored as it ought to be
  have_fsm_page = XLogRecGetBlockTag(record, 2, NULL, NULL, NULL);
                ^
make[4]: *** [cbxlog.o] Error 1
make[4]: Leaving directory
`/home/thom/Development/postgresql/src/backend/access/conveyor'
make[3]: *** [conveyor-recursive] Error 2
make[3]: Leaving directory
`/home/thom/Development/postgresql/src/backend/access'
make[2]: *** [access-recursive] Error 2

-- 
Thom

---

From: Robert Haas <[email-masked]>
Date: Wed, 20 Apr 2022 10:06:06 -0400

> included by anything yet ...

I think I was using that file for random notes with the idea of
removing it eventually.

I'll clean that up if I get back around to working on this. Right now
it's not clear to me how to get this integrated with vacuum in a
useful way, so finishing this part of it isn't that exciting, at least
not unless somebody else comes up with a cool use for it.

What motivated you to look at this?

-- 
Robert Haas
EDB: http://www.enterprisedb.com

---

From: Robert Haas <[email-masked]>
Date: Wed, 20 Apr 2022 10:08:36 -0400

> > included by anything yet ...

Since I haven't been working on this for a while, the patch set's not updated.

>   unsigned fsm_block_spacing = cb_fsm_block_spacing(pages_per_segment);

Hmm, well I guess if that variable is unused we can just delete it.

>   bool  have_fsm_page = XLogRecGetBlockTag(record, 1, NULL, NULL, NULL);

This is because Tom recently made that function return void instead of
bool. I guess all these will need to be changed to use
XLogRecGetBlockTagExtended and pass an extra NULL for the
*prefetch_buffer argument.

---

From: Alvaro Herrera <[email-masked]>
Date: Wed, 20 Apr 2022 18:07:55 +0200

> not unless somebody else comes up with a cool use for it.

Oh, okay.

> What motivated you to look at this?

Shrug ... it happened to fall in my mutt index view and I wanted to have
a general idea of where it was going.  I have no immediate use for it,
sorry.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"I dream about dreams about dreams", sang the nightingale
under the pale moon (Sandman)