Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7CDH-0007QN-Kd for pgsql-admin@arkaria.postgresql.org; Fri, 22 Mar 2019 04:55:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h7CDF-0000pk-Gu for pgsql-admin@arkaria.postgresql.org; Fri, 22 Mar 2019 04:55:25 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7CDF-0000pd-6d for pgsql-admin@lists.postgresql.org; Fri, 22 Mar 2019 04:55:25 +0000 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7CD8-0002LG-7S for pgsql-admin@lists.postgresql.org; Fri, 22 Mar 2019 04:55:24 +0000 Received: by mail-oi1-x241.google.com with SMTP id v7so794001oie.8 for ; Thu, 21 Mar 2019 21:55:17 -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=8WefYe+zORzqWBZRYAowWWJv/SHNzkwxfj3JTxaY5gI=; b=oD2pSLVhNZaUzzkYpmlGvISyjAg7Xp4jc2dWvAMAlFJlUnj0JuZDxXGWdkvqdlF7fB 6pHysWhHB8WMEzqu7ckVLaMYlCj7nBMNqv/S4G70IwxzwdCi8yHP9N+8QkKEwm+YdKeS Du2oTpSiflO5MoPBMoq7TsP8uIXgogpYwlKLhwDlG834qa14xysn/9ww8aLeH+7Q2J/m mnNur5aaYpZemYZXlgqQ6pMmuGLujn9YZB3o7DFoFSdv2N9J4kZMxZyoUBAhyAhZSbfA ja0BD36TAx9Msajfci3oYj+6KN3K8o0WCZn0Tz3PLIJIcQ/QrE+Bg6ivanYFI5atA3ka FE/A== 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=8WefYe+zORzqWBZRYAowWWJv/SHNzkwxfj3JTxaY5gI=; b=mA+fAI4GOHHwSOUHCIp7bLw4GV4F9mU5LfY7WhaVX5hCmNGfwzlX+9y1zjH+ezqKhj 7tv4YL9L80qic0QuZWgdPJWIKbvJZV6Ez+1Kq0CZIr5gzKYoaIBqeEGydQ9EBawyNhxM UcvQ9hXxREaAtV/a7ME1vmG/ZOTxhl4Uggc7qly0JWD6L5MKtVpK6tMjoMi/t5kmtTPO Hn8FfeweYwixu4Uw+NF5Z3vvX9m0UXB++elI3Bz/NcVORjY3IN7VNlyoHOc8Ww2H6RpD NG7nYIAZhFbK22nMnEeSiy+QJT0iNWYWCNHxQw4xxXiPSxJOhZExBz+Fp41INeqaJHI+ VX/A== X-Gm-Message-State: APjAAAU9EGlZnqB2np44FeCYKAXPHfp/t/bQPJdtjGoBvTSwwabyjkdz yDrbSnUrft0OS4F3NTGmwP1/HCL7Yqw= X-Google-Smtp-Source: APXvYqz8f4q0uYLKu6K9NKiAvWtv0EcX/4vhfaytrMAxEsqMbKASBYlHyUzOlDVrrn6AUlRalkx3Pw== X-Received: by 2002:aca:550c:: with SMTP id j12mr599965oib.52.1553230514899; Thu, 21 Mar 2019 21:55:14 -0700 (PDT) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id j18sm2754165otq.68.2019.03.21.21.55.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 21:55:14 -0700 (PDT) Subject: Re: Is there a way to log only a particular user connection attempts in Postgres? To: pgsql-admin@lists.postgresql.org References: <1553228652335-0.post@n3.nabble.com> From: Ron Message-ID: <939ba014-7c51-339e-c63b-e9cb5be10897@gmail.com> Date: Thu, 21 Mar 2019 23:55:13 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <1553228652335-0.post@n3.nabble.com> 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: Precedence: bulk On 3/21/19 11:24 PM, pavan95 wrote: > Hi Community, > > Is there any way to log a user login/connection attempts in a log file ? > > I know that we have log_connections parameter for this. But it logs all the > connection attempts for all users across the instance. > > But here my requirement is to exclude login attempts for a particular > user(as in my case its application user A user that can't log in isn't much of a user. > and postgres user). In a misguided, auditor-mandated attempt at security? -- Angular momentum makes the world go 'round.