Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-03-23 Thread Fujii Masao
On 2020/03/23 15:56, Fujii Masao wrote: On 2020/03/19 19:39, Atsushi Torikoshi wrote: On Wed, Feb 26, 2020 at 9:19 PM Fujii Masao mailto:masao.fu...@oss.nttdata.com>> wrote:     I have no idea about this. But I wonder how much that change     is helpful to reduce the power consumption

Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-03-23 Thread Fujii Masao
On 2020/03/19 19:39, Atsushi Torikoshi wrote: On Wed, Feb 26, 2020 at 9:19 PM Fujii Masao mailto:masao.fu...@oss.nttdata.com>> wrote: I have no idea about this. But I wonder how much that change is helpful to reduce the power consumption because waiting for WAL archive during

Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-03-19 Thread Atsushi Torikoshi
On Wed, Feb 26, 2020 at 9:19 PM Fujii Masao wrote: > I have no idea about this. But I wonder how much that change > is helpful to reduce the power consumption because waiting > for WAL archive during the backup basically not so frequently > happens. > +1. And as far as I reviewed the patch, I

Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-02-26 Thread Fujii Masao
On 2020/02/18 12:39, Michael Paquier wrote: On Mon, Feb 17, 2020 at 10:21:23PM +0900, Fujii Masao wrote: On 2020/02/17 18:48, Michael Paquier wrote: Actually, I have some questions: 1) Should a new wait event be added in recoveryPausesHere()? That would be IMO useful. Yes, it's useful, I

Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-02-17 Thread Michael Paquier
On Mon, Feb 17, 2020 at 10:21:23PM +0900, Fujii Masao wrote: > On 2020/02/17 18:48, Michael Paquier wrote: >> Actually, I have some questions: >> 1) Should a new wait event be added in recoveryPausesHere()? That >> would be IMO useful. > > Yes, it's useful, I think. But it's better to implement

Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-02-17 Thread Fujii Masao
On 2020/02/17 18:48, Michael Paquier wrote: On Mon, Feb 17, 2020 at 04:30:00PM +0900, Fujii Masao wrote: On 2020/02/14 23:43, Robert Haas wrote: On Thu, Feb 13, 2020 at 10:47 PM Fujii Masao wrote: Fixed. Thanks for the review! I think it would be safer to just report the wait event

Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-02-17 Thread Michael Paquier
On Mon, Feb 17, 2020 at 04:30:00PM +0900, Fujii Masao wrote: > On 2020/02/14 23:43, Robert Haas wrote: >> On Thu, Feb 13, 2020 at 10:47 PM Fujii Masao >> wrote: >>> Fixed. Thanks for the review! >> >> I think it would be safer to just report the wait event during >> pg_usleep(100L) rather

Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-02-16 Thread Fujii Masao
On 2020/02/14 23:43, Robert Haas wrote: On Thu, Feb 13, 2020 at 10:47 PM Fujii Masao wrote: Fixed. Thanks for the review! I think it would be safer to just report the wait event during pg_usleep(100L) rather than putting those calls around the whole loop. It does not seem impossible

Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-02-16 Thread Fujii Masao
On 2020/02/14 15:45, Michael Paquier wrote: On Fri, Feb 14, 2020 at 12:47:19PM +0900, Fujii Masao wrote: logical_rewrite_truncate_v1.patch adds the description of LogicalRewriteTruncate into the doc. This needs to be back-patched to v10 where commit 249cf070e3 introduced

Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-02-14 Thread Robert Haas
On Thu, Feb 13, 2020 at 10:47 PM Fujii Masao wrote: > Fixed. Thanks for the review! I think it would be safer to just report the wait event during pg_usleep(100L) rather than putting those calls around the whole loop. It does not seem impossible that ereport() or CHECK_FOR_INTERRUPTS() could

Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-02-13 Thread Michael Paquier
On Fri, Feb 14, 2020 at 12:47:19PM +0900, Fujii Masao wrote: > logical_rewrite_truncate_v1.patch adds the description of > LogicalRewriteTruncate into the doc. This needs to be > back-patched to v10 where commit 249cf070e3 introduced > LogicalRewriteTruncate event. Indeed. You just be careful

Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-02-13 Thread Fujii Masao
On 2020/02/13 16:30, Michael Paquier wrote: On Thu, Feb 13, 2020 at 03:35:50PM +0900, Fujii Masao wrote: I found that the wait events "LogicalRewriteTruncate" and "GSSOpenServer" are not documented. I'm thinking to add them into doc separately if ok. Nice catch. The ordering of the entries

Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-02-12 Thread Michael Paquier
On Thu, Feb 13, 2020 at 03:35:50PM +0900, Fujii Masao wrote: > I found that the wait events "LogicalRewriteTruncate" and > "GSSOpenServer" are not documented. I'm thinking to add > them into doc separately if ok. Nice catch. The ordering of the entries is not respected either for GSSOpenServer

Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-02-12 Thread Fujii Masao
On 2020/02/13 12:28, Michael Paquier wrote: On Thu, Feb 13, 2020 at 02:29:20AM +0900, Fujii Masao wrote: When I saw pg_stat_activity.wait_event while pg_basebackup -X none is waiting for WAL archiving to finish, it was either NULL or CheckpointDone. I think this is confusing. What about

Re: Wait event that should be reported while waiting for WAL archiving to finish

2020-02-12 Thread Michael Paquier
On Thu, Feb 13, 2020 at 02:29:20AM +0900, Fujii Masao wrote: > When I saw pg_stat_activity.wait_event while pg_basebackup -X none > is waiting for WAL archiving to finish, it was either NULL or > CheckpointDone. I think this is confusing. What about introducing > new wait_event like

Wait event that should be reported while waiting for WAL archiving to finish

2020-02-12 Thread Fujii Masao
Hi, When I saw pg_stat_activity.wait_event while pg_basebackup -X none is waiting for WAL archiving to finish, it was either NULL or CheckpointDone. I think this is confusing. What about introducing new wait_event like WAIT_EVENT_BACKUP_WAIT_WAL_ARCHIVE (BackupWaitWalArchive) and reporting it