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 > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to solve the errors caused by PostgreSQL date format". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to solve the errors caused by PostgreSQL date format.
Due to the different date format, PostgreSQL will have problems when performing recovery read recovery.conf.
Error message
In the recovery.conf file, the settings of recovery_target_time
Recovery_target_time='2019-3-11 14-14-40-40-00'
If you press the above settings, an error will occur
[xdb@localhost testdb] $pg_ctl startwaiting for server to start....2019-03-11 14 CST 04VR 45.121 CST [21749] LOG: listening on IPv4 address "0.0.0.0", port 54322019-03-11 14VR 04VR 45.121 CST [21749] LOG: listening on IPv6 address ":" Port 54322019-03-11 14 LOG 45.123 CST [21749] LOG: listening on Unix socket "/ tmp/.s.PGSQL.5432" 2019-03-11 14 LOG 04LOG 45.135 CST [21749] LOG: redirecting log output to logging collector process2019-03-11 1414 LOG 45.135 CST [21749] HINT: Future log output will appear in directory "log". Stopped waitingpg_ctl: could not start serverExamine the log output.
Log hint
[xdb@localhost log] $cat postgresql-2019-03-11_122129.csv2019-03-11 12 11_122129.csv2019 21 CST,1680,5c85e249.690,1,2019 29.233 CST,1680,5c85e249.690,1,2019-03-11 12:21:29 CST,0,LOG,00000, "ending log output to stderr", "Futu2019-03-11 12 12 CST,1680,5c85e249.690,1,2019-03-11 12:21:29 CST,0,LOG,00000," database system was interrupted La2019-03-11 12 syntax error in file 21 CST,0,FATAL,42601 29.249 CST,1682,5c85e249.692,2,2019-03-11 12:21:29 CST,0,FATAL,42601, "syntax error in file"recovery.c2019-03-11 12 12 V 21 syntax error in file 29.250 CST,1680,5c85e249.690,2,2019-03-11 12:21:29 CST,0,LOG,00000," startup process (PID 1682) exited w2019-03-11 1221 syntax error in file 2019-03-11 12:21:29 CST,0,LOG,00000, "aborting startup due to startup pro2019-03-11 12 12 CST,1680,5c85e249.690,4,2019-03-11 12:21:29 CST,0,LOG,00000," database system is shut down "
There is a syntax error in line 3 of the recovery.conf file, which is guessed to be a date format problem.
Date format
Testdb=# show datestyle; DateStyle-ISO, MDY (1 row)
The date format of PG is month-day-year. The above problem can be solved by adjusting the date of recovery.conf file to this format.
Thank you for your reading, the above is the content of "how to solve the errors caused by PostgreSQL date format". After the study of this article, I believe you have a deeper understanding of how to solve the errors caused by PostgreSQL date format. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.