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 1t9Lev-009PmN-4R for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Nov 2024 09:52:04 +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 1t9Les-007zmq-2F for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Nov 2024 09:52:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t9Ler-007zkJ-P2 for pgsql-hackers@lists.postgresql.org; Fri, 08 Nov 2024 09:52:02 +0000 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t9Lep-000mkg-8b for pgsql-hackers@postgresql.org; Fri, 08 Nov 2024 09:52:00 +0000 Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-5ebbed44918so1253150eaf.0 for ; Fri, 08 Nov 2024 01:51:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731059518; x=1731664318; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=qrxb381bshT74mC4eVxwEWRlIAq7OqATprimjfJyZc4=; b=GoQXBbFZ4mDZWUj+WD7Ei77mo9kZeG5hl5ereWAuEsswiWKHr/G1vWgfUO2m8G2W9y o+j4K1BZcnlCroDlX7In6I4RuErqf7iSxkPkAd615Z6h5/NIFo2RIC9iUBxqgnP1zF0+ vxLmjcVWm+9yYNWjahk5vQigwxwjJ3pcVmxEdBXYNBw13yw+TEZlczdbzPgKA9fB1oky 3iywkqPmAPJ880tOGuDva+9sUm/PWHks0IQLndnqtuupkxjnF6qV7Yhyy63ZK0no1LR/ 9gi2acXE8BTDAMUHqHmctUum5UCPkRxDirvPX0/pNptek4k5IEEOVtsKkAjL9n7wrADQ fyCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731059518; x=1731664318; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qrxb381bshT74mC4eVxwEWRlIAq7OqATprimjfJyZc4=; b=lYh7KSRuQPzy7K2aW8uwGSNvBEbaWAH0b9eGzFAxUQGKfW9I6p0xIHsQXtcvZYbky3 zgJ0g56m73va4TQ/ths/vLUNwYeQum/jOfeKEGIR/2Redu/jBaVnk5AX41yWBSTNHGgv A+U8KzytbqmlnitHzoBNqGpFiuaZp6T2GL2uh8xU1+HIgdZGPaKPFacLcDw4kiSjTKgE cudqdDu72A3PQGUg2ocQW5snfuZl0DxW2XpxC+86Eu0KBYVneB42X2tcdoc0dNtCOgpU f9mfLV1JoqzqogWgM7PUoETZXT3lbNknDd9B6qR8+r9s5YdadIlnnemiUmFxgfxs48EJ uYOA== X-Forwarded-Encrypted: i=1; AJvYcCW8MhL9AT+2WyUwJQ/cC4pnrn9x1c477LxYIY2fQE5vovqTyOgFEe3V9VinAaSpHtdpKlDdLT/tfpkh/M8H@postgresql.org X-Gm-Message-State: AOJu0Yz7j0VgD0nb6n9sxHXjeJnBDagVByzGLTo7h4o7QAG46npZuvNG hYatiKudbBkv262vPjzuwWCKCwcaCS3fP3rNOcT9FsonMcYpSatPAULOsexgPJe+ZwbxXcyCBUt ho2N3NZzaMb5mB6l1l9yiankBqvc= X-Google-Smtp-Source: AGHT+IHV5XFZ47+QwrTjKdtgaHgRD4o+vUefeqm+4v4vzH79o48KRrqTeb+q8MqR1VxIgs3Lh19bSTyHVLzpelDSrPo= X-Received: by 2002:a05:6820:1f08:b0:5eb:c72e:e29c with SMTP id 006d021491bc7-5ee57d296eemr2201967eaf.8.1731059518388; Fri, 08 Nov 2024 01:51:58 -0800 (PST) MIME-Version: 1.0 References: <9f7f4def-7ea8-4ad3-83e7-a8cc9d18c58a@wi3ck.info> <17a7ce08-f04a-49ab-af5c-233d616d7c3b@wi3ck.info> In-Reply-To: <17a7ce08-f04a-49ab-af5c-233d616d7c3b@wi3ck.info> From: Amit Kapila Date: Fri, 8 Nov 2024 15:21:47 +0530 Message-ID: Subject: Re: Commit Timestamp and LSN Inversion issue To: Jan Wieck Cc: "Zhijie Hou (Fujitsu)" , Aleksander Alekseev , pgsql-hackers , shveta malik , "tomas@vondra.me" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Nov 7, 2024 at 9:39=E2=80=AFPM Jan Wieck wrote: > > On 11/6/24 21:30, Zhijie Hou (Fujitsu) wrote: > > > > Thanks for the patch! I am reading the patch and noticed few minor thin= gs. > > > > 1. > > + /* > > + * This is a local transaction. Make sure that the xact_time > > + * higher than any timestamp we have seen thus far. > > + * > > + * TODO: This is not postmaster restart safe. If the local > > + * system clock is further behind other nodes than it takes > > + * for the postmaster to restart (time between it stops > > + * accepting new transactions and time when it becomes ready > > + * to accept new transactions), local transactions will not > > + * be bumped into the future correctly. > > + */ > > > > The TODO section mentions other nodes, but I believe think patch curren= tly do > > not have the handling of timestamps for other nodes. Should we either r= emove > > this part or add a brief explanation to clarify the relationship with o= ther > > nodes? > > That TODO is actually obsolete. I understood from Amit Kapila that the > community does assume that NTP synchronization is good enough. > This is my understanding from the relevant discussion in the email thread [= 1]. [1] - https://www.postgresql.org/message-id/2423650.1726842094%40sss.pgh.pa= .us --=20 With Regards, Amit Kapila.