Re: Add pg_walinspect function with block info columns
От | Bharath Rupireddy |
---|---|
Тема | Re: Add pg_walinspect function with block info columns |
Дата | |
Msg-id | CALj2ACVWXOQK2HScKj+mFkxHbFaui3tH95cmZ3+hX=insNwKPg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Add pg_walinspect function with block info columns (Kyotaro Horiguchi <horikyota.ntt@gmail.com>) |
Список | pgsql-hackers |
On Mon, Mar 27, 2023 at 9:11 AM Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote: > > At Sat, 25 Mar 2023 12:12:50 +0900, Michael Paquier <michael@paquier.xyz> wrote in > > On Thu, Mar 23, 2023 at 10:54:40PM +0530, Bharath Rupireddy wrote: > > OUT reltablespace oid, > > OUT reldatabase oid, > > OUT relfilenode oid, > > OUT relblocknumber int8, > > + OUT blockid int2, > > + OUT start_lsn pg_lsn, > > + OUT end_lsn pg_lsn, > > + OUT prev_lsn pg_lsn, > > > > I'd still put the LSN data before the three OIDs for consistency with > > the structures, though my opinion does not seem to count much.. > > I agree with Michael on this point. Also, although it may not be > significant for SQL, the rows are output in lsn order from the > function. Done that way. On Sat, Mar 25, 2023 at 8:42 AM Michael Paquier <michael@paquier.xyz> wrote: > > On Thu, Mar 23, 2023 at 10:54:40PM +0530, Bharath Rupireddy wrote: > > Please see the attached v4 patch set addressing all the review comments. > > - desc = GetRmgr(XLogRecGetRmid(record)); > - id = desc.rm_identify(XLogRecGetInfo(record)); > - > - if (id == NULL) > - id = psprintf("UNKNOWN (%x)", XLogRecGetInfo(record) & ~XLR_INFO_MASK); > - > - initStringInfo(&rec_desc); > - desc.rm_desc(&rec_desc, record); > - > - /* Block references. */ > - initStringInfo(&rec_blk_ref); > - XLogRecGetBlockRefInfo(record, false, true, &rec_blk_ref, &fpi_len); > - > - main_data_len = XLogRecGetDataLen(record); > > I don't see any need to move this block of code? This leads to > unnecessary diffs, potentially making backpatch a bit harder. Either > way is not a big deal, still.. Except for this bit, 0001 looks fine > by me. It's a cosmetic change - I wanted to keep the calculation of column values closer to where they're assigned to Datum values. I agree to not cause too much diff and removed them. Please see the attached v5 patch set. -- Bharath Rupireddy PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
Вложения
В списке pgsql-hackers по дате отправления: