Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUtUY-0001aJ-RI for pgsql-general@arkaria.postgresql.org; Fri, 09 Apr 2021 15:56:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lUtUX-000564-QA for pgsql-general@arkaria.postgresql.org; Fri, 09 Apr 2021 15:56:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUtUX-00055x-J3 for pgsql-general@lists.postgresql.org; Fri, 09 Apr 2021 15:56:17 +0000 Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lUtUV-0002DZ-QG for pgsql-general@lists.postgresql.org; Fri, 09 Apr 2021 15:56:17 +0000 Received: by mail-oi1-x236.google.com with SMTP id m13so6187714oiw.13 for ; Fri, 09 Apr 2021 08:56:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=2n07M9JOrrWTtDuKr4cq/QcTo1rmK3/LFB9sbp+aBqA=; b=dunQuOk4ay8oSZ5DqULzIASRZTcNuvQ8GNjHfVBWIhz2oQK9813gPkHRNK6LNIX/gj 61xFHE6LUVVySEAkGc6zZNhW8nEhHogb9t5c9VSLwc04Z4xqYSEEY4NiPRYMlFPD9mzy H5F+OLWKyq0Ou+ArMIV9vh0dAsSrnLseOo/TXFiMKQzpJFTY3rcO7B2D1PPIrbEmQluy /SfSxgYkOwVAAXNOICCB8aEwCmFXcGU8C6AC5br9JXXZI/j/QrW5oH71a9dDxIdr6Tob 41OYMzqZbKt6w1a+X/bEBX+ZR8JNxV4qKLOt4JBYqcQ8268MLubew1JZXG7GnE4v12hi HtZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=2n07M9JOrrWTtDuKr4cq/QcTo1rmK3/LFB9sbp+aBqA=; b=ksBpqtGWYlMYRbnNKb0CwLAJ74wdjGIo42GgAsqjURO46YqKAI37FmVPu+TACr/Cb4 WcEXdtGKfHg68muoh59IU7vU2vmQcPBMAGyM5qoF4fYsqTnBSB557tNS/4ZFe/VVA3oq mnexXaY4dHfqbZ8QQnuteW7w4oKGZZOPyofWJyDIvFILEf0+2zAkWRcWEf95g8SoH+LN e35X6vAmhGlknAmF3kd9Yi8nNYyfbFPj0d0Oo9ITwsT1csUIMb7orZ2uRv9fKRvhs2qq 687HdA8cMR36QXVL7zrZZBTrc+GZJRjqsp5vYxzmxmCIpCI+9AVzRwIv4/U7riOn4RO6 Ipqw== X-Gm-Message-State: AOAM532WxCuVLtiOGbmp3Gcoqg4ZostECQCxgy3UOw/z2L5mGs5yW426 LTkfqIGNrAoB/LQSLMx2kbEtzx7wLgY= X-Google-Smtp-Source: ABdhPJwAw99RykbZSf+QLycod+4iXMvRXogpHb2hi38FHMaZNczcOS5OzaY5hXQa1Z2adwJ1YZvppg== X-Received: by 2002:aca:d48e:: with SMTP id l136mr4196879oig.157.1617983774030; Fri, 09 Apr 2021 08:56:14 -0700 (PDT) Received: from [192.168.88.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id l15sm217075otp.4.2021.04.09.08.56.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Apr 2021 08:56:13 -0700 (PDT) Subject: Re: Who altered the database? To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: <3b0705db-1874-0ddf-ac20-3dcd7c494c4b@gmail.com> Date: Fri, 9 Apr 2021 10:56:12 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/9/21 6:14 AM, Durumdara wrote: > Dear Members! > > We have a server. > Because of high usage we can't log DDL-s. There are too many temporary > tables created by users, so it would slow down the server. > A database owner changed. > > What can we do to get info about the change (who did it, from what IP, > when it happened) in the future? > > As I see we can't define precisely what we want to log... All or nothing. > > Do you know any tricks to do it? > > For example: DB level trigger, or other thing? pg_audit? -- Angular momentum makes the world go 'round.