Re: Support tid range scan in parallel?

2025-06-12 Thread Steven Niu
Hi, Cary, I have two comments: 1. Does table_beginscan_parallel_tidrange() need an assert of relid, like what table_beginscan_parallel() did? Assert(RelationGetRelid(relation) == pscan->phs_relid); 2. The new field phs_numblock in ParallelBlockTableScanDescData structure has almost the same name

Re: [PATCH] Refactor: Extract XLogRecord info

2025-06-10 Thread Steven Niu
Hi, Xiaoran, I see. The code is checking if the bits other than rmgr bits, XLR_SPECIAL_REL_UPDATE and XLR_CHECK_CONSISTENCY are used. Thanks for explanation. Steven 在 2025/6/11 10:13, Xiaoran Wang 写道: > > > Steven Niu mailto:niush...@gmail.com>> 于2025年6月 > 10日周二 17:56写道: &g

Re: [PATCH] Refactor: Extract XLogRecord info

2025-06-10 Thread Steven Niu
Hi, Xiaoran, I see. The code is checking if the bits other than rmgr bits, XLR_SPECIAL_REL_UPDATE and XLR_CHECK_CONSISTENCY are used. Thanks for the explanation. Steven Xiaoran Wang 于2025年6月11日周三 10:13写道: > > > Steven Niu 于2025年6月10日周二 17:56写道: > >> I'm

Re: [PATCH] Refactor: Extract XLogRecord info

2025-06-10 Thread Steven Niu
I'm confused by the code of XLR_RMGR_INFO_MASK and XLR_INFO_MASK. According to the definition of masks, the high 4 bits are for rmgr. /* * The high 4 bits in xl_info may be used freely by rmgr. The * XLR_SPECIAL_REL_UPDATE and XLR_CHECK_CONSISTENCY bits can be passed by * XLogInsert caller. Th

Re: [PATCH] Refactor: Extract XLogRecord info

2025-06-09 Thread Steven Niu
LGTM. I have no more comments. Regards, Steven Xiaoran Wang 于2025年6月9日周一 18:31写道: > Just upload all the patches together. > > Xiaoran Wang 于2025年6月9日周一 18:25写道: > >> >> >> Steven Niu 于2025年6月9日周一 14:46写道: >> >>> Hi, >>> >>> I li

Re: [PATCH] Refactor: Extract XLogRecord info

2025-06-08 Thread Steven Niu
Hi, I like the idea of your change as it saves me out of converting-in-my-mind. And I suggest to create a macro to do this job. #define getRmgrInfo(info) (info & XLR_RMGR_INFO_MASK) Then the code can become: XLogRecGetInfo(record) & ~XLR_INFO_MASK; --> getRmgrInfo(XLogRecGetInfo(record)

Re: PG 18 release notes draft committed

2025-05-09 Thread Steven Niu
Hi, Bruce, I have one comment, in E.1.3.4. Functions, crc32c also needs bracket. "Add functions crc32() and crc32c to compute CRC values" --> "Add functions crc32() and crc32c() to compute CRC values" Regards, Steven 在 2025/5/2 10:44, Bruce Momjian 写道: > I have committd the first draft of the P

Re: Doc: Fixup misplaced filelist.sgml entities and add some commentary

2025-03-27 Thread Steven Niu
Hi, David, In the file docguide.sgml, there is a typo. "Within the book are parts, mostly defined within the same file, expect for the", the "expect" here should be "except". Thanks, Steven 在 2025/3/20 5:13, David G. Johnston 写道: Hi. Having been in filelist.sgml a bit recently I've noticed

Re: [PATCH] avoid double scanning in function byteain

2025-03-26 Thread Steven Niu
在 2025/3/26 16:37, Kirill Reshke 写道: On Wed, 26 Mar 2025 at 12:17, Steven Niu wrote: Hi, Hi! This double scanning can be inefficient, especially for large inputs. So I optimized the function to eliminate the need for two scans, while preserving correctness and efficiency. While the

[PATCH] avoid double scanning in function byteain

2025-03-26 Thread Steven Niu
share your valuable comments. Thanks, Steven Niu https://www.highgo.com/From db0352fb7fa463bd7a02f73f29760d1400cef402 Mon Sep 17 00:00:00 2001 From: Steven Niu Date: Wed, 26 Mar 2025 14:43:43 +0800 Subject: [PATCH] Optimize function byteain() to avoid double scanning Optimized the function to

Add missing PQclear for StreamLogicalLog function

2025-03-18 Thread Steven Niu
/flat/3DA7CECD-5A05-416D-8527-ABD794AEFE8B%40yesql.se#c5d662ba7bdb07e56ddbd9aaa90dea5d Regards, StevenFrom cc87aec988c483e9118d9d31b1dad1f1ca1fb4e7 Mon Sep 17 00:00:00 2001 From: Steven Niu Date: Wed, 19 Mar 2025 13:02:18 +0800 Subject: Add missing PQclear for StreamLogicalLog function --- sr

Add missing PQclear for StreamLogicalLog function

