[pgsql-jp: 37792] Re: Postgresが無応答になる問題

Bobby amidtown @ yahoo.co.jp
2006年 12月 14日 (木) 21:36:55 JST


> log_min_message を debug5 などにしてみれば、どこで止まっているかなど確
> 認できるかもしれません。ただし、debug5 は大量にログが出るので本番環境
> であればお勧めしません…。
>
早速debug5でログを出力してみました。
その結果、いずれもLOG出力に関係するところでとまっているように見えたため、
以下のようにパラメータを設定し
	log_destination =''
	log_min_messages = panic
DBを再起動しSQLを実行してみましたがやはり無応答になる現象が出てる状態です。
なぜでしょうか?

postgres.cの1105行目でstop
	/*
	 * Combine processing here as we need to calculate the query
duration in
	 * both instances.
	 */
	if (save_log_duration || save_log_min_duration_statement != -1)
	{
		.
		.
		/*
		 * Output a duration_statement to the log if the query has
exceeded
		 * the min duration, or if we are to print all durations.
		 */
		if (save_log_min_duration_statement == 0 ||
			(save_log_min_duration_statement > 0 &&
			 usecs >= save_log_min_duration_statement * 1000))
			ereport(LOG,
					(errmsg("duration: %ld.%03ld ms
statement: %s%s",
							(long)
((stop_t.tv_sec - start_t.tv_sec) * 1000 +

(stop_t.tv_usec - start_t.tv_usec) / 1000),
							(long)
(stop_t.tv_usec - start_t.tv_usec) % 1000,
							query_string,
	   	 ここでストップ ============>		prepare_string ?
prepare_string : ""))); <============ ここでストップ

		.
		.
	}

postmaster.cの4055行目でstop
	for (offset = 0; offset < win32_numChildren; offset +=
MAXIMUM_WAIT_OBJECTS)
	{
		unsigned long num = Min(MAXIMUM_WAIT_OBJECTS,
win32_numChildren - offset);

		ret = WaitForMultipleObjects(num,
&win32_childHNDArray[offset], FALSE, 0);
		switch (ret)
		{
======>		case WAIT_FAILED:  <============ ここでストップ
				ereport(LOG,
						(errmsg_internal("failed to
wait on %lu of %lu children: error code %d",
							 num,
win32_numChildren, (int) GetLastError())));
				return -1;
		.
		.
	}

--------------------------------------
Start Yahoo! Auction now! Check out the cool campaign
http://pr.mail.yahoo.co.jp/auction/




pgsql-jp メーリングリストの案内