Re: Version 14/15 documentation Section "Alter Default Privileges"

2023-11-04 Thread Bruce Momjian
On Sat, Nov 4, 2023 at 10:12:42PM +0100, Laurenz Albe wrote: > On Sat, 2023-11-04 at 14:20 -0400, Bruce Momjian wrote: > > Yes, I see your point. Updated patch attached. > > Almost perfect, except: > > + Change default privileges for objects created by > + target_role; if omitted,

Re: A recent message added to pg_upgade

2023-11-04 Thread Michael Paquier
On Fri, Nov 03, 2023 at 01:33:26PM +1100, Peter Smith wrote: > On Fri, Nov 3, 2023 at 1:11 PM Amit Kapila wrote: >> Now, that Michael also committed another similar change in commit >> 7021d3b176, it is better to be consistent in both cases. So, either we > > I agree. Both patches are setting a

Re: pg_upgrade and logical replication

2023-11-04 Thread Michael Paquier
On Thu, Nov 02, 2023 at 05:00:55PM +0530, Amit Kapila wrote: > I think it is important for users to know how they upgrade their > multi-node setup. Say a two-node setup where replication is working > both ways (aka each node has both publications and subscriptions), > similarly, how to upgrade, if

Re: Improve WALRead() to suck data directly from WAL buffers when possible

