开发者

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. 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). 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). uname -a has the following output:

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:

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.

Here's a terminal readout for me attempting to create my user's db on a fresh data setup:

[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

mk[1]+ Done ../local/pgsql/bin/postgres -D $HOME/tmp (wd: ~/tmp)

(wd now: ~)

[htung@{OMITTED}:~]$ mkdir tmp

[htung@{OMITTED}:~]$ local/pgsql/bin/initdb -D $HOME/tmp

The files belonging to this database system will be owned by user "htung".

This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.

The default 开发者_StackOverflow中文版database encoding has accordingly been set to UTF8.

The default text search configuration will be set to "english".

fixing permissions on existing directory /afs/{OMITTED}/htung/tmp ... ok

creating subdirectories ... ok

selecting default max_connections ... 100

selecting default shared_buffers ... 32MB

creating configuration files ... ok

creating template1 database in /afs/{OMITTED}/htung/tmp/base/1 ... ok

initializing pg_authid ... ok

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

vacuuming database template1 ... ok

copying template1 to template0 ... ok

copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections

You can change this by editing pg_hba.conf or using the -A option the

next time you run 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

[htung@{OMITTED}:~]$ local/pgsql/bin/postgres -D $HOME/tmp

LOG: database system was shut down at 2010-11-15 13:47:25 PST

LOG: autovacuum launcher started

LOG: database system is ready to accept connections

[1]+ Stopped local/pgsql/bin/postgres -D $HOME/tmp

[htung@{OMITTED}:~]$ bg

[1]+ local/pgsql/bin/postgres -D $HOME/tmp &

[htung@{OMITTED}:~]$ local/pgsql/bin/createdb

ERROR: could not fsync file "base/16384": Invalid argument

STATEMENT: CREATE DATABASE htung;

createdb: database creation failed: ERROR: could not fsync file "base/16384": Invalid argument

[htung@{OMITTED}:~]$


I would guess that you're possibly running into the SE linux system here. I'd recommend to either turn off SELinux and see if that works, or to install from RPMs available from the postgresql website.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