Re: Does PostgreSQL check database integrity at startup?
| От | Stephen Frost |
|---|---|
| Тема | Re: Does PostgreSQL check database integrity at startup? |
| Дата | |
| Msg-id | 20171230011315.GC2416@tamriel.snowman.net обсуждение |
| Ответ на | Re: Does PostgreSQL check database integrity at startup? (Edson Carlos Ericksson Richter <richter@simkorp.com.br>) |
| Ответы |
Re: Does PostgreSQL check database integrity at startup?
Re: Does PostgreSQL check database integrity at startup? |
| Список | pgsql-general |
Greetings, * Edson Carlos Ericksson Richter (richter@simkorp.com.br) wrote: > There should be a "catalog" that point where tables are stored in physical > files (I think, at least, because at some point PostgreSQL need to know from > where to read the data). Yes, it's pg_class. Specifically, the relfilenode. > Based on information from this catalog, would I have a tool (perhaps, a C > function) that check that data is really there? You could write such a function, but it wouldn't be able to be general purpose as a zero-byte file is, in fact, a valid file. You could just as easily do a 'select 1 from table limit 1;' and make sure that you get back a successful, single-row, result, if you wish to verify that certain tables in your database always have at least 1 row. Thanks! Stephen
Вложения
В списке pgsql-general по дате отправления: