简体   繁体   English

PostgreSQL 9:无法fsync文件“ base / 16386”:无效的参数

[英]PostgreSQL 9: could not fsync file “base/16386”: Invalid argument

I'm trying to test a small PostgreSQL setup, so I cobbled together a quick local install. 我正在尝试测试一个小的PostgreSQL设置,所以我拼凑了一个快速的本地安装程序。 However, when I'm trying to create my personal db with createdb, it chokes on errors like this (notably, it starts with base/16384 the first time, and increments each time I run it). 但是,当我尝试使用createdb创建我的个人数据库时,它会遇到类似这样的错误(值得注意的是,它第一次以base / 16384开始,每次运行时都会递增)。 Anyone know what's going on here, or if there's some trivial config I missed that would cause this? 有人知道这是怎么回事,或者如果我错过了一些琐碎的配置会导致这种情况? Thanks, and this is somewhat time-critical, so please respond if you do know anything. 谢谢,这有点时间紧迫,因此,如果您确实知道任何信息,请回复。 Thanks! 谢谢!

UPDATES: 更新:
I'm running this on a CentOS 5 server, apologies that I don't have too many further details (it's a shared account on that server). 我正在CentOS 5服务器上运行此程序,很抱歉我没有太多详细信息(它是该服务器上的共享帐户)。 uname -a has the following output: uname -a具有以下输出:

Linux {OMITTED} 2.6.18-194.11.4.el5 #1 SMP Tue Sep 21 05:04:09 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux Linux {OMITTED} 2.6.18-194.11.4.el5#1 SMP Tue Sep 21 05:04:09 EDT 2010 x86_64 x86_64 x86_64 GNU / Linux

I installed PostgreSQL from source from: 我从以下来源安装了PostgreSQL:

http://wwwmaster.postgresql.org/download/mirrors-ftp/source/v9.0.1/postgresql-9.0.1.tar.bz2 http://wwwmaster.postgresql.org/download/mirrors-ftp/source/v9.0.1/postgresql-9.0.1.tar.bz2

built in my home directory and installed to prefix=$HOME/local/pgsql. 内置在我的主目录中,并安装到prefix = $ HOME / local / pgsql。

Here's a terminal readout for me attempting to create my user's db on a fresh data setup: 这是我尝试在新的数据设置上创建用户数据库的终端读数:

[htung@{OMITTED}:~]$ killall postgres [htung @ {OMITTED}:〜] $ killall postgres
LOG: autovacuum launcher shutting down 日志:自动真空启动器关闭
LOG: received smart shutdown request 日志:收到智能关机请求
LOG: shutting down 日志:正在关闭
LOG: database system is shut down 日志:数据库系统已关闭
[htung@{OMITTED}:~]$ rm -r tmp [htung @ {OMITTED}:〜] $ rm -r tmp
mk[1]+ Done ../local/pgsql/bin/postgres -D $HOME/tmp (wd: ~/tmp) mk [1] +完成../local/pgsql/bin/postgres -D $ HOME / tmp(wd:〜/ tmp)
(wd now: ~) (现在wd:〜)
[htung@{OMITTED}:~]$ mkdir tmp [htung @ {OMITTED}:〜] $ mkdir tmp
[htung@{OMITTED}:~]$ local/pgsql/bin/initdb -D $HOME/tmp [htung @ {OMITTED}:〜] $ local / pgsql / bin / initdb -D $ HOME / tmp
The files belonging to this database system will be owned by user "htung". 属于该数据库系统的文件将由用户“ htung”拥有。
This user must also own the server process. 该用户还必须拥有服务器进程。

The database cluster will be initialized with locale en_US.UTF-8. 将使用语言环境en_US.UTF-8初始化数据库集群。
The default database encoding has accordingly been set to UTF8. 因此,默认数据库编码已设置为UTF8。
The default text search configuration will be set to "english". 默认的文本搜索配置将设置为“英语”。

fixing permissions on existing directory /afs/{OMITTED}/htung/tmp ... ok 修复现有目录/ afs / {OMITTED} / htung / tmp上的权限...确定
creating subdirectories ... ok 创建子目录...好
selecting default max_connections ... 100 选择默认的max_connections ... 100
selecting default shared_buffers ... 32MB 选择默认的shared_buffers ... 32MB
creating configuration files ... ok 创建配置文件...确定
creating template1 database in /afs/{OMITTED}/htung/tmp/base/1 ... ok 在/ afs / {OMITTED} / htung / tmp / base / 1中创建template1数据库...确定
initializing pg_authid ... ok 初始化pg_authid ...好
initializing dependencies ... ok 初始化依赖项...好
creating system views ... ok 创建系统视图...确定
loading system objects' descriptions ... ok 正在加载系统对象的描述...确定
creating conversions ... ok 建立转换...好
creating dictionaries ... ok 创建字典...好吧
setting privileges on built-in objects ... ok 在内置对象上设置权限...确定
creating information schema ... ok 创建信息模式...好
loading PL/pgSQL server-side language ... ok 加载PL / pgSQL服务器端语言...确定
vacuuming database template1 ... ok 正在清理数据库template1 ...确定
copying template1 to template0 ... ok 将template1复制到template0 ...确定
copying template1 to postgres ... ok 将template1复制到postgres ...确定

WARNING: enabling "trust" authentication for local connections 警告:为本地连接启用“信任”身份验证
You can change this by editing pg_hba.conf or using the -A option the 您可以通过编辑pg_hba.conf或使用-A选项来更改此设置。
next time you run initdb. 下次运行initdb时。

Success. 成功。 You can now start the database server using: 现在,您可以使用以下命令启动数据库服务器:

local/pgsql/bin/postgres -D /afs/{OMITTED}/htung/tmp  

or 要么
local/pgsql/bin/pg_ctl -D /afs/{OMITTED}/htung/tmp -l logfile start 本地/ pgsql / bin / pg_ctl -D / afs / {OMITTED} / htung / tmp -l日志文件开始

[htung@{OMITTED}:~]$ local/pgsql/bin/postgres -D $HOME/tmp [htung @ {OMITTED}:〜] $ local / pgsql / bin / postgres -D $ HOME / tmp
LOG: database system was shut down at 2010-11-15 13:47:25 PST 日志:数据库系统在PST于2010-11-15 13:47:25关闭
LOG: autovacuum launcher started 日志:自动真空启动器已启动
LOG: database system is ready to accept connections 日志:数据库系统已准备好接受连接

[1]+ Stopped local/pgsql/bin/postgres -D $HOME/tmp [1] +已停止本地/ pgsql / bin / postgres -D $ HOME / tmp
[htung@{OMITTED}:~]$ bg [htung @ {OMITTED}:〜] $ bg
[1]+ local/pgsql/bin/postgres -D $HOME/tmp & [1] +本地/ pgsql / bin / postgres -D $ HOME / tmp和
[htung@{OMITTED}:~]$ local/pgsql/bin/createdb [htung @ {OMITTED}:〜] $ local / pgsql / bin / createdb
ERROR: could not fsync file "base/16384": Invalid argument 错误:无法fsync文件“ base / 16384”:无效的参数
STATEMENT: CREATE DATABASE htung; 陈述:创建数据库htung;

createdb: database creation failed: ERROR: could not fsync file "base/16384": Invalid argument createdb:数据库创建失败:错误:无法fsync文件“ base / 16384”:无效的参数
[htung@{OMITTED}:~]$ [htung @ {OMITTED}:〜] $

I would guess that you're possibly running into the SE linux system here. 我猜您可能正在这里进入SE linux系统。 I'd recommend to either turn off SELinux and see if that works, or to install from RPMs available from the postgresql website. 我建议关闭SELinux并查看它是否有效,或者从postgresql网站上可用的RPM安装。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法连接到 PostgreSQL 13,无法打开文件« global/1262 »:无效参数 - Unable to connect to PostgreSQL 13, could not open file« global/1262 » : Invalid argument 首先迁移到新的PostgreSQL数据库。 ValueError:以10为底的int()的无效文字:'' - First migration to a new PostgreSQL database. ValueError: invalid literal for int() with base 10: '' 在 PostgreSQL 中关闭 fsync 是否会损坏所有数据库或仅我正在使用的特定表 - Does turning off fsync in PostgreSQL can corrupt all the database or only the specific table I'm working with Oracle SQL无效参数 - Oracle SQL invalid argument TABLESPACE PostgreSQL数据库的作用 - Role of TABLESPACE PostgreSQL data base 我的/etc/sysctl.conf文件在哪里? Postgresql Fatal无法创建共享内存段 - Where is my /etc/sysctl.conf file? Postgresql Fatal could not create shared memory segment PostgreSQL:无法打开文件进行读取。 没有权限。 SQL 状态:42501 - PostgreSQL: Could not open file for reading. Permission denied. SQL state: 42501 PostgreSQL:'psql:错误:无法连接到服务器:没有这样的文件或目录'.s.PGSQL.5432 - PostgreSQL : 'psql: error: could not connect to server: No such file or directory' .s.PGSQL.5432 以 10 为底的值的无效文字 - Invalid literal for value with base 10 在PostgreSQL函数中使用参数运行系统命令 - Running system command with argument in a PostgreSQL function
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM