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 1hqNKO-0000EX-1A for pgsql-general@arkaria.postgresql.org; Wed, 24 Jul 2019 19:53:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hqNKM-0005Qo-4Y for pgsql-general@arkaria.postgresql.org; Wed, 24 Jul 2019 19:53:30 +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 1hqNKL-0005QX-Og for pgsql-general@lists.postgresql.org; Wed, 24 Jul 2019 19:53:29 +0000 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hqNKI-0005vb-DW for pgsql-general@lists.postgresql.org; Wed, 24 Jul 2019 19:53:28 +0000 Received: by mail-io1-xd32.google.com with SMTP id i10so92120610iol.13 for ; Wed, 24 Jul 2019 12:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=0iT4PAVa9ggs3EwyiLVv3Dk+uS5qoK3OaVgAdjpE7Zs=; b=vMXBTEmxGysUH1Zgak5Gbya3q/tGGaK3PgAc4zE09KIr7uVfGpTP57uwBEPnfqLsW5 h/BwCxgrUfXRAFzqPa0efy++xZUY1PDNtzDmnJAXxKnj4nKLI4iWcv5jHD20b/nZcoWl oksYbjBvLXUBSWTC/FabH809NUyJ7cZ0jbpAaP3It4G0nhBtZpxo1cJUncCN0Yte8DZS ZD9+7vaC3Irql3hGpVO5ggMSa6HsDauGobNG2hMeyHp7TTcqkPqbfO8PvwfVdGo+pr2X 876a8JfbZIftiLLcOkp8WDg7lRGqwlPTx3lJpS7/iuazoIMm0kuMbtVXIXVM6cIPET5N /HXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=0iT4PAVa9ggs3EwyiLVv3Dk+uS5qoK3OaVgAdjpE7Zs=; b=WuMH4OwRCwFj/ZF+MZHQRNTe5gLVmxUXps5LMnvcI7FhLv7rqIw81fKCLNbMNYlpBA bcfCk0jbqxsA1aQdmwlk5Cg5r43pOrj5jqTV4DVpBZVwESuy0giZdLVTy6gtTKYXacir Qhe4X/15VHHOhnHIeEz5O0Fs4EGaY0j8gHU32yiUnvyh8uH87X0y2MpvbwWsHnVGF7DJ wQpJWWLuhCm9d3SbfhybKASPaCYxMzZmFeVhNGoHsrt4wMbmbkL6ygqFev4IQ57w3kiv idQDiqFrEYHtxY/Bgrnuotse5aYF5kCv/02Cuwi9SgzBNmh86NHLeDyMrl0yxeGv2liY EdRw== X-Gm-Message-State: APjAAAXSydgJtsq/+HrjNj1jdD+II2z7z+yb1OkAC8ezm6VIRrW+hAHj XygwAMQE+99MN9hjTqYuWlM= X-Google-Smtp-Source: APXvYqxPyv721lzWfO+6PgKVKPfNxlpt4Nv3z6OLkonAlGXAUzBXt1FSO4gotDdz03ZqOihg5KVYSQ== X-Received: by 2002:a5d:8b52:: with SMTP id c18mr13267203iot.89.1563998004605; Wed, 24 Jul 2019 12:53:24 -0700 (PDT) Received: from [192.168.1.108] (c-73-63-59-118.hsd1.ut.comcast.net. [73.63.59.118]) by smtp.gmail.com with ESMTPSA id i23sm33854344ioj.24.2019.07.24.12.53.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jul 2019 12:53:24 -0700 (PDT) From: Rob Sargent Message-Id: <9FDB31EE-CEC5-4B19-B311-E96AC7139706@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_B5A2889F-08FE-40C7-BF6E-651079A6B0A8" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Running concurrent txns and measuring the timings in Postgres Date: Wed, 24 Jul 2019 13:53:22 -0600 In-Reply-To: Cc: Adrian Klaver , "pgsql-generallists.postgresql.org" To: Souvik Bhattacherjee References: <160cb824-6952-d468-9a6b-3b7474348d5a@aklaver.com> X-Mailer: Apple Mail (2.3445.104.11) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_B5A2889F-08FE-40C7-BF6E-651079A6B0A8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jul 24, 2019, at 1:22 PM, Souvik Bhattacherjee = wrote: >=20 > > It would help to know what problem you are trying to solve? >=20 > Multiple txns are inserting tuples into a table concurrently. Wanted = to measure=20 > the total time taken to complete the insertion process. Some txns = overlap with=20 > others on the tuples they insert. Duplicate tuples are not inserted. > --=20 > adrian.klaver@aklaver.com Start both/all clients at approximately the same time, each firing a = transaction at some believable interval. (Or separate threads with = separate db connections.) This should generate the concurrency load I = think you=E2=80=99re looking for. You can easily time the iteration; = actual details on server side would likely involve turning on maximum = logging, with client identifier, and analyzing the logs. --Apple-Mail=_B5A2889F-08FE-40C7-BF6E-651079A6B0A8 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Jul 24, 2019, at 1:22 PM, Souvik Bhattacherjee <kivuosb@gmail.com> = wrote:

> It would help to know what = problem you are trying to solve?

Multiple txns are inserting tuples into = a table concurrently. Wanted to measure
the total time taken to complete the insertion process. Some = txns overlap with
others on the = tuples they insert. Duplicate tuples are not inserted.
Start both/all clients at approximately the = same time, each firing a transaction at some believable interval. (Or = separate threads with separate db connections.)  This should = generate the concurrency load I think you=E2=80=99re looking for. You = can easily time the iteration; actual details on server side would = likely involve turning on maximum logging, with client identifier, and = analyzing the logs.

= --Apple-Mail=_B5A2889F-08FE-40C7-BF6E-651079A6B0A8--