通过DTS实现PG14迁移到人大金仓V8R6

迁移需求

xxx项目适配人大金仓,测试环境195pgsql数据库需要进行迁移至192.168.3.29 人大金仓数据库;

数据库信息

ip

os登录账号密码

数据库类型

数据库端口

数据库

数据库用户密码

源库

192.168.3.15

root/123456

PG14.2

5432

ahtjtestnew

ahtjtest/123456

目标库

192.168.3.75

root/123456

Kingbase V008R006C008B0014

54321

ahtjtestnew01

ahtjtest01/123456

迁移前准备

查数据库版本

源库PG

--查看数据库版本
select version(); --PostgreSQL 14.2或
--查进程
-bash-4.2$ ps -ef | grep postmaster
postgres  1504     1  0  2023 ?        00:09:48 /usr/pgsql-14/bin/postmaster -D /opt/postgreSQL/pgsqlData
postgres 15048 14988  0 13:53 pts/2    00:00:00 grep --color=auto postmaster--查版本
-bash-4.2$ psql -V
psql (PostgreSQL) 14.2

目标库Kingbase

[kingbase@topnet29 ~]$ ksql -Usystem -W test
口令:
输入 "help" 来获取帮助信息.
test=# select version();version                                                        
----------------------------------------------------------------------------------------------------------------------KingbaseES V008R006C008B0014 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28), 64-bit
(1 行记录)或
--查进程
[root@topnet29 ~]# ps -ef | grep Kingbase
root     15597 15531  0 13:20 pts/0    00:00:00 grep --color=auto Kingbase
kingbase 25325     1  0  2023 ?        00:10:16 /opt/Kingbase/ES/V8/KESRealPro/V008R006C008B0014/Server/bin/kingbase -D /opt/Kingbase/ES/V8/data
--查版本
[root@topnet29 ~]# su - kingbase
上一次登录:五 1月 12 15:17:29 CST 2024pts/4 上
[kingbase@topnet29 ~]$ ksql -V
ksql (Kingbase) V008R006C008B0014

查字符集

源库PG

--登录数据库
-bash-4.2$ psql -U ahtjtest -W -d ahtjtestnew
口令: 
psql (14.2)
输入 "help" 来获取帮助信息.--服务器实例字符集
ahtjtestnew=> show server_encoding;server_encoding 
-----------------UTF8
(1 行记录)--数据库字符集
ahtjtestnew=> \l+数据库列表hbzscq             | postgres      | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 |                                 | 1591 MB  | pg_default | hbzscqfx           | postgres      | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 |                                 | 374 MB   | pg_default | hmzlyth            | hmqzj         | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 | =Tc/hmqzj                      +| 13 MB    | pg_default | ahtjtestnew        | ahtjtest      | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 | =Tc/ahtjtest                   +| 422 MB   | pg_default | |               |          |             |             | ahtjtest=CTc/ahtjtest           |          |            | 
--客户端字符集
ahtjtestnew=> show client_encoding;client_encoding 
-----------------UTF8
(1 行记录)

目标库Kingbase

--登录数据库
[kingbase@topnet29 ~]$ ksql -Usystem -W test
口令:
输入 "help" 来获取帮助信息.--服务器实例字符集
test=#  show server_encoding;server_encoding 
-----------------UTF8
(1 行记录)--数据库字符集
test=# \l+                                                                                                                                                                                                                                 数据库列表名称          |     拥有者     | 字元编码 |  校对规则   |    Ctype    |             存取权限              |  大小   |   表空间    |                    描述                    
-----------------------+----------------+----------+-------------+-------------+-----------------------------------+---------+-------------+--------------------------------------------data_quality_dev      | system         | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 |                                   | 6115 MB | sys_default | data_quality_kingbase | system         | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 |                                   | 4648 MB | sys_default | data_quality_zh       | system         | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 | =Tc/system                       +| 15 MB   | sys_default | --客户端字符集
test=> show client_encoding;client_encoding 
-----------------UTF8
(1 行记录)

查源库用户权限PG

--查看用户权限
ahtjtestnew=> SELECT * FROM  pg_roles WHERE rolname='ahtjtest';rolname  | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcanlogin | rolreplication | rolconnlimit | rolpassword | rolvaliduntil | rolbypassrls | rolconfig |   oid   
----------+----------+------------+---------------+-------------+-------------+----------------+--------------+-------------+---------------+--------------+-----------+---------ahtjtest | f        | t          | f             | f           | t           | f              |           -1 | ********    |               | f            |           | 1007879
(1 行记录)

查函数和扩展

源库PG

--查函数
ahtjtestnew=> \df函数列表架构模式 |            名称             |   结果数据类型    |                                               参数数据类型                                               | 类型 
----------+-----------------------------+-------------------+----------------------------------------------------------------------------------------------------------+------public   | deal_pending_item_user_null | void              |                                                                                                          | 函数public   | dealunclosedpendingitem     | void              | querycount numeric, rootorgid text, rootorgname text                                                     | 函数public   | fun_compute_holiday         | bigint            | start_date text, end_date text, is_lastday_contains text                                                 | 函数public   | instr                       | integer           | character varying, character varying                                                                     | 函数public   | instr                       | integer           | string character varying, string_to_search_for character varying, beg_index integer                      | 函数public   | instr                       | integer           | string character varying, string_to_search_for character varying, beg_index integer, occur_index integer | 函数public   | partitiontableprocedure     | void              |                                                                                                          | 函数public   | sys_guid                    | character varying |                                                                                                          | 函数
(8 行记录)--查扩展
ahtjtestnew=> \dx已安装扩展列表名称   | 版本 |  架构模式  |             描述             
---------+------+------------+------------------------------plpgsql | 1.0  | pg_catalog | PL/pgSQL procedural language
(1 行记录)

目标库Kingbase

--查函数
test=# \x
扩展显示已打开.
test=# \df
函数列表
-[ RECORD 1 ]+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
架构模式     | public
名称         | sys_stat_statements
结果数据类型 | SETOF record
参数数据类型 | showtext boolean, OUT userid oid, OUT dbid oid, OUT queryid bigint, OUT query text, OUT parses bigint, OUT total_parse_time double precision, OUT min_parse_time double precision, OUT max_parse_time double precision, OUT mean_parse_time double precision, OUT stddev_parse_time double precision, OUT plans bigint, OUT total_plan_time double precision, OUT min_plan_time double precision, OUT max_plan_time double precision, OUT mean_plan_time double precision, OUT stddev_plan_time double precision, OUT calls bigint, OUT total_exec_time double precision, OUT min_exec_time double precision, OUT max_exec_time double precision, OUT mean_exec_time double precision, OUT stddev_exec_time double precision, OUT rows bigint, OUT shared_blks_hit bigint, OUT shared_blks_read bigint, OUT shared_blks_dirtied bigint, OUT shared_blks_written bigint, OUT local_blks_hit bigint, OUT local_blks_read bigint, OUT local_blks_dirtied bigint, OUT local_blks_written bigint, OUT temp_blks_read bigint, OUT temp_blks_written bigint, OUT blk_read_time double precision, OUT blk_write_time double precision
类型         | 函数
-[ RECORD 2 ]+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
架构模式     | public
名称         | sys_stat_statements_all
结果数据类型 | SETOF record
参数数据类型 | showtext boolean, OUT userid oid, OUT dbid oid, OUT queryid bigint, OUT parent_queryid bigint, OUT query text, OUT parses bigint, OUT total_parse_time double precision, OUT min_parse_time double precision, OUT max_parse_time double precision, OUT mean_parse_time double precision, OUT stddev_parse_time double precision, OUT plans bigint, OUT total_plan_time double precision, OUT min_plan_time double precision, OUT max_plan_time double precision, OUT mean_plan_time double precision, OUT stddev_plan_time double precision, OUT calls bigint, OUT total_exec_time double precision, OUT min_exec_time double precision, OUT max_exec_time double precision, OUT mean_exec_time double precision, OUT stddev_exec_time double precision, OUT rows bigint, OUT shared_blks_hit bigint, OUT shared_blks_read bigint, OUT shared_blks_dirtied bigint, OUT shared_blks_written bigint, OUT local_blks_hit bigint, OUT local_blks_read bigint, OUT local_blks_dirtied bigint, OUT local_blks_written bigint, OUT temp_blks_read bigint, OUT temp_blks_written bigint, OUT blk_read_time double precision, OUT blk_write_time double precision
类型         | 函数
-[ RECORD 3 ]+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
架构模式     | public
名称         | sys_stat_statements_limit_len
结果数据类型 | SETOF record
参数数据类型 | showtext boolean, limit_query_len integer, OUT userid oid, OUT dbid oid, OUT queryid bigint, OUT query text, OUT parses bigint, OUT total_parse_time double precision, OUT min_parse_time double precision, OUT max_parse_time double precision, OUT mean_parse_time double precision, OUT stddev_parse_time double precision, OUT plans bigint, OUT total_plan_time double precision, OUT min_plan_time double precision, OUT max_plan_time double precision, OUT mean_plan_time double precision, OUT stddev_plan_time double precision, OUT calls bigint, OUT total_exec_time double precision, OUT min_exec_time double precision, OUT max_exec_time double precision, OUT mean_exec_time double precision, OUT stddev_exec_time double precision, OUT rows bigint, OUT shared_blks_hit bigint, OUT shared_blks_read bigint, OUT shared_blks_dirtied bigint, OUT shared_blks_written bigint, OUT local_blks_hit bigint, OUT local_blks_read bigint, OUT local_blks_dirtied bigint, OUT local_blks_written bigint, OUT temp_blks_read bigint, OUT temp_blks_written bigint, OUT blk_read_time double precision, OUT blk_write_time double precision
类型         | 函数
-[ RECORD 4 ]+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
架构模式     | public
名称         | sys_stat_statements_reset
结果数据类型 | void
参数数据类型 | userid oid DEFAULT 0, dbid oid DEFAULT 0, queryid bigint DEFAULT 0
类型         | 函数--查扩展
test=# \dx已安装扩展列表名称         | 版本 |   架构模式   |                                                        描述                                                         
---------------------+------+--------------+---------------------------------------------------------------------------------------------------------------------kdb_license         | 1.0  | pg_catalog   | kdb_license extensionkingbase_version    | 1.0  | pg_catalog   | This is a utility that provides function related to version number,  it is used to get the Kingbase version number.plpgsql             | 1.0  | pg_catalog   | PL/pgSQL procedural languagesrc_restrict        | 1.0  | src_restrict | src restrict pluginsys_anon            | 1.0  | anon         | provides data masking functionalitysys_hm              | 1.0  | pg_catalog   | Kingbase Healthy Checksys_stat_statements | 1.10 | public       | track parsing, planning and execution statistics of all SQL statements executedsysaudit            | 1.0  | sysaudit     | provides auditing functionalitysysmac              | 1.0  | sysmac       | Mac for Kingbasexlog_record_read    | 1.0  | pg_catalog   | xlog_record_read functions
(10 行记录)

