Re: Unlogged tables cleanup
От | Robert Haas |
---|---|
Тема | Re: Unlogged tables cleanup |
Дата | |
Msg-id | CA+TgmoYQchrqhs1pu=Dojd8jehtsmOjUTjucWJ_E4t2A6TPDbg@mail.gmail.com обсуждение исходный текст |
Ответ на | Unlogged tables cleanup (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>) |
Ответы |
Re: Unlogged tables cleanup
|
Список | pgsql-hackers |
On Wed, Nov 9, 2016 at 11:56 AM, Konstantin Knizhnik <k.knizhnik@postgrespro.ru> wrote: > Now simulate server crash using using "pkill -9 postgres". > > knizhnik@knizhnik:~/dtm-data$ rm -f logfile ; pg_ctl -D pgsql.master -l > logfile start > pg_ctl: another server might be running; trying to start server anyway > server starting > knizhnik@knizhnik:~/dtm-data$ psql postgres > psql (10devel) > Type "help" for help. > > postgres=# select * from foo; > ERROR: could not open file "pg_tblspc/16384/PG_10_201611041/12289/16385": > No such file or directory > > knizhnik@knizhnik:~/dtm-data$ ls fs > PG_10_201611041 > knizhnik@knizhnik:~/dtm-data$ ls fs/PG_10_201611041/ > > So all relation directory is removed! > It happens only for first table created in tablespace. > If you create table in Postgres data directory everything is ok: first > segment of relation is truncated but not deleted. Whoa. There should be an _init fork that doesn't get removed, and without removing the _init fork you shouldn't be able to remove the directory that contains it. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: