In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Today, I will talk to you about how to adjust wal_segment_size to cause PostgreSQL to stop service. Many people may not know much about it. In order to make you understand better, the editor summarized the following content for you. I hope you can get something according to this article.
Recently, it is consistent that MYSQL and PostgreSQL walk on two legs. There is a reason for this. Not all enterprises are Internet enterprises, and not all enterprise programmers can understand the use of MYSQL well, nor can they force programmers to turn complex SQL into programs. There is no doubt about the compatibility of PostgreSql and the stronger handling of complex SQL statements. So this is also one of the reasons why some financial institutions and enterprises turn to POSTGRESQL. So DBER also comprehensively evaluate whether it is MYSQL or POSTGRESQL according to the actual situation and business situation, as well as the level of programmers and the stability of the business.
For programmers, there is no doubt that the most important thing to restore is the stability and compatibility of POSTGRESQL and some special features that other databases do not have. I don't want to talk about this today, because these things are obvious to all. Recently, there is a project to prepare to use POSTGRESQL as the basic database, there is no problem in adjusting the wal_segment_size itself, but after the adjustment, there is a sudden POSTGRESQL down machine and can no longer start the problem, here talk about this pit.
First of all, as mentioned before, the parameters that POSTGRESQL can adjust inside the database were originally set in wal segment size in PostgreSQL during compilation, but in the current version of PG 11, they are adjusted in the initial database or through pg_resetwal. If this problem should not occur in the initial database, but using the pg_resetwal command to reset the pg_wal, there will be a problem.
The specific process is as follows
1 shut down the database service of PostgreSQL
2 use the pg_resetwal command to reset wal size
3 restart the server
4 error report
FATAL: "min_wal_size" must be at least twice "wal_segment_size"
The error message indicates that min_wal_size must be twice as large as wal_segment_size
Let's adjust the min_wal_size parameters.
Restart postgreSQL OK again
In fact, what prompted me to adjust wal_segment_size was an article from a bank, which mentioned that due to the small setting of wal_segement_size and some configuration problems, resulting in the crazy growth of wal_log, they were going to adjust this parameter later, but it was mentioned in the article that there was no way to adjust wal_segement_size because it could only be adjusted during compilation, but it could not be adjusted after installation. The POSTGRESQL used by a bank should be less than 11, so there is a problem that the PG 11 is adjusted and the machine cannot be started.
After reading the above, do you have any further understanding of how to adjust wal_segment_size to cause PostgreSQL to stop service? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.