查源库数据量PG

查数据库大小

-bash-4.2$ psql -U ahtjtest -W -d ahtjtestnew
口令: 
psql (14.2)
输入 "help" 来获取帮助信息.ahtjtestnew=> \l+ ahtjtestnew数据库列表名称     |  拥有者  | 字元编码 |  校对规则   |    Ctype    |       存取权限        |  大小  |   表空间   | 描述 
-------------+----------+----------+-------------+-------------+-----------------------+--------+------------+------ahtjtestnew | ahtjtest | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 | =Tc/ahtjtest         +| 422 MB | pg_default | |          |          |             |             | ahtjtest=CTc/ahtjtest |        |            | 
(1 行记录或
ahtjtestnew=> select pg_size_pretty(pg_database_size('ahtjtestnew'));pg_size_pretty 
----------------422 MB
(1 行记录)或
查单个数据库大小
SELECT d.datname as "Name",pg_catalog.pg_get_userbyid(d.datdba) as "Owner",pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding",d.datcollate as "Collate",d.datctype as "Ctype",pg_catalog.array_to_string(d.datacl, E'\n') AS "Access privileges",CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))ELSE 'No Access'END as "Size",t.spcname as "Tablespace",pg_catalog.shobj_description(d.oid, 'pg_database') as "Description"
FROM pg_catalog.pg_database dJOIN pg_catalog.pg_tablespace t on d.dattablespace = t.oid where d.datname='ahtjtestnew' order by 1;注:如果查多个库或者所有库大小,更改或去掉where 后面的d.datname='ahtjtestnew'

查不同对象数量

不是特别准确,仅作参考,记录数不一样的源库和目标库再分别查。

SELECTnsp.nspname AS SchemaName,
CASEcls.relkind WHEN 'r' THEN'TABLE' WHEN 'm' THEN'MATERIALIZED_VIEW' WHEN 'i' THEN'INDEX' WHEN 'S' THEN'SEQUENCE' WHEN 'v' THEN'VIEW' WHEN 'c' THEN'composite type' WHEN 't' THEN'TOAST' WHEN 'f' THEN'foreign table' WHEN 'p' THEN'partitioned_table' WHEN 'I' THEN'partitioned_index' ELSE cls.relkind :: TEXT END AS ObjectType,COUNT ( * ) cnt 
FROMpg_class clsJOIN pg_namespace nsp ON nsp.oid = cls.relnamespace 
WHEREnsp.nspname NOT IN ( 'information_schema', 'pg_catalog' ) AND nsp.nspname NOT LIKE'pg_toast%' 
GROUP BYnsp.nspname,cls.relkind UNION ALL
SELECTn.nspname AS "Schema",
CASEP.prokind WHEN 'a' THEN'agg' WHEN 'w' THEN'window' WHEN 'p' THEN'proc' ELSE'func' END AS "Type",COUNT ( * ) cnt 
FROMpg_catalog.pg_procP LEFT JOIN pg_catalog.pg_namespace n ON n.oid = P.pronamespace 
WHEREpg_catalog.pg_function_is_visible ( P.oid ) AND n.nspname NOT IN ( 'information_schema', 'pg_catalog' ) 
GROUP BYn.nspname,P.prokind;schemaname | objecttype | cnt 
------------+------------+-----public     | VIEW       |   7public     | INDEX      | 478public     | SEQUENCE   |   4public     | TABLE      | 375public     | func       |   8
(5 行记录)

查表记录数

SELECT schemaname,relname,n_live_tup FROM pg_stat_user_tables 
where schemaname='public'
ORDER BY relname;schemaname |                         relname                         | n_live_tup 
------------+---------------------------------------------------------+------------public     | a_organ_jc                                              |          0public     | aaf_change_his                                          |          0public     | aaf_dh_account_mapping                                  |          0public     | aaf_digitization                                        |          0public     | aaf_job                                                 |          6public     | aaf_job_20230704                                        |          0public     | aaf_job_role                                            |        576public     | aaf_menu                                                |          0public     | aaf_menu0628                                            |          0public     | aaf_menu_20230704                                       |          0public     | aaf_organ                                               |         11public     | aaf_organ_20230704                                      |          0public     | aaf_organ_copy1                                         |          0public     | aaf_organ_ext                                           |         11public     | aaf_organ_mapping                                       |          0public     | aaf_organ_merge                                         |          0public     | aaf_organ_sub                                           |          0public     | aaf_organ_sync                                          |         11public     | aaf_resource                                            |          1public     | aaf_resource0628                                        |          0public     | aaf_resource_20230704                                   |          0public     | aaf_role                                                |          3public     | aaf_role_20230704                                       |          0public     | aaf_role_resource                                       |         43public     | aaf_role_resource0628                                   |          0public     | aaf_role_resource_20230704                              |          0public     | aaf_sync_mapping                                        |          0public     | aaf_sync_version                                        |          0public     | aaf_sys_param                                           |          0public     | aaf_sys_param_his                                       |          0public     | aaf_third_user_relation                                 |          0public     | aaf_user                                                |         16public     | aaf_user_20230704                                       |          0public     | aaf_user_info                                           |          0public     | aaf_user_job                                            |         12public     | aaf_user_job_20230704                                   |          0public     | aaf_user_sub                                            |          0public     | aaf_user_sync                                           |         12public     | aaf_visible_permission                                  |          0public     | app_carousel                                            |          0public     | app_login_config                                        |          0public     | app_navigation                                          |          0public     | app_version                                             |          0public     | archive_dir                                             |         24public     | code_priority                                           |          0public     | code_source                                             |          0public     | code_sys_param                                          |          0public     | common_file                                             |          0public     | dict_item                                               |          0public     | dict_main                                               |          0public     | dim_xzqh                                                |          0public     | dm_material_code                                        |          0public     | dm_xzqh                                                 |          0public     | file                                                    |      74731public     | file_20231226                                           |      12702public     | file_classification                                     |          0public     | file_content                                            |          0public     | file_extend                                             |          0public     | file_info                                               |          0public     | file_permission                                         |          0public     | file_type                                               |          0public     | gov_annex                                               |          0public     | gov_baseinfo                                            |          0public     | gov_basic_ind_filter_condition                          |          0public     | gov_basic_ind_filter_group                              |          0public     | gov_cfg_omit_field                                      |          0public     | gov_conf_pendinginfo                                    |          0public     | gov_custom_report                                       |          0public     | gov_data_entry                                          |          0public     | gov_data_entry_indicator_bind                           |          0public     | gov_dataset_alter_record                                |          0public     | gov_enterprise_directory_library                        |          0public     | gov_final_stat_report                                   |          0public     | gov_group_field_relation                                |          0public     | gov_group_main                                          |          0public     | gov_help                                                |          0public     | gov_importdata_log                                      |          0public     | gov_ind_derived_basic_relation                          |          0public     | gov_indicator                                           |          0public     | gov_indicator_class                                     |          0public     | gov_indicator_data                                      |          0public     | gov_indicator_data_import                               |          0public     | gov_indicator_data_open                                 |          0public     | gov_indicator_entry_data_bind                           |          0public     | gov_indicator_group                                     |          0public     | gov_institution                                         |          0public     | gov_key_enterprises_info                                |          0public     | gov_key_project_info                                    |          0public     | gov_log_data_processing                                 |          0public     | gov_materials_field_check_result                        |          0public     | gov_materials_field_conf                                |          0public     | gov_mid_data_agri_animal_pro_situation                  |          0public     | gov_mid_data_agri_economic_crop_area                    |          0public     | gov_mid_data_agri_fishery_pro_situation                 |          0public     | gov_mid_data_agri_fruits_fore_pro_situation             |          0public     | gov_mid_data_agri_output_value                          |          0public     | gov_mid_data_agri_vege_fruits_pro_situation             |          0public     | gov_mid_data_comp_construction_busi_conditions          |          0public     | gov_mid_data_comp_construction_finance_season           |          0public     | gov_mid_data_comp_construction_finance_year             |          0public     | gov_mid_data_ent_baseinfo                               |          0public     | gov_mid_data_ent_develop_and_research                   |          0public     | gov_mid_data_enterprise_tables_s204_1                   |          0public     | gov_mid_data_four_down_sampling_211                     |          0public     | gov_mid_data_four_down_sampling_e224                    |          0public     | gov_mid_data_industry_economic_benefit                  |          0public     | gov_mid_data_industry_energy_consumption                |          0public     | gov_mid_data_industry_energy_output                     |          0public     | gov_mid_data_industry_product_output                    |          0public     | gov_mid_data_industry_product_value                     |          0public     | gov_mid_data_invest_estate_develop_sale                 |          0public     | gov_mid_data_invest_estate_funds_land                   |          0public     | gov_mid_data_invest_fixed_asset                         |       6887public     | gov_mid_data_labor_employee_and_salary                  |          0public     | gov_mid_data_labor_wages_i201_2                         |          0public     | gov_mid_data_labor_wages_i202_2                         |          0public     | gov_mid_data_restricted_individual_e107                 |          0public     | gov_mid_data_restricted_individual_e204_3               |          0public     | gov_mid_data_restricted_individual_s107                 |          0public     | gov_mid_data_restricted_individual_s204_3               |          0public     | gov_mid_data_service_finance_month                      |          0public     | gov_mid_data_service_finance_year                       |          0public     | gov_mid_data_trade_sales_and_stock                      |          0public     | gov_monitoring_data                                     |          0public     | gov_monitoring_data_detail                              |          0public     | gov_monitoring_indicator_data                           |          0public     | gov_monitoring_info                                     |          0public     | gov_monitoring_info_audit_log                           |          0public     | gov_monitoring_info_relation                            |          0public     | gov_monitoring_prediction_model_conf                    |          0public     | gov_monitoring_proj_ent_data                            |          0public     | gov_monitoring_proj_ent_detail                          |          0public     | gov_monitoring_rule                                     |          0public     | gov_monitoring_task                                     |          0public     | gov_monitoring_task_execute                             |          0public     | gov_monitoring_template                                 |          0public     | gov_monitoring_templatet_indicator_relation             |          0public     | gov_msg_read                                            |          0public     | gov_msg_unread                                          |          0public     | gov_ocr_bank_receipt                                    |          0public     | gov_ocr_central_unified                                 |          0public     | gov_ocr_contract                                        |          0public     | gov_ocr_financial_voucher                               |          0public     | gov_ocr_invoice                                         |          0public     | gov_ocr_progress_confirmation                           |          0public     | gov_ocr_record_certificate                              |          0public     | gov_ocr_seal                                            |          0public     | gov_online_apply                                        |          0public     | gov_online_apply_reply                                  |          0public     | gov_original_data_2017                                  |          0public     | gov_original_data_2018                                  |          0public     | gov_original_data_2019                                  |          0public     | gov_original_data_2020                                  |          0public     | gov_original_data_2021                                  |          0public     | gov_original_data_2022                                  |          0public     | gov_original_data_temp                                  |          0public     | gov_original_mid_col_relation                           |          0public     | gov_original_mid_tab_relation                           |          0public     | gov_pendinginfo                                         |          0public     | gov_project_application_audit                           |          0public     | gov_project_application_form_investment                 |          0public     | gov_project_application_form_investment_hx              |          0public     | gov_project_application_info_check_detail               |          0public     | gov_project_directory_library                           |          0public     | gov_project_invest_fixed_asset                          |          0public     | gov_project_month_check                                 |          0public     | gov_project_month_check_hx                              |          0public     | gov_projectmanage                                       |          0public     | gov_report                                              |          0public     | gov_report_catalogue                                    |          0public     | gov_report_catalogue_detail                             |          0public     | gov_report_data                                         |          0public     | gov_report_explain                                      |          0public     | gov_report_indicator_bind                               |          0public     | gov_report_indicator_relation                           |          0public     | gov_report_load                                         |          0public     | gov_report_period_bind                                  |          0public     | gov_reportmanage                                        |          0public     | gov_reportmanage_read_record                            |          0public     | gov_resource_category                                   |          0public     | gov_resource_content                                    |          0public     | gov_resource_content_audit                              |          0public     | gov_role_group_relation                                 |          0public     | gov_snapshot_mid_data_agri_animal_pro_situation         |          0public     | gov_snapshot_mid_data_agri_economic_crop_area           |          0public     | gov_snapshot_mid_data_agri_fishery_pro_situation        |          0public     | gov_snapshot_mid_data_agri_fruits_fore_pro_situation    |          0public     | gov_snapshot_mid_data_agri_output_value                 |          0public     | gov_snapshot_mid_data_agri_vege_fruits_pro_situation    |          0public     | gov_snapshot_mid_data_comp_construction_busi_conditions |          0public     | gov_snapshot_mid_data_comp_construction_finance_season  |          0public     | gov_snapshot_mid_data_comp_construction_finance_year    |          0public     | gov_snapshot_mid_data_ent_baseinfo                      |          0public     | gov_snapshot_mid_data_ent_develop_and_research          |          0public     | gov_snapshot_mid_data_enterprise_tables_s204_1          |          0public     | gov_snapshot_mid_data_four_down_sampling_211            |          0public     | gov_snapshot_mid_data_four_down_sampling_e224           |          0public     | gov_snapshot_mid_data_industry_economic_benefit         |          0public     | gov_snapshot_mid_data_industry_energy_consumption       |          0public     | gov_snapshot_mid_data_industry_energy_output            |          0public     | gov_snapshot_mid_data_industry_product_output           |          0public     | gov_snapshot_mid_data_industry_product_value            |          0public     | gov_snapshot_mid_data_invest_estate_develop_sale        |          0public     | gov_snapshot_mid_data_invest_estate_funds_land          |          0public     | gov_snapshot_mid_data_invest_fixed_asset                |          0public     | gov_snapshot_mid_data_labor_employee_and_salary         |          0public     | gov_snapshot_mid_data_labor_wages_i201_2                |          0public     | gov_snapshot_mid_data_labor_wages_i202_2                |          0public     | gov_snapshot_mid_data_restricted_individual_e107        |          0public     | gov_snapshot_mid_data_restricted_individual_e204_3      |          0public     | gov_snapshot_mid_data_restricted_individual_s107        |          0public     | gov_snapshot_mid_data_restricted_individual_s204_3      |          0public     | gov_snapshot_mid_data_service_finance_month             |          0public     | gov_snapshot_mid_data_service_finance_year              |          0public     | gov_snapshot_mid_data_trade_sales_and_stock             |          0public     | gov_submitted_materials                                 |          0public     | gov_table_conf                                          |          0public     | gov_table_field_conf                                    |          0public     | gov_topbi_dataset                                       |          0public     | image                                                   |          2public     | imagecodetable                                          |          0public     | inc_kettle_etl_sjdz                                     |          0public     | inc_kettle_etl_sjdz_hist                                |          0public     | log_email_record                                        |          0public     | log_full_record                                         |          0public     | log_interface_record                                    |          0public     | log_sms_record                                          |          0public     | msg_read                                                |          0public     | msg_read_hist                                           |          0public     | msg_setting                                             |          0public     | msg_sys_param                                           |          0public     | msg_unread                                              |          0public     | music                                                   |          0public     | notice                                                  |          0public     | oauth_client_details                                    |          0public     | oauth_login_client                                      |          0public     | operation_log                                           |         92public     | pending_history                                         |          0public     | pending_item                                            |          0public     | pending_msg_compensate                                  |          0public     | pending_param                                           |          0public     | pending_sms_record                                      |          0public     | pending_status                                          |          0public     | pending_task                                            |          0public     | pending_temporary_msg                                   |          0public     | permission                                              |          0public     | persistent_logins                                       |          0public     | picture_file                                            |          0public     | portal_bill_board                                       |          0public     | portal_browser_package_manage                           |          0public     | portal_calendar_mark                                    |          0public     | portal_common_service                                   |          0public     | portal_header_menu                                      |          0public     | portal_notepad                                          |          0public     | portal_notepad_item                                     |          0public     | portal_other_website                                    |          0public     | portal_quick_login                                      |          0public     | portal_regist_holiday                                   |          0public     | portal_release_explain                                  |          0public     | portal_topic                                            |          0public     | portal_topic_category                                   |          0public     | portal_topic_skin                                       |          0public     | portal_topic_user                                       |          0public     | recovery_file                                           |         24public     | repo_archive_organ                                      |         53public     | repo_business_attribute                                 |       4535public     | repo_business_file                                      |      79362public     | repo_search_words                                       |        103public     | role                                                    |          0public     | role_permission                                         |          0public     | share                                                   |         29public     | share_file                                              |        117public     | sis_sysparam                                            |          0public     | sis_verhis                                              |          0public     | sso_client_scope                                        |          0public     | sso_open_api                                            |          0public     | sso_scope                                               |          0public     | sso_sms_record                                          |          0public     | stat_audit_priority_conf                                |          0public     | stat_audit_process_node                                 |          0public     | stat_audit_rule                                         |          0public     | stat_check_project_list                                 |       4535public     | stat_check_report_data                                  |       4535public     | stat_check_report_data_h                                |         78public     | stat_check_report_materials                             |       1181public     | stat_check_report_materials_h                           |        114public     | stat_check_report_ocr_detail                            |      48175public     | stat_check_report_ocr_detail_h                          |       1876public     | stat_check_report_ocr_summary                           |        905public     | stat_check_report_ocr_summary_h                         |         78public     | stat_check_report_total_info                            |        879public     | stat_check_report_total_info_h                          |         75public     | stat_dict_item                                          |         11public     | stat_dict_main                                          |          0public     | stat_import_excel_header                                |        883public     | stat_material_verify_score_conf                         |          0public     | stat_materials                                          |          0public     | stat_materials_audit_record                             |        891public     | stat_materials_field_check_result                       |     121447public     | stat_materials_field_conf                               |          0public     | stat_materials_ocr_detail                               |          1public     | stat_ocr_accounts_chart                                 |         88public     | stat_ocr_bank_receipt                                   |       3219public     | stat_ocr_business_license                               |          0public     | stat_ocr_central_unified                                |        138public     | stat_ocr_composition                                    |          0public     | stat_ocr_construction_contract                          |       1172public     | stat_ocr_construction_land_use_permit                   |          0public     | stat_ocr_construction_permit_for_construction_project   |          0public     | stat_ocr_document_filing                                |          0public     | stat_ocr_equip_buy_contract                             |       1211public     | stat_ocr_equipment_in_place_photo                       |          0public     | stat_ocr_fapc                                           |          0public     | stat_ocr_invoice                                        |      36742public     | stat_ocr_main_construction_contents                     |          0public     | stat_ocr_organization_code_certificate                  |          0public     | stat_ocr_progress_confirmation                          |       3297public     | stat_ocr_project_approval_documents                     |          0public     | stat_ocr_project_site_verification_form                 |          0public     | stat_ocr_public_institution_legal_person_certificate    |          0public     | stat_ocr_quantities_valuation                           |        441public     | stat_ocr_real_estate_sales                              |          2public     | stat_ocr_sale_contract                                  |          0public     | stat_ocr_site_construction_photos                       |          0public     | stat_ocr_state_owned_land_use_right_certificate         |          0public     | stat_ocr_tax_statement                                  |          2public     | stat_ocr_tcpv                                           |        720public     | stat_ocr_total_schedule                                 |          0public     | stat_ocr_tpc                                            |        458public     | stat_origon_report_data_construction                    |          0public     | stat_origon_report_data_x2041                           |          0public     | stat_picket_mark                                        |         16public     | stat_project_apply_report                               |          0public     | stat_project_apply_report_h202                          |       2615public     | stat_project_apply_report_verify_summary                |          0public     | stat_project_apply_report_x202                          |          0public     | stat_project_audit_record                               |         10public     | stat_report_data_temp                                   |          0public     | stat_sys_param                                          |         37public     | storage                                                 |         12public     | sys_param                                               |          0public     | t_sys_param                                             |          0public     | topdp_api_app_client                                    |          0public     | topdp_api_open_api                                      |          0public     | topdp_api_scope                                         |          0public     | topdp_api_scope_app                                     |          0public     | topdp_dict                                              |          0public     | topdp_org_job                                           |          0public     | topdp_org_job_role                                      |          0public     | topdp_org_menu                                          |          0public     | topdp_org_organ                                         |          0public     | topdp_org_resource                                      |          0public     | topdp_org_role                                          |          0public     | topdp_org_role_resource                                 |          0public     | topdp_org_sys_param                                     |          0public     | topdp_org_user                                          |          0public     | topdp_org_user_job                                      |          0public     | topdp_user                                              |          0public     | topdp_user_info                                         |          0public     | topre_calculation_variable                              |          0public     | topre_dept                                              |          0public     | topre_person                                            |          0public     | topre_rule_engine                                       |          0public     | topre_rule_engine_item                                  |          0public     | topre_rule_engine_lable                                 |          0public     | topre_rule_engine_list                                  |          0public     | topre_sys_menu                                          |          0public     | topre_sys_name                                          |          0public     | topre_sys_param                                         |          0public     | upload_task                                             |      10796public     | upload_task_detail                                      |       2626public     | user_file                                               |         66public     | user_login_info                                         |          0public     | user_role                                               |          0public     | xss_additional_host_port                                |          0
(375 行记录)

目录库创建用户和数据库

--登录数据库
[kingbase@topnet29 ~]$ ksql -Usystem -W test
口令:
输入 "help" 来获取帮助信息.--查询是否有要创建的用户
test=# \du ahtjtest01角色列表角色名称 | 属性 | 成员属于 
----------+------+------------查询是否有要创建的数据库
test=# \l ahtjtestnew01
(0 行记录)--创建用户create user ahtjtest01 with password '123456';
--创建数据库create database ahtjtestnew01 owner ahtjtest01;grant all privileges on database ahtjtestnew01 to ahtjtest01;

迁移过程

运行迁移web程序

该迁移场景是在windows电脑上启动人大金仓自带的迁移工具web端

位置:C:\Program Files\Kingbase\V8R6\KESRealPro\V008R006C007B0012\ClientTools\guitools\KDts\KDTS-WEB\bin

双击启动startup.bat

启动过程如下:

web登录地址http://192.168.16.122:8080/ 账号密码默认,直接点登录即可

配置数据源

源数据库数据源

目前pg版本最高12版本

创建数据源后如下:

目标库数据源

注意选择兼容模式

创建数据源后如下:

创建迁移任务

选择数据源

选择模式

全选所有对象

选择迁移对象

配置迁移参数

查看迁移结果

处理迁移报错

主键约束报错处理

查看报错日志

单击失败数查看详情

ALTER TABLE"public"."gov_snapshot_mid_data_agri_fishery_pro_situation" DROP CONSTRAINT IF EXISTS "gov_snapshot_mid_data_agri_fishery_pro_situation";
ALTER TABLE"public"."gov_snapshot_mid_data_agri_fishery_pro_situation"
ADDCONSTRAINT "gov_snapshot_mid_data_agri_fishery_pro_situation" PRIMARY KEY ("id");
查看表上约束
SELECT con.*FROM pg_catalog.pg_constraint conINNER JOIN pg_catalog.pg_class rel ON rel.oid = con.conrelidINNER JOIN pg_catalog.pg_namespace nsp ON nsp.oid = connamespaceWHERE nsp.nspname = 'public'AND rel.relname = 'gov_snapshot_mid_data_agri_fishery_pro_situation';说明:
nsp.nspname = '{schema name}'
rel.relname = '{table name}'

无输出

解决办法

在目标库中手动执行修改后的语句,如下:

将
ALTER TABLE"public"."gov_snapshot_mid_data_agri_fishery_pro_situation" DROP CONSTRAINT IF EXISTS "gov_snapshot_mid_data_agri_fishery_pro_situation";
ALTER TABLE"public"."gov_snapshot_mid_data_agri_fishery_pro_situation"
ADDCONSTRAINT "gov_snapshot_mid_data_agri_fishery_pro_situation" PRIMARY KEY ("id");修改为
ALTER TABLE"public"."gov_snapshot_mid_data_agri_fishery_pro_situation"
ADDCONSTRAINT "gov_snapshot_mid_data_agri_fishery_pro_situation_pri" PRIMARY KEY ("id");

逐个按此方法操作

唯一性约束报错处理

查看报错日志

ALTER TABLE"public"."topdp_org_sys_param"
ADDCONSTRAINT "uk_org_sys_param_3t38v_669E488A" UNIQUE ("key_code") enable validate;
查看表上的唯一性约束
--查询唯一性约束
SELECT con.*FROM pg_catalog.pg_constraint conINNER JOIN pg_catalog.pg_class rel ON rel.oid = con.conrelidINNER JOIN pg_catalog.pg_namespace nsp ON nsp.oid = connamespaceWHERE nsp.nspname = 'public'AND rel.relname = 'topdp_org_sys_param';说明:
nsp.nspname = '{schema name}'
rel.relname = '{table name}'             

无uk_org_sys_param_3t38v_669E488A这个约束

解决办法

在目标库中手动执行修改后的语句,如下:

将
ALTER TABLE"public"."topdp_org_sys_param"
ADDCONSTRAINT "uk_org_sys_param_3t38v_669E488A" UNIQUE ("key_code") enable validate;更改为
ALTER TABLE"public"."topdp_org_sys_param"
ADDCONSTRAINT "uk_org_sys_param_3t38v_669E488A" UNIQUE ("key_code");

逐个按此方法操作

视图报错处理

点“二次迁移”执行二次迁移后视图自动实现了迁移

点“详情”查看二次迁移后结果发现视图自动实现了迁移,如下图:

补充

迁移后,随机找到一个表,生成ddl,发现约束的名字是是以表名做的截断

CREATE TABLE public.gov_snapshot_mid_data_agri_vege_fruits_pro_situation (id varchar(36) NOT NULL,original_line_num varchar(36) NOT NULL,zone_code varchar(15),town_name varchar(60),province_name varchar(60),city_name varchar(60),country_name varchar(60),tel varchar(50),written_by varchar(60),statistics_leader varchar(60),unit_leader varchar(60),submit_year varchar(4),submit_month varchar(2),submit_day varchar(2),vegetable_total_aera float4,vegetable_total_output float4,melon_fruits_total_area float4,melon_fruits_total_output float4,report_year varchar(4),report_season varchar(1),report_month varchar(2),create_time timestamp,operator_user_id varchar(36),update_time timestamp,row_state bpchar(2),period int2,CONSTRAINT gov_snapshot_mid_data_agri_vege_fruits_pro_situa PRIMARY KEY (id)
);表名:   gov_snapshot_mid_data_agri_vege_fruits_pro_situation
约束名: gov_snapshot_mid_data_agri_vege_fruits_pro_situa

查目标库数据量PG

查数据库大小

-bash-4.2$ psql -U ahtjtest -W -d ahtjtestnew
口令: 
psql (14.2)
输入 "help" 来获取帮助信息.ahtjtestnew=> \l+ ahtjtestnew数据库列表名称     |  拥有者  | 字元编码 |  校对规则   |    Ctype    |       存取权限        |  大小  |   表空间   | 描述 
-------------+----------+----------+-------------+-------------+-----------------------+--------+------------+------ahtjtestnew | ahtjtest | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 | =Tc/ahtjtest         +| 424 MB | pg_default | |          |          |             |             | ahtjtest=CTc/ahtjtest |        |            | 
(1 行记录或
ahtjtestnew=> select pg_size_pretty(pg_database_size('ahtjtestnew'));pg_size_pretty 
----------------424 MB
(1 行记录)或
查单个数据库大小
SELECT d.datname as "Name",pg_catalog.pg_get_userbyid(d.datdba) as "Owner",pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding",d.datcollate as "Collate",d.datctype as "Ctype",pg_catalog.array_to_string(d.datacl, E'\n') AS "Access privileges",CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))ELSE 'No Access'END as "Size",t.spcname as "Tablespace",pg_catalog.shobj_description(d.oid, 'pg_database') as "Description"
FROM pg_catalog.pg_database dJOIN pg_catalog.pg_tablespace t on d.dattablespace = t.oid where d.datname='ahtjtestnew' order by 1;注:如果查多个库或者所有库大小,更改或去掉where 后面的d.datname='ahtjtestnew'

查不同对象数量

SELECTnsp.nspname AS SchemaName,
CASEcls.relkind WHEN 'r' THEN'TABLE' WHEN 'm' THEN'MATERIALIZED_VIEW' WHEN 'i' THEN'INDEX' WHEN 'S' THEN'SEQUENCE' WHEN 'v' THEN'VIEW' WHEN 'c' THEN'composite type' WHEN 't' THEN'TOAST' WHEN 'f' THEN'foreign table' WHEN 'p' THEN'partitioned_table' WHEN 'I' THEN'partitioned_index' ELSE cls.relkind :: TEXT END AS ObjectType,COUNT ( * ) cnt 
FROMpg_class clsJOIN pg_namespace nsp ON nsp.oid = cls.relnamespace 
WHEREnsp.nspname NOT IN ( 'information_schema', 'pg_catalog' ) and nsp.nspname='public'AND nsp.nspname NOT LIKE'pg_toast%' 
GROUP BYnsp.nspname,cls.relkind UNION ALL
SELECTn.nspname AS "Schema",
CASEP.prokind WHEN 'a' THEN'agg' WHEN 'w' THEN'window' WHEN 'p' THEN'proc' ELSE'func' END AS "Type",COUNT ( * ) cnt 
FROMpg_catalog.pg_procP LEFT JOIN pg_catalog.pg_namespace n ON n.oid = P.pronamespace 
WHEREpg_catalog.pg_function_is_visible ( P.oid ) AND n.nspname NOT IN ( 'information_schema', 'pg_catalog' ) and n.nspname='public'
GROUP BYn.nspname,P.prokind;schemaname | objecttype | cnt 
------------+------------+-----public     | VIEW       |   9public     | INDEX      | 475public     | TABLE      | 375public     | SEQUENCE   |   5public     | func       |  12
(5 行记录)

查表记录数

SELECT schemaname,relname,n_live_tup FROM pg_stat_user_tables 
where schemaname='public'
ORDER BY relname;schemaname |                         relname                         | n_live_tup 
------------+---------------------------------------------------------+------------public     | a_organ_jc                                              |          0public     | aaf_change_his                                          |          0public     | aaf_dh_account_mapping                                  |          0public     | aaf_digitization                                        |          0public     | aaf_job                                                 |        213public     | aaf_job_20230704                                        |         61public     | aaf_job_role                                            |        576public     | aaf_menu                                                |         95public     | aaf_menu0628                                            |         66public     | aaf_menu_20230704                                       |         88public     | aaf_organ                                               |        325public     | aaf_organ_20230704                                      |         51public     | aaf_organ_copy1                                         |        313public     | aaf_organ_ext                                           |         11public     | aaf_organ_mapping                                       |          0public     | aaf_organ_merge                                         |          0public     | aaf_organ_sub                                           |          0public     | aaf_organ_sync                                          |         65public     | aaf_resource                                            |        138public     | aaf_resource0628                                        |        112public     | aaf_resource_20230704                                   |        123public     | aaf_role                                                |         79public     | aaf_role_20230704                                       |         58public     | aaf_role_resource                                       |        546public     | aaf_role_resource0628                                   |        394public     | aaf_role_resource_20230704                              |        437public     | aaf_sync_mapping                                        |          0public     | aaf_sync_version                                        |          0public     | aaf_sys_param                                           |        108public     | aaf_sys_param_his                                       |         22public     | aaf_third_user_relation                                 |          0public     | aaf_user                                                |        232public     | aaf_user_20230704                                       |         85public     | aaf_user_info                                           |         13public     | aaf_user_job                                            |          0public     | aaf_user_job_20230704                                   |         61public     | aaf_user_sub                                            |          0public     | aaf_user_sync                                           |        104public     | aaf_visible_permission                                  |          0public     | app_carousel                                            |          0public     | app_login_config                                        |          0public     | app_navigation                                          |          0public     | app_version                                             |          0public     | archive_dir                                             |         24public     | code_priority                                           |          0public     | code_source                                             |         11public     | code_sys_param                                          |         60public     | common_file                                             |          0public     | dict_item                                               |        166public     | dict_main                                               |          9public     | dim_xzqh                                                |        152public     | dm_material_code                                        |         96public     | dm_xzqh                                                 |      22867public     | file                                                    |      74730public     | file_20231226                                           |      12702public     | file_classification                                     |         71public     | file_content                                            |         17public     | file_extend                                             |         69public     | file_info                                               |         17public     | file_permission                                         |          0public     | file_type                                               |          6public     | gov_annex                                               |          0public     | gov_baseinfo                                            |          0public     | gov_basic_ind_filter_condition                          |          0public     | gov_basic_ind_filter_group                              |          0public     | gov_cfg_omit_field                                      |          0public     | gov_conf_pendinginfo                                    |          0public     | gov_custom_report                                       |          0public     | gov_data_entry                                          |          0public     | gov_data_entry_indicator_bind                           |          0public     | gov_dataset_alter_record                                |          0public     | gov_enterprise_directory_library                        |          0public     | gov_final_stat_report                                   |          0public     | gov_group_field_relation                                |          0public     | gov_group_main                                          |          0public     | gov_help                                                |          0public     | gov_importdata_log                                      |          0public     | gov_ind_derived_basic_relation                          |          0public     | gov_indicator                                           |          0public     | gov_indicator_class                                     |          0public     | gov_indicator_data                                      |          0public     | gov_indicator_data_import                               |          0public     | gov_indicator_data_open                                 |          0public     | gov_indicator_entry_data_bind                           |          0public     | gov_indicator_group                                     |          0public     | gov_institution                                         |          0public     | gov_key_enterprises_info                                |          0public     | gov_key_project_info                                    |          0public     | gov_log_data_processing                                 |          0public     | gov_materials_field_check_result                        |          0public     | gov_materials_field_conf                                |          0public     | gov_mid_data_agri_animal_pro_situation                  |          0public     | gov_mid_data_agri_economic_crop_area                    |          0public     | gov_mid_data_agri_fishery_pro_situation                 |          0public     | gov_mid_data_agri_fruits_fore_pro_situation             |          0public     | gov_mid_data_agri_output_value                          |          0public     | gov_mid_data_agri_vege_fruits_pro_situation             |          0public     | gov_mid_data_comp_construction_busi_conditions          |          0public     | gov_mid_data_comp_construction_finance_season           |          0public     | gov_mid_data_comp_construction_finance_year             |          0public     | gov_mid_data_ent_baseinfo                               |          0public     | gov_mid_data_ent_develop_and_research                   |          0public     | gov_mid_data_enterprise_tables_s204_1                   |          0public     | gov_mid_data_four_down_sampling_211                     |          0public     | gov_mid_data_four_down_sampling_e224                    |          0public     | gov_mid_data_industry_economic_benefit                  |          0public     | gov_mid_data_industry_energy_consumption                |          0public     | gov_mid_data_industry_energy_output                     |          0public     | gov_mid_data_industry_product_output                    |          0public     | gov_mid_data_industry_product_value                     |          0public     | gov_mid_data_invest_estate_develop_sale                 |          0public     | gov_mid_data_invest_estate_funds_land                   |          0public     | gov_mid_data_invest_fixed_asset                         |       6887public     | gov_mid_data_labor_employee_and_salary                  |          0public     | gov_mid_data_labor_wages_i201_2                         |          0public     | gov_mid_data_labor_wages_i202_2                         |          0public     | gov_mid_data_restricted_individual_e107                 |          0public     | gov_mid_data_restricted_individual_e204_3               |          0public     | gov_mid_data_restricted_individual_s107                 |          0public     | gov_mid_data_restricted_individual_s204_3               |          0public     | gov_mid_data_service_finance_month                      |          0public     | gov_mid_data_service_finance_year                       |          0public     | gov_mid_data_trade_sales_and_stock                      |          0public     | gov_monitoring_data                                     |          0public     | gov_monitoring_data_detail                              |          0public     | gov_monitoring_indicator_data                           |          0public     | gov_monitoring_info                                     |          0public     | gov_monitoring_info_audit_log                           |          0public     | gov_monitoring_info_relation                            |          0public     | gov_monitoring_prediction_model_conf                    |          0public     | gov_monitoring_proj_ent_data                            |          0public     | gov_monitoring_proj_ent_detail                          |          0public     | gov_monitoring_rule                                     |          0public     | gov_monitoring_task                                     |          0public     | gov_monitoring_task_execute                             |          0public     | gov_monitoring_template                                 |          0public     | gov_monitoring_templatet_indicator_relation             |          0public     | gov_msg_read                                            |          0public     | gov_msg_unread                                          |          0public     | gov_ocr_bank_receipt                                    |          0public     | gov_ocr_central_unified                                 |          0public     | gov_ocr_contract                                        |          0public     | gov_ocr_financial_voucher                               |          0public     | gov_ocr_invoice                                         |          0public     | gov_ocr_progress_confirmation                           |          0public     | gov_ocr_record_certificate                              |          0public     | gov_ocr_seal                                            |          0public     | gov_online_apply                                        |          0public     | gov_online_apply_reply                                  |          0public     | gov_original_data_2017                                  |          0public     | gov_original_data_2018                                  |          0public     | gov_original_data_2019                                  |          0public     | gov_original_data_2020                                  |          0public     | gov_original_data_2021                                  |          0public     | gov_original_data_2022                                  |          0public     | gov_original_data_temp                                  |          0public     | gov_original_mid_col_relation                           |          0public     | gov_original_mid_tab_relation                           |          0public     | gov_pendinginfo                                         |          0public     | gov_project_application_audit                           |          0public     | gov_project_application_form_investment                 |          0public     | gov_project_application_form_investment_hx              |          0public     | gov_project_application_info_check_detail               |          0public     | gov_project_directory_library                           |          0public     | gov_project_invest_fixed_asset                          |          0public     | gov_project_month_check                                 |          0public     | gov_project_month_check_hx                              |          0public     | gov_projectmanage                                       |          0public     | gov_report                                              |          0public     | gov_report_catalogue                                    |          0public     | gov_report_catalogue_detail                             |          0public     | gov_report_data                                         |          0public     | gov_report_explain                                      |          0public     | gov_report_indicator_bind                               |          0public     | gov_report_indicator_relation                           |          0public     | gov_report_load                                         |          0public     | gov_report_period_bind                                  |          0public     | gov_reportmanage                                        |          0public     | gov_reportmanage_read_record                            |          0public     | gov_resource_category                                   |          0public     | gov_resource_content                                    |          0public     | gov_resource_content_audit                              |          0public     | gov_role_group_relation                                 |          0public     | gov_snapshot_mid_data_agri_animal_pro_situation         |          0public     | gov_snapshot_mid_data_agri_economic_crop_area           |          0public     | gov_snapshot_mid_data_agri_fishery_pro_situation        |          0public     | gov_snapshot_mid_data_agri_fruits_fore_pro_situation    |          0public     | gov_snapshot_mid_data_agri_output_value                 |          0public     | gov_snapshot_mid_data_agri_vege_fruits_pro_situation    |          0public     | gov_snapshot_mid_data_comp_construction_busi_conditions |          0public     | gov_snapshot_mid_data_comp_construction_finance_season  |          0public     | gov_snapshot_mid_data_comp_construction_finance_year    |          0public     | gov_snapshot_mid_data_ent_baseinfo                      |          0public     | gov_snapshot_mid_data_ent_develop_and_research          |          0public     | gov_snapshot_mid_data_enterprise_tables_s204_1          |          0public     | gov_snapshot_mid_data_four_down_sampling_211            |          0public     | gov_snapshot_mid_data_four_down_sampling_e224           |          0public     | gov_snapshot_mid_data_industry_economic_benefit         |          0public     | gov_snapshot_mid_data_industry_energy_consumption       |          0public     | gov_snapshot_mid_data_industry_energy_output            |          0public     | gov_snapshot_mid_data_industry_product_output           |          0public     | gov_snapshot_mid_data_industry_product_value            |          0public     | gov_snapshot_mid_data_invest_estate_develop_sale        |          0public     | gov_snapshot_mid_data_invest_estate_funds_land          |          0public     | gov_snapshot_mid_data_invest_fixed_asset                |          0public     | gov_snapshot_mid_data_labor_employee_and_salary         |          0public     | gov_snapshot_mid_data_labor_wages_i201_2                |          0public     | gov_snapshot_mid_data_labor_wages_i202_2                |          0public     | gov_snapshot_mid_data_restricted_individual_e107        |          0public     | gov_snapshot_mid_data_restricted_individual_e204_3      |          0public     | gov_snapshot_mid_data_restricted_individual_s107        |          0public     | gov_snapshot_mid_data_restricted_individual_s204_3      |          0public     | gov_snapshot_mid_data_service_finance_month             |          0public     | gov_snapshot_mid_data_service_finance_year              |          0public     | gov_snapshot_mid_data_trade_sales_and_stock             |          0public     | gov_submitted_materials                                 |          0public     | gov_table_conf                                          |          0public     | gov_table_field_conf                                    |          0public     | gov_topbi_dataset                                       |          0public     | image                                                   |      79582public     | imagecodetable                                          |          0public     | inc_kettle_etl_sjdz                                     |          0public     | inc_kettle_etl_sjdz_hist                                |          2public     | log_email_record                                        |          0public     | log_full_record                                         |          0public     | log_interface_record                                    |          0public     | log_sms_record                                          |          0public     | msg_read                                                |          0public     | msg_read_hist                                           |          0public     | msg_setting                                             |          2public     | msg_sys_param                                           |         11public     | msg_unread                                              |          0public     | music                                                   |         45public     | notice                                                  |          0public     | oauth_client_details                                    |          5public     | oauth_login_client                                      |          0public     | operation_log                                           |     159458public     | pending_history                                         |          0public     | pending_item                                            |          0public     | pending_msg_compensate                                  |          0public     | pending_param                                           |          0public     | pending_sms_record                                      |          0public     | pending_status                                          |          0public     | pending_task                                            |          2public     | pending_temporary_msg                                   |          0public     | permission                                              |          0public     | persistent_logins                                       |          0public     | picture_file                                            |          0public     | portal_bill_board                                       |          1public     | portal_browser_package_manage                           |          0public     | portal_calendar_mark                                    |          0public     | portal_common_service                                   |          2public     | portal_header_menu                                      |         15public     | portal_notepad                                          |          0public     | portal_notepad_item                                     |          0public     | portal_other_website                                    |          2public     | portal_quick_login                                      |          0public     | portal_regist_holiday                                   |        366public     | portal_release_explain                                  |          0public     | portal_topic                                            |          3public     | portal_topic_category                                   |          0public     | portal_topic_skin                                       |          8public     | portal_topic_user                                       |          0public     | recovery_file                                           |         24public     | repo_archive_organ                                      |         53public     | repo_business_attribute                                 |       4535public     | repo_business_file                                      |      79362public     | repo_search_words                                       |        103public     | role                                                    |          0public     | role_permission                                         |          0public     | share                                                   |         47public     | share_file                                              |       1560public     | sis_sysparam                                            |          0public     | sis_verhis                                              |          9public     | sso_client_scope                                        |          8public     | sso_open_api                                            |          3public     | sso_scope                                               |          2public     | sso_sms_record                                          |          0public     | stat_audit_priority_conf                                |         33public     | stat_audit_process_node                                 |          2public     | stat_audit_rule                                         |          0public     | stat_check_project_list                                 |       4535public     | stat_check_report_data                                  |       4535public     | stat_check_report_data_h                                |         78public     | stat_check_report_materials                             |       1124public     | stat_check_report_materials_h                           |        114public     | stat_check_report_ocr_detail                            |      48354public     | stat_check_report_ocr_detail_h                          |       1876public     | stat_check_report_ocr_summary                           |        905public     | stat_check_report_ocr_summary_h                         |         78public     | stat_check_report_total_info                            |        879public     | stat_check_report_total_info_h                          |         75public     | stat_dict_item                                          |       3288public     | stat_dict_main                                          |         89public     | stat_import_excel_header                                |        883public     | stat_material_verify_score_conf                         |        317public     | stat_materials                                          |          0public     | stat_materials_audit_record                             |        891public     | stat_materials_field_check_result                       |     129924public     | stat_materials_field_conf                               |        358public     | stat_materials_ocr_detail                               |          0public     | stat_ocr_accounts_chart                                 |         88public     | stat_ocr_bank_receipt                                   |       3219public     | stat_ocr_business_license                               |          0public     | stat_ocr_central_unified                                |        138public     | stat_ocr_composition                                    |          0public     | stat_ocr_construction_contract                          |       1172public     | stat_ocr_construction_land_use_permit                   |          0public     | stat_ocr_construction_permit_for_construction_project   |          0public     | stat_ocr_document_filing                                |          0public     | stat_ocr_equip_buy_contract                             |       1211public     | stat_ocr_equipment_in_place_photo                       |          0public     | stat_ocr_fapc                                           |          4public     | stat_ocr_invoice                                        |      36741public     | stat_ocr_main_construction_contents                     |          0public     | stat_ocr_organization_code_certificate                  |          0public     | stat_ocr_progress_confirmation                          |       3297public     | stat_ocr_project_approval_documents                     |          0public     | stat_ocr_project_site_verification_form                 |          0public     | stat_ocr_public_institution_legal_person_certificate    |          0public     | stat_ocr_quantities_valuation                           |        441public     | stat_ocr_real_estate_sales                              |          2public     | stat_ocr_sale_contract                                  |          0public     | stat_ocr_site_construction_photos                       |          0public     | stat_ocr_state_owned_land_use_right_certificate         |          0public     | stat_ocr_tax_statement                                  |         62public     | stat_ocr_tcpv                                           |        720public     | stat_ocr_total_schedule                                 |          0public     | stat_ocr_tpc                                            |        458public     | stat_origon_report_data_construction                    |          0public     | stat_origon_report_data_x2041                           |          0public     | stat_picket_mark                                        |        142public     | stat_project_apply_report                               |          0public     | stat_project_apply_report_h202                          |       2615public     | stat_project_apply_report_verify_summary                |          0public     | stat_project_apply_report_x202                          |          0public     | stat_project_audit_record                               |         97public     | stat_report_data_temp                                   |          0public     | stat_sys_param                                          |          0public     | storage                                                 |        162public     | sys_param                                               |         15public     | t_sys_param                                             |         62public     | topdp_api_app_client                                    |          2public     | topdp_api_open_api                                      |          1public     | topdp_api_scope                                         |          2public     | topdp_api_scope_app                                     |          2public     | topdp_dict                                              |         35public     | topdp_org_job                                           |          1public     | topdp_org_job_role                                      |          3public     | topdp_org_menu                                          |          7public     | topdp_org_organ                                         |          1public     | topdp_org_resource                                      |         10public     | topdp_org_role                                          |          4public     | topdp_org_role_resource                                 |         11public     | topdp_org_sys_param                                     |          0public     | topdp_org_user                                          |          1public     | topdp_org_user_job                                      |          1public     | topdp_user                                              |          1public     | topdp_user_info                                         |          1public     | topre_calculation_variable                              |          0public     | topre_dept                                              |          0public     | topre_person                                            |          1public     | topre_rule_engine                                       |          0public     | topre_rule_engine_item                                  |          0public     | topre_rule_engine_lable                                 |         20public     | topre_rule_engine_list                                  |          0public     | topre_sys_menu                                          |          9public     | topre_sys_name                                          |          0public     | topre_sys_param                                         |          0public     | upload_task                                             |      10795public     | upload_task_detail                                      |       2623public     | user_file                                               |         66public     | user_login_info                                         |          0public     | user_role                                               |          0public     | xss_additional_host_port                                |          9
(375 行记录)

数据记录不是特别准确,和源库记录数进行对比,记录数不一样的查询下。此次查询发现记录数不一样的其实是

源库和目标库数据对比结果

不同对象数量差异

源库比目标库索引对象数据量中索引多3个

SELECTnsp.nspname AS SchemaName,
CASEcls.relkind WHEN 'r' THEN'TABLE' WHEN 'm' THEN'MATERIALIZED_VIEW' WHEN 'i' THEN'INDEX' WHEN 'S' THEN'SEQUENCE' WHEN 'v' THEN'VIEW' WHEN 'c' THEN'composite type' WHEN 't' THEN'TOAST' WHEN 'f' THEN'foreign table' WHEN 'p' THEN'partitioned_table' WHEN 'I' THEN'partitioned_index' ELSE cls.relkind :: TEXT END AS ObjectType,COUNT ( * ) cnt 
FROMpg_class clsJOIN pg_namespace nsp ON nsp.oid = cls.relnamespace 
WHEREnsp.nspname NOT IN ( 'information_schema', 'pg_catalog' ) and nsp.nspname='public'AND nsp.nspname NOT LIKE'pg_toast%' 
GROUP BYnsp.nspname,cls.relkind UNION ALL
SELECTn.nspname AS "Schema",
CASEP.prokind WHEN 'a' THEN'agg' WHEN 'w' THEN'window' WHEN 'p' THEN'proc' ELSE'func' END AS "Type",COUNT ( * ) cnt 
FROMpg_catalog.pg_procP LEFT JOIN pg_catalog.pg_namespace n ON n.oid = P.pronamespace 
WHEREpg_catalog.pg_function_is_visible ( P.oid ) AND n.nspname NOT IN ( 'information_schema', 'pg_catalog' ) and n.nspname='public'
GROUP BYn.nspname,P.prokind;--源库pg库schemaname | objecttype | cnt 
------------+------------+-----public     | VIEW       |   7public     | INDEX      | 478public     | SEQUENCE   |   4public     | TABLE      | 375public     | func       |   8
(5 行记录)--目标库Kingbaseschemaname | objecttype | cnt 
------------+------------+-----public     | VIEW       |   9public     | INDEX      | 475public     | TABLE      | 375public     | SEQUENCE   |   5public     | func       |  12
(5 行记录)--通过以下语句结合excel工具比对aaf_user_job索引数量不一致
select tablename,indexname,indexdef  from pg_indexes where schemaname = 'public' order by 1;--查看源库aaf_user_job表结构  pg库
CREATE TABLE public.aaf_user_job (id varchar(36) NOT NULL,create_time timestamp(6) NULL,operate_user_id varchar(36) NULL,state varchar(2) NULL,update_time timestamp(6) NULL,end_date timestamp(6) NULL,isdefault_job varchar(2) NOT NULL,job_id varchar(36) NOT NULL,job_type varchar(2) NOT NULL,start_date timestamp(6) NULL,user_id varchar(36) NOT NULL,create_user_id varchar(36) NULL,update_user_id varchar(36) NULL,deleted varchar(1) NOT NULL DEFAULT '0'::character varying,row_state varchar(2) NOT NULL DEFAULT '01'::character varying,description varchar(255) NULL,CONSTRAINT sys_c007779 CHECK ((id IS NOT NULL)),CONSTRAINT sys_c007780 CHECK ((isdefault_job IS NOT NULL)),CONSTRAINT sys_c007781 CHECK ((job_id IS NOT NULL)),CONSTRAINT sys_c007782 CHECK ((job_type IS NOT NULL)),CONSTRAINT sys_c007783 CHECK ((user_id IS NOT NULL)),CONSTRAINT sys_c007877 CHECK ((id IS NOT NULL)),CONSTRAINT sys_c007878 CHECK ((isdefault_job IS NOT NULL)),CONSTRAINT sys_c007879 CHECK ((job_id IS NOT NULL)),CONSTRAINT sys_c007880 CHECK ((job_type IS NOT NULL)),CONSTRAINT sys_c007881 CHECK ((user_id IS NOT NULL)),CONSTRAINT sys_c007882 PRIMARY KEY (id),CONSTRAINT sys_c007967 CHECK ((deleted IS NOT NULL)),CONSTRAINT sys_c007968 CHECK ((row_state IS NOT NULL)),CONSTRAINT unique_user_job_isdefault UNIQUE (user_id, job_id, isdefault_job)
);
CREATE UNIQUE INDEX aaf_user_job_pkey ON public.aaf_user_job USING btree (id);
CREATE INDEX idx_job_job_id ON public.aaf_user_job USING btree (job_id);
CREATE INDEX idx_job_user_id ON public.aaf_user_job USING btree (user_id);--查看目标库aaf_user_job表结构  Kingbase库
CREATE TABLE public.aaf_user_job (id varchar(36) NOT NULL,create_time timestamp,operate_user_id varchar(36),state varchar(2),update_time timestamp,end_date timestamp,isdefault_job varchar(2) NOT NULL,job_id varchar(36) NOT NULL,job_type varchar(2) NOT NULL,start_date timestamp,user_id varchar(36) NOT NULL,create_user_id varchar(36),update_user_id varchar(36),deleted varchar(1) NOT NULL,row_state varchar(2) NOT NULL,description varchar(255),CONSTRAINT "sys_c007882_DE31C607" PRIMARY KEY (id)
);
CREATE UNIQUE INDEX "unique_user_job_isdefault_8E532681" ON public.aaf_user_job (isdefault_job,job_id,user_id);--解决办法
目标库aaf_user_job表中创建以下索引  Kingbase库
CREATE UNIQUE INDEX aaf_user_job_pkey ON public.aaf_user_job USING btree (id);
CREATE INDEX idx_job_job_id ON public.aaf_user_job USING btree (job_id);
CREATE INDEX idx_job_user_id ON public.aaf_user_job USING btree (user_id);
补充:源库和目标库建表语句差异
--查看源库aaf_user_job表结构  pg库
CREATE TABLE public.aaf_user_job (id varchar(36) NOT NULL,create_time timestamp(6) NULL,operate_user_id varchar(36) NULL,state varchar(2) NULL,update_time timestamp(6) NULL,end_date timestamp(6) NULL,isdefault_job varchar(2) NOT NULL,job_id varchar(36) NOT NULL,job_type varchar(2) NOT NULL,start_date timestamp(6) NULL,user_id varchar(36) NOT NULL,create_user_id varchar(36) NULL,update_user_id varchar(36) NULL,deleted varchar(1) NOT NULL DEFAULT '0'::character varying,row_state varchar(2) NOT NULL DEFAULT '01'::character varying,description varchar(255) NULL,CONSTRAINT sys_c007779 CHECK ((id IS NOT NULL)),CONSTRAINT sys_c007780 CHECK ((isdefault_job IS NOT NULL)),CONSTRAINT sys_c007781 CHECK ((job_id IS NOT NULL)),CONSTRAINT sys_c007782 CHECK ((job_type IS NOT NULL)),CONSTRAINT sys_c007783 CHECK ((user_id IS NOT NULL)),CONSTRAINT sys_c007877 CHECK ((id IS NOT NULL)),CONSTRAINT sys_c007878 CHECK ((isdefault_job IS NOT NULL)),CONSTRAINT sys_c007879 CHECK ((job_id IS NOT NULL)),CONSTRAINT sys_c007880 CHECK ((job_type IS NOT NULL)),CONSTRAINT sys_c007881 CHECK ((user_id IS NOT NULL)),CONSTRAINT sys_c007882 PRIMARY KEY (id),CONSTRAINT sys_c007967 CHECK ((deleted IS NOT NULL)),CONSTRAINT sys_c007968 CHECK ((row_state IS NOT NULL)),CONSTRAINT unique_user_job_isdefault UNIQUE (user_id, job_id, isdefault_job)
);
CREATE UNIQUE INDEX aaf_user_job_pkey ON public.aaf_user_job USING btree (id);
CREATE INDEX idx_job_job_id ON public.aaf_user_job USING btree (job_id);
CREATE INDEX idx_job_user_id ON public.aaf_user_job USING btree (user_id);--查看目标库aaf_user_job表结构  Kingbase库
CREATE TABLE public.aaf_user_job (id varchar(36) NOT NULL,create_time timestamp,operate_user_id varchar(36),state varchar(2),update_time timestamp,end_date timestamp,isdefault_job varchar(2) NOT NULL,job_id varchar(36) NOT NULL,job_type varchar(2) NOT NULL,start_date timestamp,user_id varchar(36) NOT NULL,create_user_id varchar(36),update_user_id varchar(36),deleted varchar(1) NOT NULL,row_state varchar(2) NOT NULL,description varchar(255),CONSTRAINT "sys_c007882_DE31C607" PRIMARY KEY (id)
);
CREATE UNIQUE INDEX "unique_user_job_isdefault_8E532681" ON public.aaf_user_job (isdefault_job,job_id,user_id);

表记录数差异

SELECT schemaname,relname,n_live_tup FROM pg_stat_user_tables 
where schemaname='public'
ORDER BY relname;

源库PG和目标库Kingbase的部分表记录数不一致,经过库中查询,发现一直,推测该语句只是大概记录数的一个统计,仅作参考

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/624719.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【数据结构】排序之归并排序与计数排序

个人主页 : zxctsclrjjjcph 文章封面来自:艺术家–贤海林 如有转载请先通知 目录 1. 前言2. 归并排序2.1 递归实现2.1.1 分析2.1.2 代码实现 2.2 非递归实现2.2.1 分析2.2.2 代码实现 3. 计数排序3.1 分析3.2 代码实现 4. 附代码4.1 Sort.h4.2 Sort.c4.3…

centos7系统 gdb调试jdk11源码

centos7 gdb调试jdk11源码 ##首先你得编译一个debug版本的jdk11。教程centos7下openjdk11源码下载编译安装_openjdk11下载-CSDN博客 ##gdb 启动java进程 设置运行参数、设置断点 运行、调试进入main断点 gdb /home/yym/code/jdk11u-master/build/linux-x86_64-normal-serve…

Batch Normalization、Layer Normalization代码实现

目录 前言批量正则化-BN层正则化-LN 前言 BN(Batch Normalization)首次提出与论文,主要目的是为了解决训练深层神经网络慢的问题。我们可以神经网络整体可以看成一个高阶的复杂函数,通过训练优化它的参数,可以用于拟合各种复杂的数据分布。一…

营销与经营一体,巨量引擎如何激发生意新未来?

12月6日,在第九届GDMS全球数字营销峰会上,巨量引擎发表了《营销经营一体,激发生意新未来》为主题的演讲,分享了巨量引擎如何在营销与经营一体化的背景下,通过极致的产品技术创新,激发生意新未来。 激发全渠…

ClientHttpRequestInterceptor报错Timeout waiting for connection from pool

restTemplate实现ClientHttpRequestInterceptor,报错org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool 代码如下: Configuration public class HttpConfig {private static final Integer RETRY_COUNT…

0基础学java-day26(满汉楼实战)

一、界面设计 1. 需求说明 2 界面设计 2.1 用户登录 2.2 显示餐桌状态 2.3 预订 2.4 显示菜品 2.5 点餐 2.6 查看账单 2.7 结账 3 分层设计 二、功能实现 1 工具类 1.1 构建如下的项目结构 1.2 导入相关的工具类和jar包 相关的工具类和jar包会放在评论区的百度网盘的链接…

VBA之Excel应用第五节:录制宏时,使用绝对引用和相对引用

《VBA之Excel应用》(版权10178983)是非常经典的,是我推出的第七套教程,定位于初级,目前是第一版修订。这套教程从简单的录制宏开始讲解,一直到窗体的搭建,内容丰富,实例众多。大家可…

基于JAVA+ssm开发的在线报名系统设计与实现【附源码】

基于JAVAssm开发的在线报名系统设计与实现【附源码】 🍅 作者主页 央顺技术团队 🍅 欢迎点赞 👍 收藏 ⭐留言 📝 🍅 文末获取源码联系方式 📝 🍅 查看下方微信号获取联系方式 承接各种定制系统 …

vue使用i18n实现国际化

安装 npm install vue-i18nnext在src下创建一个名为i18n的文件夹,并按照下图创建需要的文件 i18n/locales/en.json {"common": {"BUTTON_OK": "OK","BUTTON_CANCEL": "Cancel","BUTTON_SUBMIT": "Submit…

linux后台进程的总结

文章目录 方案1 nohup &方案2 screen 方案1 nohup & 1、单独使用 nohup 执行脚本,如下图所示,终端会被接管,就是标准输入stdin 被关闭了,使用ctrlc会导致终止执行,但是可以关闭这个终端,重新打开终…

二叉树题目:从前序与后序遍历序列构造二叉树

文章目录 题目标题和出处难度题目描述要求示例数据范围 前言解法一思路和算法代码复杂度分析 解法二思路和算法代码复杂度分析 题目 标题和出处 标题:从前序与后序遍历序列构造二叉树 出处:889. 从前序与后序遍历序列构造二叉树 难度 7 级 题目描述…

react项目运行卡在编译:您当前运行的TypeScript版本不受@TypeScript eslint/TypeScript estree的官方支持

1.问题 错误信息具体如下: 搜索了一下,是typescript版本的问题,提示我版本需要在3.3.0和4.5.0中间,我查看了package.json,显示版本为4.1.3,然后一直给我提示我的版本是4.9.5,全局搜索一下&…

FPGA——时序分析与约束(Quartus II)

FPGA时序分析与约束 FPGA结构基础数据传输模型Quartus II 时序报告Quartus II 中TimeQuest的操作实操 时序分析:通过分析FPGA内部各个存储器之间的数据和时钟传输路径,来分析数据延迟和时钟延迟的关系,保证所有寄存器都可以正确寄存数据。 数…

Ubuntu配置NFS客户端和服务端详解——手把手配置

Ubuntu配置NFS客户端和服务端 如果您想实现远程访问并修改 ROS 主机中 Ubuntu 上的文件,可以通过 NFS挂载的方式。虚拟机上的 Ubuntu 系统可以通过 NFS 的方式来访问 ROS 主机中Ubuntu 系统的文件,NFS 分为服务器挂载和客户端访问。这里虚拟机上的 Ubun…

基于多反应堆的高并发服务器【C/C++/Reactor】(中)HttpRequest 提取请求行、解析请求行和优化 以及解析请求头并存储

### 知识点1:读取网络数据 客户端发送给服务器的通信数据通过封装的bufferSocketRead函数读取读取的数据存储在struct Buffer结构体实例中,可将该实例作为参数传递给解析函数 回顾Buffer.c中的bufferSocketRead函数 // 写内存 2.接收套接字数据 int b…

腾讯云服务器新版活动报价表,3年核5年适合长期使用

腾讯云服务器优惠价格表_一年、3年、包月和1小时费用_最新报价 腾讯云服务器租用优惠价格表:轻量应用服务器2核2G3M价格62元一年、2核2G4M价格118元一年,540元三年、2核4G5M带宽218元一年,2核4G5M带宽756元三年、轻量4核8G12M服务器646元15个…

【复现】Tenda信息泄露漏洞_19

目录 一.概述 二 .漏洞影响 三.漏洞复现 1. 漏洞一: 四.修复建议: 五. 搜索语法: 六.免责声明 一.概述 Tenda远端WEB管理是为了在外网(其他网络)可以访问路由器,从而进行管理。 电脑可以通过网线连接…

HTML---JAVAscript对向和原型链

文章目录 前言一、pandas是什么?二、使用步骤 1.引入库2.读入数据总结 前言 一.JavaSceipt对象概述 JavaScript是一种基于对象的编程语言,每个值都是一个对象。JavaScript中的对象是一种无序的键值对集合,其中每个键都是唯一的。 JavaScript的…

浅析Pe2shellcode

编者注:本文仅供学习研究,严禁从事非法活动,任何后果由使用者本人负责。 前言 众所周知,对shellcode免杀是很流行的技术,但是直接对exe的免杀方法相对稀缺,如果我们能将exe转为shellcode,然后用…