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 1uIPB7-003xbI-4T for pgsql-jdbc@arkaria.postgresql.org; Fri, 23 May 2025 09:59:01 +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 1uIPB5-000lGA-O6 for pgsql-jdbc@arkaria.postgresql.org; Fri, 23 May 2025 09:58:59 +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 1uIPB5-000lFw-G0 for pgsql-jdbc@lists.postgresql.org; Fri, 23 May 2025 09:58:59 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uIPB2-000W1w-1O for pgsql-jdbc@lists.postgresql.org; Fri, 23 May 2025 09:58:58 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43edb40f357so74675465e9.0 for ; Fri, 23 May 2025 02:58:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1747994335; x=1748599135; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=NwFY/5mL7trapZtEKGiRVM1fdfXmvjDnFshLRcbOkvM=; b=Uwg4hl9iNsIBIW22k13wqFleXWSAlBMRFYsMx+Ilswyc0muS/3wrlU5kpJO9/cEv/e Kcvik8uU/DE0K0y4KPjvMRDORjJejC65KEKV+MiA3C38PEGSmrof6AhJVoNIf5OoUhMy MnRB3Km2X5xSi18cIW91r1fwQCGUDzovh5w3fS/2Y6XdPDlfGej9hrXl7y7Np8Si7Mdk 3JvgGfElCsfI5AC72MgH4wTQV+9nj25ZGSrV8vSrifj5uaDfsaCbuHiZkt9S9PfvWiBq z0NpDQ2kn+5ZYBg22zP1hmaoNrzO1dmopkA4FWFcSHGJvYGI6LZZB223lTuNWsf15Cuk f0kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747994335; x=1748599135; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=NwFY/5mL7trapZtEKGiRVM1fdfXmvjDnFshLRcbOkvM=; b=D5LQHkxM7pLXbcUB+/DHc1eAYg86v3S3QCTwI3gJUKYe2NpWsWmg4cU+/6X8ILP/EU oe2To+Jb5OK1Kcivdc+h5Kb2Q774yPFbbBbm39awEOzSgsA+BFDdtJeGwkupE5niO3Af SO5Fj0zoDYEb+X2/DhqA0rWdn2WbghSzCptpg2PtkKALaYCxTiFV/IRg7s68g3xlnZiS g0djFp92sTJ8m/CdjhdrgtF2N5Qn+yFsShiQuNfZsr7gar11ahji3BjJv/zbTXCeglLN GxupSAoOJUo0C58ZZYoRPkSZymREH+AE3zqWewoRmCbZH480dI5hk4hW3girBGtO3Kvr 42JA== X-Gm-Message-State: AOJu0YyZ7FF54eODu4OtMZ6ARxxB47sRsqqKgVgYWzk/pJIcaJUq5/cy c++kV3xF6O7sG/j/GbAKwH0paqG9F6nj5dw395u8k1QOeb1/Hqy8NzzxkP9dvXWlq+M= X-Gm-Gg: ASbGncsqkErv68k3PSacO6zRD42Y2wHjKWlJCnDi88oC95qzqIrG2hxTUKsA2Q/k/St kKHvP6uuROxMmRuvX+JI0ciYtE4H5vgJeTbNvCmZwBbkAFC0j/kMdh+bkyKRDBDI/AhRTiZfEm+ 6Xnux1cL30F5SFZaW7lbsI0JZONBjCYtCBdTWhWXGfwvgPtWzqDMLF1pSgWIUhsT0iEq4DwVDiG aRMUAMbitoiZzBcAccex/NyLBN0vEac9Y/HV7xpEGuoPc5ReE3Z8PAseCnrzbt7tp69wKv6zGI4 QRJje4sqRBPZysnQDQjsmxKoEdspjFbIF7Zr0ZxtkcLTMBC7w4fXBqXsAT9CVkIPAIPOltnNSQ2 5yDIB X-Google-Smtp-Source: AGHT+IH1eOrMiKI4tPXHA7OqsBGKpFkqAngaPHvrQb3DTiIV1zPdjq9Ytzp9iGNsDXhJl3jh47mEtQ== X-Received: by 2002:a05:600c:474a:b0:442:f44f:65b with SMTP id 5b1f17b1804b1-442fd675a33mr236751975e9.32.1747994335249; Fri, 23 May 2025 02:58:55 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:5e:6c9b:73f5:6897:6da1:73ea]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-447f1825193sm141832075e9.5.2025.05.23.02.58.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 May 2025 02:58:54 -0700 (PDT) Message-ID: <37c6dcd199f3dfa41fc51ce347687210fd372363.camel@cybertec.at> Subject: Re: Understanding DateStyle guc in startup packet From: Laurenz Albe To: Manav Kumar , Vladimir Sitnikov Cc: pgsql-jdbc@lists.postgresql.org Date: Fri, 23 May 2025 11:58:51 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.1 (3.56.1-1.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2025-05-23 at 14:08 +0530, Manav Kumar wrote: > Can you also share how=C2=A0does DRIVER comes to know the value been set = for > DateStyle is other than "ISO". and throw an error: > =C2=A0The server's DateStyle parameter was changed to Postgres, DMY. The = JDBC driver requires DateStyle to begin with ISO for correct operation.=C2= =A0 >=20 > I thought it used to read the PARAMETER STATUS packet that it receives > from the server. But I tried changing it connection pooler i doens't > see the same error. Can you point me to code where this assert check > is present.=C2=A0=C2=A0 See the method org.postgresql.core.v3.QueryExecutorImpl.receiveParameterStatus() https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postg= resql/core/v3/QueryExecutorImpl.java#L2886 See the PostgreSQL documentation for context: https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-ASYNC ParameterStatus messages will be generated whenever the active value changes for any of the parameters the backend believes the frontend should know about. Most commonly this occurs in response to a SET SQL command executed by the frontend, and this case is effectively synchronous =E2=80=94 but it is also possible for parameter status change= s to occur because the administrator changed a configuration file and then sent the SIGHUP signal to the server. Also, if a SET command is rolled back, an appropriate ParameterStatus message will be generated to report the current effective value. Yours, Laurenz Albe