postmaster became multithreaded

Started by Wayne Pichottaabout 9 years ago4 messagesbugs
Jump to latest
#1Wayne Pichotta
wpichotta@truecar.com

Yesterday my computer froze while postgres was running. After a restart I got this message while trying to connect to postgres while developing a rails app:
PG::ConnectionBad
could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "tmp/.s.PGSQL.5432"?

I tried everything I could find googling. I tried to remove the postmaster.pid file that many people on google were talking about but it didn’t exist. I uninstalled and reinstalled postgres with homebrew. I uninstalled and reinstalled the pg rails gem.

I just saw this in my logs:
LOG: postmaster became multithreaded
DETAIL: Please report this to <pgsql-bugs@postgresql.org>.

I decided to follow the directions.

Wayne Pichotta | Senior Manager, Software Engineering
e: wpichotta@truecar.com<mailto:wpichotta@truecar.com>
TRUECar

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Wayne Pichotta (#1)
Re: postmaster became multithreaded

Wayne Pichotta <wpichotta@truecar.com> writes:

I just saw this in my logs:
LOG: postmaster became multithreaded
DETAIL: Please report this to <pgsql-bugs@postgresql.org>.

Just reporting the bare fact of that message isn't helpful.

The known causes of that involve doing something thread-oriented
in an "unsafe" language such as pltclu, plperlu, or plpythonu,
or perhaps bare C --- and even then, you'd have had to go well out
of your way to make it happen in the postmaster process
instead of some child process.

However, you haven't told us what nondefault configuration you
might be using, or what platform this is on, or even what PG version
it is. So it's impossible to speculate further.

FWIW, that's only an informational log message emitted during a
postmaster shutdown that occurred for some other reason. Maybe
it's related to the reason, but again we have zero info. Preceding
lines in the log might have provided some knowledge.

regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#3Noah Misch
noah@leadboat.com
In reply to: Tom Lane (#2)
Re: postmaster became multithreaded

On Tue, Mar 28, 2017 at 04:32:44PM -0400, Tom Lane wrote:

Wayne Pichotta <wpichotta@truecar.com> writes:

I just saw this in my logs:
LOG: postmaster became multithreaded
DETAIL: Please report this to <pgsql-bugs@postgresql.org>.

Just reporting the bare fact of that message isn't helpful.

You can blame me for writing the message that way. Wayne, thanks for
following the message's direction.

The known causes of that involve doing something thread-oriented
in an "unsafe" language such as pltclu, plperlu, or plpythonu,
or perhaps bare C --- and even then, you'd have had to go well out
of your way to make it happen in the postmaster process
instead of some child process.

/*
* On macOS, libintl replaces setlocale() with a version that calls
* CFLocaleCopyCurrent() when its second argument is "" and every relevant
* environment variable is unset or empty. CFLocaleCopyCurrent() makes
* the process multithreaded.

The reported message might be explained by starting the server with
lc_messages='something' in postgresql.conf, then deleting that line from
postgresql.conf and reloading the configuration. Wayne, does that sound like
something you might have done? If not ...

However, you haven't told us what nondefault configuration you
might be using, or what platform this is on, or even what PG version
it is. So it's impossible to speculate further.

... please post the output of the "pg_config" command and describe anything
unusual about your configuration. (We do know this is macOS.)

FWIW, that's only an informational log message emitted during a
postmaster shutdown that occurred for some other reason. Maybe
it's related to the reason, but again we have zero info. Preceding
lines in the log might have provided some knowledge.

Agreed, a larger portion of log would help.

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#4Noah Misch
noah@leadboat.com
In reply to: Noah Misch (#3)
Re: postmaster became multithreaded

On Tue, Apr 11, 2017 at 10:56:00PM -0400, Noah Misch wrote:

On Tue, Mar 28, 2017 at 04:32:44PM -0400, Tom Lane wrote:

Wayne Pichotta <wpichotta@truecar.com> writes:

I just saw this in my logs:
LOG: postmaster became multithreaded
DETAIL: Please report this to <pgsql-bugs@postgresql.org>.

Reporter sent additional facts offline. Root cause was interference from
antivirus software.

/*
* On macOS, libintl replaces setlocale() with a version that calls
* CFLocaleCopyCurrent() when its second argument is "" and every relevant
* environment variable is unset or empty. CFLocaleCopyCurrent() makes
* the process multithreaded.

The reported message might be explained by starting the server with
lc_messages='something' in postgresql.conf, then deleting that line from
postgresql.conf and reloading the configuration.

On further reflection, that sequence of actions would not elicit the reported
message. Startup would fail with "postmaster became multithreaded during
startup" before you could complete the rest of that sequence.

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs