Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Nine-story Pagoda of PostgreSQL Learning

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Event preview: at the upcoming 2019 data Technology Carnival, there will be a variety of topics from PostgreSQL, including database research and development from cloud vendors, introduction of new versions and new features, and best practices from users.

These topics include Zhou Yuefeng, president of Huawei's intelligent data and storage field, Alibaba, Zhou Zhengzhong (Dege), chief evangelist of PostgreSQL community, Wang Weimin, GaussDB ecology and standard CTO of Huawei, Zhang Wensheng, core member of PostgreSQL community, Sun Xu, technical expert of Tencent Cloud, Liu Wei, researcher of Yun and Enmo, and Zhou Zhenxing, technical expert of Aliyun. Tencent Cloud technology expert Li Yuesen and others share the gist. These experts will show you the vigorous vitality and extensive database ecology of Postg reSQL database, as well as the best application scenarios. Details: http://www.modb.pro/dtc( is copied to the browser to open)

Preface

Martial arts world, 9 is a magical number, the secret books of martial arts are "Jiuyang True Sutra" and "Jiuyin True Sutra". If you practice martial arts to the ninth level, you will seek defeat alone and be happy with gratitude and hatred. Taking Wen Changta as an analogy, I divide my study of PG into nine levels, hoping to give some reference to the students who play with the data, and advance layer by layer, until they reach the ranks of experts, enter the workplace, and can handle it easily.

The first layer: get to know PG for the first time and broaden your mind

Database is not only Oracle, DB2, SQLSERVER, but also PostgreSQL (referred to as PG), PG is the most powerful open source database, PG open source friendly, learning PG can be engaged in DBA/ application development / system kernel development and other work, and there will be a lot of room to play, the use of PG can provide effective database management for enterprises, but also can be independently controllable and cost-saving. In today's workplace, knowing more databases will give us more opportunities.

The first time to know PG is to learn the origin and development of PG, its main version characteristics and application fields; to understand the organization, resources and trends of international PG community, to establish contact with Chinese PG chapter and PG community, to interact actively, to obtain learning resources, to try to share, and to show ourselves.

The second floor: installation and use, hands-on practice

"installation and deployment, service management, architecture, initialization configuration, database object management", which is the basis of PG application management, DBA and application development. Of course, the focus of the two roles is slightly different, for example, DBA focuses on architecture deployment, operational stability and efficiency, while application development is more concerned with the creation and management of database objects.

The third layer: grasp the main points and outline

As a relational database, PG undertakes the important task of managing enterprise data. Function and performance are very important, and stability is more important, which is also the primary consideration of DBA. PG database has been developed for more than 30 years, and many international and domestic application cases show that stability can be trusted. Focusing on learning the knowledge points related to stability can make the stability of PG better:

Key points of PG stability:

Memory configuration

Log configuration

Disk management

Concurrency control

Process control

……

PG is powerful and versatile, and it can be used for systematic and modular selective learning. For example, PG has a geographic information data processing function (GIS), which can be let go for the time being, unless it is very interesting. DBA and application developers can learn different functional points in depth according to the needs of their work.

PG feature list:

Safety control

Benchmark test

Monitoring function

Audit function

Concurrency control

Parallel processing

Temporary watch

Trigger

Functions, stored procedures

Carry out the plan

Physical connection

Data caching

Materialized view

Partition table

Master-slave stream replication

Logical replication

Access to external data

……

The fourth floor: proficient in operation, handy

After learning the stability points and the list of features, PG can basically be used to serve the work. Through continuous self-practice, to meet the business needs of work, you will see that your level will continue to improve.

The fifth layer: perspective function, inquiry principle

PG has a variety of function points, and its unique features are suitable for different business scenarios, and with the update and iteration of the PG version, important function points will be continuously optimized. Whether it is the convenience of use or the enhancement of performance, it all reflects the wisdom and pursuit contributed by the source kernel: to make PG continue to improve and better serve the business.

For example, partition table, PG V9 version is realized by table inheritance + trigger, due to the limitation of trigger itself, the performance of data insertion is not high; PG V10 implements built-in partition table, and the partition created is essentially a normal table structure, so it is convenient to manage partition and improve the efficiency of data insertion; PG V11 adds hash partition, default partition, support for update partition key and so on, which improves the function of partition.

