From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgstat_reset_remove_files ignores its argument |
Date: | 2013-08-16 19:38:09 |
Message-ID: | CA+Tgmoa+0F7fnY7v1PZZarK4hd07r48yCbg1R+KSXbzYzdAoVw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Aug 14, 2013 at 12:13 AM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
> in 9.3 and 9.4, pgstat_reset_remove_files uses the global variable
> pgstat_stat_directory rather than the argument it is passed, "directory".
> On crash recovery, this means the tmp directory gets cleared twice and the
> permanent pg_stat doesn't get cleared at all.
>
> It seems like the obvious one line change would fix it, but I haven't tested
> it because I don't know how to cause a crash without pg_stat already being
> empty.
I think there are three lines to change, as in the attached patch.
Am I wrong?
...Robert
Attachment | Content-Type | Size |
---|---|---|
pgstat-reset-remove-files.patch | application/octet-stream | 859 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2013-08-16 19:47:51 | Re: pgstat_reset_remove_files ignores its argument |
Previous Message | Robert Haas | 2013-08-16 19:35:21 | Re: [PATCH] pg_sleep(interval) |