Re: preventing encoding conversion while starting up - Mailing list pgsql-hackers

From Tom Lane
Subject Re: preventing encoding conversion while starting up
Date
Msg-id 4979.1027000406@sss.pgh.pa.us
Whole thread Raw
In response to preventing encoding conversion while starting up  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> I have faced a problem with encoding conversion while the database is
> starting up. If postmaster accepts a connection request while in the
> state, it issues a fatal message "The database system is starting
> up". Then the encoding conversion system tries to convert the message
> to client encoding if neccessary (e.g. PGCLIENTENCODING is set for
> postmaster process). Then it calles recomputeNamespacePath() which
> calls GetUserId(), it ends up with an assersion error (see below).

This seems to me to be a fatal objection to the entire concept of
storing encoding status in the database.  If the low-level client
communication code needs to access that information, then the postmaster
is broken and is not repairable.

> To prevent this, I would like to add a public function to postmaster.c
> to know we are in the database starting up phase:

How will that help?
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Magnus Naeslund(f)"
Date:
Subject: [PATCH] Win32 native fixes after SSL updates (+more)
Next
From: Tom Lane
Date:
Subject: Re: Bright ideas required for drop column...