From: Tomas Vondra <tv@fuzzy.cz>
To: pgsql-bugs@postgresql.org
Subject: Re: crazy logging from PG 8.4
Date: Wed, 23 Oct 2013 21:48:27 +0200
Message-ID: <5268280B.2010204@fuzzy.cz> (raw)
In-Reply-To: <CAKuK5J3=boRoTDVvCXHQuriyu5w00mz8miTtUoNH1O7tp_eqYA@mail.gmail.com>
References: <CAKuK5J3pOn9TnZ0LvZV7G+8bT8PTzAXti4+TLpWzuAd0s+2CNA@mail.gmail.com>
<4b1a3cc650d1ab10de13360bf2222dc2.squirrel@sq.gransy.com>
<28141.1382540089@sss.pgh.pa.us>
<CAKuK5J3=boRoTDVvCXHQuriyu5w00mz8miTtUoNH1O7tp_eqYA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 23.10.2013 20:56, Jon Nelson wrote:
> On Wed, Oct 23, 2013 at 9:54 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> "Tomas Vondra" <tv@fuzzy.cz> writes:
>>> On 23 Říjen 2013, 16:00, Jon Nelson wrote:
>>>> After several days of running a simple query over a very large dataset
>>>> (more than a terabyte), I logged in to note that postgresql had
>>>> decided to log *billions* of log lines.
>>
>>> First guess is that you enabled detailed logging in config.
>>
>> I think it's trace_sort.
>
> I think you are right.
>
> Let's say that there would end up being 2.7+ billion groups. Does
> that scenario help to explain? I guess I'd like to see trace_sort have
> a new value in addition to just "on" and "off", perhaps "external". I
> don't really care about internal sorts but I do care about external
> sorts. Right now, they're the only (minimal!) insight I have into how
> the query is progressing.
Yes, that sounds plausible, because COUNT(DISTINCT) ends with a sort for
each group. At least that's my experience.
If by internal/external you mean in-memory/on-disk sorting, then you can
disable trace_sort and use log_temp_files instead. It will probably log
some other operations using temp files, but it's unlikely to happen as
frequently as trace_sort.
Tomas
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tv@fuzzy.cz
Subject: Re: crazy logging from PG 8.4
In-Reply-To: <5268280B.2010204@fuzzy.cz>
References: <CAKuK5J3pOn9TnZ0LvZV7G+8bT8PTzAXti4+TLpWzuAd0s+2CNA@mail.gmail.com> <4b1a3cc650d1ab10de13360bf2222dc2.squirrel@sq.gransy.com> <28141.1382540089@sss.pgh.pa.us> <CAKuK5J3=boRoTDVvCXHQuriyu5w00mz8miTtUoNH1O7tp_eqYA@mail.gmail.com> <5268280B.2010204@fuzzy.cz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox