原创 BackgroundWriterMain代碼
提示: 由於工作原因文章還沒有弄完,請跳過,弄完後,會刪除此提示 基礎流程: BackgroundWriterMain BgBuffferSync-> SyncOneBuffer-> FlushBuffer()-> smgr
原创 postgresql時間函數j2date
代碼頁: backend/utils/adt/datetime.c 函數原型 extern void j2date(int jd, int *year, int *month, int *day); 函數解釋: 將時間jd轉換
原创 白話字符編碼和字符集
下面解釋是使用白話解釋。專業屬於請參考其他文檔 字符 字符代表的是一個字,如:一個英文’A’或者中文’王’ 字符集 字符集表示字符的集合,表示這個集合可以包含的字符的範圍。 如:ascii 無法保存漢字,因爲它範圍不夠。
原创 結構體強轉聯合體筆記
結構體強制轉換爲聯合體筆記 測試代碼1 int main() { //首先創建一個聯合體,聯合體內有兩個結構體 typedef union { struct {
原创 C語言中位移問題
聲明: 本文原創,一部分內容引用其他人博客,有個錯字,進行修復一下,本人特別討厭各種無理由複製粘貼,本篇文章只作爲自己參考使用,如有侵權,請原作聯繫本人。 博客鏈接 邏輯位移與算數位移 http://www.cnblogs.c
原创 sybase安裝過程Accessing a corrupted shared library
sybase安裝過程中遇到一些問題 當運行 ./setup.bin 時出現錯誤: ./setup.bin: line 2506: /tmp/install.dir.5624/Linux/resource/jre/bin/jav
原创 內存溢出之sprintf
在下面的代碼例子中,name可能來自用戶輸入,文件系統或者網絡。程序從字符串構造文件名,爲打開文件做準備 #include <stdio.h> void func(const char *name) { char fil
原创 postgresql 時間函數j2day
代碼頁: utils/adt/datetime.c 函數原型 extern int j2day(int jd); 函數解釋: convert Julian date to day-of-week (0..6 == Sun..
原创 eclipse出現Symbol could not be resolved解決方案
eclipse出現Symbol ‘NULL’ could not be resolved 借鑑老外解決方案:順便吐槽一下百度垃圾 :Here are the details if anybody else has thi
原创 /contrib/contrib-global.mk: No such file or directory
postgresql 安裝插件時提示找不到~global.mk 當postgresql 安裝插件時,遇到了/contrib/contrib-global.mk: 打開MakeFile ifdef USE_PGXS PG_CONFI
原创 批量修改postgresql索引大小寫
背景:由於項目遷移自別的數據庫,索引都帶引號,並且大小寫區分,遷移到pg中想去掉引號不區分大小寫(全是廢話,見代碼) create or replace function changetolower() returns void
原创 postgresql主備之the database system is starting up
主備配置完成以後:啓動slave出現下面問題: FATAL: the database system is starting up 問題定位: slave實例一直是備份模式並保持重放XLOG。 解決問題: 配置postg
原创 vmware虛擬機實現雙網卡固定ip
vmware 可以添加兩個網卡 一個網卡連接外網:使用NAT 一個網卡用於內網連接,使用主機模式 如何添加兩個網卡 1. 2. 3. 虛擬機內部設置 假定條件:你內部網卡配置是正確的 進入網卡設置文件夾 執行ifconfig -a
原创 oracle sqlplus 方向鍵不能用
安裝完oracle後,發現方向鍵不能用。 當點擊方向鍵時出現一些亂碼 網上的解決方案是安裝rlwrap 確實好用 不過需要在網上下載包,然後編譯安裝 在下載之前你可以試下search命令 yum search rlwrap
原创 directory "*" exists but is not empty
在使用pg_basebackup備份基礎數據的時候,遇到了錯誤 directory "/home/Thornger" exists but is not empty 經過檢查-D ‘/home/Thornger/data2’,指定