printf ordering issues?

From: James Coleman <jtc331(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: printf ordering issues?
Date: 2018-12-11 23:19:16
Message-ID: CAAaqYe9XiMKtAOrwJ77kshLUsJy0kYwDYJZHmQMcVPi8qT-bzg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

While using printf to do some good old fashioned print debugging, I
noticed that it seemed like my printf statements in the executor were
sometimes not getting printed to the log at all, and sometimes getting
printed out *before* the ones I have in the planner.

Upon further investigation I realized instead that the output from the
executor is getting flushed on the *subsequent* query.

Is there some kind of weird behavior that most hackers already know
about and I'm missing?

(Also I realize I can use elog(LOG...), but I'm still curious.)

Thanks,
James Coleman

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-12-11 23:51:37 Re: Sketch of a fix for that truncation data corruption issue
Previous Message Andres Freund 2018-12-11 23:08:02 Re: automatically assigning catalog toast oids