Thread: NAMEDATALEN

NAMEDATALEN

From
"Thomas F. O'Connell"
Date:
is it safe to change NAMEDATALEN, dump an existing database, recompile,
and then restore the database?

in src/include/postgres_ext.h, it mentions that "... databases with
different NAMEDATALEN's cannot interoperate!", and i was wondering if
included when altering NAMEDATALEN for a database that already has data
even if performing a pg_dump on it.

-tfo


Re: NAMEDATALEN

From
Bruce Momjian
Date:
You can dump and reload.  It is saying all databases under the same
postmaster have to have the same NAMEDATALEN.

> is it safe to change NAMEDATALEN, dump an existing database, recompile,
> and then restore the database?
>
> in src/include/postgres_ext.h, it mentions that "... databases with
> different NAMEDATALEN's cannot interoperate!", and i was wondering if
> included when altering NAMEDATALEN for a database that already has data
> even if performing a pg_dump on it.
>
> -tfo
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: NAMEDATALEN

From
Tom Lane
Date:
"Thomas F. O'Connell" <tfo@monsterlabs.com> writes:
> in src/include/postgres_ext.h, it mentions that "... databases with
> different NAMEDATALEN's cannot interoperate!", and i was wondering if
> included when altering NAMEDATALEN for a database that already has data
> even if performing a pg_dump on it.

Dump, recompile, initdb, reload should work.  Be aware however that
NAMEDATALEN is visible to clients (in particular, in libpq's
datastructure for Notify results), so you may have binary-compatibility
problems if you neglect to recompile your clients too.  I suspect that
is what the comment is really referring to.

            regards, tom lane