2024-07-09 14:34:43.759 CST [1] LOG: starting PostgreSQL 15.3 (Debian 15.3-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit 2024-07-09 14:34:43.759 CST [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2024-07-09 14:34:43.759 CST [1] LOG: listening on IPv6 address "::", port 5432 2024-07-09 14:34:43.782 CST [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2024-07-09 14:34:43.804 CST [29] LOG: database system was shut down at 2024-07-08 12:46:18 CST 2024-07-09 14:34:43.804 CST [29] LOG: invalid record length at 0/16B5C28: wanted 24, got 0 2024-07-09 14:34:43.804 CST [29] LOG: invalid primary checkpoint record 2024-07-09 14:34:43.804 CST [29] PANIC: could not locate a valid checkpoint record 2024-07-09 14:34:44.209 CST [1] LOG: startup process (PID 29) was terminated by signal 6: Aborted 2024-07-09 14:34:44.209 CST [1] LOG: aborting startup due to startup process failure 2024-07-09 14:34:44.211 CST [1] LOG: database system is shut down PostgreSQL Database directory appears to contain a database; Skipping initialization 2024-07-09 14:34:45.819 CST [1] LOG: starting PostgreSQL 15.3 (Debian 15.3-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit 2024-07-09 14:34:45.819 CST [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2024-07-09 14:34:45.819 CST [1] LOG: listening on IPv6 address "::", port 5432 2024-07-09 14:34:45.837 CST [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2024-07-09 14:34:45.843 CST [29] LOG: database system was shut down at 2024-07-08 12:46:18 CST 2024-07-09 14:34:45.843 CST [29] LOG: invalid record length at 0/16B5C28: wanted 24, got 0 2024-07-09 14:34:45.843 CST [29] LOG: invalid primary checkpoint record 2024-07-09 14:34:45.843 CST [29] PANIC: could not locate a valid checkpoint record 2024-07-09 14:34:46.216 CST [1] LOG: startup process (PID 29) was terminated by signal 6: Aborted 2024-07-09 14:34:46.216 CST [1] LOG: aborting startup due to startup process failure 2024-07-09 14:34:46.217 CST [1] LOG: database system is shut down PostgreSQL Database directory appears to contain a database; Skipping initialization 2024-07-09 14:34:48.599 CST [1] LOG: starting PostgreSQL 15.3 (Debian 15.3-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit 2024-07-09 14:34:48.600 CST [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2024-07-09 14:34:48.600 CST [1] LOG: listening on IPv6 address "::", port 5432 2024-07-09 14:34:48.626 CST [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2024-07-09 14:34:48.635 CST [28] LOG: database system was shut down at 2024-07-08 12:46:18 CST 2024-07-09 14:34:48.635 CST [28] LOG: invalid record length at 0/16B5C28: wanted 24, got 0 2024-07-09 14:34:48.635 CST [28] LOG: invalid primary checkpoint record 2024-07-09 14:34:48.635 CST [28] PANIC: could not locate a valid checkpoint record 2024-07-09 14:34:48.976 CST [1] LOG: startup process (PID 28) was terminated by signal 6: Aborted 2024-07-09 14:34:48.976 CST [1] LOG: aborting startup due to startup process failure 2024-07-09 14:34:48.977 CST [1] LOG: database system is shut down

2024-07-09 14:34:43.759 CST [1] LOG: starting PostgreSQL 15.3 (Debian 15.3-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit 2024-07-09 14:34:43.759 CST [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2024-07-09 14:34:43.759 CST [1] LOG: listening on IPv6 address "::", port 5432 2024-07-09 14:34:43.782 CST [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2024-07-09 14:34:43.804 CST [29] LOG: database system was shut down at 2024-07-08 12:46:18 CST 2024-07-09 14:34:43.804 CST [29] LOG: invalid record length at 0/16B5C28: wanted 24, got 0 2024-07-09 14:34:43.804 CST [29] LOG: invalid primary checkpoint record 2024-07-09 14:34:43.804 CST [29] PANIC: could not locate a valid checkpoint record 2024-07-09 14:34:44.209 CST [1] LOG: startup process (PID 29) was terminated by signal 6: Aborted 2024-07-09 14:34:44.209 CST [1] LOG: aborting startup due to startup process failure 2024-07-09 14:34:44.211 CST [1] LOG: database system is shut down PostgreSQL Database directory appears to contain a database; Skipping initialization 2024-07-09 14:34:45.819 CST [1] LOG: starting PostgreSQL 15.3 (Debian 15.3-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit 2024-07-09 14:34:45.819 CST [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2024-07-09 14:34:45.819 CST [1] LOG: listening on IPv6 address "::", port 5432 2024-07-09 14:34:45.837 CST [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2024-07-09 14:34:45.843 CST [29] LOG: database system was shut down at 2024-07-08 12:46:18 CST 2024-07-09 14:34:45.843 CST [29] LOG: invalid record length at 0/16B5C28: wanted 24, got 0 2024-07-09 14:34:45.843 CST [29] LOG: invalid primary checkpoint record 2024-07-09 14:34:45.843 CST [29] PANIC: could not locate a valid checkpoint record 2024-07-09 14:34:46.216 CST [1] LOG: startup process (PID 29) was terminated by signal 6: Aborted 2024-07-09 14:34:46.216 CST [1] LOG: aborting startup due to startup process failure 2024-07-09 14:34:46.217 CST [1] LOG: database system is shut down PostgreSQL Database directory appears to contain a database; Skipping initialization 2024-07-09 14:34:48.599 CST [1] LOG: starting PostgreSQL 15.3 (Debian 15.3-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit 2024-07-09 14:34:48.600 CST [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2024-07-09 14:34:48.600 CST [1] LOG: listening on IPv6 address "::", port 5432 2024-07-09 14:34:48.626 CST [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2024-07-09 14:34:48.635 CST [28] LOG: database system was shut down at 2024-07-08 12:46:18 CST 2024-07-09 14:34:48.635 CST [28] LOG: invalid record length at 0/16B5C28: wanted 24, got 0 2024-07-09 14:34:48.635 CST [28] LOG: invalid primary checkpoint record 2024-07-09 14:34:48.635 CST [28] PANIC: could not locate a valid checkpoint record 2024-07-09 14:34:48.976 CST [1] LOG: startup process (PID 28) was terminated by signal 6: Aborted 2024-07-09 14:34:48.976 CST [1] LOG: aborting startup due to startup process failure 2024-07-09 14:34:48.977 CST [1] LOG: database system is shut down
用户500598139
2024年07月09日
|
浏览 199

根据日志信息显示,PostgreSQL在启动过程中遇到了严重的问题。日志中出现了"invalid record length"、“invalid primary checkpoint record”、"PANIC: could not locate a valid checkpoint record"等错误,这表明数据库无法找到有效的检查点记录,导致启动过程失败并终止。

可能的原因是数据库文件损坏或者启动过程中发生了意外情况。建议尝试以下解决方法:

  1. 尝试恢复数据库备份文件。
  2. 检查数据库文件的完整性,确保文件没有损坏。
  3. 尝试手动进行数据库恢复操作,如使用pg_resetwal命令等。
  4. 检查数据库配置文件是否正确,特别是检查检查点相关的配置项。
  5. 查看系统日志以获取更多有关启动过程失败的详细信息。

如果以上方法无法解决问题,可能需要进一步分析日志以确定根本原因,并采取相应的措施来修复数据库启动问题。

我要提问
复制内容
分享给好友
AI编程问答网 免责声明:
以上内容除特别注明外均来源于网友提问,AI编程问答网回答,权益归原著者所有;
 
下一篇:<template> <div> <el-upload :action="uploadAction" :headers="uploadHeaders" list-type="picture-card" :on-preview="handlePictureCardPreview" :on-remove="handleRemove" :on-success="handleUploadSuccess" :file-list="imageList" :before-upload="beforeAvatarUpload" > <el-icon><Plus /></el-icon> </el-upload> <el-dialog v-model="dialogVisible"> <img width="100%" :src="dialogImageUrl" alt="" > </el-dialog> </div> </template> <script setup> import $cookie from 'vue-cookies' import { ElMessage } from 'element-plus' const uploadHeaders = { Authorization: $cookie.get('Authorization') } const uploadAction = http.adornUrl('/admin/file/upload/element') const props = defineProps({ modelValue: { default: '', type: String } }) const emit = defineEmits(['update:modelValue']) const dialogImageUrl = ref('') const dialogVisible = ref(false) const resourcesUrl = import.meta.env.VITE_APP_RESOURCES_URL const imageList = computed(() => { const res = [] if (props.modelValue) { const imageArray = props.modelValue?.split(',') for (let i = 0; i < imageArray.length; i++) { res.push({ url: resourcesUrl + imageArray[i], response: imageArray[i] }) } } emit('update:modelValue', props.modelValue) return res }) /** * 图片上传 */ // eslint-disable-next-line no-unused-vars const handleUploadSuccess = (response, file, fileList) => { const pics = fileList.map(file => { if (typeof file.response === 'string') { return file.response } return file.response.data }).join(',') emit('update:modelValue', pics) } /** * 限制图片上传大小 */ const beforeAvatarUpload = (file) => { const isJPG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif' || file.type === 'image/jpg' if (!isJPG) { ElMessage.error('上传图片只能是jpeg/jpg/png/gif 格式!') } const isLt2M = file.size / 1024 / 1024 < 2 if (!isLt2M) { ElMessage.error('上传图片大小不能超过 2MB!') } return isLt2M && isJPG } // eslint-disable-next-line no-unused-vars const handleRemove = (file, fileList) => { const pics = fileList.map(file => { if (typeof file.response === 'string') { return file.response } return file.response.data }).join(',') emit('update:modelValue', pics) } const handlePictureCardPreview = (file) => { dialogImageUrl.value = file.url dialogVisible.value = true } </script> 把这个改成多视频上传