Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHkUR-0001lO-EA for pgsql-general@arkaria.postgresql.org; Wed, 31 Oct 2018 07:00:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gHkUP-0002zA-Nn for pgsql-general@arkaria.postgresql.org; Wed, 31 Oct 2018 07:00:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHkUP-0002xU-FJ for pgsql-general@lists.postgresql.org; Wed, 31 Oct 2018 07:00:29 +0000 Received: from mx2a.mailbox.org ([2001:67c:2050:104:0:2:25:2] helo=mx2.mailbox.org) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gHkUN-0000mU-2H for pgsql-general@postgresql.org; Wed, 31 Oct 2018 07:00:29 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id CBA74A11F5; Wed, 31 Oct 2018 08:00:23 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id tNtoPbNDzEwB; Wed, 31 Oct 2018 08:00:22 +0100 (CET) Message-ID: <233be564bfa8cba4084e8d1a031880b777b43d37.camel@cybertec.at> Subject: Re: Fwd: Log file From: Laurenz Albe To: Igor Korot , Tom Lane Cc: pgsql-general Date: Wed, 31 Oct 2018 08:00:21 +0100 In-Reply-To: References: <18469.1540839366@sss.pgh.pa.us> <23733.1540847335@sss.pgh.pa.us> Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Igor Korot wrote: > Now is there a command to flush the log - delete the content of it? No, managing the logs is outside of PostgreSQL's responsibility. But it shouldn't be a problem to do this outside the database. Of course you could write a funtion in PostgreSQL that uses one of the "untrusted" procedural languages to do it for you. > All I'm looking for in the log are DDL commands - CREATE/ALTER/DELETE ones. You mean DROP, right? You can set "log_statement = 'ddl'" for that. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com