简体   繁体   中英

View missing after postgres restart

When I create a postgres view like this;

create view sp_pool_relay_cnt as 
select hash_id, count(hash_id) as relay_cnt from sp_pool_relay
group by hash_id;

Then i restart restart using;

sudo systemctl restart postgresql

then my view disappears, how do i make it permanent?

I created a new test database and view, restarted the database and the view was available as expected, no issue with postgres. subsequently tracked the behavior to a startup script acting on the database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM