暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

lightdb for postgresql 系列【lt_initdb手工创建实例】

原创 姚崇 2022-03-18
513

指定端口、DATA目录和字符编码创建实例

[lightdb@localhost bin]$ ./lt_initdb -p 8888 -D /home/lightdb/lightdb-8888 --wal-segsize=512 -E UTF8 --locale=en_US.UTF-8 The files belonging to this database system will be owned by user "lightdb". This user must also own the server process. The database cluster will be initialized with locale "en_US.UTF-8". The default text search configuration will be set to "english". Data page checksums are disabled. Data encryption is disabled. fixing permissions on existing directory /home/lightdb/lightdb-8888 ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... PRC creating configuration files ... ok running bootstrap script ... 2022-03-18 13:55:20.506513T @ not initialized 00000[2022-03-18 13:55:20 CST] 0 [27342] LOG: checkpoint starting: shutdown immediate 2022-03-18 13:55:20.507749T @ not initialized 00000[2022-03-18 13:55:20 CST] 0 [27342] LOG: checkpoint complete: wrote 207 buffers (1.3%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.002 s; sync files=0, longest=0.000 s, average=0.000 s; distance=720 kB, estimate=720 kB ok performing post-bootstrap initialization ... 2022-03-18 13:55:20.987538T @ not initialized 00000[2022-03-18 13:55:20 CST] 479 [27345] LOG: checkpoint starting: immediate force wait flush-all 2022-03-18 13:55:20.987538T @ not initialized 00000[2022-03-18 13:55:20 CST] 479 [27345] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false; 2022-03-18 13:55:20.994432T @ not initialized 00000[2022-03-18 13:55:20 CST] 479 [27345] LOG: checkpoint complete: wrote 844 buffers (5.2%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.006 s, sync=0.001 s, total=0.007 s; sync files=0, longest=0.000 s, average=0.000 s; distance=7556 kB, estimate=7556 kB 2022-03-18 13:55:20.994432T @ not initialized 00000[2022-03-18 13:55:20 CST] 479 [27345] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false; 2022-03-18 13:55:21.007561T @ not initialized 00000[2022-03-18 13:55:20 CST] 479 [27345] LOG: checkpoint starting: immediate force wait 2022-03-18 13:55:21.007561T @ not initialized 00000[2022-03-18 13:55:20 CST] 479 [27345] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false; 2022-03-18 13:55:21.008834T @ not initialized 00000[2022-03-18 13:55:20 CST] 479 [27345] LOG: checkpoint complete: wrote 0 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.002 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB, estimate=6800 kB 2022-03-18 13:55:21.008834T @ not initialized 00000[2022-03-18 13:55:20 CST] 479 [27345] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false; 2022-03-18 13:55:21.010152T @ not initialized 00000[2022-03-18 13:55:20 CST] 484 [27345] LOG: checkpoint starting: immediate force wait flush-all 2022-03-18 13:55:21.010152T @ not initialized 00000[2022-03-18 13:55:20 CST] 484 [27345] STATEMENT: CREATE DATABASE postgres; 2022-03-18 13:55:21.011564T @ not initialized 00000[2022-03-18 13:55:20 CST] 484 [27345] LOG: checkpoint complete: wrote 11 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.002 s; sync files=0, longest=0.000 s, average=0.000 s; distance=42 kB, estimate=6124 kB 2022-03-18 13:55:21.011564T @ not initialized 00000[2022-03-18 13:55:20 CST] 484 [27345] STATEMENT: CREATE DATABASE postgres; 2022-03-18 13:55:21.022479T @ not initialized 00000[2022-03-18 13:55:20 CST] 484 [27345] LOG: checkpoint starting: immediate force wait 2022-03-18 13:55:21.022479T @ not initialized 00000[2022-03-18 13:55:20 CST] 484 [27345] STATEMENT: CREATE DATABASE postgres; 2022-03-18 13:55:21.023772T @ not initialized 00000[2022-03-18 13:55:20 CST] 484 [27345] LOG: checkpoint complete: wrote 0 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.002 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB, estimate=5512 kB 2022-03-18 13:55:21.023772T @ not initialized 00000[2022-03-18 13:55:20 CST] 484 [27345] STATEMENT: CREATE DATABASE postgres; 2022-03-18 13:55:21.024022T @ not initialized 00000[2022-03-18 13:55:20 CST] 0 [27345] LOG: checkpoint starting: shutdown immediate 2022-03-18 13:55:21.024477T @ not initialized 00000[2022-03-18 13:55:20 CST] 0 [27345] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.001 s; sync files=0, longest=0.000 s, average=0.000 s; distance=1 kB, estimate=4961 kB ok syncing data to disk ... ok initdb: warning: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: /home/lightdb/lightdb-3066/lightdb-x/13.3-21.3/bin/lt_ctl -D /home/lightdb/lightdb-8888 -l logfile start Notice: It is recommended to use lt_initdb, otherwise some functions are unavailable. If you are run initdb directly, you can using like: $PGHOME/scripts/5_lightdb_modify_para.sh $PGHOME $PGDATA OLTP/OLAP shared_buffers(MB) effective_cache_size(MB) $PGPORT $PGHOME/scripts/6_lightdb_start.sh $PGHOME $PGDATA (if not started) $PGHOME/scripts/8_lightdb_create_extension.sh $PGHOME $PGPORT for optimised performance. INFO modify effective_cache_size successfully INFO modify wal_buffers successfully INFO modify max_wal_size successfully INFO modify min_wal_size successfully INFO modify random_page_cost successfully INFO modify max_parallel_maintenance_workers successfully INFO modify default_statistics_target successfully INFO modify min_parallel_index_scan_size successfully INFO modify transform_null_equals successfully INFO modify max_worker_processes successfully INFO modify auto_explain.log_min_duration successfully INFO modify max_parallel_workers successfully INFO modify logging_collector successfully INFO modify enable_partitionwise_aggregate successfully INFO modify shared_buffers successfully INFO modify pg_stat_statements.track_planning successfully INFO modify bgwriter_lru_maxpages successfully INFO modify parallel_setup_cost successfully INFO modify shared_preload_libraries successfully INFO modify track_io_timing successfully INFO modify log_min_messages successfully INFO modify temp_buffers successfully INFO modify commit_siblings successfully INFO modify min_parallel_table_scan_size successfully waiting for server to shut down.... done server stopped lt_initdb success
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论