当前位置: 首页 > news >正文

宁波高质量品牌网站设计厂家做网站不用编程

宁波高质量品牌网站设计厂家,做网站不用编程,上海企业seo,潍坊网站收录目录 增加guc参数 initdb参数传递 pg_ctl参数传递 参数验证 新增guc参数pg_test_parameter#xff0c;支持从initdb和pg_ctl命令中传递/覆盖参数#xff0c;使用场景是TDE透明加密指定算法或者某些定制化需求。 增加guc参数 pg源码是这样描述guc参数的#xff1a;它是全局…目录 增加guc参数 initdb参数传递 pg_ctl参数传递 参数验证 新增guc参数pg_test_parameter支持从initdb和pg_ctl命令中传递/覆盖参数使用场景是TDE透明加密指定算法或者某些定制化需求。 增加guc参数 pg源码是这样描述guc参数的它是全局配置管理模式包括set命令、conf配置文件或其他方式指定参数我们postgresql.conf文件中所有参数都在这里面但它是conf文件超集还有一些配置是不能对用户提供的。 * Support for grand unified configuration scheme, including SET * command, configuration file, and command line options. * See src/backend/utils/misc/README for more information. 比如postgresql.conf中定义wal段大小的参数 {max_wal_size, PGC_SIGHUP, WAL_CHECKPOINTS,gettext_noop(Sets the WAL size that triggers a checkpoint.),NULL,GUC_UNIT_MB}, 本次我们新增1个guc参数pg_test_parameter直接仿照src/utils/misc/guc.c文件中的data_directory参数定义这个参数指定后也是不允许修改的并且在initdb和pg_ctl都需要指定跟我们本次想实现的参数类似但是两者的GucContext和config_group类型有差异 {data_directory, PGC_POSTMASTER, FILE_LOCATIONS,gettext_noop(Sets the servers data directory.),NULL,GUC_SUPERUSER_ONLY | GUC_DISALLOW_IN_AUTO_FILE},data_directory,NULL,NULL, NULL, NULL},{{pg_test_parameter, PGC_INTERNAL, PRESET_OPTIONS,gettext_noop(Sets pg test parameter.),NULL,GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE},pg_test_parameter,NULL,NULL, NULL, NULL}, 定义后就会有pg_test_parameter这个全局参数了但是定义参数要用起来。  initdb参数传递 支持initdb方式传递pg_test_parameter需要接受参数输入这里增加-p的参数读取与参数解析逻辑在/src/bin/initdb/initdb.c中 //增加-p参数printf(_( -p, --pg-test-parameter show pg_test_parameter settings\n)); //在main函数中把它定义为必须传递的参数static struct option long_options[] {// ...{pg-test-parameter, required_argument, NULL, N}// ...}; //增加参数解析while ((c getopt_long(argc, argv, A:dD:E:gkL:nNsST:U:WX:p:, long_options, option_index)) ! -1){switch (c){// ...case p:pg_test_parameter pg_strdup(optarg);break;// ...}} // 增加日志if (pg_test_parameter){printf(_(pg_test_parameter ok. \n));}elseprintf(_(pg_test_parameter not ok..\n)); 这里完成initdb的参数传递直接通过initdb -p abc方式将pg_test_parameter参数设置成abc。 pg_ctl参数传递 这里传入后根据需要读取 // 增加参数读入while ((flag getopt(argc, argv, B:p:c:d:D:Fkr:x:X:-:)) ! -1){switch (flag){// ...case p:pg_test_parameter pstrdup(optarg);break;// ... } } 参数验证 initdb指定-p参数 ./initdb -D ~/data -p abc The files belonging to this database system will be owned by user postgres. This user must also own the server process.The database cluster will be initialized with locale en_US.UTF-8. The default database encoding has accordingly been set to UTF8. The default text search configuration will be set to english.Data page checksums are disabled.creating directory /home/postgres/data ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Asia/Shanghai creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok pg_test_parameter 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:./pg_ctl -D /home/postgres/data -l logfile start查看参数调试中 postgres# show pg_test_parameter;pg_test_parameter -------------------(1 row)
http://www.hkea.cn/news/14257753/

相关文章:

  • wordpress 运行 php宁波seo推广服务
  • 做期货主要看哪个网站网站集约化建设会议议程
  • 设计网站轮廓模板php源码建站 一品资源
  • jfinal怎么做网站东莞市城乡建设规划局官网
  • 五常市网站wordpress 技术交流
  • 网站建设费是宣传费用吗辽宁省建设网站
  • 做网站学好哪些软件网站建设具体要求
  • 商城网站建站全媒体网站的建设
  • 网站关键词收入软件网站开发需要什么技术人员
  • 网站美工设计基础金山快盘为什么停止服务
  • 定制网站建设和运营龙斗seo博客
  • 网站备案和不备案的区别手表网站查询
  • 建一个单页网站百度免费网站申请注册
  • 网站建设及报价大连h5建站
  • 网站建设建设公司哪家好单页推广网站模版
  • 成都企业网站备案流程太原seo关键词排名优化
  • 网站上飘窗怎么做福建网站开发招聘
  • 杭州网站的制作郴州网站建设公司哪里有
  • 站长检测工具网站建设指导合同
  • 做网站的公司怎么拓展业务网站建设工作室wp主题模板
  • 网站设计 线框图哈尔滨的网络科技开发公司
  • 甘肃建设住房厅网站首页网站上传文件夹
  • 做网站需要交税官网开发建设公司地址电话
  • 做网站容易还是编程容易建模师工资一般多少
  • 湖南网站备案要多少天数据网站建设工具模板
  • 网站内容建设给我看免费观看
  • 网站备案扫描安宁区网站制作
  • 定制柜设计网站西安网红
  • 长宁区网站建设设招聘网站开发技术维护
  • 生成静态网站天津市招标采购网官网