pgsql: Fix removal of files in pgstats directories

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Fix removal of files in pgstats directories
Дата
Msg-id E1VBXQX-0006l3-NP@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix removal of files in pgstats directories

Instead of deleting all files in stats_temp_directory and the permanent
directory on a crash, only remove those files that match the pattern of
files we actually write in them, to avoid possibly clobbering existing
unrelated contents of the temporary directory.  Per complaint from Jeff
Janes, and subsequent discussion, starting at message
CAMkU=1z9+7RsDODnT4=cDFBRBp8wYQbd_qsLcMtKEf-oFwuOdQ@mail.gmail.com

Also, fix a bug in the same routine to avoid removing files from the
permanent directory twice (instead of once from that directory and then
from the temporary directory), also per report from Jeff Janes, in
message
CAMkU=1wbk947=-pAosDMX5VC+sQw9W4ttq6RM9rXu=MjNeEQKA@mail.gmail.com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f9b50b7c18c8ce7de1fee59409fe23c58d438190

Modified Files
--------------
src/backend/postmaster/pgstat.c |   33 ++++++++++++++++++++++++++++-----
1 file changed, 28 insertions(+), 5 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Rename the "fast_promote" file to just "promote".
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Fix removal of files in pgstats directories