Re: Doesn't pgstat_report_wal() handle the argument "force" incorrectly

2023-09-24 Thread Ryoga Yoshida
; That's very clear and I think it's good. Ryoga Yoshida

Re: Doesn't pgstat_report_wal() handle the argument "force" incorrectly

2023-09-24 Thread Ryoga Yoshida
On 2023-09-25 12:47, Michael Paquier wrote: in attached file + /* like in pgstat.c, don't wait for lock acquisition when !force */ Isn't it the case with force=true and !force that it doesn't wait for the lock acquisition. In fact, force may be false. Ryoga Yoshida

Re: Doesn't pgstat_report_wal() handle the argument "force" incorrectly

2023-09-24 Thread Ryoga Yoshida
On 2023-09-25 09:56, Michael Paquier wrote: It seems to me that you are right here. It would make sense to me to say that force=true is equivalent to nowait=false, as in "I'm OK to wait on the lockas I want to make sure that the stats are flushed at this point". Currently force=true means nowai

Doesn't pgstat_report_wal() handle the argument "force" incorrectly

2023-09-21 Thread Ryoga Yoshida
Hi, pgstat_report_wal() calls pgstat_flush_wal() and pgstat_flush_io(). When calling them, pgstat_report_wal() specifies its argument "force" as the argument of them, as follows. But according to the code of pgstat_flush_wal() and pgstat_flush_io(), their argument is "nowait" and its meaning

Doesn't pgstat_report_wal() handle the argument "force" incorrectly

2023-09-21 Thread Ryoga Yoshida
s. /* don't wait for lock acquisition when !force */ nowait = !force; Ryoga Yoshida

Re: Bug fix in vacuumdb --buffer-usage-limit xxx -Z

2023-09-21 Thread Ryoga Yoshida
ing and it seemed like it would be difficult for me to fix, so I appreciate your help. Ryoga Yoshida

Bug fix in vacuumdb --buffer-usage-limit xxx -Z

2023-09-20 Thread Ryoga Yoshida
Hi, When --buffer-usage-limit option is specified, vacuumdb issues VACUUM or VACUUM ANALYZE command with BUFFER_USAGE_LIMIT option. Also if --buffer-usage-limit and -Z options are specified, vacuumdb should issue ANALYZE command with BUFFER_USAGE_LIMIT option. But it does not. That is, vacuum

Re: Bug fix for psql's meta-command \ev

2023-09-19 Thread Ryoga Yoshida
. Ryoga Yoshida

Fix bug in VACUUM and ANALYZE docs

2023-09-19 Thread Ryoga Yoshida
Hi, Issue1: VACUUM and ANALYZE docs explain that the parameter of BUFFER_USAGE_LIMIT is optional as follows. But this is not true. The argument, size, is required for BUFFER_USAGE_LIMIT. So the docs should be fixed this issue. BUFFER_USAGE_LIMIT [ size ] https://www.postgresql.org/docs/devel/s

Re: Bug fix for psql's meta-command \ev

2023-09-19 Thread Ryoga Yoshida
On 2023-09-19 15:29, Ryoga Yoshida wrote: You can see attached file. I didn't notice that Michael attached the patch file. Just ignore my file. I apologize for the inconvenience. Ryoga Yoshida

Re: Bug fix for psql's meta-command \ev

2023-09-18 Thread Ryoga Yoshida
On 2023-09-19 12:53, Michael Paquier wrote: Adding a comment looks important to me once we consider the edit as a path that can fail and the edited query is only executed then reset when we have PSQL_CMD_NEWEDIT as status. I would suggest the patch attached instead, taking care of the error case

Bug fix for psql's meta-command \ev

2023-09-14 Thread Ryoga Yoshida
Hi, When a table name is specified as the first argument of \ev meta-command, it reports the error message, the prompt string becomes "-#" and then the following valid query fails because the psql's query buffer contains the garbage string generated by failure of \ev. Please see the following