The principle of inquiry can be deeply understood from the internal mechanism, and we can also see the essence through the phenomenon in the face of the problem, and find out whether the cause of the problem is improper use or system bug, so that we can deal with the problem better.

Layer 6: problem handling, performance optimization

The purpose of acquiring the fifth layer is to make better use of PG. Problems encountered can be quickly located, analyzed and dealt with. Dealing with problems needs to be accumulated and sorted out at ordinary times. On the one hand, problems thrown by technical groups and website forums are actively considered, sorted out, studied and summarized in case of a rainy day. Some problems are not often encountered, but once they arise, it will be tricky if they have not been dealt with before. On the other hand, there are usually emergency measures to deal with the problems at work. After dealing with the problems, we should try our best to form a problem analysis report, and choose to think deeply, discuss and explore the root causes of some problems, and then file or share them. These are valuable experiences.

Performance optimization has always been the focus of the database brain, and it is also the embodiment of the work value of operation and maintenance, developers. Through the exploration of the inside story, we can see the sun in the clouds and cooperate with relevant tools to improve the access performance of the database through configuration or SQL optimization.

Layer 7: read the source code and locate it quickly

Students majoring in computer science generally have courses in C language. C language can be regarded as one of the greatest programming languages in the world. It can be used to write the kernel of UNIX/Linux, Python/Ruby parser, Apache middleware and so on. Many relational databases can see the shadow of C.

PG source code is also written in C, trying to learn the source code is a challenging thing, just like driving a manual car, if you can operate it skillfully, you will be able to experience the fun. Without any interpretation, we can quickly locate the source code and directly understand the working logic of PG, which helps us to make better use of PG.

The eighth layer: write the source code, perfect and optimize

Writing PG source code is the pursuit or direction of students who are interested in system programming. The strength of PG embodies the wisdom of PG kernel coding engineers around the world. Unfortunately, Chinese names do not appear in the archives of contributors to the PG international community. Of course, there is no lack of excellent system coders in China, and we look forward to the emergence of more and more excellent system coding engineers in the list through your joint efforts.

Link to PG International Community contributor list:

Https://www.postgresql.org/community/contributors/

The ninth floor: integrate and hire freely.

To learn any skill, the ultimate realm is integration, so that you can win without success.

Whether you are engaged in DBA, DEV or system kernel development, through effective methods, persistent accumulation can reach this level, free to sprinkle.

Postscript

The above contents are just some summaries made from the learning point of view of PG. Good use of PG also requires good knowledge of system and database principles, which is also the foundation, just like the foundation, the foundation is stable, and the pagoda stands. The nine-story pagoda of PG learning is for a more vivid and specific description. The learning process does not have to be carried out according to this level. You can choose to study according to your own interests or work needs.

Finally, let's talk about two learning methods:

First: communicate more, read more and practice more.

Communicate more with your predecessors, ask and answer questions in science, read more excellent books, and do more experiments on your own. Books are the ladder of human progress, and the best partner in learning can choose to read according to the stage of study or the needs of work.

Reference bibliography

"the way to practice PostgreSQL-from a small worker to an expert"

"Top of PostgreSQL 9X"

"PostgreSQL actual combat"

"PostgreSQL Guide: insider Exploration"

PostgreSQL server programming

……

Second: invest in learning and borrow from your mentor.

Training is a professional thing, and excellent training instructors can help you quickly grasp the main points and correct methods; help you save time and upgrade your skills more quickly and effectively; and provide more resources, such as a good learning environment, employment opportunities, technical support, etc., and it is also a blessing to have a good teacher in your life.

After reading this article, I think some readers will ask me which floor I am. I can only answer you, "it's a long journey, and I won't stop pursuing it." If this article is helpful to you, it will not be in vain; if you have different opinions, you can also use the PG chapter platform to post or further exchange.

Author: Wei Bo, China PG Branch training and Certification Executive Director, senior database engineer, more than ten years of database operation and maintenance management and training experience, master PostgreSQL architecture deployment, performance optimization, etc., committed to promoting the development of PostgreSQL in China.

Extended reading.

About China PostgreSQL Branch

The PostgreSQL branch of China Open Source Software Alliance was established in 2017, jointly sponsored by a number of major domestic PG ecological enterprises, and is an important achievement produced by PostgreSQL database as a key development and support object of the Open Source Alliance. Under the joint guidance of China Electronic Information Industry Development Research Institute of the Ministry of Industry and Information Technology and China Open Source Software Alliance, with the purpose of improving the development and application level of PostgreSQL in China, it is committed to building PG industrial ecology and promoting the development of PG technology industry-university-research-application. As the only PG industry association in China, the branch undertakes the function of promoting and developing PostgreSQL technology in China.

About the PostgreSQL Industry Development Fund of China

China PostgreSQL Development Fund, initiated and managed by PostgreSQL Branch of China Open Source Software Alliance, is an industrial fund dedicated to promoting the ecological development of PostgreSQL in China. PostgreSQL Development Fund absorbs donations from a number of PG technology application enterprises, with a total size of 10 million.

Chapter mission: relying on PG technology, the catalytic industry win-win.

Chapter functions and tasks: enhance the influence of PG in China and promote the ecological development of PG industry

The key tasks of the chapter are:

PostgresConf.CN (PCC) Conference-PG Ecological Conference with the largest scale and the largest number of international guests in China, PGconf global official meeting.

PostgreSQL China training Certification system-- the only systematic and standardized PG training and certification system in China

PostgreSQL China Ivory Tower Project-jointly with member units and PG industry chain enterprises, and relying on the China PG Industry Development Fund, the project is committed to promoting the ecological development of PG industry, learning and research in colleges and universities, and training more high-level PG technical personnel. The plan is mainly through the co-construction of open source database innovation laboratories in 100 colleges and universities across the country, the university training base of PG branch, and the start-up fund for PG innovation research, with the goal of training more than 50, 000 PG professionals in the next five years.

PostgreSQL China contributor Program-relying on the functions of the China PG Industry Development Fund and the international technology exchange bridge of PG, we will guide and train more Chinese PG technicians to develop into core developers and source contributors in the international community, and cultivate more than one world-class core community contributor team. Help Chinese database kernel research develop by leaps and bounds.

PostgreSQL ecological infrastructure-in addition to the PG training and certification system, the infrastructure to promote the ecological development of PG is built through the PG talent supply and demand platform, the ivory tower project of colleges and universities, and the PG China Support platform. Provide necessary support and support for industrial development.

Member units (as of 2019.11):

Ali Cloud Computing Co., Ltd.

Henkel basic software co., Ltd.

Tencent Cloud computing (Beijing) Co., Ltd.

Beijing Baidu Netcom Science and Technology Co., Ltd

Yunhe Enmo (Beijing) Information Technology Co., Ltd.

Ping an Technology (Shenzhen) Co., Ltd.

Ping an Yi wallet e-commerce co., Ltd

Shanda Diwei software co., Ltd.

National Grid Global Energy Internet Research Institute

Beijing Xuji Electric Co., Ltd.

AsiaInfo Technology (Nanjing) Co., Ltd.

School of computer Science, Wuhan University

Whirlpool (China) Co., Ltd.

Beijing massive data Technology Co., Ltd.

Beijing Sheng Mathematical Technology Co., Ltd.

Beijing excellent Technology Education Technology Co., Ltd.

Beijing Today Intelligent Technology Co., Ltd.

Nanjing Copley Information Technology Co., Ltd.

Chengdu Wenwu Information Technology Co., Ltd.

Beijing Youxuan Software Co., Ltd.

Tianxi Network Technology (Beijing) Co., Ltd.

Guangzhou Yunzheng Technology Co., Ltd.

Beijing Youfan Technology Co., Ltd.

Shanghai Jiarou Information Technology Co., Ltd.

Shanghai Yunbei Network Technology Co., Ltd.

Beijing Sun Tower Technology Co., Ltd.

Hangzhou multiplier Technology Co., Ltd.

Learn about PostgreSQL database ecology, learn about the stories and experiences from O2P, and sincerely invite you to participate in the "2019 data Technology Carnival"! Join us now and enjoy the ultra-low fare discount:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report