我正在将大量数据导入 PostgreSQL 服务器(跨服务器上的多个数据库)。
当我上次尝试导入数据时,它有效地“崩溃”了我的机器(Ubuntu 10.0.4),因为 /var/log/postgres 包含超过360G的文件(而我只进行了大约 1 个导入的一半)。
我不确定日志文件的用途(我猜它必须是为了符合 ACID 等)。但是我想知道是否有办法减少导入大量数据时生成的日志文件的大小。
我最近使用 apt-get install 在 Ubuntu 10.0.4 上安装了 pg 8.4。
它将 pg 安装为一项服务,该服务在机器启动时启动。但是,我已经在我希望 postgres 使用的特定位置创建了一个数据库集群。
这是我如何创建集群的命令行输出:
username@jupiter:~$ sudo /usr/lib/postgresql/8.4/bin/initdb --encoding=UTF8 --pgdata=/mydata/pgdbdata/
initdb: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.
username@jupiter:~$ /usr/lib/postgresql/8.4/bin/initdb --encoding=UTF8 --pgdata=/mydata/pgdbdata/
The files belonging to this database system will be owned by user "username".
This user must also own the server process.
The database cluster will be initialized with locale en_US.utf8.
The default text search …Run Code Online (Sandbox Code Playgroud) 在过去的 6 个小时里,我一直在尝试在 Ubuntu 上安装 Oracle 11g。显然,我并不是唯一一个为此而苦苦挣扎的人,因为网上有很多(通常是误导性的)“文档”,关于如何解决人们在 Ubuntu 上安装 Oracle 11g 时总会遇到的各种错误。
我遵循了一个这样的“指南” - (this one),并遵循了所有说明。然后我花了最后 5 个小时尝试配置 Oracle,但无济于事。
当我运行时/etc/init.d/oracle-xe configure,我得到了响应(几分钟后):
Starting Oracle Net Listener...Done
Configuring database...
Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details
Run Code Online (Sandbox Code Playgroud)
以下是我的 /u01/app/oracle/product/11.2.0/xe/config/log 文件夹中文件的内容:
CloneDbCreation.log
Control file created.
PL/SQL procedure successfully completed.
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2233344 bytes
Variable Size 616565760 bytes
Database Buffers 444596224 bytes …Run Code Online (Sandbox Code Playgroud)