问题描述
我正在支持一些旧的PostgreSQL 8.3 / 4数据库,并将它们迁移到一些较新的Windows Server 2008硬件上。
I'm supporting some legacy PostgreSQL 8.3/4 databases, and migrating them onto some newer Windows Server 2008 hardware.
我被告知NAMEDATALEN数字需要高于默认值。
I've been informed that the NAMEDATALEN figure needs to be higher than the default.
据我了解,NAMEDATALEN配置不存在于配置文件中,而是需要在编译应用程序时进行设置。
As far as I understand, the NAMEDATALEN configuration does not exist in a config file, but rather needs to be set on compiling the application.
已经在新包装上安装了PostgreSQL 9.0,我想知道是否有可能在事后更改此配置?
Having already installed PostgreSQL 9.0 on the new box, I'm wondering if it's possible to alter this configuration after the fact?
推荐答案
无法更改此选项-需要在源文件 src / include / pg_config_manual.h
。然后需要重新编译Postgres,使用 initdb
初始化数据目录并恢复数据。然后,每个安全和错误修正的次要版本都必须进行修补和重新编译。
It's not possible to alter this option - it needs to be changed in source file src/include/pg_config_manual.h
. Then Postgres needs to be recompiled, data directory initialized with initdb
and data restored. Every security and bugfix minor release will then have to be patched and recompiled. This is bad thing to do.
这对修补应用程序源以使用较短的表/函数/等名称更容易且更明智。最多63个字符,足以用于 insanely_stupid_and_totally_impractical_table_or_function_name0
This is much easier and sensible to patch an application source to use shorter table/function/etc names. The maximum is 63 characters, which is enough for insanely_stupid_and_totally_impractical_table_or_function_name0
也许您的架构确实不需要更长的名称,并且这项要求只是客户端应用程序长期版本中的产物。选中此选项-尝试将架构和功能导入新数据库。
Maybe your schema really does not need longer names, and this requirement it is just an artifact from long gone version of your client application. Check this - try to import a schema and functions to new database.
该问题可能应该迁移到。
And this question should probably be migrated to serverfault.com.
这篇关于安装PostgreSQL 9.0后如何更改NAMEDATALEN配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!