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.96) (envelope-from ) id 1wRPQD-002Jx0-2Y for pgsql-hackers@arkaria.postgresql.org; Mon, 25 May 2026 07:08:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wRPQB-000LvL-1x for pgsql-hackers@arkaria.postgresql.org; Mon, 25 May 2026 07:08:20 +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.96) (envelope-from ) id 1wRPQB-000LvD-0x for pgsql-hackers@lists.postgresql.org; Mon, 25 May 2026 07:08:20 +0000 Received: from mail-dl1-x1230.google.com ([2607:f8b0:4864:20::1230]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wRPQA-00000001JAR-01im for pgsql-hackers@lists.postgresql.org; Mon, 25 May 2026 07:08:19 +0000 Received: by mail-dl1-x1230.google.com with SMTP id a92af1059eb24-132830d8281so110065c88.1 for ; Mon, 25 May 2026 00:08:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779692895; x=1780297695; darn=lists.postgresql.org; h=to:cc:date:message-id:subject:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=PYDyXIsAOyq0tkf/yFfuyWfBXNRHvP+Gl0Jn1Y/KSNU=; b=V1LHLlcgujOoUuZ/+Gu2jE1Z8TZVNSM5TBV1TFcQXXSVwUPihEprldADlMf702tdSY ywDpaQQMYoZXUlSAg9XBF3CgvT7UghGGeAz0aehvKfhbRGPdmBI41G2ub2TUW0iSmc2m 9upIRU031XBW+jW6/+UWq4G2lLEys0pwkDDoI2hC2NDbvG5/afOBdvq4N60H2+2TeUm5 m3mcKsbWhwt4o+Gz5TsV8sd5iH+lpY+dWMZ5I638PYetg+AC1XWhznani9e+k4AApmzI /+qy9fUI5fyhdks7V/fqPUrOhMvpgu8MOYpNTD8eQtz+lT4ereWQQm69TOx8JAR8CMSG tpEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779692895; x=1780297695; h=to:cc:date:message-id:subject:mime-version:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PYDyXIsAOyq0tkf/yFfuyWfBXNRHvP+Gl0Jn1Y/KSNU=; b=R2PuqVIPElTc3iCdZXoz4RhFhb0zdOKmEemqOmEZ9lVrulXzuGMRP03nTPlx2F/CiY PYPQi1qVPhUO2VtBqP5DGjT8RPg27uBV0fNmlEzYUjr10237LvEABBRaMvtInofTyFmr 6mBa91UrDqN32yTNZhGEIsGri6w10EkhraRroRbTTVjKj2VPOTiXIHafKLYANsm9NtKK 8wmaOL2TnuEldJvK8/cXIkhmrVGyqL+9mBv58ECLyBAYNxI/qD5CP+A/lo5HA2fmQH2n nSg3vl6FAk54r6qER8QelnH5HEaxyGslHN+H2U4JAghLyWwuJJF4MmBWNPHvLvgNdl+Q Uwvg== X-Gm-Message-State: AOJu0Ywh06gEXUnXlHJg16dqQ48lhLd2NBdzQR3EgMtI11uQUrjdUL2B +heM2kDqJUgXV/Ih/j74zEjScmDCrynqhmjrvUD1E+lu0roVoBeJDoM4iLRSkeTv/HY= X-Gm-Gg: Acq92OE/S5hQyhRgEtVPiKTQY37RJXtoHBazBQuvhH6fTJMyDya93LCd5fg1JOOFBkU 9Nue6aJ4ZE7mV4ti2jnWgXv3xV/AP4bHB7avLQNXoIexVBTJwosS6sA0QQCXqVi9b3LS3V8vhQG DKw9kghgnlsx4T295/lhB8RRbezf0AEuKk+nmolMOdfBbn4JsRWTfOiLxcTbwk7VCH78xvJNhXo +DzJlKR44AhAzRXglVmcgMeePLhFJnwIH00tEBe4RNAaqoDcLh2Vp0VEoHCYfBPOGvdehbQo5Ep clD4fWne0bmKkKLIMRs9aFBciSNBdspizlrtjnL0i7GhiOzKXuvxkUK5WDuljHIBt2jFlTN1isl 89m1tAvVDxsFs+cMYnt/WDesWr7W3ZJq6H6VzCImttR+5XyepnFr5bAvD5LDXhRrmPSmThuWFlh K0vdPw4ct2ky+yXMinGWIDDfzTHt1Z4w== X-Received: by 2002:a05:7022:fe0b:b0:134:fc89:40c5 with SMTP id a92af1059eb24-1365f8144ccmr4078088c88.10.1779692895358; Mon, 25 May 2026 00:08:15 -0700 (PDT) Received: from smtpclient.apple ([64.32.14.230]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-136b2b1f2a6sm3027962c88.4.2026.05.25.00.08.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 May 2026 00:08:14 -0700 (PDT) From: Chao Li Content-Type: multipart/mixed; boundary="Apple-Mail=_2C5EE8EC-0F23-4FEF-B436-EF1558929FA7" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: Small fixes for CHECKPOINT FLUSH_UNLOGGED Message-Id: <4855807D-F1CA-44E6-9B58-406691832848@gmail.com> Date: Mon, 25 May 2026 15:07:38 +0800 Cc: Nathan Bossart , Christoph Berg To: PostgreSQL Hackers X-Mailer: Apple Mail (2.3864.600.51.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_2C5EE8EC-0F23-4FEF-B436-EF1558929FA7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, I just tested =E2=80=9CAdd FLUSH_UNLOGGED option to CHECKPOINT = command=E2=80=9D, and found no functional issue. I only noticed a couple = of small issues. 1. Tab-completion for FLUSH_UNLOGGED misses its boolean value FLUSH_UNLOGGED can take a boolean value, but tab completion does not = suggest ON/OFF for it. For comparison, REPACK does: ``` evantest=3D# checkpoint (FLUSH_UNLOGGED o evantest=3D# repack (concurrently O OFF ON ```The fix just follows the existing code for REPACK. After the fix: ``` evantest=3D# checkpoint (flush_unlogged O OFF ON ``` 2. The CHECKPOINT doc still says =E2=80=9CAll data files will be flushed = to disk=E2=80=9D After introducing FLUSH_UNLOGGED, CHECKPOINT by default no longer = flushes dirty buffers of unlogged relations, but checkpoint.sgml still = says =E2=80=9CAll data files will be flushed to disk.=E2=80=9D That = seems stale, so I updated the doc. These are two small changes, but to make the patch easier to process, I = split them into two commits. Best reagards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/ --Apple-Mail=_2C5EE8EC-0F23-4FEF-B436-EF1558929FA7 Content-Disposition: attachment; filename=v1-0002-doc-Clarify-CHECKPOINT-handling-of-unlogged-buffe.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="v1-0002-doc-Clarify-CHECKPOINT-handling-of-unlogged-buffe.patch" Content-Transfer-Encoding: quoted-printable =46rom=208e18462c160a45ebf0cec535b6ab48c0fed942c4=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20"Chao=20Li=20(Evan)"=20=0A= Date:=20Mon,=2025=20May=202026=2014:30:41=20+0800=0ASubject:=20[PATCH=20= v1=202/2]=20doc:=20Clarify=20CHECKPOINT=20handling=20of=20unlogged=20= buffers=0A=0AThe=20CHECKPOINT=20reference=20page=20still=20described=20= checkpoints=20as=20flushing=20all=0Adata=20files,=20which=20became=20= misleading=20after=20adding=20the=20FLUSH_UNLOGGED=0Aoption.=20By=20= default,=20manual=20checkpoints=20flush=20dirty=20buffers=20for=20= permanent=0Arelations=20but=20do=20not=20flush=20dirty=20buffers=20of=20= unlogged=20relations.=0A=0AUpdate=20the=20description=20to=20mention=20= that=20exception=20and=20point=20readers=20to=0AFLUSH_UNLOGGED=20when=20= they=20want=20unlogged=20buffers=20flushed=20too.=0A=0AAuthor:=20Chao=20= Li=20=0A---=0A=20doc/src/sgml/ref/checkpoint.sgml=20|=20= 6=20++++--=0A=201=20file=20changed,=204=20insertions(+),=202=20= deletions(-)=0A=0Adiff=20--git=20a/doc/src/sgml/ref/checkpoint.sgml=20= b/doc/src/sgml/ref/checkpoint.sgml=0Aindex=20cd981cf2cab..a43a1913b41=20= 100644=0A---=20a/doc/src/sgml/ref/checkpoint.sgml=0A+++=20= b/doc/src/sgml/ref/checkpoint.sgml=0A@@=20-35,8=20+35,10=20@@=20= CHECKPOINT=20[=20(=20option=20[,=20...]=20)=20]=0A=20=0A=20=20=20=0A= =20=20=20=20A=20checkpoint=20is=20a=20point=20in=20the=20write-ahead=20= log=20sequence=20at=20which=0A-=20=20=20all=20data=20files=20have=20been=20= updated=20to=20reflect=20the=20information=20in=20the=0A-=20=20=20log.=20= =20All=20data=20files=20will=20be=20flushed=20to=20disk.=20=20Refer=20to=0A= +=20=20=20data=20files=20for=20permanent=20relations=20have=20been=20= updated=20to=20reflect=20the=0A+=20=20=20information=20in=20the=20log.=20= =20Those=20data=20files=20will=20be=20flushed=20to=20disk.=0A+=20=20=20= Dirty=20buffers=20of=20unlogged=20relations=20are=20normally=20not=20= flushed=20unless=0A+=20=20=20FLUSH_UNLOGGED=20is=20= specified.=20=20Refer=20to=0A=20=20=20=20=20for=20more=20details=20about=20what=20= happens=0A=20=20=20=20during=20a=20checkpoint.=0A=20=20=20=0A--=20= =0A2.50.1=20(Apple=20Git-155)=0A=0A= --Apple-Mail=_2C5EE8EC-0F23-4FEF-B436-EF1558929FA7 Content-Disposition: attachment; filename=v1-0001-psql-Complete-boolean-values-for-CHECKPOINT-FLUSH.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="v1-0001-psql-Complete-boolean-values-for-CHECKPOINT-FLUSH.patch" Content-Transfer-Encoding: quoted-printable =46rom=20afbc48bcc06d5668b8a3db3a0b3caba4a0f8a4a0=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20"Chao=20Li=20(Evan)"=20=0A= Date:=20Mon,=2025=20May=202026=2014:14:26=20+0800=0ASubject:=20[PATCH=20= v1=201/2]=20psql:=20Complete=20boolean=20values=20for=20CHECKPOINT=0A=20= FLUSH_UNLOGGED=0A=0ATab=20completion=20for=20CHECKPOINT=20option=20lists=20= suggested=20FLUSH_UNLOGGED,=20but=0Aonce=20that=20option=20had=20been=20= entered=20it=20did=20not=20offer=20the=20accepted=20boolean=0Avalues.=20=20= Add=20ON/OFF=20completion,=20matching=20other=20parenthesized=20boolean=0A= option-list=20completions.=0A=0AAuthor:=20Chao=20Li=20=0A= ---=0A=20src/bin/psql/tab-complete.in.c=20|=202=20++=0A=201=20file=20= changed,=202=20insertions(+)=0A=0Adiff=20--git=20= a/src/bin/psql/tab-complete.in.c=20b/src/bin/psql/tab-complete.in.c=0A= index=20364546c13e8..de547a8cb37=20100644=0A---=20= a/src/bin/psql/tab-complete.in.c=0A+++=20= b/src/bin/psql/tab-complete.in.c=0A@@=20-3274,6=20+3274,8=20@@=20= match_previous_words(int=20pattern_id,=0A=20=09=09=09= COMPLETE_WITH("MODE",=20"FLUSH_UNLOGGED");=0A=20=09=09else=20if=20= (TailMatches("MODE"))=0A=20=09=09=09COMPLETE_WITH("FAST",=20"SPREAD");=0A= +=09=09else=20if=20(TailMatches("FLUSH_UNLOGGED"))=0A+=09=09=09= COMPLETE_WITH("ON",=20"OFF");=0A=20=09}=0A=20/*=20CLOSE=20*/=0A=20=09= else=20if=20(Matches("CLOSE"))=0A--=20=0A2.50.1=20(Apple=20Git-155)=0A=0A= --Apple-Mail=_2C5EE8EC-0F23-4FEF-B436-EF1558929FA7--