lightdb启动与停止
[zjh@hs-10-20-30-193 ~]$ lt_ctl -D lightdb-x-dev-server/data stop #停止 waiting for server to shut down............................... done server stopped [zjh@hs-10-20-30-193 ~]$ lt_ctl -D lightdb-x-dev-server/data start # 启动 waiting for server to start....2022-05-26 06:43:53.407933C @ postmaster 00000[2022-05-26 06:43:53 UTC] 0 [167878] LOG: LightDB autoprewarm: prewarm dbnum=0 2022-05-26 06:43:53.408078C @ postmaster 00000[2022-05-26 06:43:53 UTC] 0 [167878] LOG: Auto detecting pg_stat_kcache.linux_hz parameter... 2022-05-26 06:43:53.408093C @ postmaster 00000[2022-05-26 06:43:53 UTC] 0 [167878] LOG: pg_stat_kcache.linux_hz is set to 1000000 2022-05-26 06:43:53.410947C @ postmaster 00000[2022-05-26 06:43:53 UTC] 0 [167878] LOG: pgaudit extension initialized 2022-05-26 06:43:53.617145C @ postmaster 00000[2022-05-26 06:43:53 UTC] 0 [167878] LOG: redirecting log output to logging collector process 2022-05-26 06:43:53.617145C @ postmaster 00000[2022-05-26 06:43:53 UTC] 0 [167878] HINT: Future log output will appear in directory "log". done server started [zjh@hs-10-20-30-193 ~]$ lt_ctl --help lt_ctl is a utility to initialize, start, stop, or control a LightDB server. Usage: lt_ctl init[db] [-D DATADIR] [-s] [-o OPTIONS] lt_ctl start [-D DATADIR] [-l FILENAME] [-W] [-t SECS] [-K KEY-CMD] [-s] [-o OPTIONS] [-p PATH] [-c] lt_ctl stop [-D DATADIR] [-m SHUTDOWN-MODE] [-W] [-t SECS] [-s] lt_ctl restart [-D DATADIR] [-m SHUTDOWN-MODE] [-W] [-t SECS] [-K KEY-CMD] [-s] [-o OPTIONS] [-c] lt_ctl reload [-D DATADIR] [-s] lt_ctl status [-D DATADIR] lt_ctl promote [-D DATADIR] [-W] [-t SECS] [-s] lt_ctl logrotate [-D DATADIR] [-s] lt_ctl kill SIGNALNAME PID Common options: -D, --pgdata=DATADIR location of the database storage area -K, --encryption-key-command command that returns encryption key -s, --silent only print errors, no informational messages -t, --timeout=SECS seconds to wait when using -w option -V, --version output version information, then exit -w, --wait wait until operation completes (default) -W, --no-wait do not wait until operation completes -Y, --SM key file external import SM2/SM4 key file path -?, --help show this help, then exit If the -D option is omitted, the environment variable PGDATA is used. Options for start or restart: -c, --core-files allow lightdb to produce core files -l, --log=FILENAME write (or append) server log to FILENAME -o, --options=OPTIONS command line options to pass to postgres (PostgreSQL server executable) or initdb -p PATH-TO-POSTGRESQL normally not necessary Options for stop or restart: -m, --mode=MODE MODE can be "smart", "fast", or "immediate" Shutdown modes are: smart quit after all clients have disconnected fast quit directly, with proper shutdown (default) immediate quit without complete shutdown; will lead to recovery on restart Allowed signal names for kill: ABRT HUP INT KILL QUIT TERM USR1 USR2 Report bugs to <https://github.com/hslightdb>. LightDB home page: <https://www.hs.net/lightdb> [zjh@hs-10-20-30-193 ~]$ ltsql -Ulightdb ltsql (13.3-22.1) Type "help" for help. lightdb@postgres=# select current_user; current_user -------------- lightdb (1 row) lightdb@postgres=# show %data%; name | setting | description ---------------------+-------------------------+----------------------------------------------------------------- cron.database_name | postgres | Database in which pg_cron metadata is kept. data_checksums | off | Shows whether data checksums are turned on for this cluster. data_directory | /mnt/pmem0/data/data524 | Sets the server's data directory. data_directory_mode | 0700 | Mode of the data directory. data_encryption | off | Shows whether data encryption is turned on for this cluster. data_sync_retry | off | Whether to continue running after a failure to sync data files. (6 rows)
initdb选项会让lightdb启动程序进入bootstrap模式创建lightdb实例。
不重启修改参数
lightdb@postgres=# alter system set data_sync_retry=on; ALTER SYSTEM lightdb@postgres=# exit [zjh@hs-10-20-30-193 ~]$ lt_ctl -D lightdb-x-dev-server/data reload server signaled [zjh@hs-10-20-30-193 ~]$
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
2019-05-26 linux signal 处理
2019-05-26 freemarker null异常详解及兼容模式
2019-05-26 蓝绿部署、A/B测试以及灰度发布(金丝雀发布)
2019-05-26 动态BGP与静态BGP
2019-05-26 axios与ajax的区别及中文用户指南
2019-05-26 java poi excel给单元格增加批注(包含SXSSF)及设置列类型
2019-05-26 java图片处理(加水印、生成缩略图)等之Thumbnailator库