I read pg_upgrade code glance over, and found 4 issues in it.
Are there any issues to be fixed before 9.0 release?

    2. extern PGDLLIMPORT
    3. pathSeparator

==== 1. NAMEDATASIZE ====
pg_upgrade has the following definition, but should it be just NAMEDATALEN?

    /* Allocate for null byte */
    #define NAMEDATASIZE                (NAMEDATALEN + 1)

Table names should be in NAMEDATELEN - 1 bytes. At least 64th bytes in 
"name" data is always '\0'.

    =# CREATE TABLE "1234567890...(total 70 chars)...1234567890" (i int);
    NOTICE:  identifier "123...890" will be truncated to "123...0123"

==== 2. extern PGDLLIMPORT ====
pg_upgrade has own definitions of
    extern PGDLLIMPORT Oid binary_upgrade_next_xxx
in pg_upgrade_sysoids.c. But those variables are not declared as
PGDLLIMPORT in the core. Can we access unexported variables here?

==== 3. pathSeparator ====
Path separator for Windows is not only \ but also /. The current code
ignores /. Also, it might not work if the path string including multi-byte
characters that have \ (0x5c) in the second byte.

==== 4. EDB_NATIVE_LANG ====
Of course it is commented out with #ifdef, but do we have codes
for EDB in core?

Takahiro Itagaki
NTT Open Source Software Center

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to