Re: Checksum errors in pg_stat_database
От | Julien Rouhaud |
---|---|
Тема | Re: Checksum errors in pg_stat_database |
Дата | |
Msg-id | CAOBaU_ZAmGznYPwjkcVPR32M7aL5BsspeCHo__Q5UOYnWLkj7g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Checksum errors in pg_stat_database (Magnus Hagander <magnus@hagander.net>) |
Ответы |
Re: Checksum errors in pg_stat_database
Re: Checksum errors in pg_stat_database |
Список | pgsql-hackers |
On Fri, Feb 22, 2019 at 3:01 PM Magnus Hagander <magnus@hagander.net> wrote: > > It tracks things that happen in the general backends. Possibly we should also consider counting the errors actually foundwhen running base backups? OTOH, that part of the code doesn't really track things like databases (as it operates juston the raw data directory underneath), so that implementation would definitely not be as clean... Sorry I just realized that I totally forgot this part of the thread. While it's true that we operate on raw directory, I see that sendDir() already setup a isDbDir var, and if this is true lastDir should contain the oid of the underlying database. Wouldn't it be enough to call sendFile() using this, something like (untested): if (!sizeonly) - sent = sendFile(pathbuf, pathbuf + basepathlen + 1, &statbuf, true); + sent = sendFile(pathbuf, pathbuf + basepathlen + 1, &statbuf, true, isDbDir ? pg_atoi(lastDir+1, 4) : InvalidOid); and accordingly report any checksum error from sendFile()?
В списке pgsql-hackers по дате отправления: