簡體   English   中英

postgres 重啟后視圖丟失

[英]View missing after postgres restart

當我創建這樣的 postgres 視圖時;

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

然后我重新啟動使用;

sudo systemctl restart postgresql

然后我的視圖消失了,我如何使它永久化?

我創建了一個新的測試數據庫和視圖,重新啟動了數據庫,視圖按預期可用,postgres 沒有問題。 隨后將行為跟蹤到作用於數據庫的啟動腳本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM