Re: Multi-Column List Partitioning

2022-01-02 Thread Amul Sul
On Wed, Dec 29, 2021 at 7:26 PM Nitin Jadhav wrote: > > > > -* For range partitioning, we must only perform pruning with values > > -* for either all partition keys or a prefix thereof. > > +* For range partitioning and list partitioning, we must only > > perform > > +

Re: generalized conveyor belt storage

2021-12-29 Thread Amul Sul
On Wed, Dec 15, 2021 at 9:04 PM Robert Haas wrote: > > On Wed, Dec 15, 2021 at 10:03 AM Matthias van de Meent > wrote: > [...] Thought patch is WIP, here are a few comments that I found while reading the patch and thought might help: + { + if (meta->cbm_oldest_index_segment == +

Re: Multi-Column List Partitioning

2021-12-23 Thread Amul Sul
On Tue, Dec 21, 2021 at 6:34 PM Nitin Jadhav wrote: > > --- > > > + if (isnulls && isnulls[i]) > > + cmpval = 0; /* NULL "=" NULL */ > > + else > > + cmpval = 1; /* NULL ">" not-NULL */ > > + } > > + else if (isnulls &&

Re: Multi-Column List Partitioning

2021-12-09 Thread Amul Sul
On Thu, Dec 9, 2021 at 12:43 PM Amul Sul wrote: > > On Thu, Dec 9, 2021 at 12:03 PM Amit Langote wrote: > > > > On Thu, Dec 9, 2021 at 3:12 PM Amul Sul wrote: > > > On Thu, Dec 9, 2021 at 11:24 AM Amit Langote > > > wrote: > > > > > >

Re: Multi-Column List Partitioning

2021-12-08 Thread Amul Sul
On Thu, Dec 9, 2021 at 12:03 PM Amit Langote wrote: > > On Thu, Dec 9, 2021 at 3:12 PM Amul Sul wrote: > > On Thu, Dec 9, 2021 at 11:24 AM Amit Langote > > wrote: > > > > > [] > > > On Mon, Dec 6, 2021 at 10:57 PM Nitin Jadhav > > > wrot

Re: Multi-Column List Partitioning

2021-12-08 Thread Amul Sul
On Thu, Dec 9, 2021 at 11:24 AM Amit Langote wrote: > [] > On Mon, Dec 6, 2021 at 10:57 PM Nitin Jadhav > wrote: > > > Looks difficult to understand at first glance, how about the following: > > > > > > if (b1->isnulls != b2->isnulls) > > >return false; > > I don't think having this

Re: Multi-Column List Partitioning

2021-12-06 Thread Amul Sul
On Mon, Dec 6, 2021 at 7:27 PM Nitin Jadhav wrote: > > Thank you for reviewing the patch. > > > partbounds.c: In function ‘get_qual_for_list.isra.18’: > > partbounds.c:4284:29: warning: ‘boundinfo’ may be used uninitialized > > in this function [-Wmaybe-uninitialized] > >

Re: Multi-Column List Partitioning

2021-12-03 Thread Amul Sul
Hi, Few comments for v7 patch, note that I haven't been through the previous discussion, if any of the review comments that has been already discussed & overridden, then please ignore here too: partbounds.c: In function ‘get_qual_for_list.isra.18’: partbounds.c:4284:29: warning: ‘boundinfo’ may

Re: Update stale code comment in CheckpointerMain()

2021-11-30 Thread Amul Sul
On Tue, Nov 30, 2021 at 3:09 PM Daniel Gustafsson wrote: > > > On 30 Nov 2021, at 08:00, Amul Sul wrote: > > > The attached patch updates the code comment which is no longer true > > after commit # 4a92a1c3d1c361ffb031ed05bf65b801241d7cdd > > Agreed, but looking a

Update stale code comment in CheckpointerMain()

2021-11-29 Thread Amul Sul
Hi, The attached patch updates the code comment which is no longer true after commit # 4a92a1c3d1c361ffb031ed05bf65b801241d7cdd -- Regards, Amul Sul EDB: http://www.enterprisedb.com diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c index be7366379d0

tweak to a few index tests to hits ambuildempty() routine.

2021-11-28 Thread Amul Sul
Hi, Attached patch is doing small changes to brin, gin & gist index tests to use an unlogged table without changing the original intention of those tests and that is able to hit ambuildempty() routing which is otherwise not reachable by the current tests. -- Regards, Amul Sul EDB:

Re: Deduplicate code updating ControleFile's DBState.

2021-11-28 Thread Amul Sul
On Mon, Nov 29, 2021 at 10:12 AM Michael Paquier wrote: > > On Mon, Nov 29, 2021 at 09:28:23AM +0530, Bharath Rupireddy wrote: > > In that case, why can't we inline UpdateControlFile to avoid the > > function call cost? Do you see any issues with it? > > This routine is IMO not something worth

Re: Deduplicate code updating ControleFile's DBState.

2021-11-26 Thread Amul Sul
iteControlFile() is fine, on the contrary. My bad, sorry for the sloppy change, corrected it in the attached version. Regards, Amul From a2c385f6a6152dbba1e33149f1d7f102243ed0cd Mon Sep 17 00:00:00 2001 From: Amul Sul Date: Thu, 23 Sep 2021 00:47:52 -0400 Subject: [PATCH v6] Do the Control

Re: prevent immature WAL streaming

2021-11-25 Thread Amul Sul
On Fri, Nov 26, 2021 at 1:42 AM Tom Lane wrote: > > Alvaro Herrera writes: > > On 2021-Nov-25, Tom Lane wrote: > >> Really? AFAICS the WAL record contains the correct value, or at least > >> we should define that one as being correct, for precisely this reason. > > > I don't know what is the

Re: prevent immature WAL streaming

2021-11-24 Thread Amul Sul
On Wed, Nov 24, 2021 at 2:10 AM Alvaro Herrera wrote: > > On 2021-Nov-23, Tom Lane wrote: > > > We're *still* not out of the woods with 026_overwrite_contrecord.pl, > > as we are continuing to see occasional "mismatching overwritten LSN" > > failures, further down in the test where it tries to

Re: Deduplicate code updating ControleFile's DBState.

2021-11-24 Thread Amul Sul
On Thu, Nov 11, 2021 at 1:30 AM Bossart, Nathan wrote: > > On 10/1/21, 10:40 PM, "Michael Paquier" wrote: > > On Fri, Oct 01, 2021 at 05:47:45PM +, Bossart, Nathan wrote: > >> I'm inclined to agree that anything that calls update_controlfile() > >> should update the timestamp. > > > >

Re: [Patch] ALTER SYSTEM READ ONLY

2021-11-23 Thread Amul Sul
On Wed, Nov 17, 2021 at 6:20 PM Amul Sul wrote: > > On Wed, Nov 17, 2021 at 4:07 PM Amul Sul wrote: > > > > On Wed, Nov 17, 2021 at 11:13 AM Amul Sul wrote: > > > > > > On Sat, Nov 13, 2021 at 2:18 AM Robert Haas wrote: > > > > > &

TAP test to cover "EndOfLogTLI != replayTLI" case

2021-11-22 Thread Amul Sul
ase where recovery_target_lsn and recovery_target_inclusive=off which doesn't exist as of now and that is the reason I have added this test to 003_recovery_targets.pl file. Thoughts? Suggestions? -- Regards, Amul Sul EDB: http://www.enterprisedb.com From 4e2bbb37d4874c910494ba221c7be7e02a29c8c1 Mon

Re: xlog.c: removing ReadRecPtr and EndRecPtr

2021-11-21 Thread Amul Sul
On Fri, Nov 19, 2021 at 12:43 AM Robert Haas wrote: > > On Thu, Nov 18, 2021 at 7:30 AM Amul Sul wrote: > > Somehow with and without patch I am getting the same log. > > Try applying the attached 0001-dubious-test-cast.patch for you and see > if that fails. It does fo

Re: Should rename "startup process" to something else?

2021-11-18 Thread Amul Sul
On Thu, Nov 18, 2021 at 6:06 PM Andrey Borodin wrote: > > > > > 15 нояб. 2021 г., в 19:32, Rushabh Lathia > > написал(а): > > > > Open for suggestions and thoughts. > > > How about walapplier ? > Similar to walsender, walreciver.. > Or maybe walreplayer ? Regards, Amul

Re: xlog.c: removing ReadRecPtr and EndRecPtr

2021-11-18 Thread Amul Sul
On Thu, Nov 18, 2021 at 3:31 AM Robert Haas wrote: > > I spent a lot of time trying to figure out why xlog.c has global > variables ReadRecPtr and EndRecPtr instead of just relying on the > eponymous structure members inside the XLogReaderState. I concluded > that the values are the same at most

Re: [Patch] ALTER SYSTEM READ ONLY

2021-11-17 Thread Amul Sul
On Wed, Nov 17, 2021 at 4:07 PM Amul Sul wrote: > > On Wed, Nov 17, 2021 at 11:13 AM Amul Sul wrote: > > > > On Sat, Nov 13, 2021 at 2:18 AM Robert Haas wrote: > > > > > > On Mon, Nov 8, 2021 at 8:20 AM Amul Sul wrote: > > > > Attach

Re: [Patch] ALTER SYSTEM READ ONLY

2021-11-17 Thread Amul Sul
On Wed, Nov 17, 2021 at 11:13 AM Amul Sul wrote: > > On Sat, Nov 13, 2021 at 2:18 AM Robert Haas wrote: > > > > On Mon, Nov 8, 2021 at 8:20 AM Amul Sul wrote: > > > Attached is the rebased version of refactoring as well as the > > > pg_prohibit_wal featur

Re: [Patch] ALTER SYSTEM READ ONLY

2021-11-16 Thread Amul Sul
On Sat, Nov 13, 2021 at 2:18 AM Robert Haas wrote: > > On Mon, Nov 8, 2021 at 8:20 AM Amul Sul wrote: > > Attached is the rebased version of refactoring as well as the > > pg_prohibit_wal feature patches for the latest master head (commit # > > 39a3105678a). > &g

Re: Unnecessary global variable declared in xlog.c

2021-11-16 Thread Amul Sul
On Wed, Nov 17, 2021 at 7:36 AM Michael Paquier wrote: > > On Tue, Nov 16, 2021 at 02:08:54AM -0500, Tom Lane wrote: > > I think LastRec was originally referenced by multiple functions > > in xlog.c. But it does look like it could be a local now. > > Thanks for double-checking, applied this one

Unnecessary global variable declared in xlog.c

2021-11-15 Thread Amul Sul
Hi, The attached patch moves the "LastRec" variable declaration inside StartupXLOG() where it is supposed to be. -- Regards, Amul Sul EDB: http://www.enterprisedb.com remove_global_declaration.patch Description: Binary data

Re: removing global variable ThisTimeLineID

2021-11-03 Thread Amul Sul
On Tue, Nov 2, 2021 at 12:46 AM Robert Haas wrote: > > [...] > I would like to clean this up. Attached is a series of patches which > try to do that. For ease of review, this is separated out into quite a > few separate patches, but most likely we'd combine some of them for > commit. Patches 0001

Re: Correct error message for end-of-recovery record TLI

2021-10-28 Thread Amul Sul
On Fri, Oct 29, 2021 at 2:36 AM Robert Haas wrote: > > On Thu, Oct 28, 2021 at 3:52 PM Bossart, Nathan wrote: > > When I apply the patch, it changes the PANIC message in the > > XLOG_CHECKPOINT_ONLINE section, not the XLOG_END_OF_RECOVERY one. > > Well that's a good point. *facepalm* > Oops...

Correct error message for end-of-recovery record TLI

2021-10-28 Thread Amul Sul
Hi, In xlog_redo, for end-of-recovery case error message describes the record as a checkpoint record which seems to be incorrect; the attached patch corrects that. -- Regards, Amul Sul EDB: http://www.enterprisedb.com diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam

Re: inefficient loop in StandbyReleaseLockList()

2021-10-27 Thread Amul Sul
On Thu, Oct 28, 2021 at 9:07 AM Bossart, Nathan wrote: > > Hi hackers, > > I've seen a few cases now for v13 where the startup process on a > standby appears to be stuck on StandbyReleaseLockList(). It looks > like most of the time is spent on list_delete_first(). I believe this > is related to

Re: TAP test for recovery_end_command

2021-10-27 Thread Amul Sul
On Thu, Oct 28, 2021 at 7:24 AM Michael Paquier wrote: > > On Wed, Oct 27, 2021 at 02:20:50PM +0900, Michael Paquier wrote: > > ok(!-f $recovery_end_command_file, > > - 'recovery_end_command executed after promotion'); > > + 'recovery_end_command not executed yet'); > > Indeed :p > > While

Re: TAP test for recovery_end_command

2021-10-26 Thread Amul Sul
On Wed, Oct 27, 2021 at 9:37 AM Michael Paquier wrote: > > On Mon, Oct 25, 2021 at 02:42:28PM +0530, Amul Sul wrote: > > Understood, moved tests to 002_archiving.pl in the attached version. > > Thanks for the new patch. I have reviewed its contents, and there > we

Re: [Patch] ALTER SYSTEM READ ONLY

2021-10-26 Thread Amul Sul
On Mon, Oct 25, 2021 at 8:15 PM Robert Haas wrote: > > On Mon, Oct 25, 2021 at 3:05 AM Amul Sul wrote: > > Ok, did the same in the attached 0001 patch. > > > > There is no harm in calling LocalSetXLogInsertAllowed() calling > > multiple times, but the problem I c

Re: TAP test for recovery_end_command

2021-10-25 Thread Amul Sul
On Wed, Oct 20, 2021 at 11:09 AM Michael Paquier wrote: > > On Wed, Oct 06, 2021 at 06:49:10PM +0530, Amul Sul wrote: > > Thanks for the suggestion, added the same in the attached version. > > Hmm. The run-time of 020_archive_status.p bumps from 4.7s to 5.8s on > my

Re: [Patch] ALTER SYSTEM READ ONLY

2021-10-25 Thread Amul Sul
On Tue, Oct 19, 2021 at 3:50 AM Robert Haas wrote: > > On Mon, Oct 18, 2021 at 9:54 AM Amul Sul wrote: > > I tried this in the attached version, but I'm a bit skeptical with > > changes that are needed for CreateCheckPoint(), those don't seem to be > > clean. > > Ye

Re: prevent immature WAL streaming

2021-10-24 Thread Amul Sul
On Mon, Oct 25, 2021 at 7:02 AM Kyotaro Horiguchi wrote: > > At Fri, 22 Oct 2021 18:43:52 +0530, Amul Sul wrote in > > Any thoughts about the patch posted previously? > > Honestly, xlogreader looks fine with the current shape. The reason is > that it seems cleaner as an int

Re: prevent immature WAL streaming

2021-10-22 Thread Amul Sul
On Thu, Oct 14, 2021 at 6:14 PM Amul Sul wrote: > > On Wed, Oct 13, 2021 at 10:58 PM Alvaro Herrera > wrote: > > > > On 2021-Oct-13, Amul Sul wrote: > > > > > I have one more question, regarding the need for other global > > > variables i.e. aborted

Re: [Patch] ALTER SYSTEM READ ONLY

2021-10-18 Thread Amul Sul
On Thu, Oct 14, 2021 at 11:10 PM Robert Haas wrote: > > On Tue, Oct 12, 2021 at 8:18 AM Amul Sul wrote: > > In the attached version I have fixed this issue by restoring > > missingContrecPtr. > > > > To handle abortedRecPtr and missingContrecPtr newly adde

Re: using an end-of-recovery record in all cases

2021-10-17 Thread Amul Sul
On Wed, Oct 6, 2021 at 7:24 PM Amul Sul wrote: > > On Tue, Oct 5, 2021 at 10:42 PM Robert Haas wrote: > > > > On Tue, Oct 5, 2021 at 12:41 PM Amul Sul wrote: > > > No, InRecovery flag get cleared before this point. I think, we can use > > > lastRepla

Re: prevent immature WAL streaming

2021-10-14 Thread Amul Sul
On Wed, Oct 13, 2021 at 10:58 PM Alvaro Herrera wrote: > > On 2021-Oct-13, Amul Sul wrote: > > > I have one more question, regarding the need for other global > > variables i.e. abortedRecPtr. (Sorry for coming back after so long.) > > > > Instead of abortedRe

Re: when the startup process doesn't (logging startup delays)

2021-10-13 Thread Amul Sul
On Wed, Sep 29, 2021 at 11:10 PM Robert Haas wrote: > > On Wed, Sep 29, 2021 at 10:08 AM Nitin Jadhav > wrote: > > Sorry. There was a misunderstanding about this and for the patch > > shared on September 27th, I had tested for the value '0' and observed > > that no progress messages were getting

Re: prevent immature WAL streaming

2021-10-13 Thread Amul Sul
Hi, On Thu, Oct 7, 2021 at 6:57 PM Alvaro Herrera wrote: > > On 2021-Oct-07, Amul Sul wrote: > > > Make sense, thanks for the explanation. > > You're welcome. Also, I forgot: thank you for taking the time to review > the code. Much appreciated. :) > > I hav

Re: [Patch] ALTER SYSTEM READ ONLY

2021-10-12 Thread Amul Sul
On Thu, Oct 7, 2021 at 6:21 PM Amul Sul wrote: > > On Thu, Oct 7, 2021 at 5:56 AM Jaime Casanova > wrote: > > > > On Tue, Oct 05, 2021 at 04:11:58PM +0530, Amul Sul wrote: > > >On Mon, Oct 4, 2021 at 1:57 PM Rushabh Lathia > > > wrote: >

Re: prevent immature WAL streaming

2021-10-07 Thread Amul Sul
On Thu, 7 Oct 2021 at 6:41 PM, Alvaro Herrera wrote: > On 2021-Oct-07, Amul Sul wrote: > > > While reading this commit (ff9f111bce24), wondered can't we skip > > missingContrecPtr global variable declaration and calculate that from > > abortedRecPtr value

Re: [Patch] ALTER SYSTEM READ ONLY

2021-10-07 Thread Amul Sul
On Thu, Oct 7, 2021 at 5:56 AM Jaime Casanova wrote: > > On Tue, Oct 05, 2021 at 04:11:58PM +0530, Amul Sul wrote: > >On Mon, Oct 4, 2021 at 1:57 PM Rushabh Lathia > > wrote: > > > > > > I tried to apply the patch on the master branch head a

Re: prevent immature WAL streaming

2021-10-07 Thread Amul Sul
Hi, On Wed, Sep 29, 2021 at 8:14 PM Alvaro Herrera wrote: > > On 2021-Sep-24, Alvaro Herrera wrote: > > > Here's the set for all branches, which I think are really final, in case > > somebody wants to play and reproduce their respective problem scenarios. > > Nathan already confirmed that his

Re: using an end-of-recovery record in all cases

2021-10-06 Thread Amul Sul
On Tue, Oct 5, 2021 at 10:42 PM Robert Haas wrote: > > On Tue, Oct 5, 2021 at 12:41 PM Amul Sul wrote: > > No, InRecovery flag get cleared before this point. I think, we can use > > lastReplayedEndRecPtr what you have suggested in other thread. > > Hmm, right, that makes

Re: TAP test for recovery_end_command

2021-10-06 Thread Amul Sul
On Wed, Oct 6, 2021 at 1:40 AM Andres Freund wrote: > > Hi, > > On 2021-09-14 10:34:09 +0530, Amul Sul wrote: > > +# recovery_end_command_file executed only on recovery end which can happen > > on > > +# promotion. > > +$standby3->promote;

Re: using an end-of-recovery record in all cases

2021-10-05 Thread Amul Sul
On Tue, 5 Oct 2021 at 9:04 PM, Robert Haas wrote: > On Tue, Oct 5, 2021 at 7:44 AM Amul Sul wrote: > > I was trying to understand the v1 patch and found that at the end > > RequestCheckpoint() is called unconditionally, I think that should > > have been called if REDO had

Re: using an end-of-recovery record in all cases

2021-10-05 Thread Amul Sul
I was trying to understand the v1 patch and found that at the end RequestCheckpoint() is called unconditionally, I think that should have been called if REDO had performed, here is the snip from the v1 patch: /* - * If this was a promotion, request an (online) checkpoint now. This isn't - *

Re: [Patch] ALTER SYSTEM READ ONLY

2021-10-05 Thread Amul Sul
On Mon, Oct 4, 2021 at 1:57 PM Rushabh Lathia wrote: > > > > On Fri, Oct 1, 2021 at 2:29 AM Robert Haas wrote: >> >> On Thu, Sep 30, 2021 at 7:59 AM Amul Sul wrote: >> > To find the value of InRecovery after we clear it, patch still uses >> >

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-30 Thread Amul Sul
On Fri, Sep 24, 2021 at 5:07 PM Amul Sul wrote: > > On Thu, Sep 23, 2021 at 11:56 PM Robert Haas wrote: > > > > On Mon, Sep 20, 2021 at 11:20 AM Amul Sul wrote: > > > Ok, understood, I have separated my changes into 0001 and 0002 patch, > > > and the

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-24 Thread Amul Sul
On Thu, Sep 23, 2021 at 11:56 PM Robert Haas wrote: > > On Mon, Sep 20, 2021 at 11:20 AM Amul Sul wrote: > > Ok, understood, I have separated my changes into 0001 and 0002 patch, > > and the refactoring patches start from 0003. > > I think it would be b

Re: Deduplicate code updating ControleFile's DBState.

2021-09-22 Thread Amul Sul
On Tue, Sep 21, 2021 at 9:43 PM Bossart, Nathan wrote: > > On 9/20/21, 10:07 PM, "Amul Sul" wrote: > > On Tue, Sep 21, 2021 at 4:44 AM Bossart, Nathan wrote: > >> On 9/19/21, 11:07 PM, "Amul Sul" wrote: > >> > I have one additional co

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-22 Thread Amul Sul
On Wed, Sep 22, 2021 at 7:33 PM Mark Dilger wrote: > > > > > On Sep 22, 2021, at 6:39 AM, Amul Sul wrote: > > > > Yes, that is a bit longer, here is the snip from v35-0010 patch > > Right, that's longer, and only tests one interaction. The isolation spec I

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-22 Thread Amul Sul
On Wed, Sep 22, 2021 at 6:59 PM Mark Dilger wrote: > > > > > On Sep 22, 2021, at 6:14 AM, Amul Sul wrote: > > > >> Attached patch v34-0010 adds a test of cursors opened FOR UPDATE > >> interacting with a system that is set read-only by a different sessi

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-22 Thread Amul Sul
On Wed, Sep 15, 2021 at 4:34 AM Mark Dilger wrote: > > > > > On Jun 16, 2020, at 6:55 AM, amul sul wrote: > > > > (2) if the session is idle, we also need the top-level abort > > record to be written immediately, but can't send an error to the client > &g

Re: Deduplicate code updating ControleFile's DBState.

2021-09-20 Thread Amul Sul
On Tue, Sep 21, 2021 at 4:44 AM Bossart, Nathan wrote: > > On 9/19/21, 11:07 PM, "Amul Sul" wrote: > > +1, since skipping ControlFileLock for the DBState update is not the > > right thing, let's have two different functions as per your suggestion > > -- di

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-20 Thread Amul Sul
sTimeLineID); " > So I think you've covered most of the necessary things here, with > probably some more discussion needed on whether you've done the right > things... > Thanks, Robert, for your time. Regards, Amul Sul From 9d876ab6ffe05228457c9c58442d05cefceb1584 Mon Sep 17 00

Re: Deduplicate code updating ControleFile's DBState.

2021-09-20 Thread Amul Sul
On Thu, Sep 16, 2021 at 4:19 AM Bossart, Nathan wrote: > > On 9/15/21, 4:47 AM, "Amul Sul" wrote: > > On Wed, Sep 15, 2021 at 12:52 AM Bossart, Nathan > > wrote: > >> It looks like ebdf5bf intentionally made sure that we hold > >> ControlFileLoc

Re: Deduplicate code updating ControleFile's DBState.

2021-09-19 Thread Amul Sul
On Thu, Sep 16, 2021 at 5:17 AM Michael Paquier wrote: > > On Wed, Sep 15, 2021 at 10:49:39PM +, Bossart, Nathan wrote: > > Ah, I was missing this context. Perhaps this should be included in > > the patch set for the other thread, especially if it will need to be > > exported. > > This part

Re: Deduplicate code updating ControleFile's DBState.

2021-09-15 Thread Amul Sul
On Wed, Sep 15, 2021 at 12:52 AM Bossart, Nathan wrote: > > On 9/13/21, 11:06 PM, "Amul Sul" wrote: > > The patch is straightforward but the only concern is that in > > StartupXLOG(), SharedRecoveryState now gets updated only with spin > > lock; earlier it al

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-15 Thread Amul Sul
, On Sat, Jul 24, 2021 at 1:33 AM Robert Haas wrote: > > On Thu, Jun 17, 2021 at 1:23 AM Amul Sul wrote: > > Attached is rebase for the latest master head. Also, I added one more > > refactoring code that deduplicates the code setting database state in the > > control

Deduplicate code updating ControleFile's DBState.

2021-09-14 Thread Amul Sul
to that. AFAICU, I don't see any problem there, since until the startup process exists other backends could not connect and write a WAL record. Regards, Amul Sul. EDB: http://www.enterprisedb.com From 4728be13bc17183f9869b1c040d5c72d2969e736 Mon Sep 17 00:00:00 2001 From: Amul Sul Date: Tue, 14 Sep

Re: TAP test for recovery_end_command

2021-09-13 Thread Amul Sul
On Mon, Sep 13, 2021 at 8:39 PM Euler Taveira wrote: > > On Mon, Sep 13, 2021, at 10:09 AM, Amul Sul wrote: > > Yeah, added that test too. I triggered the restartpoint via a > CHECKPOINT command in the attached version. > > +# archive_cleanup_command executed with every rest

Re: TAP test for recovery_end_command

2021-09-13 Thread Amul Sul
On Mon, Sep 13, 2021 at 5:56 AM Euler Taveira wrote: > > On Thu, Sep 9, 2021, at 8:18 AM, Amul Sul wrote: > > The attached patch adds a small test for recovery_end_command execution. > > Additional coverage is always a good thing. > Thanks for the confirmation. >

Re: TAP test for recovery_end_command

2021-09-12 Thread Amul Sul
On Mon, Sep 13, 2021 at 8:44 AM Michael Paquier wrote: > > On Sun, Sep 12, 2021 at 09:25:32PM -0300, Euler Taveira wrote: > > On Thu, Sep 9, 2021, at 8:18 AM, Amul Sul wrote: > >> Also, we don't have a good test for archive_cleanup_command as well, I > >> am not sur

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-10 Thread Amul Sul
On Thu, Sep 9, 2021 at 11:12 PM Mark Dilger wrote: > > Thank you, for looking at the patch. Please see my reply inline below: > > > On Sep 8, 2021, at 6:44 AM, Amul Sul wrote: > > > > Here is the rebased version. > > v33-0004 > > This patch moves the

TAP test for recovery_end_command

2021-09-09 Thread Amul Sul
Hi, The attached patch adds a small test for recovery_end_command execution. Currently, patch tests execution of recovery_end_command by creating dummy file, I am not wedded only to this approach, other suggestions also welcome. Also, we don't have a good test for archive_cleanup_command as

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-07 Thread Amul Sul
On Tue, 7 Sep 2021 at 8:43 PM, Mark Dilger wrote: > > > > On Aug 31, 2021, at 5:15 AM, Amul Sul wrote: > > > > Attached is the rebased version for the latest master head. > > Hi Amul! > > Could you please rebase again? > Ok will do that tomorrow, thanks. Regards, Amul

Re: Unused variable in TAP tests file

2021-09-05 Thread Amul Sul
Thank you ! Regards, Amul On Mon, Sep 6, 2021 at 7:58 AM Michael Paquier wrote: > > On Fri, Sep 03, 2021 at 04:03:36PM +0900, Michael Paquier wrote: > > Indeed. Let's clean up that. Thanks! > > And done. > -- > Michael

Re: using an end-of-recovery record in all cases

2021-09-03 Thread Amul Sul
On Fri, Sep 3, 2021 at 10:23 AM Kyotaro Horiguchi wrote: > > At Thu, 2 Sep 2021 11:30:59 -0400, Robert Haas wrote > in > > On Mon, Aug 9, 2021 at 3:00 PM Robert Haas wrote: > > > I decided to try writing a patch to use an end-of-recovery record > > > rather than a checkpoint record in all

Unused variable in TAP tests file

2021-09-02 Thread Amul Sul
Few tap test files have the "tempdir_short" variable which isn't in use. The attached patch removes the same Regards, Amul From 0751895df64bcd6bc719933013edf1d76e31b784 Mon Sep 17 00:00:00 2001 From: Amul Sul Date: Fri, 3 Sep 2021 01:19:29 -0400 Subject: [PATCH] Remove unused variable

Re: Background writer and checkpointer in crash recovery

2021-08-02 Thread Amul Sul
On Mon, Aug 2, 2021 at 6:47 PM Robert Haas wrote: > > On Mon, Aug 2, 2021 at 1:37 AM Thomas Munro wrote: > > I pushed 0001. > > That's great. I just realized that this leaves us with identical > RequestCheckpoint() calls in two nearby places. Is there any reason > not to further simplify as in

Re: [Patch] ALTER SYSTEM READ ONLY

2021-07-29 Thread Amul Sul
On Thu, Jul 29, 2021 at 4:47 PM Dilip Kumar wrote: > > On Wed, Jul 28, 2021 at 5:03 PM Amul Sul wrote: > > > > I was too worried about how I could miss that & after thinking more > > about that, I realized that the operation for ArchiveRecoveryRequested >

Re: needless complexity in StartupXLOG

2021-07-28 Thread Amul Sul
On Mon, Jul 26, 2021 at 9:43 PM Robert Haas wrote: > > StartupXLOG() has code beginning around line 7900 of xlog.c that > decides, at the end of recovery, between four possible courses of > action. It either writes an end-of-recovery record, or requests a > checkpoint, or creates a checkpoint, or

Re: [Patch] ALTER SYSTEM READ ONLY

2021-07-28 Thread Amul Sul
On Wed, Jul 28, 2021 at 4:37 PM Amul Sul wrote: > > On Wed, Jul 28, 2021 at 2:26 AM Robert Haas wrote: > > > > On Fri, Jul 23, 2021 at 4:03 PM Robert Haas wrote: > > > My 0003 is where I see some lingering problems. It creates > > > XLogAcceptW

Re: [Patch] ALTER SYSTEM READ ONLY

2021-07-28 Thread Amul Sul
On Wed, Jul 28, 2021 at 2:26 AM Robert Haas wrote: > > On Fri, Jul 23, 2021 at 4:03 PM Robert Haas wrote: > > My 0003 is where I see some lingering problems. It creates > > XLogAcceptWrites(), moves the appropriate stuff there, and doesn't > > need the xlogreader. But it doesn't really solve the

Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb

2021-07-12 Thread Amul Sul
Thanks a lot Tom. On Tue, Jul 13, 2021 at 2:37 AM Tom Lane wrote: > > Amul Sul writes: > > [ v5_Add-RelationGetSmgr-inline-function.patch ] > > Pushed with minor cosmetic adjustments. > > RelationCopyStorage() kind of gives me the willies. > It's not really an smgr-

Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb

2021-07-11 Thread Amul Sul
On Fri, Jul 9, 2021 at 7:30 PM Alvaro Herrera wrote: > > On 2021-Jul-09, Amul Sul wrote: > > > > On Tue, Jul 6, 2021 at 11:06 PM Tom Lane wrote: > > > > > The point of the static-inline function idea was to be cheap enough > > > > that it

Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb

2021-07-09 Thread Amul Sul
On Wed, Jul 7, 2021 at 9:44 AM Amul Sul wrote: > > On Tue, Jul 6, 2021 at 11:06 PM Tom Lane wrote: > > > > Amul Sul writes: > > > On Tue, Apr 20, 2021 at 6:59 AM Kyotaro Horiguchi > > > wrote: > > >> I don't mind RelationGetSmgr(index)->s

Re: when the startup process doesn't (logging startup delays)

2021-07-09 Thread Amul Sul
Few comments for v4 patch: @@ -7351,6 +7363,8 @@ StartupXLOG(void) (errmsg("redo starts at %X/%X", LSN_FORMAT_ARGS(ReadRecPtr; + InitStartupProgress(); + /* * main redo apply loop */ @@ -7358,6

Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb

2021-07-06 Thread Amul Sul
On Tue, Jul 6, 2021 at 11:06 PM Tom Lane wrote: > > Amul Sul writes: > > On Tue, Apr 20, 2021 at 6:59 AM Kyotaro Horiguchi > > wrote: > >> I don't mind RelationGetSmgr(index)->smgr_rnode alone or > >> >member alone and there's not the previous call to

Re: "debug_invalidate_system_caches_always" is too long

2021-07-04 Thread Amul Sul
On Mon, Jul 5, 2021 at 1:57 AM Tom Lane wrote: > > As I've been poking around in this area, I find myself growing > increasingly annoyed at the new GUC name > "debug_invalidate_system_caches_always". It is too d*mn long. > It's a serious pain to type in any context where you don't have >

Re: New committers: Daniel Gustafsson and John Naylor

2021-06-30 Thread Amul Sul
On Thu, Jul 1, 2021 at 2:14 AM Tom Lane wrote: > > The Core Team would like to extend our congratulations to > Daniel Gustafsson and John Naylor, who have accepted invitations > to become our newest Postgres committers. > Many congratulations to Daniel & John ! Regards, Amul

Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options

2021-05-19 Thread Amul Sul
On Wed, May 19, 2021 at 2:09 PM Bharath Rupireddy wrote: > > Hi, > > parse_subscription_options function has some similar code when > throwing errors [with the only difference in the option]. I feel we > could just use a variable for the option and use it in the error. > While this has no benefit

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-11 Thread Amul Sul
On Tue, 11 May 2021 at 7:50 PM, Dilip Kumar wrote: > On Tue, May 11, 2021 at 6:56 PM Amul Sul wrote: > > > > On Tue, May 11, 2021 at 6:48 PM Dilip Kumar > wrote: > > > > > > On Tue, May 11, 2021 at 4:50 PM Amul Sul wrote: > > > > > > &g

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-11 Thread Amul Sul
On Tue, May 11, 2021 at 6:48 PM Dilip Kumar wrote: > > On Tue, May 11, 2021 at 4:50 PM Amul Sul wrote: > > > > On Tue, May 11, 2021 at 4:13 PM Dilip Kumar wrote: > > > I might be missing something, but assume the behavior should be like this > > > > >

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-11 Thread Amul Sul
On Tue, May 11, 2021 at 4:13 PM Dilip Kumar wrote: > > On Tue, May 11, 2021 at 3:38 PM Amul Sul wrote: > > > > On Tue, May 11, 2021 at 2:26 PM Dilip Kumar wrote: > > > > > > On Tue, May 11, 2021 at 2:16 PM Amul Sul wrote: > > > > >

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-11 Thread Amul Sul
On Tue, May 11, 2021 at 2:26 PM Dilip Kumar wrote: > > On Tue, May 11, 2021 at 2:16 PM Amul Sul wrote: > > > I get why you think that, I wasn't very precise in briefing the problem. > > > > Any new backend that gets connected right after the shar

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-11 Thread Amul Sul
On Tue, May 11, 2021 at 11:33 AM Dilip Kumar wrote: > > On Mon, May 10, 2021 at 10:25 PM Amul Sul wrote: > > > > Yes, we don't want any write slip in before UpdateFullPageWrites(). > > Recently[1], we have decided to let the Checkpointed process call > > XLog

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-10 Thread Amul Sul
On Mon, May 10, 2021 at 9:21 PM Robert Haas wrote: > > On Sun, May 9, 2021 at 1:26 AM Amul Sul wrote: > > The state in the control file also gets cleared. Though, after > > clearing in memory the state patch doesn't really do the immediate > > change to the control fil

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-08 Thread Amul Sul
On Fri, May 7, 2021 at 1:23 AM Robert Haas wrote: > > On Mon, Apr 12, 2021 at 10:04 AM Amul Sul wrote: > > Rebased again. > > I started to look at this today, and didn't get very far, but I have a > few comments. The main one is that I don't think this patch implements

Re: Remove redundant variable from transformCreateStmt

2021-05-02 Thread Amul Sul
On Fri, Apr 30, 2021 at 10:49 AM Bharath Rupireddy wrote: > > On Fri, Apr 30, 2021 at 7:07 AM Justin Pryzby wrote: > > > > On Thu, Apr 29, 2021 at 02:39:42PM -0400, Alvaro Herrera wrote: > > > On 2021-Apr-29, Tom Lane wrote: > > > > Alvaro Herrera writes: > > > > > I'd do it like this. Note I

Re: Skip temporary table schema name from explain-verbose output.

2021-04-29 Thread Amul Sul
quot;^(pg_temp)$") == 0 || +strcmp(schemabuf.data, "^(pg_toast_temp)$") == 0) +schemabuf.data[schemabuf.len-1] = '\0'; appendStringLiteralConn(buf, schemabuf.data, conn); if (PQserverVersion(conn) >= 12) appendPQExpBufferStr(buf, " COLLATE pg_catalog.default"); -- 2.18.0

Re: Skip temporary table schema name from explain-verbose output.

2021-04-27 Thread Amul Sul
On Tue, Apr 27, 2021 at 7:08 PM Bharath Rupireddy wrote: > > On Tue, Apr 27, 2021 at 6:59 PM Ashutosh Bapat > wrote: > > > > On Tue, Apr 27, 2021 at 12:23 PM Amul Sul wrote: > > > > > > > > How about using an explain filter to replace the unstabl

Re: Skip temporary table schema name from explain-verbose output.

2021-04-27 Thread Amul Sul
On Tue, Apr 27, 2021 at 11:07 AM Bharath Rupireddy wrote: > > On Tue, Apr 27, 2021 at 10:51 AM Amul Sul wrote: > > > > Hi, > > > > Temporary tables usually gets a unique schema name, see this: > > > > postgres=# create temp table foo(i int); > > CR

Skip temporary table schema name from explain-verbose output.

2021-04-26 Thread Amul Sul
Hi, Temporary tables usually gets a unique schema name, see this: postgres=# create temp table foo(i int); CREATE TABLE postgres=# explain verbose select * from foo; QUERY PLAN - Seq Scan on pg_temp_3.foo

Re: fix a comment

2021-04-24 Thread Amul Sul
On Sat, Apr 24, 2021 at 11:43 AM Michael Paquier wrote: > > On Fri, Apr 23, 2021 at 07:03:40AM +, wangyu...@fujitsu.com wrote: > > Agree. Please see the v2 patch which delete the number in comment. > > Indeed, this set of comments became a bit obsolete after 1375422, as > you saied upthread.

Re: fix a comment

2021-04-23 Thread Amul Sul
On Fri, Apr 23, 2021 at 12:12 PM wangyu...@fujitsu.com wrote: > > Hi, Hackers: > > In function ExecGetTriggerResultRel, we can see comments: > > > /* First, search through the query result relations */ ... > > /* > > * Third, search through the result relations that were created during > > *

<    1   2   3   4   >