Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tBVgp-004J6J-5I for pgsql-general@arkaria.postgresql.org; Thu, 14 Nov 2024 08:58:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tBVgl-002IIA-Sg for pgsql-general@arkaria.postgresql.org; Thu, 14 Nov 2024 08:58:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tBVgl-002II2-HP for pgsql-general@lists.postgresql.org; Thu, 14 Nov 2024 08:58:56 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tBVgi-001rK8-OB for pgsql-general@lists.postgresql.org; Thu, 14 Nov 2024 08:58:55 +0000 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a99f3a5a44cso46514866b.3 for ; Thu, 14 Nov 2024 00:58:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731574732; x=1732179532; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=8Q0T4AU6b1sibdsNduqFK6KW1BW0uJsI5QPDNtFlME8=; b=PS1Q6Q1M3MF+1SIdryaAOGi1AIyEQ9H41qqrueeJSm3oOzlJS1gDLkb3CbOSd/3ylf za27QxHzCiLF+RIm2MnQriZlGKOjKwImaRdWH0ouy+rR6iA6BWCp1YdHlqGh6UNpoArG Qbd9k5I48DOwTRK0Ii+mvM/GfLqaaGmEhIc+bSXf3r+wjGcVq90DAkUtakyBYcAbFoUl Fp4EHm3FJxznEmqsamt1iFdw39Aqdxshg5yflGachlZ7gB3ci2XxdQ/L+ZYBq1JoTLKx +xPAnBULjlc30yDF6uprKnyN2B0bkgGJnG9bFzi+TWbpPOLr0s3jx9qR8wkyP9rD6w+6 zL/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731574732; x=1732179532; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8Q0T4AU6b1sibdsNduqFK6KW1BW0uJsI5QPDNtFlME8=; b=UCzGWdIv9RVkYpjsYDpDcoXd8k3uMQ8szpgg5cjk08cWT7dC5Wzm27UIy6AOyE5dBV WUSh3zxTL/T2w1/xpilI1ABfeTK+2W7UUAUmu5UQkMDWWFKlrj9mARlpTKLl5qpVVcZ8 rsGAoYj6nurtt7spwdI76X72ZxX3YFkGiHlUWRJunC5jlolG92yn+ALf55kC60iQCzTi PdX5SZGpfcaiPfr1UkCUxeeQnhJ56malmoZO1m1ZvWsGG4yQLzRIVr8SZLNonkVXugtG y37BAqPzMb8BGQidvaYhb+flVYZfKG6/hMNSGv8NGu31Yfp+0kRHaxpeQUX2pNIUhIGp ot3A== X-Gm-Message-State: AOJu0YwMmvG2biMVyYLhL0WUI5C9FJFO3vXQ6RTOeuk68IaBrWR78BR+ /wivrdYHXLy+oFFxVQuPDpSx6UpijkARJ5hxCDzBPemwJzuQfShUY8gY/SQz X-Google-Smtp-Source: AGHT+IFXXBGjRAsq9RWlILFDgVGP2wj0w3Ax7cYA1ukJggH3RlZpBFYDb3VrlPgGpWHm6OmA8mYzDg== X-Received: by 2002:a17:906:d542:b0:a8a:58c5:78f1 with SMTP id a640c23a62f3a-a9eefe9bb2fmr2137208466b.11.1731574731517; Thu, 14 Nov 2024 00:58:51 -0800 (PST) Received: from [192.168.178.111] (146-241-19-88.dyn.eolo.it. [146.241.19.88]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cf79ba0997sm340792a12.35.2024.11.14.00.58.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Nov 2024 00:58:50 -0800 (PST) Message-ID: <242ee502-4b8e-49b5-b2f9-ffba6c678ca2@gmail.com> Date: Thu, 14 Nov 2024 09:58:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: question on audit columns To: pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Johannes Lochmann In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ... and (3) the values are not updated on manual actions without triggers - which might or might not be desirable depending on the intention. Best, Johannes On 9/4/2024 16:36, Adrian Klaver wrote: > On 9/4/24 06:17, Khan Muhammad Usman wrote: >> Yes this would be the better approach. > > 1) Except the overhead is now shifted to the application, which may or > not be better. You are also moving the audit responsibility to the > application and the application maintainers and making it application > specific. If a new application/client starts hitting the database and > it did not get the memo about the audit fields they won't be filled in. > > 2) I would recommend setting up a some realistic tests and see if the > overhead of the update triggers would be a concern. > > >