2025-03-18 Thread Steven Niu
/flat/3DA7CECD-5A05-416D-8527-ABD794AEFE8B%40yesql.se#c5d662ba7bdb07e56ddbd9aaa90dea5d Regards, StevenFrom cc87aec988c483e9118d9d31b1dad1f1ca1fb4e7 Mon Sep 17 00:00:00 2001 From: Steven Niu Date: Wed, 19 Mar 2025 13:02:18 +0800 Subject: Add missing PQclear for StreamLogicalLog function --- sr

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Steven Niu
在 2025/3/17 18:56, Daniil Davydov 写道: Hi, On Mon, Mar 17, 2025 at 5:33 PM Steven Niu wrote: I mean RangeVarGetRelidExtended(), you deleted the following code: if (!OidIsValid(myTempNamespace)) relId = InvalidOid; /* this probably can't happen? */ Hm, I got it. Let&#x

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Steven Niu
在 2025/3/17 18:13, Daniil Davydov 写道: Hi, On Mon, Mar 17, 2025 at 4:48 PM Steven Niu wrote: 1. namespace.c, if relation->schemaname is pg_temp but myTempNamespace isn't set, the error information might be misleading. Consider checking OidIsValid(myTempNamespace) first. Could yo

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Steven Niu
Hi, I have some comments: 1. namespace.c, if relation->schemaname is pg_temp but myTempNamespace isn't set, the error information might be misleading. Consider checking OidIsValid(myTempNamespace) first. 2."you have not any temporary relations" --> "you have no any temporary relations" 3.

Re: Not-terribly-safe checks for CRC intrinsic support

2025-03-16 Thread Steven Niu
+# is missing, we must link not just compile, and store the results in global The "compile" should be "compiler"? Regards, Steven 在 2025/3/15 7:04, Tom Lane 写道: I noticed that our configuration-time checks for the presence of CRC intrinsics generally look like unsigned int crc = 0;

Re: [Patch] remove duplicated smgrclose

2025-03-13 Thread Steven Niu
在 2025/3/12 6:31, Masahiko Sawada 写道: On Mon, Mar 10, 2025 at 3:08 AM Steven Niu wrote: Hi, Masahiko Thanks for your comments! I understand your concern as you stated. However, my initial patch was split into two parts as Kirill suggested. This thread is about the first part. Another

Re: [Patch] remove duplicated smgrclose

2025-03-11 Thread Steven Niu
Masahiko Sawada 于2025年3月8日周六 12:04写道: > Hi, > > On Sun, Oct 27, 2024 at 12:05 PM Kirill Reshke > wrote: > > > > On Wed, 14 Aug 2024 at 11:35, Steven Niu wrote: > > > > > > Junwang, Kirill, > > > > > > The split work has been do

Re: Patching for increasing the number of columns

2024-12-12 Thread Steven Niu
Mayeul Kauffmann 于2024年12月13日周五 15:11写道: > > On 20/08/14 18:17, Tom Lane wrote: > > Hm. I think the without_oid test is not showing that anything is broken; > > > The other tests aren't showing any functional issue either AFAICS. > Thanks a lot Tom! That's very helpful. > I have written more deta

Re: Use function smgrclose() to replace the loop

2024-10-25 Thread Steven Niu
Junwang Zhao 于2024年10月15日周二 18:56写道: > On Mon, Oct 14, 2024 at 6:30 PM Ilia Evdokimov > wrote: > > > > > > On 14.08.2024 09:32, Steven Niu wrote: > > > Hi, Kirill, Junwang, > > > > > > I made this patch to address the refactor issue in

Re: [Patch] remove duplicated smgrclose

2024-08-15 Thread Steven Niu
Junwang Zhao 于2024年8月15日周四 18:03写道: > On Wed, Aug 14, 2024 at 2:35 PM Steven Niu wrote: > > > > Junwang, Kirill, > > > > The split work has been done. I created a new patch for removing > redundant smgrclose() function as attached. > > Please help review it

Re: [Patch] remove duplicated smgrclose

2024-08-13 Thread Steven Niu
Junwang, Kirill, The split work has been done. I created a new patch for removing redundant smgrclose() function as attached. Please help review it. Thanks, Steven Steven Niu 于2024年8月12日周一 18:11写道: > Kirill, > > Good catch! > I will split the patch into two to cover both cases

Use function smgrclose() to replace the loop

2024-08-13 Thread Steven Niu
Hi, Kirill, Junwang, I made this patch to address the refactor issue in our previous email discussion. https://www.postgresql.org/message-id/flat/CABBtG=cdtcbdcbk7mcsy6bjr3s5xutog0vsffuw8olduyyc...@mail.gmail.com That is, the for loop in function smgrdestroy() and smgrdounlinkall can be replaced

Re: [Patch] remove duplicated smgrclose

2024-08-12 Thread Steven Niu
i Steven, > > > > > > On Wed, Jul 31, 2024 at 11:16 AM Steven Niu > wrote: > > > > > > > > Hello, hackers, > > > > > > > > I think there may be some duplicated codes. > > > > Function smgrDoPendingDeletes() calls

Re: [Patch] remove duplicated smgrclose

2024-08-02 Thread Steven Niu
Thanks, I have set my name in the Authors column of CF. Steven Junwang Zhao 于2024年8月2日周五 13:22写道: > Hi Steven, > > On Fri, Aug 2, 2024 at 12:12 PM Steven Niu wrote: > > > > Hi, Junwang, > > > > Thank you for the review and excellent summary in commit

Re: [Patch] remove duplicated smgrclose

2024-08-01 Thread Steven Niu
iewed others' work. :( If so, could you please help to submit it to commitfest? Best Regards, Steven Junwang Zhao 于2024年8月1日周四 20:32写道: > Hi Steven, > > On Wed, Jul 31, 2024 at 11:16 AM Steven Niu wrote: > > > > Hello, hackers, > > > > I think there

[Patch] remove duplicated smgrclose

2024-07-30 Thread Steven Niu
Hello, hackers, I think there may be some duplicated codes. Function smgrDoPendingDeletes() calls both smgrdounlinkall() and smgrclose(). But both functions would close SMgrRelation object, it's dupliacted behavior? So I make this patch. Could someone take a look at it? Thanks for your help, Ste