2023-11-04 Thread Bharath Rupireddy
On Sun, Nov 5, 2023 at 2:57 AM Jeff Davis wrote: > > On Sat, 2023-11-04 at 20:55 +0530, Bharath Rupireddy wrote: > > + XLogRecPtr EndPtr = > > pg_atomic_read_u64(>xlblocks[curridx]); > > + > > + /* > > + * xlblocks value can be InvalidXLogRecPtr before >

Re: add log messages when replication slots become active and inactive (was Re: Is it worth adding ReplicationSlot active_pid to ReplicationSlotPersistentData?)

2023-11-04 Thread Bharath Rupireddy
On Thu, Nov 2, 2023 at 7:19 AM Peter Smith wrote: > > But that's not quite compatible with what Alvaro [2] had written long > back ("... the only acquisitions that would log messages are those in > StartReplication and StartLogicalReplication."). > > In other words,

Re: Improve WALRead() to suck data directly from WAL buffers when possible

2023-11-04 Thread Jeff Davis
On Sat, 2023-11-04 at 20:55 +0530, Bharath Rupireddy wrote: > + XLogRecPtr EndPtr = > pg_atomic_read_u64(>xlblocks[curridx]); > + > + /* > + * xlblocks value can be InvalidXLogRecPtr before > the new WAL buffer > + * page gets initialized in

Re: Version 14/15 documentation Section "Alter Default Privileges"

2023-11-04 Thread Laurenz Albe
On Sat, 2023-11-04 at 14:20 -0400, Bruce Momjian wrote: > Yes, I see your point. Updated patch attached. Almost perfect, except: + Change default privileges for objects created by + target_role; if omitted, the current + role is modified. It is not the role that is modified.

Re: Inconsistent use of "volatile" when accessing shared memory?

2023-11-04 Thread Jeff Davis
On Fri, 2023-11-03 at 18:36 -0700, Andres Freund wrote: > All that is happening here is that clang can prove that nothing ever > could > change the variable ... > See https://godbolt.org/z/EaM77E8jK > > We don't gain anything from preventing the compiler from making such > conclusions afaict.

Re: Printing backtrace of postgres processes

2023-11-04 Thread Bharath Rupireddy
On Thu, Jul 20, 2023 at 8:22 PM Daniel Gustafsson wrote: > > > On 11 Jan 2023, at 15:44, Bharath Rupireddy > > wrote: > > > > On Wed, Nov 30, 2022 at 11:43 AM Bharath Rupireddy > > wrote: > >> > >> I'm attaching the v22 patch set for further review. > > > > Needed a rebase due to

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

2023-11-04 Thread Andrey M. Borodin
> On 30 Oct 2023, at 09:20, Dilip Kumar wrote: > > changed the logic of SlruAdjustNSlots() in 0002, such that now it > starts with the next power of 2 value of the configured slots and > keeps doubling the number of banks until we reach the number of banks > to the max SLRU_MAX_BANKS(128) and

Re: Syncrep and improving latency due to WAL throttling

2023-11-04 Thread Tomas Vondra
Hi, I keep getting occasional complaints about the impact of large/bulk transactions on latency of small OLTP transactions, so I'd like to revive this thread a bit and move it forward. Attached is a rebased v3, followed by 0002 patch with some review comments, missing comments and minor tweaks.

Re: brininsert optimization opportunity

2023-11-04 Thread Soumyadeep Chakraborty
On Fri, 3 Nov 2023 at 19:37, Tomas Vondra wrote: > The one thing I'm not entirely sure about is adding new stuff to the > IndexAmRoutine. I don't think we want to end up with too many callbacks > that all AMs have to initialize etc. I can't think of a different/better > way to do this, though.

Re: Version 14/15 documentation Section "Alter Default Privileges"

2023-11-04 Thread Bruce Momjian
On Sat, Nov 4, 2023 at 07:05:28AM +0100, Laurenz Albe wrote: > On Fri, 2023-11-03 at 12:53 -0400, Bruce Momjian wrote: > > I have developed the attached patch on top of the alter default patch I > > just applied. It is more radical, making FOR ROLE clearer, and also > > moving my new FOR ROLE

Re: Introduction and Inquiry on Beginner-Friendly Issues

2023-11-04 Thread Atharva Bhise
Thanks a lot for sharing. On Sat, Nov 4, 2023 at 10:47 PM Bruce Momjian wrote: > On Sat, Nov 4, 2023 at 10:17:13PM +0530, Atharva Bhise wrote: > > Hello PostgreSQL Developers, > > > > I hope this message finds you well. My name is Atharva, and I'm a > second-year > > student majoring in

Re: Introduction and Inquiry on Beginner-Friendly Issues

2023-11-04 Thread Bruce Momjian
On Sat, Nov 4, 2023 at 10:17:13PM +0530, Atharva Bhise wrote: > Hello PostgreSQL Developers, > > I hope this message finds you well. My name is Atharva, and I'm a second-year > student majoring in computer application with a strong interest in > contributing > to the PostgreSQL project. I have

Introduction and Inquiry on Beginner-Friendly Issues

2023-11-04 Thread Atharva Bhise
Hello PostgreSQL Developers, I hope this message finds you well. My name is Atharva, and I'm a second-year student majoring in computer application with a strong interest in contributing to the PostgreSQL project. I have experience in C programming and a solid understanding of PostgreSQL. I'm

Re: Guiding principle for dropping LLVM versions?

2023-11-04 Thread Andres Freund
Hi, On 2023-11-02 10:46:52 +1300, Thomas Munro wrote: > So it sounds like we're in agreement that it is time to require LLVM > 10+ in master. Could the owners (CC'd) of the following animals > please turn off --with-llvm on master (and future 17+ branches), or > consider upgrading to a modern OS

Re: Improve WALRead() to suck data directly from WAL buffers when possible

2023-11-04 Thread Bharath Rupireddy
On Sat, Nov 4, 2023 at 1:17 AM Jeff Davis wrote: > > > > I think it needs something like: > > > > > > pg_atomic_write_u64(>xlblocks[nextidx], > > > InvalidXLogRecPtr); > > > pg_write_barrier(); > > > > > > before the MemSet. > > > > I think it works. First, xlblocks needs to be turned to an

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-11-04 Thread Vik Fearing
On 11/3/23 21:28, Jim Jones wrote: On 03.11.23 19:05, Vik Fearing wrote: I was thinking of something much shorter than that.  Such as     X038    XMLText YES supported except for RETURNING v6 attached includes this change and the doc addition from Daniel. There are some typos in

Re: Support run-time partition pruning for hash join

2023-11-04 Thread Alexander Lakhin
Hello Richard, 02.11.2023 14:19, Richard Guo wrote: However, the cfbot indicates that there are test cases that fail on FreeBSD [1] (no failure on other platforms).  So I set up a FreeBSD-13 locally but just cannot reproduce the failure.  I must be doing something wrong.  Can anyone give me

Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE

2023-11-04 Thread Dilip Kumar
On Fri, Jan 20, 2023 at 2:04 PM David Geier wrote: > > Hi hackers, > > EXPLAIN ANALYZE for parallel Bitmap Heap Scans currently only reports > the number of heap blocks processed by the leader. It's missing the > per-worker stats. The attached patch adds that functionality in the > spirit of e.g.

Re: Version 14/15 documentation Section "Alter Default Privileges"

2023-11-04 Thread Laurenz Albe
On Fri, 2023-11-03 at 12:53 -0400, Bruce Momjian wrote: > I have developed the attached patch on top of the alter default patch I > just applied. It is more radical, making FOR ROLE clearer, and also > moving my new FOR ROLE text up to the first paragraph, and reordering > the paragraphs to be