Silly API for do_pg_start_backup()
От | Tom Lane |
---|---|
Тема | Silly API for do_pg_start_backup() |
Дата | |
Msg-id | 28752.1512413887@sss.pgh.pa.us обсуждение исходный текст |
Ответы |
Re: Silly API for do_pg_start_backup()
|
Список | pgsql-hackers |
Why is it that do_pg_start_backup() expects its callers to pass in an open DIR pointer for the pg_tblspc directory, rather than doing the AllocateDir call for itself? This complicates the callers, provides no flexibility (since do_pg_start_backup() is hardwired to know that pg_tblspc is what it was passed), and it doesn't seem to me to offer any robustness either. There are a couple of comments suggesting that somebody thought that opening the directory early might be good, but there's no defense of why, and I can't see that holding the directory open across a checkpoint request is adding robustness; if anything more the reverse, since it's a kernel resource we don't need during that phase. Barring objection I'll remove the tblspcdir parameter and have do_pg_start_backup() open and close the directory immediately around the loop where it's read, like every other case in the backend. regards, tom lane
В списке pgsql-hackers по дате отправления: