<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當(dāng)前位置: 首頁 - 科技 - 知識百科 - 正文

        Postgres文件所有者更改造成異常處理

        來源:懂視網(wǎng) 責(zé)編:小采 時間:2020-11-09 16:07:42
        文檔

        Postgres文件所有者更改造成異常處理

        Postgres文件所有者更改造成異常處理:Postgres文件所有者更改造成異常處理 本地一臺測試機,被同事一不小將根目錄下所有文件的屬主都改成了root( chown -R root:root /,這是個坑爹而且危險的操作),postgres數(shù)據(jù)庫是用其他用戶安裝的,上面還有其他應(yīng)用,這里簡單說下postgres數(shù)據(jù)庫的恢
        推薦度:
        導(dǎo)讀Postgres文件所有者更改造成異常處理:Postgres文件所有者更改造成異常處理 本地一臺測試機,被同事一不小將根目錄下所有文件的屬主都改成了root( chown -R root:root /,這是個坑爹而且危險的操作),postgres數(shù)據(jù)庫是用其他用戶安裝的,上面還有其他應(yīng)用,這里簡單說下postgres數(shù)據(jù)庫的恢

        Postgres文件所有者更改造成異常處理 本地一臺測試機,被同事一不小將根目錄下所有文件的屬主都改成了root( chown -R root:root /,這是個坑爹而且危險的操作),postgres數(shù)據(jù)庫是用其他用戶安裝的,上面還有其他應(yīng)用,這里簡單說下postgres數(shù)據(jù)庫的恢復(fù)過程

        Postgres文件所有者更改造成異常處理

        本地一臺測試機,被同事一不小將根目錄下所有文件的屬主都改成了root( chown -R root:root /,這是個坑爹而且危險的操作),postgres數(shù)據(jù)庫是用其他用戶安裝的,上面還有其他應(yīng)用,這里簡單說下postgres數(shù)據(jù)庫的恢復(fù)過程。

        1.環(huán)境

        OS:CentOS 6.2

        DB:postgres 9.2.4

        2.異常現(xiàn)象

        a.數(shù)據(jù)庫進程沒了

        b.日志情況

        [postgresql@localhost pg_log]$ tail -f postgresql-2013-05-06_000000.csv

        2013-05-06 17:11:21.923 CST,"test","testdb",664,"172.25.10.1:13906",51876c10.298,3,"idle",2013-05-06 16:38:40 CST,37/0,0,WARNING,57P02,"terminating connection because of crash of another server process","The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.","In a moment you should be able to reconnect to the database and repeat your command.",,,,,,,""

        2013-05-06 17:11:21.921 CST,"test","testdb",2633,"172.25.10.88:45681",5187730e.a49,3,"idle",2013-05-06 17:08:30 CST,14/0,0,WARNING,57P02,"terminating connection because of crash of another server process","The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.","In a moment you should be able to reconnect to the database and repeat your command.",,,,,,,""

        .....

        2013-05-06 17:11:21.926 CST,,,24842,,5162b7b7.610a,8,,2013-04-08 20:27:35 CST,,0,LOG,00000,"all server processes terminated; reinitializing",,,,,,,,,""

        2013-05-06 17:11:21.955 CST,,,24842,,5162b7b7.610a,9,,2013-04-08 20:27:35 CST,,0,LOG,42501,"could not open file ""postmaster.pid"": Permission denied",,,,,,,,,""

        2013-05-06 17:11:22.011 CST,,,24842,,5162b7b7.610a,10,,2013-04-08 20:27:35 CST,,0,PANIC,42501,"could not open control file ""global/pg_control"": Permission denied",,,,,,,,,""

        3.恢復(fù)過程

        a.首先改回用戶權(quán)限

        [root@localhost ~]#chown -R postgresql:postgresql /var/postgres

        [root@localhost ~]#chown -R postgresql:postgresql /data/pgdata

        b.重新啟動

        [postgresql@localhost pg_log]$ pg_start

        server starting

        [postgresql@localhost pg_log]$ FATAL: could not open lock file "/tmp/.s.PGSQL.lock": Permission denied

        could not open control file ""global/pg_control"": Permission denied

        重新啟動的時候發(fā)現(xiàn)數(shù)據(jù)庫仍然不能起來,但是這里給出了一個信息,tmp下socket文件權(quán)限不夠

        返回到root用戶下授權(quán),再啟動

        [root@localhost home]#cd /tmp

        [root@localhost tmp]#ls -a .s.PGSQL*

        .s.PGSQL.5432 .s.PGSQL.5432.lock

        [root@localhost tmp]#chown postgresql:postgresql ./.s.PGSQL*

        [root@localhost tmp]#su - postgresql

        [postgresql@localhost ~]$ pg_start

        --還是報上面的錯誤,因為socket文件是本地通信文件,故先刪除再啟動DB,平時沒事不要手賤去刪

        [root@localhost tmp]#rm -f ./.s.PGSQL*

        [postgresql@localhost ~]$ pg_start

        server starting

        [postgresql@localhost ~]$ LOG: could not bind Unix socket: Address already in use

        HINT: Is another postmaster already running on port 5432? If not, remove socket file "/tmp/.s.PGSQL.5432" and retry.

        WARNING: could not create Unix-domain socket

        c.登陸檢查

        [postgresql@localhost ~]$ psql

        psql: could not connect to server: No such file or directory

        Is the server running locally and accepting

        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

        [postgresql@localhost ~]$ psql -h 192.168.10.38

        Password:

        psql (9.2.4)

        Type "help" for help.

        postgres=# \q

        檢查了一下,剛才啟動的時候在tmp下面socket文件沒有生成,導(dǎo)致psql登陸直接報錯。若想psql能直接登陸,再重啟一下DB,socket文件會隨著服務(wù)器的啟動而生成。

        聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        Postgres文件所有者更改造成異常處理

        Postgres文件所有者更改造成異常處理:Postgres文件所有者更改造成異常處理 本地一臺測試機,被同事一不小將根目錄下所有文件的屬主都改成了root( chown -R root:root /,這是個坑爹而且危險的操作),postgres數(shù)據(jù)庫是用其他用戶安裝的,上面還有其他應(yīng)用,這里簡單說下postgres數(shù)據(jù)庫的恢
        推薦度:
        標(biāo)簽: 文件 更改 修改
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 国产永久免费高清在线| 黄页网址大全免费观看12网站| 中文字幕乱码系列免费| 亚洲精品无码永久在线观看 | 亚洲精品白色在线发布| 日本视频在线观看永久免费| 亚洲va无码手机在线电影| 黄色网址在线免费| 亚洲ⅴ国产v天堂a无码二区| 日本免费一区二区三区| 亚洲第一网站免费视频| 噼里啪啦电影在线观看免费高清 | 亚洲视频在线观看免费视频| 亚洲精品一卡2卡3卡三卡四卡| 69xx免费观看视频| 国产精品亚洲精品青青青| 香蕉视频在线观看免费国产婷婷| 亚洲av无码日韩av无码网站冲| 内射无码专区久久亚洲| 亚洲精品黄色视频在线观看免费资源 | 豆国产96在线|亚洲| 亚洲伦乱亚洲h视频| baoyu777永久免费视频| 精品无码一区二区三区亚洲桃色 | 国产精品美女免费视频观看| 亚洲AV无码国产丝袜在线观看 | 人人公开免费超级碰碰碰视频| 午夜亚洲av永久无码精品| 久草免费福利在线| 亚洲免费在线播放| 天堂在线免费观看中文版| 精品久久久久久国产免费了| 亚洲大片在线观看| 精品久久洲久久久久护士免费 | 久久成人永久免费播放| 亚洲校园春色小说| 国产一级一片免费播放i| 97无码人妻福利免费公开在线视频 | 在线视频亚洲一区| 久久亚洲私人国产精品vA| 永久黄网站色视频免费|