Is a clearer memory lifespan for outerTuple and innerTuple useful?

2023-12-14 Thread Andy Fan
Hi, When I am working on "shared detoast value"[0], where I want to avoid detoast the same datum over and over again, I have to decide which memory context should be used to hold the detoast value. later I found I have to use different MemoryContexts for the OuterTuple and innerTuple since

Support "Right Semi Join" plan shapes

2023-12-14 Thread wenhui qiu
Hi Richard Guo I see that the test samples are all (exists) subqueries ,I think semi join should also support ( in) and ( any) subqueries. would you do more test on ( in) and ( any) subqueries? Best whish

Re: Fix bug with indexes on whole-row expressions

2023-12-14 Thread Nikolay Samokhvalov
On Wed, Dec 13, 2023 at 7:01 AM Tom Lane wrote: > ywgrit writes: > > I forbid to create indexes on whole-row expression in the following > patch. > > I'd like to hear your opinions. > > As I said in the previous thread, I don't think this can possibly > be acceptable. Surely there are people

Re: Make COPY format extendable: Extract COPY TO format implementations

2023-12-14 Thread Junwang Zhao
On Fri, Dec 15, 2023 at 12:45 PM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Fri, 15 Dec 2023 11:27:30 +0800, > Junwang Zhao wrote: > > >> > Adding a prefix or suffix would be one option but to give extensions > >> >

Re: Improve eviction algorithm in ReorderBuffer

2023-12-14 Thread Masahiko Sawada
On Fri, Dec 15, 2023 at 12:37 PM Amit Kapila wrote: > > On Wed, Dec 13, 2023 at 6:01 AM Masahiko Sawada wrote: > > > > On Tue, Dec 12, 2023 at 1:33 PM Dilip Kumar wrote: > > > > > > On Tue, Dec 12, 2023 at 9:01 AM Masahiko Sawada > > > wrote: > > > > > > > > I've heard the report internally

Re: "pgoutput" options missing on documentation

2023-12-14 Thread Peter Smith
Thanks for the update. Here are some more review comments for the v01* patches. // Patch v00-0001 v01 modified the messages more than I was expecting, although what you did looks fine to me. ~~~ 1. + /* Check required options */ + if (!protocol_version_given) + ereport(ERROR, +

Re: Synchronizing slots from primary to standby

2023-12-14 Thread shveta malik
On Thu, Dec 14, 2023 at 10:15 AM Peter Smith wrote: > > A review comment for v47-0001 > Thanks for reviewing. I have addressed these in v48. There is some design change around the code part where we were checking cascading and were revalidating new GUC values on conf-reload. So code has changed

Re: Synchronizing slots from primary to standby

2023-12-14 Thread shveta malik
On Wed, Dec 13, 2023 at 3:53 PM Peter Smith wrote: > > Hi Shveta, here are some review comments for v45-0002. > Thanks for the feedback. Addressed these in v48. Please find my comments on some. > == > doc/src/sgml/bgworker.sgml > > 1. > + > + > + BgWorkerStart_PostmasterStart > +

Re: Synchronizing slots from primary to standby

2023-12-14 Thread shveta malik
On Thu, Dec 14, 2023 at 4:40 PM Amit Kapila wrote: > > On Thu, Dec 14, 2023 at 7:00 AM Peter Smith wrote: > > > > Hi, here are a few more review comments for the patch v47-0002 > > > > (plus my review comments of v45-0002 [1] are yet to be addressed) > > > > == > > 1. General > > > > For

Re: Make COPY format extendable: Extract COPY TO format implementations

2023-12-14 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Fri, 15 Dec 2023 11:27:30 +0800, Junwang Zhao wrote: >> > Adding a prefix or suffix would be one option but to give extensions >> > more flexibility, another option would be to support format = 'custom' >>

Re: Make COPY format extendable: Extract COPY TO format implementations

2023-12-14 Thread Masahiko Sawada
On Fri, Dec 15, 2023 at 9:53 AM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Fri, 15 Dec 2023 05:19:43 +0900, > Masahiko Sawada wrote: > > > To avoid collisions, extensions can be created in a > > different schema than

Re: Improve eviction algorithm in ReorderBuffer

2023-12-14 Thread Amit Kapila
On Wed, Dec 13, 2023 at 6:01 AM Masahiko Sawada wrote: > > On Tue, Dec 12, 2023 at 1:33 PM Dilip Kumar wrote: > > > > On Tue, Dec 12, 2023 at 9:01 AM Masahiko Sawada > > wrote: > > > > > > I've heard the report internally that replication lag became huge when > > > decoding transactions each

Re: Make COPY format extendable: Extract COPY TO format implementations

2023-12-14 Thread Junwang Zhao
On Fri, Dec 15, 2023 at 8:53 AM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Fri, 15 Dec 2023 05:19:43 +0900, > Masahiko Sawada wrote: > > > To avoid collisions, extensions can be created in a > > different schema than

Re: Make COPY format extendable: Extract COPY TO format implementations

2023-12-14 Thread Sutou Kouhei
Hi, In "RE: Make COPY format extendable: Extract COPY TO format implementations" on Tue, 12 Dec 2023 02:31:53 +, "Hayato Kuroda (Fujitsu)" wrote: >> Can we discuss how to proceed this improvement? >> >> There are 2 approaches for it: >> >> 1. Do the followings concurrently: >>

Re: logical decoding and replication of sequences, take 2

2023-12-14 Thread Amit Kapila
On Thu, Dec 14, 2023 at 9:14 PM Ashutosh Bapat wrote: > > On Thu, Dec 14, 2023 at 2:51 PM Amit Kapila wrote: > > > > It can only be cleaned if we process it but xact_decode won't allow us > > to process it and I don't think it would be a good idea to add another > > hack for sequences here. See

Re: Add 64-bit XIDs into PostgreSQL 15

2023-12-14 Thread wenhui qiu
Hi Maxim Orlov Good news,xid64 has achieved a successful first phase,I tried to change the path status (https://commitfest.postgresql.org/43/3594/) ,But it seems incorrect Maxim Orlov 于2023年12月13日周三 20:26写道: > Hi! > > Just to keep this thread up to date, here's a new version after recent >

Re: [PoC] Improve dead tuple storage for lazy vacuum

2023-12-14 Thread John Naylor
On Thu, Dec 14, 2023 at 7:22 AM Masahiko Sawada wrote: > In v45, 0001 - 0006 are from earlier versions but I've merged previous > updates. So the radix tree now has RT_SET() and RT_FIND() but not > RT_GET() and RT_SEARCH(). 0007 and 0008 are the updates from previous > versions that incorporated

Re: Change GUC hashtable to use simplehash?

2023-12-14 Thread John Naylor
I wrote: > > * v8 with chunked interface: > latency average = 555.688 ms > > This starts to improve things for me. > > * v8 with chunked, and return lower 32 bits of full 64-bit hash: > latency average = 556.324 ms > > This is within the noise level. There doesn't seem to be much downside > of

Re: Make COPY format extendable: Extract COPY TO format implementations

2023-12-14 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Fri, 15 Dec 2023 05:19:43 +0900, Masahiko Sawada wrote: > To avoid collisions, extensions can be created in a > different schema than public. Thanks. I didn't notice it. > And note that built-in format

Re: Memory consumed by paths during partitionwise join planning

2023-12-14 Thread Ashutosh Bapat
Forgot to mention, On Thu, Dec 14, 2023 at 5:34 PM Ashutosh Bapat wrote: > > On Thu, Dec 7, 2023 at 6:19 PM David Rowley wrote: > > > > Maybe we can try to move forward with your refcount idea and see how > > the performance looks. If that's intolerable then that might help us > > decide on

Re: Simplify newNode()

2023-12-14 Thread Thomas Munro
On Fri, Dec 15, 2023 at 11:44 AM Tom Lane wrote: > Heikki Linnakangas writes: > > Yeah, +1 on removing all that, including MemoryContextAllocZeroAligned. > > It's not doing any good as it is, as it gets compiled to be identical to > > MemoryContextAllocZero. > > Also not so here. Admittedly, my

Re: Simplify newNode()

2023-12-14 Thread Tom Lane
Heikki Linnakangas writes: > On 14/12/2023 10:32, Peter Eisentraut wrote: >> But if we think that compilers are now smart enough, maybe we can unwind >> this whole stack a bit more? Maybe we don't need MemSetTest() and/or >> palloc0fast() and/or newNode() at all? > Good point. Looking closer,

Re: useless LIMIT_OPTION_DEFAULT

2023-12-14 Thread Tom Lane
Zhang Mingli writes: > By reading the codes, I found that we process limit option as > LIMIT_OPTION_WITH_TIES when using WITH TIES > and all others are LIMIT_OPTION_COUNT by  commit > 357889eb17bb9c9336c4f324ceb1651da616fe57. > And check actual limit node in limit_needed(). > There is no need

Re: Teach predtest about IS [NOT] proofs

2023-12-14 Thread Tom Lane
James Coleman writes: > On Wed, Dec 13, 2023 at 1:36 PM Tom Lane wrote: >> I don't have an objection in principle to adding more smarts to >> predtest.c. However, we should be wary of slowing down cases where >> no BooleanTests are present to be optimized. I wonder if it could >> help to use a

pg_serial bloat

2023-12-14 Thread Thomas Munro
Hi, Our pg_serial truncation logic is a bit broken, as described by the comments in CheckPointPredicate() (a sort of race between xid cycles and checkpointing). We've seen a system with ~30GB of files in there (note: full/untruncated be would be 2³² xids × sizeof(uint64_t) = 32GB). It's not

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2023-12-14 Thread Masahiko Sawada
Hi, On Tue, Dec 12, 2023 at 10:04 PM jian he wrote: > > On Mon, Dec 11, 2023 at 10:05 PM Alena Rybakina > wrote: > > > > Hi! Thank you for your work. Your patch looks better! > > Yes, thank you! It works fine, and I see that the regression tests have > > been passed.  > > However, when I ran

Re: Make COPY format extendable: Extract COPY TO format implementations

2023-12-14 Thread Masahiko Sawada
On Thu, Dec 14, 2023 at 6:44 PM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Mon, 11 Dec 2023 10:57:15 +0900, > Masahiko Sawada wrote: > > > IIUC we cannot create two same name functions with the same arguments > > but

Re: logical decoding and replication of sequences, take 2

2023-12-14 Thread Euler Taveira
On Thu, Dec 14, 2023, at 12:44 PM, Ashutosh Bapat wrote: > I haven't found the code path from where the sequence cleanup gets > called. But it's being called. Am I missing something? ReorderBufferCleanupTXN. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Add --check option to pgindent

2023-12-14 Thread Tristan Partin
On Wed Dec 13, 2023 at 2:46 PM CST, Andrew Dunstan wrote: On 2023-12-12 Tu 10:30, Alvaro Herrera wrote: > On 2023-Dec-12, Tom Lane wrote: > >> "Euler Taveira" writes: >>> When you add exceptions, it starts to complicate the UI. >> Indeed. It seems like --silent-diff was poorly defined and

Re: Add new for_each macros for iterating over a List that do not require ListCell pointer

2023-12-14 Thread Jelte Fennema-Nio
On Fri, 1 Dec 2023 at 05:20, Nathan Bossart wrote: > Could we simplify it with something like the following? Great suggestion! Updated the patchset accordingly. This made it also easy to change the final patch to include the automatic scoped declaration logic for all of the new macros. I quite

Re: logical decoding and replication of sequences, take 2

2023-12-14 Thread Ashutosh Bapat
On Thu, Dec 14, 2023 at 2:51 PM Amit Kapila wrote: > > On Thu, Dec 14, 2023 at 2:45 PM Ashutosh Bapat > wrote: > > > > On Thu, Dec 14, 2023 at 12:37 PM Dilip Kumar wrote: > > > > > > I think you forgot to attach the patch. > > > > Sorry. Here it is. > > > > On Thu, Dec 14, 2023 at 2:36 PM Amit

Re: Clean up find_typedefs and add support for Mac

2023-12-14 Thread Tristan Partin
On Thu Dec 14, 2023 at 9:16 AM CST, Andrew Dunstan wrote: On 2023-12-13 We 15:59, Tristan Partin wrote: > On Wed Dec 13, 2023 at 2:35 PM CST, Andrew Dunstan wrote: >> >> On 2023-12-12 Tu 18:02, Tom Lane wrote: >> > "Tristan Partin" writes: >> >> The big patch here is adding support for Mac.

Re: Clean up find_typedefs and add support for Mac

2023-12-14 Thread Andrew Dunstan
On 2023-12-13 We 15:59, Tristan Partin wrote: On Wed Dec 13, 2023 at 2:35 PM CST, Andrew Dunstan wrote: On 2023-12-12 Tu 18:02, Tom Lane wrote: > "Tristan Partin" writes: >> The big patch here is adding support for Mac. objdump -W doesn't work on >> Mac. So, I used dsymutil and dwarfdump

Re: encoding affects ICU regex character classification

2023-12-14 Thread Jeff Davis
On Tue, 2023-12-12 at 14:35 -0800, Jeremy Schneider wrote: > Is someone able to test out upper & lower functions on U+A7BA ... > U+A7BF > across a few libs/versions? Those code points are unassigned in Unicode 11.0 and assigned in Unicode 12.0. In ICU 63-2 (based on Unicode 11.0), they just get

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-12-14 Thread Dilip Kumar
On Thu, Dec 14, 2023 at 4:36 PM Dilip Kumar wrote: > > On Wed, Dec 13, 2023 at 5:49 PM Andrey M. Borodin > wrote: > > > > On 12 Dec 2023, at 18:28, Alvaro Herrera wrote: > > > > > > Andrey, do you have any stress tests or anything else that you used to > > > gain confidence in this code? > >

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2023-12-14 Thread Alena Rybakina
On 12.12.2023 16:04, jian he wrote: On Mon, Dec 11, 2023 at 10:05 PM Alena Rybakina wrote: Hi! Thank you for your work. Your patch looks better! Yes, thank you! It works fine, and I see that the regression tests have been passed.  However, when I ran 'copy from with save_error' operation

Re: Built-in CTYPE provider

2023-12-14 Thread Jeff Davis
On Wed, 2023-12-13 at 16:34 +0100, Daniel Verite wrote: > In particular "el" (modern greek) has case mapping rules that > ICU seems to implement, but "el" is missing from the list > ("lt", "tr", and "az") you identified. I compared with glibc el_GR.UTF-8 and el_CY.UTF-8 locales, and the ctype

Re: Simplify newNode()

2023-12-14 Thread Heikki Linnakangas
On 14/12/2023 10:32, Peter Eisentraut wrote: I notice that the existing comments point out that the size argument should be a compile-time constant, but that is no longer the case for ExtensibleNode(). Also, newNode() is the only caller of palloc0fast(), which also points out that the size

Re: Build the docs if there are changes in docs and don't run other tasks if the changes are only in docs

2023-12-14 Thread Nazir Bilal Yavuz
Hi, Sorry for the late reply. On Fri, 6 Oct 2023 at 17:07, Tom Lane wrote: > > As a quick cross-check, I searched our commit log to see how many > README-only commits there were so far this year. I found 11 since > January. (Several were triggered by the latest round of pgindent > code and

Re: Improve upcasting for INT range and multi range types

2023-12-14 Thread Federico
Hi, Thanks for the reply. I suspected that there were technical reasons that prevented the obvious right thing to be done. Would adding overloads to the functions and operators be something that could be considered as an acceptable solution? I've tried a very naive solution and it seems to work

Re: Relation bulk write facility

2023-12-14 Thread Heikki Linnakangas
Melanie just reminded about an older thread about this same thing: https://www.postgresql.org/message-id/CAAKRu_ZQEpk6Q1WtNLgfXBdCmdU5xN_w0boVO6faO_Ax%2Bckjig%40mail.gmail.com. I had completely forgotten about that. Melanie's patches in that thread implemented the same optimization of

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2023-12-14 Thread Jelte Fennema-Nio
On Mon, 13 Nov 2023 at 03:39, Thomas Munro wrote: > We follow the common en-US usage: "canceled", "canceling" but > "cancellation". Blame Webstah et al. I changed all the places that were not adhering to those spellings. There were also a few of such places in parts of the codebase that these

Re: btree_gist into core?

2023-12-14 Thread Julien Rouhaud
Hi, On Wed, Jan 19, 2022 at 09:30:11AM +0100, Peter Eisentraut wrote: > > To use exclusion constraints in practice, you often need to install the > btree_gist extension, so that you can combine for example a range type check > and normal scalar key columns into one constraint. > > [...] > > There

Re: Memory consumed by paths during partitionwise join planning

2023-12-14 Thread Ashutosh Bapat
On Thu, Dec 7, 2023 at 6:19 PM David Rowley wrote: > > Maybe we can try to move forward with your refcount idea and see how > the performance looks. If that's intolerable then that might help us > decide on the next best alternative solution. > Here are performance numbers setup create table

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-12-14 Thread Andrey M. Borodin
> On 14 Dec 2023, at 16:32, tender wang wrote: > > enable -O2, only one instruction: > xor eax, eax This is not fast code. This is how friendly C compiler suggests you that mask must be 127, not 128. Best regards, Andrey Borodin.

Re: btree_gist into core?

2023-12-14 Thread Emre Hasegeli
> Thoughts? I think it'd be really nice to do this without btree_gist. I imagine something like this: CREATE INDEX ON tbl USING gist ( range_col, int_col USING btree ) I think this would make the index access methods interface more useful. Index access method developers wouldn't need

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-12-14 Thread tender wang
Andrey M. Borodin 于2023年12月14日周四 17:35写道: > > > > On 14 Dec 2023, at 14:28, tender wang wrote: > > > > Now that AND is more faster, Can we replace the '% > SLRU_MAX_BANKLOCKS' operation in SimpleLruGetBankLock() with '& 127' > > unsigned int GetBankno1(unsigned int pageno) { > return

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-12-14 Thread Andrey M. Borodin
> On 14 Dec 2023, at 16:06, Dilip Kumar wrote: > > I have noticed > a very good improvement with the addition of patch 0003. Indeed, a very impressive results! It’s almost x2 of performance on high contention scenario, on top of previous improvements. Best regards, Andrey Borodin.

Re: Synchronizing slots from primary to standby

2023-12-14 Thread Amit Kapila
On Thu, Dec 14, 2023 at 7:00 AM Peter Smith wrote: > > Hi, here are a few more review comments for the patch v47-0002 > > (plus my review comments of v45-0002 [1] are yet to be addressed) > > == > 1. General > > For consistency and readability, try to use variables of the same > names

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-12-14 Thread Dilip Kumar
On Wed, Dec 13, 2023 at 5:49 PM Andrey M. Borodin wrote: > > On 12 Dec 2023, at 18:28, Alvaro Herrera wrote: > > > > Andrey, do you have any stress tests or anything else that you used to > > gain confidence in this code? > > We are using only first two steps of the patchset, these steps do not

Re: Guiding principle for dropping LLVM versions?

2023-12-14 Thread Peter Eisentraut
On 25.10.23 07:47, Thomas Munro wrote: Ideally more distros would be present in this vacuum-horizon decision table, but I don't think it'd change the conclusion: 10 is the trailing edge. Therefore the attached patch scales back its ambition to that release. Tested on LLVM 10-18. This patch

Re: "pgoutput" options missing on documentation

2023-12-14 Thread Emre Hasegeli
> I agree that we missed updating the parameters of the Logical > Streaming Replication Protocol documentation. I haven't reviewed all > the details yet but one minor thing that caught my attention while > looking at your patch is that we can update the exact additional > information we started to

Re: "pgoutput" options missing on documentation

2023-12-14 Thread Emre Hasegeli
> To reduce translation efforts, perhaps it is better to arrange for > these to share a common message. Good idea. I've done so. > Also, I am unsure whether to call these "parameters" or "options" -- I > wanted to call them parameters like in the documentation, but every > other message in this

Re: planner chooses incremental but not the best one

2023-12-14 Thread Richard Guo
On Tue, Dec 12, 2023 at 4:40 PM Nicolas Lutic wrote: > I've come across a behaviour of the planner I can't explain. > After a migration from 11 to 15 (on RDS) we noticed a degradation in > response time on a query, it went from a few seconds to ten minutes. > A vacuum(analyze) has been realized

Re: Make COPY format extendable: Extract COPY TO format implementations

2023-12-14 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Mon, 11 Dec 2023 10:57:15 +0900, Masahiko Sawada wrote: > IIUC we cannot create two same name functions with the same arguments > but a different return value type in the first place. It seems to me > to

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-12-14 Thread Andrey M. Borodin
> On 14 Dec 2023, at 14:28, tender wang wrote: > > Now that AND is more faster, Can we replace the '% SLRU_MAX_BANKLOCKS' > operation in SimpleLruGetBankLock() with '& 127' unsigned int GetBankno1(unsigned int pageno) { return pageno & 127; } unsigned int GetBankno2(unsigned int

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-12-14 Thread tender wang
Andrey M. Borodin 于2023年12月14日周四 17:02写道: > > > > On 14 Dec 2023, at 08:12, Amul Sul wrote: > > > > > > + int bankno = pageno & ctl->bank_mask; > > > > I am a bit uncomfortable seeing it as a mask, why can't it be simply a > number > > of banks (num_banks) and get the bank number through

Re: [meson] expose buildtype debug/optimization info to pg_config

2023-12-14 Thread Junwang Zhao
Hi Peter, Thanks for looking into this. On Thu, Dec 14, 2023 at 4:50 PM Peter Eisentraut wrote: > > On 12.12.23 11:40, Junwang Zhao wrote: > > build system using configure set VAL_CFLAGS with debug and > > optimization flags, so pg_config will show these infos. Some > > extensions depend on the

Re: logical decoding and replication of sequences, take 2

2023-12-14 Thread Amit Kapila
On Thu, Dec 14, 2023 at 2:45 PM Ashutosh Bapat wrote: > > On Thu, Dec 14, 2023 at 12:37 PM Dilip Kumar wrote: > > > > I think you forgot to attach the patch. > > Sorry. Here it is. > > On Thu, Dec 14, 2023 at 2:36 PM Amit Kapila wrote: > > > > > > > It looks like the solution works. But this is

Re: logical decoding and replication of sequences, take 2

2023-12-14 Thread Ashutosh Bapat
On Thu, Dec 14, 2023 at 12:37 PM Dilip Kumar wrote: > > I think you forgot to attach the patch. Sorry. Here it is. On Thu, Dec 14, 2023 at 2:36 PM Amit Kapila wrote: > > > > It looks like the solution works. But this is the only place where we > process a change before SNAPSHOT reaches FULL.

Re: logical decoding and replication of sequences, take 2

2023-12-14 Thread Amit Kapila
On Thu, Dec 14, 2023 at 12:31 PM Ashutosh Bapat wrote: > > On Thu, Dec 14, 2023 at 10:53 AM Dilip Kumar wrote: > > > > > > > > > > > It is correct that we can make a wrong decision about whether a change > > > is transactional or non-transactional when sequence DDL happens before > > > the

Re: pgBufferUsage.blk_{read|write}_time are zero although there are pgBufferUsage.local_blks_{read|written}

2023-12-14 Thread Michael Paquier
On Tue, Oct 31, 2023 at 03:11:03PM +0100, hubert depesz lubaczewski wrote: > On Tue, Oct 31, 2023 at 08:17:52AM +0900, Michael Paquier wrote: >> Thanks for the input. I was looking yesterday if this code was >> available somewhere, but couldn't find it.. Until this morning: >>

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-12-14 Thread Andrey M. Borodin
> On 14 Dec 2023, at 08:12, Amul Sul wrote: > > > + int bankno = pageno & ctl->bank_mask; > > I am a bit uncomfortable seeing it as a mask, why can't it be simply a number > of banks (num_banks) and get the bank number through modulus op (pageno % > num_banks) instead of bitwise & operation

Re: [meson] expose buildtype debug/optimization info to pg_config

2023-12-14 Thread Peter Eisentraut
On 12.12.23 11:40, Junwang Zhao wrote: build system using configure set VAL_CFLAGS with debug and optimization flags, so pg_config will show these infos. Some extensions depend on the mechanism. This patch exposes these flags with a typo fixed together. I have committed the typo fix. But I

Re: Add code indentation check to cirrus-ci (was Re: Add BF member koel-like indentation checks to SanityCheck CI)

2023-12-14 Thread Nazir Bilal Yavuz
Hi, You may want to check out the WIP patch [1] about adding meson targets to run pgindent by Andres. [1] https://www.postgresql.org/message-id/20231019044907.ph6dw637loqg3lqk%40awork3.anarazel.de -- Regards, Nazir Bilal Yavuz Microsoft

Re: GUC names in messages

2023-12-14 Thread Peter Eisentraut
On 11.12.23 00:07, Peter Smith wrote: If the rule is changed to quote those MixedCase GUCs then the docs will require minor tweaking CURRENT In messages containing configuration variable names, do not include quotes when the names are visibly not natural English words, such as

Re: Simplify newNode()

2023-12-14 Thread Peter Eisentraut
On 14.12.23 01:48, Heikki Linnakangas wrote: The newNode() macro can be turned into a static inline function, which makes it a lot simpler. See attached. This was not possible when the macro was originally written, as we didn't require compiler to have static inline support, but nowadays we

Re: remaining sql/json patches

2023-12-14 Thread Amit Langote
On Sat, Dec 9, 2023 at 2:05 PM jian he wrote: > Hi. Thanks for the review. > function JsonPathExecResult comment needs to be refactored? since it > changed a lot. I suppose you meant executeJsonPath()'s comment. I've added a description of the new callback function arguments. On Wed, Dec 13,

Re: remaining sql/json patches

2023-12-14 Thread Amit Langote
On Sat, Dec 9, 2023 at 2:05 AM Andrew Dunstan wrote: > On 2023-12-08 Fr 11:37, Robert Haas wrote: > > On Fri, Dec 8, 2023 at 1:59 AM Amit Langote wrote: > >> Would it be messy to replace the lookahead approach by whatever's > >> suiable *in the future* when it becomes necessary to do so? > > It