Re: Is Recovery actually paused?

2021-03-11 Thread Dilip Kumar
On Fri, 12 Mar 2021 at 2:04 AM, Robert Haas wrote: > On Mon, Mar 1, 2021 at 12:08 AM Dilip Kumar wrote: > > > > > I'll wait for a day before marking this RfC in case anyone have > > > > > further comments. > > > > > > > > Okay. > > > > > > Hearing nothing, done that. > > > > Thanks. > >

Re: Is Recovery actually paused?

2021-03-11 Thread Robert Haas
On Mon, Mar 1, 2021 at 12:08 AM Dilip Kumar wrote: > > > > I'll wait for a day before marking this RfC in case anyone have > > > > further comments. > > > > > > Okay. > > > > Hearing nothing, done that. > > Thanks. Committed with minor cosmetic changes. -- Robert Haas EDB:

Re: Is Recovery actually paused?

2021-02-28 Thread Dilip Kumar
On Fri, Feb 26, 2021 at 1:33 PM Kyotaro Horiguchi wrote: > > At Thu, 25 Feb 2021 13:22:53 +0530, Dilip Kumar wrote > in > > On Thu, Feb 25, 2021 at 12:42 PM Kyotaro Horiguchi > > wrote: > > > The latest version applies (almost) cleanly to the current master and > > > works fine. > > > I don't

Re: Is Recovery actually paused?

2021-02-26 Thread Kyotaro Horiguchi
At Thu, 25 Feb 2021 13:22:53 +0530, Dilip Kumar wrote in > On Thu, Feb 25, 2021 at 12:42 PM Kyotaro Horiguchi > wrote: > > The latest version applies (almost) cleanly to the current master and > > works fine. > > I don't have further comment on this. > > > > I'll wait for a day before marking

Re: Is Recovery actually paused?

2021-02-24 Thread Dilip Kumar
On Thu, Feb 25, 2021 at 12:42 PM Kyotaro Horiguchi wrote: > > Thanks for your patience and sorry for having annoyed you. Thank you very much for your review and inputs. > The latest version applies (almost) cleanly to the current master and > works fine. > I don't have further comment on this.

Re: Is Recovery actually paused?

