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 1moRTK-0005F6-M3 for pgsql-general@arkaria.postgresql.org; Sat, 20 Nov 2021 14:36:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1moRTJ-0000Wh-JN for pgsql-general@arkaria.postgresql.org; Sat, 20 Nov 2021 14:36:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1moRTJ-0000WY-8o for pgsql-general@lists.postgresql.org; Sat, 20 Nov 2021 14:36:05 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1moRTD-0004CD-Ds for pgsql-general@lists.postgresql.org; Sat, 20 Nov 2021 14:36:04 +0000 Received: by mail-pj1-x1036.google.com with SMTP id gt5so10148918pjb.1 for ; Sat, 20 Nov 2021 06:35:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=fiB9XtwYewYIaYlqMOzB8gj6q6LObv6KL9VmWS5BgRA=; b=ZlL9jD/L/BcxroYKcXqWKho1lDNiQGo/xE4+7iSULVJw8Zg4utdmZPPZzqlgqBPGm8 HaBcB+yUohumtPyY9IiLXrbtMoFilyH7I7GMpnHPEQe6MtvuGwmAsXd4sGjfeA+xodlk phQnJiFlQbMpTNFU7O5P79BLITll0TFrKyWsnv2RF32ekPMKPf/l1cGFePNoiL28cO1H ibB9MetiS7Gdv09rokjJh9ZVCBgNW/a/Re/EyoEzuOgf+WGmIeKsfs+lcJXsOIhjaImi fUWuGk3kg82iusWgvbI7xaWSL89caS7FfOglMobv13Bzx2O0LcGoUK7GEtpU/PtcBUK8 lapg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=fiB9XtwYewYIaYlqMOzB8gj6q6LObv6KL9VmWS5BgRA=; b=e4f9dpZhI6MXgCOn7b37dyOUdwEeTDFRbIV3Ev65Ue6OXwJxj6yBIv6RXM7w/MVVem XS4tSdc1FTrCHD/ZPp1KJQKXw9avNZaw6TQ4eMz/XFSrN3tEVxozoEU033AaiATjkz1o aCBHGXVtuSB4MHJiJ3EbZ/5JM0cgHjS9mGIq3ib2XJt+oCYWxULb36Sug1+sjivE6/12 XU9yey7FAEl+vFNFWvO4L9Pf7u5RgEah8xlcBwRBaJOuzpQJvsOJSM6PTmoPlY42wZH8 RS4ReBEvG9avg/gv3PYHHpPqVOnWNYIXCXjfltuWWMd8maiX3mMyzvsvzJ73D7ZJw+6Z N1EQ== X-Gm-Message-State: AOAM531SFdk8Yn4qVrzMlLCQdFCAXuSmC0qtOA+Z+RZ9PeBLxccVVf4f EueDjRCLwYtRphHJq/bfzkE= X-Google-Smtp-Source: ABdhPJxi4SbRouLj136Crl3rlp0d9j7SztHVF+4t1hMY2c9H9dTLrXeOKQlfm7XCq8/6+cNSr4JfIQ== X-Received: by 2002:a17:902:c115:b0:142:2441:aa23 with SMTP id 21-20020a170902c11500b001422441aa23mr85455481pli.16.1637418958542; Sat, 20 Nov 2021 06:35:58 -0800 (PST) Received: from smtpclient.apple ([2601:681:5500:dde0:b943:f395:1d2e:443a]) by smtp.gmail.com with ESMTPSA id f18sm2357417pfk.105.2021.11.20.06.35.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Nov 2021 06:35:58 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: any default columns for tracking / auditing purpose From: Rob Sargent In-Reply-To: Date: Sat, 20 Nov 2021 07:35:57 -0700 Cc: pgsql-general Content-Transfer-Encoding: quoted-printable Message-Id: <73BE98A3-C0B6-47F4-A6EB-5FE18C77F880@gmail.com> References: To: Sanjay Minni X-Mailer: Apple Mail (2.3654.120.0.1.13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Nov 20, 2021, at 6:50 AM, Sanjay Minni = wrote: >=20 >=20 > In Postgres 12 and up, are there any default columns available which = could be useful for tracking / auditing purposes ? > e.g. > - real user who entered / updated the data > - timestamp when data was updated / entered > where can i get a list of such default columns (if any) - which could = be accessed easily in user applications. >=20 > also what is the usual practice in creating userID's in a large = multi-tenanted applications with highly dynamically changing users (e.g = students who enroll and go off after some sometime), with all users = having the same access -=20 > is a different userID created in the system for each user or is a = common postgresID used by the application and the application is = responsible for tracking individual users with its own userID. (this = will reduce system overhead) > =20 Never ever re-use an id. There are lots of them. If you need lots and = lots of them use UUID. > with warm regards > Sanjay >=20