Re: Missing update of all_hasnulls in BRIN opclasses

2022-10-22 Thread Zhihong Yu
Hi, Tomas: For 0002-fixup-brin-has_nulls-20221022.patch : + first_row = (bval->bv_hasnulls && bval->bv_allnulls); + + if (bval->bv_hasnulls && bval->bv_allnulls) It seems the if condition can be changed to `if (first_row)` which is more readable. Chhers

Re: Pluggable toaster

2022-10-22 Thread Nikita Malakhov
Hi! Aleksander, this is a good question. If I understood you correctly, you mean that the alternative TOAST mechanism B is using a specific Table AM A? Pluggable TOAST API was designed with storage flexibility in mind, and Custom TOAST mechanics is free to use any storage methods - we've tested

Interesting areas for beginners

2022-10-22 Thread Matheus Alcantara
Hi hackers. Can you please share some areas that would be good to start contributing? Some months ago I've got my first patch accept [1], and I'm looking to try to make other contributions. Thanks in advance! [1]

Re: Allow WindowFuncs prosupport function to use more optimal WindowClause options

2022-10-22 Thread Vik Fearing
On 10/20/22 22:02, David Rowley wrote: On Thu, 13 Oct 2022 at 13:34, David Rowley wrote: So it looks like the same can be done for rank() and dense_rank() too. I've added support for those in the attached. The attached adds support for percent_rank(), cume_dist() and ntile(). Shouldn't it

Re: Missing update of all_hasnulls in BRIN opclasses

2022-10-22 Thread Tomas Vondra
On 10/22/22 10:00, Alvaro Herrera wrote: > On 2022-Oct-22, Tomas Vondra wrote: > >> I wonder how to do this in a back-patchable way - we can't add >> parameters to the opclass procedure, and the other solution seems to be >> storing it right in the BrinMemTuple, somehow. But that's likely an ABI

Re: Logical WAL sender unresponsive during decoding commit

2022-10-22 Thread Amit Kapila
On Thu, Oct 20, 2022 at 7:17 PM Robert Haas wrote: > > On Thu, Oct 20, 2022 at 1:37 AM Amit Kapila wrote: > > On Thu, Oct 20, 2022 at 5:17 AM Robert Haas wrote: > > > > Pushed. > > > > > > I think this was a good change, but there's at least one other problem > > > here: within

pg_dump test: Make concatenated create_sql commands more readable

2022-10-22 Thread Peter Eisentraut
When the pg_dump 002_pg_dump.pl test generates the command to load the schema, it does # Add terminating semicolon $create_sql{$test_db} .= $tests{$test}->{create_sql} . ";"; In some cases, this creates a duplicate semicolon, but more importantly, this doesn't add any newline. So if

Re: Avoid memory leaks during base backups

2022-10-22 Thread Michael Paquier
On Fri, Oct 21, 2022 at 09:02:04PM +0530, Bharath Rupireddy wrote: > After all, that is what is being discussed here; what if palloc down > below fails and they're not reset to NULL after MemoryContextReset()? It does not seem to matter much to me for that, so left these as proposed. > On Fri,

Re: Pluggable toaster

2022-10-22 Thread Aleksander Alekseev
Hi Nikita, > Aleksander, we have had this in mind while developing this feature, and have > checked it. Just a slight modification is needed > to make it work with Pluggable Storage (Access Methods) API. Could you please clarify this a little from the architectural point of view? Let's say

Re: Crash after a call to pg_backup_start()

2022-10-22 Thread Bharath Rupireddy
On Sat, Oct 22, 2022 at 1:56 PM Alvaro Herrera wrote: > > > Why can't we just get rid of the Assert and treat during_backup_start > > as backup_marked_active_in_shmem or something like that to keep things > > simple? > > Why is that simpler? IMO, the assertion looks complex there and thinking if

Re: Crash after a call to pg_backup_start()

2022-10-22 Thread Alvaro Herrera
On 2022-Oct-22, Bharath Rupireddy wrote: > +/* We should be here only by one of these reasons, never both */ > +Assert(during_backup_start ^ > + (sessionBackupState == SESSION_BACKUP_RUNNING)); > + > > What's the problem even if we're here when both of them are

Re: Missing update of all_hasnulls in BRIN opclasses

2022-10-22 Thread Alvaro Herrera
On 2022-Oct-22, Tomas Vondra wrote: > I wonder how to do this in a back-patchable way - we can't add > parameters to the opclass procedure, and the other solution seems to be > storing it right in the BrinMemTuple, somehow. But that's likely an ABI > break :-( Hmm, I don't see the ABI

Re: Crash after a call to pg_backup_start()

2022-10-22 Thread Bharath Rupireddy
On Sat, Oct 22, 2022 at 1:26 PM Alvaro Herrera wrote: > > On 2022-Oct-21, Michael Paquier wrote: > > > On Fri, Oct 21, 2022 at 05:53:25PM +0800, Richard Guo wrote: > > > > /* These conditions can not be both true */ > > > > If you do that, it would be a bit easier to read as of the following

Re: Crash after a call to pg_backup_start()

2022-10-22 Thread Alvaro Herrera
On 2022-Oct-21, Michael Paquier wrote: > On Fri, Oct 21, 2022 at 05:53:25PM +0800, Richard Guo wrote: > > /* These conditions can not be both true */ > > If you do that, it would be a bit easier to read as of the following > assertion instead? Like: > Assert(!during_backup_start || >