Re: Operation log for major operations

Поиск
Список
Период
Сортировка
От Dmitry Koval
Тема Re: Operation log for major operations
Дата
Msg-id 69d49e4f-a7ab-e36b-cf2c-1e0809d0234a@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Operation log for major operations  (Ted Yu <yuzhihong@gmail.com>)
Ответы Re: Operation log for major operations  (Ted Yu <yuzhihong@gmail.com>)
Список pgsql-hackers
Thanks, Ted Yu!

 > Please update year for the license in pg_controllog.c

License updated for files pg_controllog.c, controllog_utils.c, 
pg_controllog.h, controllog_utils.h.

 > +check_file_exists(const char *datadir, const char *path)
 > There is existing helper function such as:
 > src/backend/utils/fmgr/dfmgr.c:static bool file_exists(const char *name);
 > Is it possible to reuse that code ?

There are a lot of functions that check the file existence:

1) src/backend/utils/fmgr/dfmgr.c:static bool file_exists(const char *name);
2) src/backend/jit/jit.c:static bool file_exists(const char *name);
3) src/test/regress/pg_regress.c:bool file_exists(const char *file);
4) src/bin/pg_upgrade/exec.c:bool pid_lock_file_exists(const char *datadir);
5) src/backend/commands/extension.c:bool extension_file_exists(const 
char *extensionName);

But there is no unified function: different components use their own 
function with their own specific.
Probably we can not reuse code of dfmgr.c:file_exists() because this 
function skip "errno == EACCES" (this error is critical for us).
I copied for src/bin/pg_rewind/file_ops.c:check_file_exists() code of 
function jit.c:file_exists() (with adaptation for the utility).

-- 
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com
Вложения

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

Предыдущее
От: shveta malik
Дата:
Сообщение: Re: Time delayed LR (WAS Re: logical replication restrictions)
Следующее
От: Maxim Orlov
Дата:
Сообщение: Re: Add SHELL_EXIT_CODE to psql