2021-02-24 Thread Kyotaro Horiguchi
At Thu, 25 Feb 2021 09:49:15 +0530, Dilip Kumar wrote in > On Thu, Feb 25, 2021 at 6:52 AM Kyotaro Horiguchi > wrote: > > > Recently we have mildly changed to the direction to utilize the > > compiler warning about enum coverage in switch struct. (Maybe we need > > another compiler option

Re: Is Recovery actually paused?

2021-02-24 Thread Dilip Kumar
On Thu, Feb 25, 2021 at 6:52 AM Kyotaro Horiguchi wrote: > Recently we have mildly changed to the direction to utilize the > compiler warning about enum coverage in switch struct. (Maybe we need > another compiler option that enables that check for switch'es with the > default case, though.) In

Re: Is Recovery actually paused?

2021-02-24 Thread Kyotaro Horiguchi
At Wed, 24 Feb 2021 15:25:57 +0530, Dilip Kumar wrote in > On Wed, Feb 24, 2021 at 2:26 PM Kyotaro Horiguchi > wrote: > > I should have took the meaning of "confirm" wrongly. I took that as > > "somehow determine if the recovery is to be paused". If that reading > > is completely wrong, I

Re: Is Recovery actually paused?

2021-02-24 Thread Dilip Kumar
On Wed, Feb 24, 2021 at 3:25 PM Dilip Kumar wrote: > > > > > The reason for the checkpoint is to move to "paused" state in a > > > > reasonable time. I think we need to mention that reason rather than > > > > what is done here. > > > > > > I will do that. I have fixed this. > > > > > > > > +

Re: Is Recovery actually paused?

2021-02-24 Thread Dilip Kumar
On Wed, Feb 24, 2021 at 2:26 PM Kyotaro Horiguchi wrote: > > At Wed, 24 Feb 2021 13:15:27 +0530, Dilip Kumar wrote > in > > On Wed, Feb 24, 2021 at 12:39 PM Kyotaro Horiguchi > > wrote: > > > > > > At Tue, 23 Feb 2021 12:03:32 +0530, Dilip Kumar > > > wrote in > > > > On Fri, Feb 12, 2021 at

Re: Is Recovery actually paused?

2021-02-24 Thread Kyotaro Horiguchi
At Wed, 24 Feb 2021 17:56:41 +0900 (JST), Kyotaro Horiguchi wrote in > At Wed, 24 Feb 2021 13:15:27 +0530, Dilip Kumar wrote > in > > > After the renaming of the function, the following structure looks > > > simpler and more natural. > > > > > > while (ConfirmRecoveryPaused()) > > > { > >

Re: Is Recovery actually paused?

2021-02-24 Thread Kyotaro Horiguchi
At Wed, 24 Feb 2021 13:15:27 +0530, Dilip Kumar wrote in > On Wed, Feb 24, 2021 at 12:39 PM Kyotaro Horiguchi > wrote: > > > > At Tue, 23 Feb 2021 12:03:32 +0530, Dilip Kumar > > wrote in > > > On Fri, Feb 12, 2021 at 3:26 AM Robert Haas wrote: > > How about something like this? > > > >

Re: Is Recovery actually paused?

2021-02-23 Thread Dilip Kumar
On Wed, Feb 24, 2021 at 12:39 PM Kyotaro Horiguchi wrote: > > At Tue, 23 Feb 2021 12:03:32 +0530, Dilip Kumar wrote > in > > On Fri, Feb 12, 2021 at 3:26 AM Robert Haas wrote: > > > There might be some more to say here, but those are things I notice on > > > a first read-through. > > > > Okay.

Re: Is Recovery actually paused?

2021-02-23 Thread Kyotaro Horiguchi
At Tue, 23 Feb 2021 12:03:32 +0530, Dilip Kumar wrote in > On Fri, Feb 12, 2021 at 3:26 AM Robert Haas wrote: > > There might be some more to say here, but those are things I notice on > > a first read-through. > > Okay. It seems to me all the suggestions are addressed in this version. +

Re: Is Recovery actually paused?

2021-02-22 Thread Dilip Kumar
On Fri, Feb 12, 2021 at 3:26 AM Robert Haas wrote: > > On Thu, Feb 11, 2021 at 6:07 AM Dilip Kumar wrote: > > > Thanks for the patch. I tested the new function and it works as > > > expected. I have no further comments on the v13 patch. > > > > Thanks for the review and testing. > > I don't see

Re: Is Recovery actually paused?

2021-02-11 Thread Kyotaro Horiguchi
At Fri, 12 Feb 2021 13:33:32 +0900, Yugo NAGATA wrote in > I don't think that we need to include the waiting approach in > pg_get_wal_replay_pause_state > patch. However, Horiguchi-san's patch may be useful for some users who want > pg_wal_replay_pause to wait until recovery gets paused instead

Re: Is Recovery actually paused?

2021-02-11 Thread Yugo NAGATA
On Thu, 11 Feb 2021 16:36:55 +0530 Dilip Kumar wrote: > On Thu, Feb 11, 2021 at 3:20 PM Bharath Rupireddy > wrote: > > > > On Wed, Feb 10, 2021 at 8:39 PM Dilip Kumar wrote: > > > > > > On Wed, Feb 10, 2021 at 10:02 AM Dilip Kumar > > > wrote: > > > > > > > > I don't find any problem with

Re: Is Recovery actually paused?

2021-02-11 Thread Robert Haas
On Thu, Feb 11, 2021 at 6:07 AM Dilip Kumar wrote: > > Thanks for the patch. I tested the new function and it works as > > expected. I have no further comments on the v13 patch. > > Thanks for the review and testing. I don't see a whole lot wrong with this patch, but I think there are some

Re: Is Recovery actually paused?

2021-02-11 Thread Dilip Kumar
On Thu, Feb 11, 2021 at 3:20 PM Bharath Rupireddy wrote: > > On Wed, Feb 10, 2021 at 8:39 PM Dilip Kumar wrote: > > > > On Wed, Feb 10, 2021 at 10:02 AM Dilip Kumar wrote: > > > > > > I don't find any problem with this approach as well, but I personally > > > feel that the other approach where

Re: Is Recovery actually paused?

2021-02-11 Thread Bharath Rupireddy
On Wed, Feb 10, 2021 at 8:39 PM Dilip Kumar wrote: > > On Wed, Feb 10, 2021 at 10:02 AM Dilip Kumar wrote: > > > > I don't find any problem with this approach as well, but I personally > > feel that the other approach where we don't wait in any API and just > > return the recovery pause state is

Re: Is Recovery actually paused?

2021-02-10 Thread Dilip Kumar
On Wed, Feb 10, 2021 at 10:02 AM Dilip Kumar wrote: > > I don't find any problem with this approach as well, but I personally > feel that the other approach where we don't wait in any API and just > return the recovery pause state is much simpler and more flexible. So > I will make the pending

Re: Is Recovery actually paused?

2021-02-09 Thread Dilip Kumar
On Wed, Feb 10, 2021 at 8:19 AM Kyotaro Horiguchi wrote: > > At Tue, 9 Feb 2021 12:27:21 +0530, Bharath Rupireddy > wrote in > > What I meant was that if we were to add waiting logic inside > > pg_wal_replay_pause, we should also have a timeout with some default > > value, to avoid

Re: Is Recovery actually paused?

2021-02-09 Thread Kyotaro Horiguchi
At Tue, 9 Feb 2021 12:27:21 +0530, Bharath Rupireddy wrote in > What I meant was that if we were to add waiting logic inside > pg_wal_replay_pause, we should also have a timeout with some default > value, to avoid pg_wal_replay_pause waiting forever in the waiting > loop. Within that timeout,

Re: Is Recovery actually paused?

2021-02-08 Thread Bharath Rupireddy
On Tue, Feb 9, 2021 at 11:30 AM Kyotaro Horiguchi wrote: > > At Tue, 9 Feb 2021 09:58:30 +0530, Bharath Rupireddy > wrote in > > On Tue, Feb 9, 2021 at 9:48 AM Dilip Kumar wrote: > > > > > > On Tue, Feb 9, 2021 at 8:54 AM Yugo NAGATA wrote: > > > > > > > > On Tue, 09 Feb 2021 10:58:04 +0900

Re: Is Recovery actually paused?

2021-02-08 Thread Kyotaro Horiguchi
Sorry, I made a mistake here. At Tue, 09 Feb 2021 14:55:23 +0900 (JST), Kyotaro Horiguchi wrote in > At Tue, 9 Feb 2021 09:47:58 +0530, Dilip Kumar wrote > in > > APIs the wait logic can be implemented in the application code which > > is actually using these APIs and IMHO that will give

Re: Is Recovery actually paused?

2021-02-08 Thread Kyotaro Horiguchi
At Tue, 9 Feb 2021 09:58:30 +0530, Bharath Rupireddy wrote in > On Tue, Feb 9, 2021 at 9:48 AM Dilip Kumar wrote: > > > > On Tue, Feb 9, 2021 at 8:54 AM Yugo NAGATA wrote: > > > > > > On Tue, 09 Feb 2021 10:58:04 +0900 (JST) > > > Kyotaro Horiguchi wrote: > > > > If we are going to introduce

Re: Is Recovery actually paused?

2021-02-08 Thread Kyotaro Horiguchi
At Tue, 9 Feb 2021 09:47:58 +0530, Dilip Kumar wrote in > On Tue, Feb 9, 2021 at 8:54 AM Yugo NAGATA wrote: > > > > On Tue, 09 Feb 2021 10:58:04 +0900 (JST) > > Kyotaro Horiguchi wrote: > > > > > At Mon, 8 Feb 2021 17:05:52 +0530, Dilip Kumar > > > wrote in > > > > On Mon, Feb 8, 2021 at

Re: Is Recovery actually paused?

2021-02-08 Thread Kyotaro Horiguchi
At Tue, 9 Feb 2021 12:23:23 +0900, Yugo NAGATA wrote in > On Tue, 09 Feb 2021 10:58:04 +0900 (JST) > Kyotaro Horiguchi wrote: > > I didn't asked about the internal logical correctness, but asked about > > *actual harm* revealed to users. I don't see any actual harm in the > > "wrong" transition

Re: Is Recovery actually paused?

2021-02-08 Thread Bharath Rupireddy
On Tue, Feb 9, 2021 at 9:48 AM Dilip Kumar wrote: > > On Tue, Feb 9, 2021 at 8:54 AM Yugo NAGATA wrote: > > > > On Tue, 09 Feb 2021 10:58:04 +0900 (JST) > > Kyotaro Horiguchi wrote: > > > > > At Mon, 8 Feb 2021 17:05:52 +0530, Dilip Kumar > > > wrote in > > > > On Mon, Feb 8, 2021 at 2:19 PM

Re: Is Recovery actually paused?

2021-02-08 Thread Dilip Kumar
On Tue, Feb 9, 2021 at 8:54 AM Yugo NAGATA wrote: > > On Tue, 09 Feb 2021 10:58:04 +0900 (JST) > Kyotaro Horiguchi wrote: > > > At Mon, 8 Feb 2021 17:05:52 +0530, Dilip Kumar > > wrote in > > > On Mon, Feb 8, 2021 at 2:19 PM Yugo NAGATA wrote: > > > > > > > > On Mon, 08 Feb 2021 17:32:46

Re: Is Recovery actually paused?

2021-02-08 Thread Dilip Kumar
D we should not go to the > > PAUSE_REQUESTED without going to NOT PAUSED) > > I didn't asked about the internal logical correctness, but asked about > *actual harm* revealed to users. I don't see any actual harm in the > "wrong" transition because: > > 1. It is not wron

Re: Is Recovery actually paused?

2021-02-08 Thread Yugo NAGATA
On Tue, 09 Feb 2021 10:58:04 +0900 (JST) Kyotaro Horiguchi wrote: > At Mon, 8 Feb 2021 17:05:52 +0530, Dilip Kumar wrote > in > > On Mon, Feb 8, 2021 at 2:19 PM Yugo NAGATA wrote: > > > > > > On Mon, 08 Feb 2021 17:32:46 +0900 (JST) > > > Kyotaro Horiguchi wrote: > > > > > > > At Mon, 8 Feb

Re: Is Recovery actually paused?

2021-02-08 Thread Kyotaro Horiguchi
At Mon, 8 Feb 2021 17:05:52 +0530, Dilip Kumar wrote in > On Mon, Feb 8, 2021 at 2:19 PM Yugo NAGATA wrote: > > > > On Mon, 08 Feb 2021 17:32:46 +0900 (JST) > > Kyotaro Horiguchi wrote: > > > > > At Mon, 8 Feb 2021 14:12:35 +0900, Yugo NAGATA > > > wrote in > > > > > > > I think the right

Re: Is Recovery actually paused?

2021-02-08 Thread Dilip Kumar
On Mon, Feb 8, 2021 at 2:19 PM Yugo NAGATA wrote: > > On Mon, 08 Feb 2021 17:32:46 +0900 (JST) > Kyotaro Horiguchi wrote: > > > At Mon, 8 Feb 2021 14:12:35 +0900, Yugo NAGATA wrote > > in > > > > > > I think the right fix should be that the state should never go from > > > > > > ‘paused’ to

Re: Is Recovery actually paused?

2021-02-08 Thread Yugo NAGATA
On Mon, 08 Feb 2021 17:32:46 +0900 (JST) Kyotaro Horiguchi wrote: > At Mon, 8 Feb 2021 14:12:35 +0900, Yugo NAGATA wrote in > > > > > I think the right fix should be that the state should never go from > > > > > ‘paused’ to ‘pause requested’ so I think pg_wal_replay_pause should > > > > >

Re: Is Recovery actually paused?

2021-02-08 Thread Kyotaro Horiguchi
At Mon, 8 Feb 2021 14:12:35 +0900, Yugo NAGATA wrote in > > > > I think the right fix should be that the state should never go from > > > > ‘paused’ to ‘pause requested’ so I think pg_wal_replay_pause should > > > > take > > > > care of that. > > > > > > It makes sense to take care of this in

Re: Is Recovery actually paused?

2021-02-07 Thread Yugo NAGATA
On Mon, 8 Feb 2021 09:35:00 +0530 Dilip Kumar wrote: > On Mon, Feb 8, 2021 at 8:18 AM Yugo NAGATA wrote: > > > > On Mon, 8 Feb 2021 07:51:22 +0530 > > Dilip Kumar wrote: > > > > > On Mon, 8 Feb 2021 at 6:38 AM, Yugo NAGATA wrote: > > > > > > > Hi, > > > > > > > > On Sun, 7 Feb 2021 19:27:02

Re: Is Recovery actually paused?

2021-02-07 Thread Dilip Kumar
On Mon, Feb 8, 2021 at 9:49 AM Bharath Rupireddy wrote: > > On Mon, Feb 8, 2021 at 9:35 AM Dilip Kumar wrote: > > > > > If a user call pg_wal_replay_pause while waiting in > > > > > RecoveryRequiresIntParameter, > > > > > the state become 'pause requested' and this never returns to 'paused'. > >

Re: Is Recovery actually paused?

2021-02-07 Thread Bharath Rupireddy
On Mon, Feb 8, 2021 at 9:35 AM Dilip Kumar wrote: > > > > If a user call pg_wal_replay_pause while waiting in > > > > RecoveryRequiresIntParameter, > > > > the state become 'pause requested' and this never returns to 'paused'. > > > > Should we check recoveryPauseState in this loop as in > > > >

Re: Is Recovery actually paused?

2021-02-07 Thread Dilip Kumar
On Mon, Feb 8, 2021 at 8:18 AM Yugo NAGATA wrote: > > On Mon, 8 Feb 2021 07:51:22 +0530 > Dilip Kumar wrote: > > > On Mon, 8 Feb 2021 at 6:38 AM, Yugo NAGATA wrote: > > > > > Hi, > > > > > > On Sun, 7 Feb 2021 19:27:02 +0530 > > > Dilip Kumar wrote: > > > > > > > On Sun, Feb 7, 2021 at 6:44 PM

Re: Is Recovery actually paused?

2021-02-07 Thread Yugo NAGATA
On Mon, 8 Feb 2021 07:51:22 +0530 Dilip Kumar wrote: > On Mon, 8 Feb 2021 at 6:38 AM, Yugo NAGATA wrote: > > > Hi, > > > > On Sun, 7 Feb 2021 19:27:02 +0530 > > Dilip Kumar wrote: > > > > > On Sun, Feb 7, 2021 at 6:44 PM Bharath Rupireddy > > > wrote: > > > > > > > > On Fri, Feb 5, 2021 at

Re: Is Recovery actually paused?

2021-02-07 Thread Dilip Kumar
On Mon, 8 Feb 2021 at 6:38 AM, Yugo NAGATA wrote: > Hi, > > On Sun, 7 Feb 2021 19:27:02 +0530 > Dilip Kumar wrote: > > > On Sun, Feb 7, 2021 at 6:44 PM Bharath Rupireddy > > wrote: > > > > > > On Fri, Feb 5, 2021 at 10:14 AM Bharath Rupireddy > > > wrote: > > > > > We can not do that,

Re: Is Recovery actually paused?

2021-02-07 Thread Yugo NAGATA
Hi, On Sun, 7 Feb 2021 19:27:02 +0530 Dilip Kumar wrote: > On Sun, Feb 7, 2021 at 6:44 PM Bharath Rupireddy > wrote: > > > > On Fri, Feb 5, 2021 at 10:14 AM Bharath Rupireddy > > wrote: > > > > We can not do that, basically, under one lock we need to check the > > > > state and set it to

Re: Is Recovery actually paused?

2021-02-07 Thread Dilip Kumar
On Sun, Feb 7, 2021 at 6:44 PM Bharath Rupireddy wrote: > > On Fri, Feb 5, 2021 at 10:14 AM Bharath Rupireddy > wrote: > > > We can not do that, basically, under one lock we need to check the > > > state and set it to pause. Because by the time you release the lock > > > someone might set it to

Re: Is Recovery actually paused?

2021-02-07 Thread Bharath Rupireddy
On Fri, Feb 5, 2021 at 10:14 AM Bharath Rupireddy wrote: > > We can not do that, basically, under one lock we need to check the > > state and set it to pause. Because by the time you release the lock > > someone might set it to RECOVERY_NOT_PAUSED then you don't want to set > > it to

Re: Is Recovery actually paused?

2021-02-04 Thread Bharath Rupireddy
On Fri, Feb 5, 2021 at 10:06 AM Dilip Kumar wrote: > > On Fri, Feb 5, 2021 at 6:22 AM Bharath Rupireddy > wrote: > > > > On Thu, Feb 4, 2021 at 7:20 PM Dilip Kumar wrote: > > > > How can we do that this is not a 1 byte flag this is enum so I don't > > > > think we can read any atomic state

Re: Is Recovery actually paused?

2021-02-04 Thread Dilip Kumar
On Fri, Feb 5, 2021 at 6:22 AM Bharath Rupireddy wrote: > > On Thu, Feb 4, 2021 at 7:20 PM Dilip Kumar wrote: > > > How can we do that this is not a 1 byte flag this is enum so I don't > > > think we can read any atomic state without a spin lock here. > > > > I have fixed the other comments and

Re: Is Recovery actually paused?

2021-02-04 Thread Dilip Kumar
On Thu, Feb 4, 2021 at 10:19 PM Robert Haas wrote: > > On Thu, Feb 4, 2021 at 7:46 AM Dilip Kumar wrote: > > How can we do that this is not a 1 byte flag this is enum so I don't > > think we can read any atomic state without a spin lock here. > > I think this discussion of atomics is confused.

Re: Is Recovery actually paused?

2021-02-04 Thread Bharath Rupireddy
On Thu, Feb 4, 2021 at 7:20 PM Dilip Kumar wrote: > > How can we do that this is not a 1 byte flag this is enum so I don't > > think we can read any atomic state without a spin lock here. > > I have fixed the other comments and the updated patch is attached. Can we just do like below so that we

Re: Is Recovery actually paused?

2021-02-04 Thread Robert Haas
On Thu, Feb 4, 2021 at 7:46 AM Dilip Kumar wrote: > How can we do that this is not a 1 byte flag this is enum so I don't > think we can read any atomic state without a spin lock here. I think this discussion of atomics is confused. Let's talk about what atomic reads and writes mean. Imagine that

Re: Is Recovery actually paused?

2021-02-04 Thread Dilip Kumar
On Thu, Feb 4, 2021 at 6:16 PM Dilip Kumar wrote: > > On Thu, Feb 4, 2021 at 4:58 PM Bharath Rupireddy > wrote: > > > > On Thu, Feb 4, 2021 at 10:28 AM Dilip Kumar wrote: > > > Please find an updated patch which addresses these comments. > > > > Thanks for the patch. I tested the new function

Re: Is Recovery actually paused?

2021-02-04 Thread Dilip Kumar
On Thu, Feb 4, 2021 at 4:58 PM Bharath Rupireddy wrote: > > On Thu, Feb 4, 2021 at 10:28 AM Dilip Kumar wrote: > > Please find an updated patch which addresses these comments. > > Thanks for the patch. I tested the new function pg_get_wal_replay_pause_state: > > postgres=# select

Re: Is Recovery actually paused?

2021-02-04 Thread Dilip Kumar
On Thu, Feb 4, 2021 at 4:58 PM Bharath Rupireddy wrote: > > On Thu, Feb 4, 2021 at 10:28 AM Dilip Kumar wrote: > > Please find an updated patch which addresses these comments. > > Thanks for the patch. I tested the new function pg_get_wal_replay_pause_state: > > postgres=# select

Re: Is Recovery actually paused?

2021-02-04 Thread Bharath Rupireddy
On Thu, Feb 4, 2021 at 10:28 AM Dilip Kumar wrote: > Please find an updated patch which addresses these comments. Thanks for the patch. I tested the new function pg_get_wal_replay_pause_state: postgres=# select pg_get_wal_replay_pause_state(); pg_get_wal_replay_pause_state

Re: Is Recovery actually paused?

2021-02-03 Thread Dilip Kumar
On Mon, Feb 1, 2021 at 1:41 PM Dilip Kumar wrote: > > On Mon, Feb 1, 2021 at 11:59 AM Kyotaro Horiguchi > wrote: > > > > At Sun, 31 Jan 2021 11:24:30 +0530, Dilip Kumar > > wrote in > > > On Fri, Jan 29, 2021 at 4:33 PM Dilip Kumar wrote: > > > > > > > > On Fri, Jan 29, 2021 at 3:25 PM Yugo

Re: Is Recovery actually paused?

2021-02-01 Thread Dilip Kumar
On Mon, Feb 1, 2021 at 11:59 AM Kyotaro Horiguchi wrote: > > At Sun, 31 Jan 2021 11:24:30 +0530, Dilip Kumar wrote > in > > On Fri, Jan 29, 2021 at 4:33 PM Dilip Kumar wrote: > > > > > > On Fri, Jan 29, 2021 at 3:25 PM Yugo NAGATA wrote: > > > > > > > > On Thu, 28 Jan 2021 09:55:42 +0530 > >

Re: Is Recovery actually paused?

2021-01-31 Thread Kyotaro Horiguchi
At Sun, 31 Jan 2021 11:24:30 +0530, Dilip Kumar wrote in > On Fri, Jan 29, 2021 at 4:33 PM Dilip Kumar wrote: > > > > On Fri, Jan 29, 2021 at 3:25 PM Yugo NAGATA wrote: > > > > > > On Thu, 28 Jan 2021 09:55:42 +0530 > > > Dilip Kumar wrote: > > > > > > > On Wed, Jan 27, 2021 at 2:28 PM Dilip

Re: Is Recovery actually paused?

2021-01-30 Thread Dilip Kumar
On Fri, Jan 29, 2021 at 4:33 PM Dilip Kumar wrote: > > On Fri, Jan 29, 2021 at 3:25 PM Yugo NAGATA wrote: > > > > On Thu, 28 Jan 2021 09:55:42 +0530 > > Dilip Kumar wrote: > > > > > On Wed, Jan 27, 2021 at 2:28 PM Dilip Kumar wrote: > > > > > > > > On Wed, Jan 27, 2021 at 2:06 PM Yugo NAGATA

Re: Is Recovery actually paused?

2021-01-29 Thread Yugo NAGATA
On Fri, 29 Jan 2021 16:33:32 +0530 Dilip Kumar wrote: > On Fri, Jan 29, 2021 at 3:25 PM Yugo NAGATA wrote: > > > > On Thu, 28 Jan 2021 09:55:42 +0530 > > Dilip Kumar wrote: > > > > > On Wed, Jan 27, 2021 at 2:28 PM Dilip Kumar wrote: > > > > > > > > On Wed, Jan 27, 2021 at 2:06 PM Yugo NAGATA

Re: Is Recovery actually paused?

2021-01-29 Thread Dilip Kumar
On Fri, Jan 29, 2021 at 3:25 PM Yugo NAGATA wrote: > > On Thu, 28 Jan 2021 09:55:42 +0530 > Dilip Kumar wrote: > > > On Wed, Jan 27, 2021 at 2:28 PM Dilip Kumar wrote: > > > > > > On Wed, Jan 27, 2021 at 2:06 PM Yugo NAGATA wrote: > > > > > > > > On Wed, 27 Jan 2021 13:29:23 +0530 > > > >

Re: Is Recovery actually paused?

2021-01-29 Thread Yugo NAGATA
On Thu, 28 Jan 2021 09:55:42 +0530 Dilip Kumar wrote: > On Wed, Jan 27, 2021 at 2:28 PM Dilip Kumar wrote: > > > > On Wed, Jan 27, 2021 at 2:06 PM Yugo NAGATA wrote: > > > > > > On Wed, 27 Jan 2021 13:29:23 +0530 > > > Dilip Kumar wrote: > > > > > > > On Wed, Jan 27, 2021 at 12:50 PM Masahiko

Re: Is Recovery actually paused?

2021-01-27 Thread Dilip Kumar
On Wed, Jan 27, 2021 at 2:28 PM Dilip Kumar wrote: > > On Wed, Jan 27, 2021 at 2:06 PM Yugo NAGATA wrote: > > > > On Wed, 27 Jan 2021 13:29:23 +0530 > > Dilip Kumar wrote: > > > > > On Wed, Jan 27, 2021 at 12:50 PM Masahiko Sawada > > > wrote: > > > > > > > > On Tue, Jan 26, 2021 at 2:00 AM

Re: Is Recovery actually paused?

2021-01-27 Thread Dilip Kumar
On Wed, Jan 27, 2021 at 2:06 PM Yugo NAGATA wrote: > > On Wed, 27 Jan 2021 13:29:23 +0530 > Dilip Kumar wrote: > > > On Wed, Jan 27, 2021 at 12:50 PM Masahiko Sawada > > wrote: > > > > > > On Tue, Jan 26, 2021 at 2:00 AM Robert Haas wrote: > > > > > > > > On Sat, Jan 23, 2021 at 6:10 AM

Re: Is Recovery actually paused?

2021-01-27 Thread Yugo NAGATA
On Wed, 27 Jan 2021 13:29:23 +0530 Dilip Kumar wrote: > On Wed, Jan 27, 2021 at 12:50 PM Masahiko Sawada > wrote: > > > > On Tue, Jan 26, 2021 at 2:00 AM Robert Haas wrote: > > > > > > On Sat, Jan 23, 2021 at 6:10 AM Bharath Rupireddy > > > wrote: > > > > +1 to just show the recovery pause

Re: Is Recovery actually paused?

2021-01-26 Thread Dilip Kumar
On Wed, Jan 27, 2021 at 12:50 PM Masahiko Sawada wrote: > > On Tue, Jan 26, 2021 at 2:00 AM Robert Haas wrote: > > > > On Sat, Jan 23, 2021 at 6:10 AM Bharath Rupireddy > > wrote: > > > +1 to just show the recovery pause state in the output of > > > pg_is_wal_replay_paused. But, should the

Re: Is Recovery actually paused?

2021-01-26 Thread Masahiko Sawada
On Tue, Jan 26, 2021 at 2:00 AM Robert Haas wrote: > > On Sat, Jan 23, 2021 at 6:10 AM Bharath Rupireddy > wrote: > > +1 to just show the recovery pause state in the output of > > pg_is_wal_replay_paused. But, should the function name > > "pg_is_wal_replay_paused" be something like > >

Re: Is Recovery actually paused?

2021-01-25 Thread Robert Haas
On Sat, Jan 23, 2021 at 6:10 AM Bharath Rupireddy wrote: > +1 to just show the recovery pause state in the output of > pg_is_wal_replay_paused. But, should the function name > "pg_is_wal_replay_paused" be something like > "pg_get_wal_replay_pause_state" or some other? To me, when "is" exists > in

Re: Is Recovery actually paused?

2021-01-25 Thread Yugo NAGATA
On Mon, 25 Jan 2021 14:53:18 +0530 Dilip Kumar wrote: > I have changed as per other functions for consistency. Thank you for updating the patch. Here are a few comments: (1) - SetRecoveryPause(true); + SetRecoveryPause(RECOVERY_PAUSE_REQUESTED);

Re: Is Recovery actually paused?

2021-01-25 Thread Bharath Rupireddy
On Mon, Jan 25, 2021 at 2:53 PM Dilip Kumar wrote: > I have changed as per other functions for consistency. Thanks for the v7 patch. Here are some quick comments on it: [1] I think we need to change return value from boolean to text in documentation: pg_is_wal_replay_paused

Re: Is Recovery actually paused?

2021-01-25 Thread Dilip Kumar
On Sun, Jan 24, 2021 at 12:17 PM Bharath Rupireddy wrote: > > On Sun, Jan 24, 2021 at 11:29 AM Dilip Kumar wrote: > > > Some comments on the v6 patch: > > > > [2] Typo - it's "requested" + * 'paused requested' - if pause is > > > reqested but recovery is not yet paused > > Here I meant the typo

Re: Is Recovery actually paused?

2021-01-24 Thread Kyotaro Horiguchi
At Mon, 25 Jan 2021 10:05:19 +0530, Dilip Kumar wrote in > On Mon, Jan 25, 2021 at 8:42 AM Kyotaro Horiguchi > wrote: > > > > At Sun, 24 Jan 2021 14:26:08 +0530, Dilip Kumar > > wrote in > > > On Sun, Jan 24, 2021 at 12:16 PM Bharath Rupireddy > > > wrote: > > > > > > > > On Sun, Jan 24,

Re: Is Recovery actually paused?

2021-01-24 Thread Dilip Kumar
On Mon, Jan 25, 2021 at 8:42 AM Kyotaro Horiguchi wrote: > > At Sun, 24 Jan 2021 14:26:08 +0530, Dilip Kumar wrote > in > > On Sun, Jan 24, 2021 at 12:16 PM Bharath Rupireddy > > wrote: > > > > > > On Sun, Jan 24, 2021 at 7:17 AM Dilip Kumar wrote: > > > > On Sat, 23 Jan 2021 at 4:40 PM,

Re: Is Recovery actually paused?

2021-01-24 Thread Dilip Kumar
On Mon, Jan 25, 2021 at 6:12 AM Masahiko Sawada wrote: > > On Sun, Jan 17, 2021 at 5:19 PM Dilip Kumar wrote: > > > > On Sat, Jan 16, 2021 at 8:59 AM Masahiko Sawada > > wrote: > > > > > > On Wed, Jan 13, 2021 at 9:20 PM Dilip Kumar wrote: > > > > > > > > On Wed, Jan 13, 2021 at 3:35 PM Dilip

Re: Is Recovery actually paused?

2021-01-24 Thread Kyotaro Horiguchi
At Sun, 24 Jan 2021 14:26:08 +0530, Dilip Kumar wrote in > On Sun, Jan 24, 2021 at 12:16 PM Bharath Rupireddy > wrote: > > > > On Sun, Jan 24, 2021 at 7:17 AM Dilip Kumar wrote: > > > On Sat, 23 Jan 2021 at 4:40 PM, Bharath Rupireddy > > > wrote: > > >> > > >> On Sat, Jan 23, 2021 at 1:36

Re: Is Recovery actually paused?

2021-01-24 Thread Masahiko Sawada
On Sun, Jan 17, 2021 at 5:19 PM Dilip Kumar wrote: > > On Sat, Jan 16, 2021 at 8:59 AM Masahiko Sawada wrote: > > > > On Wed, Jan 13, 2021 at 9:20 PM Dilip Kumar wrote: > > > > > > On Wed, Jan 13, 2021 at 3:35 PM Dilip Kumar wrote: > > > > > > > > On Wed, Jan 13, 2021 at 3:27 PM Yugo NAGATA

Re: Is Recovery actually paused?

2021-01-24 Thread Dilip Kumar
On Sun, Jan 24, 2021 at 12:16 PM Bharath Rupireddy wrote: > > On Sun, Jan 24, 2021 at 7:17 AM Dilip Kumar wrote: > > On Sat, 23 Jan 2021 at 4:40 PM, Bharath Rupireddy > > wrote: > >> > >> On Sat, Jan 23, 2021 at 1:36 PM Dilip Kumar wrote: > >> > Please find the patch for the same. I haven't

Re: Is Recovery actually paused?

2021-01-23 Thread Bharath Rupireddy
On Sun, Jan 24, 2021 at 11:29 AM Dilip Kumar wrote: > > Some comments on the v6 patch: > > [2] Typo - it's "requested" + * 'paused requested' - if pause is > > reqested but recovery is not yet paused Here I meant the typo "reqested" in "if pause is reqested but recovery is not yet paused"

Re: Is Recovery actually paused?

2021-01-23 Thread Bharath Rupireddy
On Sun, Jan 24, 2021 at 7:17 AM Dilip Kumar wrote: > On Sat, 23 Jan 2021 at 4:40 PM, Bharath Rupireddy > wrote: >> >> On Sat, Jan 23, 2021 at 1:36 PM Dilip Kumar wrote: >> > Please find the patch for the same. I haven't added a test case for >> > this yet. I mean we can write a test case to

Re: Is Recovery actually paused?

2021-01-23 Thread Dilip Kumar
On Sat, Jan 23, 2021 at 4:40 PM Bharath Rupireddy wrote: > > On Sat, Jan 23, 2021 at 1:36 PM Dilip Kumar wrote: > > Please find the patch for the same. I haven't added a test case for > > this yet. I mean we can write a test case to pause the recovery and > > get the status. But I am not sure

Re: Is Recovery actually paused?

2021-01-23 Thread Dilip Kumar
On Sat, 23 Jan 2021 at 4:40 PM, Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > On Sat, Jan 23, 2021 at 1:36 PM Dilip Kumar wrote: > > Please find the patch for the same. I haven't added a test case for > > this yet. I mean we can write a test case to pause the recovery

Re: Is Recovery actually paused?

2021-01-23 Thread Bharath Rupireddy
On Sat, Jan 23, 2021 at 1:36 PM Dilip Kumar wrote: > Please find the patch for the same. I haven't added a test case for > this yet. I mean we can write a test case to pause the recovery and > get the status. But I am not sure that we can really write a reliable > test case for 'pause

Re: Is Recovery actually paused?

2021-01-23 Thread Dilip Kumar
On Sat, Jan 23, 2021 at 9:56 AM Dilip Kumar wrote: > > On Fri, Jan 22, 2021 at 2:18 AM Robert Haas wrote: > > > > On Mon, Jan 18, 2021 at 9:42 PM Yugo NAGATA wrote: > > > If it is acceptable that pg_is_wal_replay_paused() makes users wait, > > > I'm ok for the current interface. I don't feel

Re: Is Recovery actually paused?

2021-01-22 Thread Dilip Kumar
On Thu, Jan 21, 2021 at 6:20 PM Yugo NAGATA wrote: > > On Tue, 19 Jan 2021 21:32:31 +0530 > Dilip Kumar wrote: > > > On Tue, Jan 19, 2021 at 8:34 AM Dilip Kumar wrote: > > > > > > On Tue, 19 Jan 2021 at 8:12 AM, Yugo NAGATA wrote: > > >> > > >> On Sun, 17 Jan 2021 11:33:52 +0530 > > >> Dilip

Re: Is Recovery actually paused?

2021-01-22 Thread Dilip Kumar
On Fri, Jan 22, 2021 at 2:18 AM Robert Haas wrote: > > On Mon, Jan 18, 2021 at 9:42 PM Yugo NAGATA wrote: > > If it is acceptable that pg_is_wal_replay_paused() makes users wait, > > I'm ok for the current interface. I don't feel the need of > > pg_is_wal_replay_paluse_requeseted(). > > Another

Re: Is Recovery actually paused?

2021-01-21 Thread Robert Haas
On Mon, Jan 18, 2021 at 9:42 PM Yugo NAGATA wrote: > If it is acceptable that pg_is_wal_replay_paused() makes users wait, > I'm ok for the current interface. I don't feel the need of > pg_is_wal_replay_paluse_requeseted(). Another idea could be that pg_is_wal_replay_paused() could be changed to

Re: Is Recovery actually paused?

2021-01-21 Thread Yugo NAGATA
On Tue, 19 Jan 2021 21:32:31 +0530 Dilip Kumar wrote: > On Tue, Jan 19, 2021 at 8:34 AM Dilip Kumar wrote: > > > > On Tue, 19 Jan 2021 at 8:12 AM, Yugo NAGATA wrote: > >> > >> On Sun, 17 Jan 2021 11:33:52 +0530 > >> Dilip Kumar wrote: > >> > >> > On Thu, Jan 14, 2021 at 6:49 PM Yugo NAGATA

Re: Is Recovery actually paused?

2021-01-21 Thread Dilip Kumar
On Thu, Jan 21, 2021 at 3:29 PM Bharath Rupireddy wrote: Thanks for reviewing Bharat. > On Tue, Jan 19, 2021 at 9:32 PM Dilip Kumar wrote: > > In the last patch there were some local changes which I did not add to > > the patch and it was giving compilation warning so fixed that along > > with

Re: Is Recovery actually paused?

2021-01-21 Thread Bharath Rupireddy
On Tue, Jan 19, 2021 at 9:32 PM Dilip Kumar wrote: > In the last patch there were some local changes which I did not add to > the patch and it was giving compilation warning so fixed that along > with that I have addressed your this comment as well. Thanks for the patch. I took a look at the v5

Re: Is Recovery actually paused?

2021-01-19 Thread Dilip Kumar
On Tue, Jan 19, 2021 at 8:34 AM Dilip Kumar wrote: > > On Tue, 19 Jan 2021 at 8:12 AM, Yugo NAGATA wrote: >> >> On Sun, 17 Jan 2021 11:33:52 +0530 >> Dilip Kumar wrote: >> >> > On Thu, Jan 14, 2021 at 6:49 PM Yugo NAGATA wrote: >> > > >> > > On Wed, 13 Jan 2021 17:49:43 +0530 >> > > Dilip

Re: Is Recovery actually paused?

2021-01-18 Thread Dilip Kumar
to > > > actually get paused, but user have an option to cancel that. So I > > > agree that there is currently no option to just know that recovery > > > pause is requested without waiting for its actually get paused if it > > > is requested. So one option is we can

Re: Is Recovery actually paused?

2021-01-18 Thread Kyotaro Horiguchi
is requested. So one option is we can provide an another interface as > > you mentioned pg_is_wal_replay_paluse_requeseted(), which can just > > return the request status. I am not sure how useful it is. > > If it is acceptable that pg_is_wal_replay_paused() makes users wait, >

Re: Is Recovery actually paused?

2021-01-18 Thread Dilip Kumar
On Tue, 19 Jan 2021 at 8:12 AM, Yugo NAGATA wrote: > On Sun, 17 Jan 2021 11:33:52 +0530 > Dilip Kumar wrote: > > > On Thu, Jan 14, 2021 at 6:49 PM Yugo NAGATA wrote: > > > > > > On Wed, 13 Jan 2021 17:49:43 +0530 > > > Dilip Kumar wrote: > > > > > > > On Wed, Jan 13, 2021 at 3:35 PM Dilip

Re: Is Recovery actually paused?

2021-01-18 Thread Yugo NAGATA
On Sun, 17 Jan 2021 11:33:52 +0530 Dilip Kumar wrote: > On Thu, Jan 14, 2021 at 6:49 PM Yugo NAGATA wrote: > > > > On Wed, 13 Jan 2021 17:49:43 +0530 > > Dilip Kumar wrote: > > > > > On Wed, Jan 13, 2021 at 3:35 PM Dilip Kumar wrote: > > > > > > > > On Wed, Jan 13, 2021 at 3:27 PM Yugo NAGATA

Re: Is Recovery actually paused?

2021-01-17 Thread Dilip Kumar
On Sun, Jan 17, 2021 at 1:48 PM Dilip Kumar wrote: > > On Sat, Jan 16, 2021 at 8:59 AM Masahiko Sawada wrote: > > > > On Wed, Jan 13, 2021 at 9:20 PM Dilip Kumar wrote: > > > > > > On Wed, Jan 13, 2021 at 3:35 PM Dilip Kumar wrote: > > > > > > > > On Wed, Jan 13, 2021 at 3:27 PM Yugo NAGATA

Re: Is Recovery actually paused?

2021-01-17 Thread Dilip Kumar
On Sat, Jan 16, 2021 at 8:59 AM Masahiko Sawada wrote: > > On Wed, Jan 13, 2021 at 9:20 PM Dilip Kumar wrote: > > > > On Wed, Jan 13, 2021 at 3:35 PM Dilip Kumar wrote: > > > > > > On Wed, Jan 13, 2021 at 3:27 PM Yugo NAGATA wrote: > > > > > > > > On Thu, 10 Dec 2020 11:25:23 +0530 > > > >

Re: Is Recovery actually paused?

2021-01-16 Thread Dilip Kumar
On Thu, Jan 14, 2021 at 6:49 PM Yugo NAGATA wrote: > > On Wed, 13 Jan 2021 17:49:43 +0530 > Dilip Kumar wrote: > > > On Wed, Jan 13, 2021 at 3:35 PM Dilip Kumar wrote: > > > > > > On Wed, Jan 13, 2021 at 3:27 PM Yugo NAGATA wrote: > > > > > > > > On Thu, 10 Dec 2020 11:25:23 +0530 > > > >

Re: Is Recovery actually paused?

2021-01-16 Thread Dilip Kumar
On Sun, Jan 17, 2021 at 3:52 AM Masahiko Sawada wrote: > > On Sat, Jan 16, 2021 at 12:28 PM Masahiko Sawada > wrote: > > > > --- > > + /* test for recovery pause if user has requested the pause */ > > + if (((volatile XLogCtlData *) XLogCtl)->recoveryPause) > > +

Re: Is Recovery actually paused?

2021-01-16 Thread Masahiko Sawada
On Sat, Jan 16, 2021 at 12:28 PM Masahiko Sawada wrote: > > --- > + /* test for recovery pause if user has requested the pause */ > + if (((volatile XLogCtlData *) XLogCtl)->recoveryPause) > + recoveryPausesHere(false); > + > + now = GetCurrentTimestamp(); > + > > Hmm,

Re: Is Recovery actually paused?

2021-01-15 Thread Masahiko Sawada
On Wed, Jan 13, 2021 at 9:20 PM Dilip Kumar wrote: > > On Wed, Jan 13, 2021 at 3:35 PM Dilip Kumar wrote: > > > > On Wed, Jan 13, 2021 at 3:27 PM Yugo NAGATA wrote: > > > > > > On Thu, 10 Dec 2020 11:25:23 +0530 > > > Dilip Kumar wrote: > > > > > > > > > However, I wonder users don't expect

Re: Is Recovery actually paused?

2021-01-14 Thread Yugo NAGATA
On Wed, 13 Jan 2021 17:49:43 +0530 Dilip Kumar wrote: > On Wed, Jan 13, 2021 at 3:35 PM Dilip Kumar wrote: > > > > On Wed, Jan 13, 2021 at 3:27 PM Yugo NAGATA wrote: > > > > > > On Thu, 10 Dec 2020 11:25:23 +0530 > > > Dilip Kumar wrote: > > > > > > > > > However, I wonder users don't expect

  1   2   >