<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>杂项 on Last DBA</title><link>https://lastdba.com/en/categories/%E6%9D%82%E9%A1%B9/</link><description>Recent content in 杂项 on Last DBA</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><copyright>© 2026 liuzhilong62</copyright><lastBuildDate>Fri, 29 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://lastdba.com/en/categories/%E6%9D%82%E9%A1%B9/index.xml" rel="self" type="application/rss+xml"/><item><title>A DBA's Perspective on the 0526 Approved Database List</title><link>https://lastdba.com/en/2026/05/29/a-dbas-perspective-on-the-0526-approved-database-list/</link><pubDate>Fri, 29 May 2026 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2026/05/29/a-dbas-perspective-on-the-0526-approved-database-list/</guid><description>&lt;blockquote&gt;&lt;p&gt;AI rate 5%&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 class="relative group"&gt;TL;DR
 &lt;div id="tldr" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#tldr" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;On May 26, the Xinchuang Database List 2026 No. 2 was released, with 23 products passing (8 centralized + 15 distributed) — the most ever. Most notably: Ping An, UnionPay, China Mobile, and China Telecom — four major buyers — had their self-incubated databases debut on the list. The Xinchuang logic has changed — buyers are no longer just buyers.&lt;/p&gt;

&lt;h2 class="relative group"&gt;The Latest List
 &lt;div id="the-latest-list" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-latest-list" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Historical batch statistics for the Xinchuang database list. Data source: China Information Security Evaluation Center (itsec.gov.cn), 8 batches total, 4 containing databases.&lt;/p&gt;</description><content:encoded>&lt;blockquote&gt;&lt;p&gt;AI rate 5%&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 class="relative group"&gt;TL;DR
 &lt;div id="tldr" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#tldr" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;On May 26, the Xinchuang Database List 2026 No. 2 was released, with 23 products passing (8 centralized + 15 distributed) — the most ever. Most notably: Ping An, UnionPay, China Mobile, and China Telecom — four major buyers — had their self-incubated databases debut on the list. The Xinchuang logic has changed — buyers are no longer just buyers.&lt;/p&gt;

&lt;h2 class="relative group"&gt;The Latest List
 &lt;div id="the-latest-list" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-latest-list" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Historical batch statistics for the Xinchuang database list. Data source: China Information Security Evaluation Center (itsec.gov.cn), 8 batches total, 4 containing databases.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By Batch&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Batch&lt;/th&gt;
 &lt;th&gt;Date&lt;/th&gt;
 &lt;th&gt;Database Products&lt;/th&gt;
 &lt;th&gt;Achieved Level II&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;2023#1&lt;/td&gt;
 &lt;td&gt;2023-12-26&lt;/td&gt;
 &lt;td&gt;11 (centralized)&lt;/td&gt;
 &lt;td&gt;None&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;2024#2&lt;/td&gt;
 &lt;td&gt;2024-09-30&lt;/td&gt;
 &lt;td&gt;17 (6 centralized + 11 distributed)&lt;/td&gt;
 &lt;td&gt;GaussDB&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;2025#2&lt;/td&gt;
 &lt;td&gt;2025-08-22&lt;/td&gt;
 &lt;td&gt;3 (centralized)&lt;/td&gt;
 &lt;td&gt;None&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;2026#2&lt;/td&gt;
 &lt;td&gt;2026-05-26&lt;/td&gt;
 &lt;td&gt;23 (8 centralized + 15 distributed)&lt;/td&gt;
 &lt;td&gt;Dameng/Yashan/GaussDB/GoldenDB&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;By Appearances (≥2 times)&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Vendor&lt;/th&gt;
 &lt;th&gt;Count&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Dameng&lt;/td&gt;
 &lt;td&gt;3&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;GBASE&lt;/td&gt;
 &lt;td&gt;3&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Alibaba Cloud&lt;/td&gt;
 &lt;td&gt;3&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;HighGo&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Tencent Cloud&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;East Golden&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Vastdata&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Huawei Cloud&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;ZTE (GoldenDB)&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;OceanBase&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Kingbase&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Shentong&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Xugu&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Yashan&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Only 1 time&lt;/td&gt;
 &lt;td&gt;PingCAP/Wanli/Uxin/Ping An/China Mobile/UnionPay/Telecom Cloud/Timecho/Transwarp/DolphinDB/Z-Range/CM Suzhou&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;By Category: Big Tech / Unicorn / Major Buyer&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Category&lt;/th&gt;
 &lt;th&gt;Vendors&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Big Tech&lt;/td&gt;
 &lt;td&gt;Huawei Cloud (GaussDB/TaurusDB/DWS), Alibaba Cloud (PolarDB/AnalyticDB), Tencent Cloud (TDSQL), ZTE (GoldenDB), OceanBase (Ant Group)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Unicorns&lt;/td&gt;
 &lt;td&gt;PingCAP (TiDB), Yashan (SICS), Transwarp (ArgoDB), Timecho (TimechoDB), DolphinDB&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Major Buyers&lt;/td&gt;
 &lt;td&gt;Ping An Tech (RASESQL), China UnionPay (UPDRDB), China Mobile (Panwei + He3DB), China Telecom Cloud (TeleDB)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Traditional Xinchuang&lt;/td&gt;
 &lt;td&gt;Dameng, Kingbase, GBASE, Shentong, HighGo, Xugu, Vastdata, East Golden, Wanli, Uxin&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 class="relative group"&gt;The Floodgates Open
 &lt;div id="the-floodgates-open" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-floodgates-open" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;When this list came out, my reaction was four words: &lt;strong&gt;the floodgates opened&lt;/strong&gt;. 23 products — the most ever. A few highlights:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ping An RASESQL.&lt;/strong&gt; The most unexpected. Ping An Group&amp;rsquo;s fintech capabilities have always been strong, but there was almost no public information about them building a database. Seeing &amp;ldquo;RASESQL&amp;rdquo; on the list stunned me for several seconds. A financial buyer of Ping An&amp;rsquo;s scale — once their self-developed database passes national testing, their internal Xinchuang replacement roadmap gains one more path.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UnionPay UPDRDB.&lt;/strong&gt; Equally mysterious. I had no idea UnionPay was building a distributed database before this. UnionPay&amp;rsquo;s transaction volume speaks for itself — a distributed database that can handle their own business won&amp;rsquo;t be technically weak.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alibaba Cloud PolarDB for MySQL.&lt;/strong&gt; The MySQL-compatible edition of PolarDB not passing had been something many people remembered. Now, all three of PolarDB&amp;rsquo;s main lines — PG edition, distributed edition, MySQL edition — have passed. Add AnalyticDB, and Alibaba Cloud&amp;rsquo;s database family is basically complete.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;China Mobile Panwei + China Telecom TeleDB.&lt;/strong&gt; China Mobile already had He3DB (CM Suzhou) pass national testing last year; this year Panwei is their second product. China Telecom TeleDB debuts. Both telecom operators now have their own incubated Xinchuang databases, which should significantly reduce their respective Xinchuang replacement pressure. Interestingly, China Unicom has been silent — their Xinchuang strategy is clearly different from Mobile and Telecom.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Transwarp ArgoDB.&lt;/strong&gt; Transwarp started in the big data/Hadoop ecosystem and now their distributed database has passed national testing. Once crowned &amp;ldquo;China&amp;rsquo;s First Domestic Big Data Infrastructure Software Stock&amp;rdquo; with a market cap exceeding 30 billion, their path from data lake to Xinchuang database has been validated.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Impact
 &lt;div id="impact" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#impact" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;The most important signal from this floodgate opening: &lt;strong&gt;buyers can self-develop databases&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;What are the implications?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Major buyers who succeed at self-development don&amp;rsquo;t have to be lambs to the slaughter.&lt;/li&gt;
&lt;li&gt;Those major buyers who haven&amp;rsquo;t built one yet may restart their self-development efforts.&lt;/li&gt;
&lt;li&gt;The market share that big tech and unicorns could compete for in the domestic database market just shrank.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Financial industry players UnionPay and Ping An, telecom players China Mobile and China Telecom — all passed national testing, effectively earning a &amp;ldquo;R&amp;amp;D Success&amp;rdquo; gold badge. Internally, each organization must be celebrating. For external vendors, what they&amp;rsquo;ve lost isn&amp;rsquo;t just major clients — more precisely, &lt;strong&gt;they&amp;rsquo;ve lost absolute bargaining power&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;I know you&amp;rsquo;re in a tough spot, and I know you can&amp;rsquo;t afford not to buy, so I&amp;rsquo;ll swap the butcher&amp;rsquo;s knife for a dragon-slaying blade and slaughter you to death&amp;rdquo; — for buyers who successfully incubated their own databases, this kind of predicament has been substantially eased. That&amp;rsquo;s significant.&lt;/p&gt;
&lt;p&gt;As for where Xinchuang policy goes next, nobody can say. Based on previous lists, things should be getting stricter (last time only 3 databases passed), but this time they unexpectedly opened the floodgates. A sharp contraction next round isn&amp;rsquo;t impossible. Not just China Unicom — insurance industry players like CPIC and PICC, and even capable financial institutions, could consider jumping in to hand-roll their own database.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Bittersweet Reflections
 &lt;div id="bittersweet-reflections" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#bittersweet-reflections" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Since our kernel team sits right behind me, I have some understanding of the Xinchuang R&amp;amp;D process. After consecutive failed submissions, the entire team&amp;rsquo;s morale was extremely low. I believe we weren&amp;rsquo;t the only ones — many teams whose submissions failed felt the same. For industries like finance and telecom, there&amp;rsquo;s a Xinchuang mandate, but if your self-developed product doesn&amp;rsquo;t pass approval, there&amp;rsquo;s no choice at the corporate strategy level, and at the team level, there&amp;rsquo;s no reason for existence. That&amp;rsquo;s why &amp;ldquo;passing national testing&amp;rdquo; carries such weight and influence. Thankfully they passed — heartfelt congratulations to them! RaseSQL No.1!&lt;/p&gt;
&lt;p&gt;At the same time, it&amp;rsquo;s clear that Xinchuang results and direction are unstable, volatile, and impactful. It determines some companies&amp;rsquo; strategies and many people&amp;rsquo;s fates. I myself am even a piece on this wheel of fortune.&lt;/p&gt;
&lt;p&gt;Beyond those on the list, many organizations poured enormous effort but remain off the list. Their products might be terrible, or they might be excellent. But national testing is that stark watershed — a mysterious ticket of admission. &lt;strong&gt;Pass or fail — in the domestic market, those are two entirely different concepts.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;OK, just some thoughts — might delete later.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Reference
 &lt;div id="reference" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#reference" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://www.itsec.gov.cn/aqkkcp/cpgg/" target="_blank" rel="noreferrer"&gt;https://www.itsec.gov.cn/aqkkcp/cpgg/&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Original link: &lt;a href="https://lastdba.com/2026/05/29/xinchuang-db-2026-review/" target="_blank" rel="noreferrer"&gt;https://lastdba.com/2026/05/29/xinchuang-db-2026-review/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded></item><item><title>My Blog is Live</title><link>https://lastdba.com/en/2026/05/16/my-blog-is-live/</link><pubDate>Sat, 16 May 2026 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2026/05/16/my-blog-is-live/</guid><description>&lt;h3 class="relative group"&gt;It&amp;rsquo;s Live!
 &lt;div id="its-live" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#its-live" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;The blog is finally live.&lt;/p&gt;
&lt;p&gt;URL: &lt;a href="https://lastdba.com" target="_blank" rel="noreferrer"&gt;https://lastdba.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Accessible from China, mobile-friendly too.&lt;/p&gt;
&lt;p&gt;76 articles — all PostgreSQL writing from the past few years: case studies, internals, source code analysis, paper deep reads.&lt;/p&gt;
&lt;p&gt;This is a proper launch: new framework, new domain, new theme — rebuilt from the ground up.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Highlights
 &lt;div id="highlights" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#highlights" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Clean Interface&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Minimalist, reader-friendly design with a useful search feature.&lt;/p&gt;</description><content:encoded>
&lt;h3 class="relative group"&gt;It&amp;rsquo;s Live!
 &lt;div id="its-live" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#its-live" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;The blog is finally live.&lt;/p&gt;
&lt;p&gt;URL: &lt;a href="https://lastdba.com" target="_blank" rel="noreferrer"&gt;https://lastdba.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Accessible from China, mobile-friendly too.&lt;/p&gt;
&lt;p&gt;76 articles — all PostgreSQL writing from the past few years: case studies, internals, source code analysis, paper deep reads.&lt;/p&gt;
&lt;p&gt;This is a proper launch: new framework, new domain, new theme — rebuilt from the ground up.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Highlights
 &lt;div id="highlights" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#highlights" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Clean Interface&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Minimalist, reader-friendly design with a useful search feature.&lt;/p&gt;
&lt;p&gt;

 


&lt;img src="https://lastdba.com/img/image-20260517000626083.png" alt="image-20260517000626083" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Framework: Jekyll → Hugo&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Version 1: Jekyll + minima theme + 2000 lines of CSS&lt;/p&gt;
&lt;p&gt;Version 2: Hugo + Blowfish theme + 0 lines of CSS&lt;/p&gt;
&lt;p&gt;V1 was decent, but building the UI myself was exhausting. I remembered vonng had written an article about website architecture choices, so I just went and borrowed from it. I explained the architecture to AI and had it learn from vonng.com — the page quality jumped up a level instantly. A few more tweaks and it was done.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Domain: github.io → lastdba.com&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Bought &lt;code&gt;lastdba.com&lt;/code&gt;, configured Cloudflare. GitHub Pages with custom domain, free HTTPS certificate, auto-renewal. Now accessible without VPN!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Image Localization&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Previously, article images were scattered everywhere — CSDN CDN, GitHub PicBed, Modb OSS. CSDN has hotlink protection. GitHub PicBed on foreign networks often failed to load domestically. This time I had AI consolidate everything to local paths. No more worrying about image hosts going down. Cross-network image loading problems solved — very good.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Reflections on Going Live
 &lt;div id="reflections-on-going-live" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#reflections-on-going-live" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;d actually set up a blog URL before — just fork a blog project and deploy via GitHub Pages. The domain was &lt;code&gt;liuzhilong62.github.io/blogs&lt;/code&gt;. But being somewhat of a quality freak (not really), the results were mediocre so I took it down. Later I just used the GitHub repo as my blog, without even enabling Pages. Recently, with more free time for various reasons, I revisited this and used Hermes to build the blog from scratch.&lt;/p&gt;
&lt;p&gt;As a DBA and backend engineer, I know nothing about frontend stuff like Jekyll, Hugo, Blowfish, CSS. I just give Hermes a target and it does the work. When it explains things to me I don&amp;rsquo;t understand (and I&amp;rsquo;m too embarrassed to admit it), I basically just say &amp;ldquo;keep going.&amp;rdquo; I check the result in the browser — if I&amp;rsquo;m satisfied, great; occasionally I say &amp;ldquo;revert this.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Honestly, my biggest takeaway from switching to Hugo wasn&amp;rsquo;t technical — it was &amp;ldquo;don&amp;rsquo;t reinvent the wheel.&amp;rdquo; I&amp;rsquo;d spent so much time hand-coding dark mode, TOC, search, only to discover a theme swap includes it all, and theirs looks better than mine.&lt;/p&gt;
&lt;p&gt;Also, after hooking up &lt;code&gt;lastdba.com&lt;/code&gt;, the blog suddenly felt &amp;ldquo;official.&amp;rdquo; &lt;code&gt;liuzhilong62.github.io/blogs&lt;/code&gt; felt like a personal experiment; now it feels like a real website. Same content, different feeling.&lt;/p&gt;

&lt;h3 class="relative group"&gt;What It Cost
 &lt;div id="what-it-cost" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-it-cost" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;All expenses:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Item&lt;/th&gt;
 &lt;th&gt;Cost&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;lastdba.com&lt;/code&gt; domain (Cloudflare, 1 year)&lt;/td&gt;
 &lt;td&gt;¥70&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;GitHub Pages hosting&lt;/td&gt;
 &lt;td&gt;¥0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Hugo framework&lt;/td&gt;
 &lt;td&gt;¥0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Blowfish theme&lt;/td&gt;
 &lt;td&gt;¥0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Cloudflare DNS + CDN&lt;/td&gt;
 &lt;td&gt;¥0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Tokens&lt;/td&gt;
 &lt;td&gt;¥60&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;¥130&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Possibly the most cost-effective personal website solution out there.&lt;/p&gt;
&lt;hr&gt;

&lt;h3 class="relative group"&gt;Finally
 &lt;div id="finally" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#finally" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Some details may not be polished — feedback, bug reports, and optimization suggestions welcome.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll likely keep updating.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Reference
 &lt;div id="reference" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#reference" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://vonng.com/" target="_blank" rel="noreferrer"&gt;https://vonng.com/&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Original link: &lt;a href="https://lastdba.com/2026/05/16/" target="_blank" rel="noreferrer"&gt;https://lastdba.com/2026/05/16/&lt;/a&gt;个人博客上线/&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded></item><item><title>My 2025 Year-End Summary</title><link>https://lastdba.com/en/2025/12/21/my-2025-year-end-summary/</link><pubDate>Sun, 21 Dec 2025 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2025/12/21/my-2025-year-end-summary/</guid><description>&lt;h2 class="relative group"&gt;As a DBA
 &lt;div id="as-a-dba" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#as-a-dba" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;As a DBA, I strongly believe in first principles and information theory when it comes to problem analysis. A DBA needs to deeply understand the system, understand PostgreSQL, to explain anomalies from first principles. For example, in the first half of the year I spent considerable effort understanding Linux memory, exploring the essence of memory issues and their solutions. At the same time, this year I took a step forward in system operations — no longer focusing solely on technical problems and handling, but more on providing solutions. These should encompass thinking across the PostgreSQL database technology dimension, the system dimension, and the management dimension.&lt;/p&gt;</description><content:encoded>
&lt;h2 class="relative group"&gt;As a DBA
 &lt;div id="as-a-dba" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#as-a-dba" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;As a DBA, I strongly believe in first principles and information theory when it comes to problem analysis. A DBA needs to deeply understand the system, understand PostgreSQL, to explain anomalies from first principles. For example, in the first half of the year I spent considerable effort understanding Linux memory, exploring the essence of memory issues and their solutions. At the same time, this year I took a step forward in system operations — no longer focusing solely on technical problems and handling, but more on providing solutions. These should encompass thinking across the PostgreSQL database technology dimension, the system dimension, and the management dimension.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a simple classification of cloud DBA work:&lt;/p&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/2e7e4042bd88.png" alt="image-20251221120908749" /&gt;&lt;/p&gt;
&lt;p&gt;Many Ops papers only talk about incident handling, but in reality, incident handling probably accounts for less than 5% of actual operational workload. And whether in academia or practice, anomaly ops itself isn&amp;rsquo;t very effective anyway. So I&amp;rsquo;m not very bullish on AIOps being able to significantly help DBAs. Note that DBAs using AIOps and DBAs using AI are two different things.&lt;/p&gt;
&lt;p&gt;Actually, this diagram is just so-so, because it doesn&amp;rsquo;t include leadership tasks, which are definitely the bulk.&lt;/p&gt;
&lt;p&gt;Looking back at the 2023 and 2024 year-end summaries, I can simply summarize my DBA work year by year:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2023: Comprehensive PostgreSQL learning&lt;/li&gt;
&lt;li&gt;2024: Comprehensive PostgreSQL operations&lt;/li&gt;
&lt;li&gt;2025: Responsible for 1510 emotional value&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What&amp;rsquo;s deeply ironic is that last year&amp;rsquo;s conclusion — &amp;ldquo;DBAs are providing 1510 emotional value to their leaders&amp;rdquo; — became my lived reality this year. I don&amp;rsquo;t want to say more about it. In short, it&amp;rsquo;s been exhausting, mentally draining. I hope next year brings improvement.&lt;/p&gt;

&lt;h2 class="relative group"&gt;READING
 &lt;div id="reading" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#reading" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/710a408c1e3a.png" alt="image-20251220160932315" /&gt;&lt;/p&gt;
&lt;p&gt;This year I read even more books than last year (from 20+ to 30+), but wrote even fewer reading notes. Writing is indeed troublesome and energy-consuming, and I&amp;rsquo;ve grown to prefer the feeling of reading itself. Compared to last year, this year&amp;rsquo;s reading shows a clear decrease in PostgreSQL technical books, an increase in comprehensive technical books, and I even started reading psychology, economics, and philosophy. In short, broader hunting grounds, not limited to databases alone. Also fewer novels — novels are like snacks, and I&amp;rsquo;m increasingly losing interest in such non-nutritious content.&lt;/p&gt;
&lt;p&gt;This year&amp;rsquo;s book list generally falls into: IT Systems, Economics, Popular Science, Spiritual, and Fiction categories. As with last year, ranked &lt;strong&gt;by personal preference&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;IT Systems Book List:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;SRE: Google&amp;rsquo;s Approach to Service Reliability&amp;rdquo; — DBAs are not SREs, but their work involves system stability objectives, which has similarities with DBA work. Some content in this book about cloud environments or management aspects was truly enlightening — for example, SLA, systems engineering, operational pressure, busy work, role rotation, &amp;ldquo;trust the team rather than a single technical expert,&amp;rdquo; and more. Absolutely brilliant. Recently I also heard the term DBRE — Database Reliability Engineer — which fits my current role even better than DBA. In short, an excellent book, a must-read for modern ops.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;Running Linux Kernel: Introduction&amp;rdquo; — operating open-source databases requires understanding the operating system. One of my books for studying Linux memory.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;Deep Understanding of Linux Processes and Memory&amp;rdquo; — one of my books for studying Linux memory.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;Understanding the Linux Kernel&amp;rdquo; — one of my books for studying Linux memory.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;Observability Engineering&amp;rdquo; — the patterns and flaws of traditional monitoring and traditional ops, and what observability essentially means. Quite helpful.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Economics Book List:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;Microeconomics&amp;rdquo; — a masterpiece, by Daron Acemoglu. I consider it essential reading for life. This book has my best notes of any book. Not only understanding economics, but further understanding society. Some viewpoints left a deep impression on me:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Proves why the market is an invisible hand that maximizes social surplus value — any intervention reduces social surplus value.&lt;/li&gt;
&lt;li&gt;Under what circumstances markets are ineffective: externalities, public resources, and common-pool resources.&lt;/li&gt;
&lt;li&gt;Women earn less than men in the workplace partly because women bear children and cannot participate in production during that time.&lt;/li&gt;
&lt;li&gt;The function of academic credentials is signaling — to a certain degree, they certify the productive value of the person.&lt;/li&gt;
&lt;li&gt;Business entry and exit are normal market signals, not signs of disorder.&lt;/li&gt;
&lt;li&gt;The trade-off between equity and efficiency is a subject of study.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;Why Nations Fail&amp;rdquo; — a masterpiece, by Daron Acemoglu. This book can be summarized in one sentence: Why do nations succeed? Because of creative destruction. Daron Acemoglu won the 2024 Nobel Prize in Economics for &amp;ldquo;research on how institutions are formed and how they affect prosperity.&amp;rdquo; What&amp;rsquo;s even more remarkable is that this book is easier to understand than other economics works. The top-recommended economics masterpiece.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;The Rational Optimist&amp;rdquo; — said to rival &amp;ldquo;Sapiens,&amp;rdquo; but it&amp;rsquo;s definitely a notch below. However, the content quality isn&amp;rsquo;t bad, and it&amp;rsquo;s more economics-oriented. Some viewpoints are very fresh, for example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Modern economics makes the rich richer, but the poor are not getting poorer.&lt;/li&gt;
&lt;li&gt;Self-sufficiency is poverty.&lt;/li&gt;
&lt;li&gt;What distinguishes humans from animals is barter exchange (in &amp;ldquo;Sapiens&amp;rdquo; it&amp;rsquo;s the cognitive revolution).&lt;/li&gt;
&lt;li&gt;Higher income leads to greater happiness — this is a fact.&lt;/li&gt;
&lt;li&gt;The elevation of trade in social status came from the rise of maritime trade, because land trade was unstable and easily plundered.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;Reminiscences of a Stock Operator&amp;rdquo; — feels like I learned something and nothing at the same time. Decent read though.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;Game Theory&amp;rdquo; — honestly, I found it average. Not much content, quite superficial. I mainly read it because economics books keep mentioning game theory, so I flipped through it to evaluate.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;The Wealth of Nations&amp;rdquo; — extremely dense, not for normal people to read. Incredibly content-rich. Adam Smith must have been a genius — hard to imagine what kind of mind produced this. Too difficult for me, didn&amp;rsquo;t finish, gave up.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Popular Science Book List:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;A Brief History of Intelligence&amp;rdquo; — a masterpiece, essential reading for the AI era. This book is worn from my constant reading, covered in notes everywhere. Deconstructing the human brain, understanding what intelligence is, understanding how AI came to be. I give it full marks! Now whenever I see any animal, I first think about what intelligence level it&amp;rsquo;s at&amp;hellip;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;On Top of Tides&amp;rdquo; — by Wu Jun. Every IT professional should read this book. It tells the rise and fall of major IT companies. You can learn about Oracle, Google, Fairchild, Bell Labs, and even basics about venture capital. Every company has its own DNA, which is nearly unchangeable and determines the company&amp;rsquo;s culture and characteristics. A programmer&amp;rsquo;s must-read.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;The Almanack of Naval Ravikant&amp;rdquo; — has many useful perspectives, like views on marginal utility. And more importantly, it recommended one of my favorite books this year — &amp;ldquo;Microeconomics.&amp;rdquo; It also recommended meditation, which changed my habits.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;How to Manage a Software Company&amp;rdquo; — by Frank Slootman, a legendary Silicon Valley CEO who led three software companies (ServiceNow, Data Domain, Snowflake) to successful IPOs. A very good book, looking at company development, employee management, execution, decision-making, and decision failures from an IT company manager&amp;rsquo;s perspective. Highly recommended.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;The Economics of Aging&amp;rdquo; — by Kenichi Ohmae. Using Japan&amp;rsquo;s aging problem to glimpse China&amp;rsquo;s aging problems and opportunities. The demographic structural risks in our country are severe and about to come to a head. In this era, highly recommended reading.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;The Fourth Wave&amp;rdquo; — by Kenichi Ohmae. Mainly about how Japan missed the IT technology wave, still relying on old industries to support the national economy, appearing somewhat envious of South Korea and China. I personally love the author&amp;rsquo;s attitude of directly criticizing the prime minister, haha.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;The Checklist Manifesto&amp;rdquo; — explains the necessity of checklist inspections before Western surgical procedures. Seemingly simple steps can dramatically increase surgical success rates. This book had a big impact on my work — I genuinely brought the checklist concept into my work. I treat database operations like a surgical procedure — checklists are a simple yet necessary means to improve success rates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;The Mythical Man-Month&amp;rdquo; — &amp;ldquo;adding people&amp;rdquo; cannot linearly reduce systems engineering project timelines, but you also can&amp;rsquo;t simply reject &amp;ldquo;adding people&amp;rdquo; because large systems engineering projects genuinely require many people collaborating. It&amp;rsquo;s a good book, but calling it a programmer&amp;rsquo;s must-read feels like a stretch.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;The Beauty of Mathematics&amp;rdquo; — by Wu Jun. Also quite good. Technology always has its mathematical foundations. This book accessibly tells the beauty of mathematics.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;McKinsey Structured Thinking&amp;rdquo; — any problem should be structurally decomposed. When I encounter new problems, I think this way. A useful book.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;The Chrysanthemum and the Sword&amp;rdquo; — stock from years ago that I dug out to read. An American&amp;rsquo;s post-WWII perspective on Japan. You can glimpse aspects of Japanese culture like modified Confucianism without &amp;ldquo;benevolence (ren),&amp;rdquo; the psychology of indebtedness, etc. One drawback is it&amp;rsquo;s quite dated — modern Japan is largely different from that era.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;The Black Swan&amp;rdquo; — a black swan refers to unforeseen extreme events. Black swan events will always happen — there&amp;rsquo;s no such thing as 100% accurate prediction. It also discusses classification, which reminded me of content from &amp;ldquo;Structured Thinking&amp;rdquo; and &amp;ldquo;The Worlds I See&amp;rdquo;: &amp;ldquo;The essence of human understanding is classifying things,&amp;rdquo; but classification always awkwardly leaves some things unclassifiable or unable to be classified. Black swan events exist from the moment of classification. An interesting and noteworthy reflection.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;ldquo;The Professional&amp;rdquo; — by Kenichi Ohmae. Very mediocre, not recommended.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Spiritual / Self-Help Book List:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&amp;ldquo;The Evolution of Desire&amp;rdquo; — evolutionary psychology, a masterpiece.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Die with Zero&amp;rdquo; — experience the right things at different life stages. Even if you revisit something after missing it, it won&amp;rsquo;t feel the same as experiencing it at the right time. A life manual, highly recommended.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Ten Minutes Meditation&amp;rdquo; — mainly about the importance of meditation and how to do it. I learned meditation through this book. When I first completed meditation, I fell in love with it. It gave me a feeling of being taken to outer space and then returning to Earth. More importantly, it truly relieves stress. Meditation has become part of my life.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;The Manipulation Bible&amp;rdquo; — okay.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Siddhartha&amp;rdquo; — incomprehensible, rubbish.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;The Book of Life&amp;rdquo; — pure chicken soup, rubbish.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Fiction Book List:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&amp;ldquo;The Stranger&amp;rdquo; — a masterpiece. An indescribable sense of authenticity, feeling like an outsider oneself.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Yellowface&amp;rdquo; — a very interesting book about a white American woman who plagiarizes an unpublished work by a deceased Asian writer, even using a very Chinese pen name. When fans discover she&amp;rsquo;s white, you can feel the embarrassment. Playfully explores racial prejudice. As thrilling as watching a TV drama — twists and turns, gripping. Highly recommended.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;The World of Yesterday&amp;rdquo; — by Stefan Zweig. Austria, Europe, WWI and WWII through a writer&amp;rsquo;s eyes. Returning to that turbulent Europe from a different angle. A very good book.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Project Hail Mary&amp;rdquo; — sci-fi. I increasingly dislike reading sci-fi. This one is okay: imagine you&amp;rsquo;re on an alien exploration mission, all your crewmates have died, and you happen to encounter a friendly alien. How do you communicate with them&amp;hellip;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Letter from an Unknown Woman&amp;rdquo; — by Stefan Zweig. Not good. Only the first story is somewhat novel. No interest in seriously reading the other two.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Satantango&amp;rdquo; — incomprehensible. Even Nobel Prize in Literature winners vary in quality.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 class="relative group"&gt;Blog and WeChat Official Account
 &lt;div id="blog-and-wechat-official-account" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#blog-and-wechat-official-account" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;The name of my WeChat Official Account has always been a struggle. I didn&amp;rsquo;t put much thought into maintaining it anyway, so I casually used a few names. This year I watched a documentary — &amp;ldquo;The Last Porter&amp;rdquo; (最后的棒棒), which moved me deeply. The DBA profession, like the porters of Chongqing, is undergoing tremendous change. So I simply changed it to &amp;ldquo;最后的DBA&amp;rdquo; (The Last DBA). This name rolls off the tongue nicely and carries some historical context and philosophical reflection. Seems like a good name.&lt;/p&gt;
&lt;p&gt;Since a lot of time goes into work, I didn&amp;rsquo;t have much time for writing to begin with. Plus, this year my operational approach kept changing, and no matter how I adjusted my daily schedule, I couldn&amp;rsquo;t carve out a good time slot. I even invested some money, and my time still didn&amp;rsquo;t increase, which frustrated me for quite a while. Looking back now, I only published 12 articles this year — not even one in the first half of the year.&lt;/p&gt;
&lt;p&gt;Very dissatisfied. &amp;#x1f620;&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t know if my skills have improved or if the system is genuinely stable, but cases worth deep research seem to have become fewer. But this isn&amp;rsquo;t really a big problem. This year I also started treating paper interpretation as an article type. I personally feel the results are decent — I can learn quite a bit, without being too insular or reinventing the wheel. Using AI to interpret papers would certainly be fast, but I personally feel there are two problems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do I truly understand? I feel like I don&amp;rsquo;t — it&amp;rsquo;s not the same concept as reading through it myself. Reading it yourself not only allows deeper understanding but also lets you discover all sorts of quirky details.&lt;/li&gt;
&lt;li&gt;Can&amp;rsquo;t pad articles. If I can interpret a paper with one prompt, then I feel the dissemination value is minimal — surely there&amp;rsquo;s no one not using AI now, right?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Of course, I don&amp;rsquo;t read every paper word by word — that would be too inefficient. I only select papers that I feel are good and worth frame-by-frame interpretation, and savor them carefully.&lt;/p&gt;
&lt;p&gt;A quick summary of this year&amp;rsquo;s articles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Too few in quantity&lt;/li&gt;
&lt;li&gt;Slightly improved quality, and useful content (several articles I&amp;rsquo;m personally very satisfied with)&lt;/li&gt;
&lt;li&gt;Explored new formats&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 class="relative group"&gt;Final Thoughts
 &lt;div id="final-thoughts" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#final-thoughts" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;This year was a busy one, with both bad and good memories. Many important things were left unfinished. Next year should bring significant changes. Writing this year-end summary is quite interesting — looking back to see what my past selves were up to is a fun experience.&lt;/p&gt;
&lt;p&gt;Last year&amp;rsquo;s 2025 OKRs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Continue some things — FAILED&lt;/li&gt;
&lt;li&gt;Think about how to produce output — FAILED&lt;/li&gt;
&lt;li&gt;Master another track — HALF SUCCESSFUL&lt;/li&gt;
&lt;li&gt;PostgreSQL&amp;hellip; haven&amp;rsquo;t figured out what more to do — FAILED&lt;/li&gt;
&lt;li&gt;Find a way to resume fitness — FAILED&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;2026 Plan:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Continue some things&lt;/li&gt;
&lt;li&gt;Pay attention to my psychological and physical health — next year&amp;rsquo;s annual health inspection alerts should be lower than this year&amp;rsquo;s&lt;/li&gt;
&lt;li&gt;Pay attention to article readership, maintain the WeChat Official Account&lt;/li&gt;
&lt;li&gt;Explore DB AI Ops, report to myself next year&lt;/li&gt;
&lt;li&gt;Manage upward — don&amp;rsquo;t invest too much time in work&lt;/li&gt;
&lt;li&gt;Travel during holidays instead of grinding&lt;/li&gt;
&lt;li&gt;Read no fewer than 30 books, but don&amp;rsquo;t focus solely on quantity&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title>My 2024 Year-End Summary</title><link>https://lastdba.com/en/2025/01/11/my-2024-year-end-summary/</link><pubDate>Sat, 11 Jan 2025 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2025/01/11/my-2024-year-end-summary/</guid><description>&lt;h2 class="relative group"&gt;As a DBA
 &lt;div id="as-a-dba" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#as-a-dba" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;2023 was a year of comprehensive PostgreSQL learning for me, and 2024 has been a year of comprehensive PostgreSQL operations. There&amp;rsquo;s actually a lot of material I really want to dive into but haven&amp;rsquo;t had the time. This year was mainly case analysis — I could only supplement my foundational knowledge here and there.&lt;/p&gt;
&lt;p&gt;Mid-year there was a discussion about &amp;ldquo;will DBAs be eliminated in the cloud era.&amp;rdquo; This discussion left a deep impression on me. I thought about many things afterward — why do others seem to have so few things to deal with while I, as a DBA, have so much? I even went into cloud computing groups to debate about it, and I actually gained something from it. Different perspectives lead to unexpected conclusions. The conclusion of the debate may boil down to just one thing: DBAs are providing 1510 emotional value to their leaders.&lt;/p&gt;</description><content:encoded>
&lt;h2 class="relative group"&gt;As a DBA
 &lt;div id="as-a-dba" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#as-a-dba" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;2023 was a year of comprehensive PostgreSQL learning for me, and 2024 has been a year of comprehensive PostgreSQL operations. There&amp;rsquo;s actually a lot of material I really want to dive into but haven&amp;rsquo;t had the time. This year was mainly case analysis — I could only supplement my foundational knowledge here and there.&lt;/p&gt;
&lt;p&gt;Mid-year there was a discussion about &amp;ldquo;will DBAs be eliminated in the cloud era.&amp;rdquo; This discussion left a deep impression on me. I thought about many things afterward — why do others seem to have so few things to deal with while I, as a DBA, have so much? I even went into cloud computing groups to debate about it, and I actually gained something from it. Different perspectives lead to unexpected conclusions. The conclusion of the debate may boil down to just one thing: DBAs are providing 1510 emotional value to their leaders.&lt;/p&gt;
&lt;p&gt;Right or wrong, you can see reflections on the DBA profession in many of my articles this year. Continuing down the traditional DBA path is certainly a dead end. Today&amp;rsquo;s DBAs lean more toward business data layer operations, or moving up to architecture design. Positions for expert DBAs focused purely on databases are actually very few.&lt;/p&gt;

&lt;h2 class="relative group"&gt;READING
 &lt;div id="reading" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#reading" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/4961d50ee1c3.jpg" alt="image" /&gt;&lt;/p&gt;
&lt;p&gt;Let me reiterate why I&amp;rsquo;m so devoted to reading (I said this in 2023 too&amp;hellip;):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The value brought by reading is immeasurable in the short term&lt;/li&gt;
&lt;li&gt;Reading brings a pleasant sense of intellectual enrichment&lt;/li&gt;
&lt;li&gt;Learning is a belief. Yuval Harari has a view: believing in science is actually also a form of faith. I choose to believe in this faith, at least in 2024 and the foreseeable future.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My book list roughly falls into three categories: PostgreSQL, broader technical scope, and extracurricular. Some are in Chinese, some in English. Some are physical books, some electronic.&lt;/p&gt;
&lt;p&gt;This year, let me continue with a reading list ranking. Horizontal comparison across different categories is a bit of a stretch, so let&amp;rsquo;s compare within categories. Once again, note: these book lists are for books I aimed to &amp;ldquo;finish cover to cover.&amp;rdquo; Books used as references don&amp;rsquo;t count here.&lt;/p&gt;
&lt;p&gt;2024 PostgreSQL Book List (ranked by preference):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&amp;ldquo;PostgreSQL Database Kernel Analysis&amp;rdquo; — clear thinking and framework, though the version is a bit old&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Quickly Mastering PostgreSQL Version New Features&amp;rdquo; — this should be my favorite PostgreSQL book this year, because it has &lt;strong&gt;zero fluff&lt;/strong&gt; throughout, a pleasure to read&lt;/li&gt;
&lt;li&gt;&amp;ldquo;The Internals of PostgreSQL&amp;rdquo; — I originally wanted to put this first, but since there&amp;rsquo;s a free online version at interdb, I wouldn&amp;rsquo;t even recommend buying this book. It&amp;rsquo;s ranked here because interdb is so excellent — its substitute is enshrined here as a deity&lt;/li&gt;
&lt;li&gt;&amp;ldquo;The Way of PostgreSQL: From Apprentice to Expert, 2nd Edition&amp;rdquo; — very detailed but also very long. I recommend skimming through quickly to find the key points without lingering too long&lt;/li&gt;
&lt;li&gt;&amp;ldquo;PostgreSQL Technical Internals: Transaction Processing Deep Dive&amp;rdquo; — transactions are the foundation of PostgreSQL, and also the foundation of my source code journey&lt;/li&gt;
&lt;li&gt;&amp;ldquo;PostgreSQL in Action&amp;rdquo; — the practical examples are well worth referencing&lt;/li&gt;
&lt;li&gt;&amp;ldquo;PostgreSQL 16 Administration Cookbook&amp;rdquo; — not recommended. The table of contents framework looks good, but the content is hollow. Don&amp;rsquo;t waste time on this book.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;2024 Broader Technical Scope Book List (ranked by preference):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&amp;ldquo;DDIA-v2: Designing Data-Intensive Applications (2nd Edition)&amp;rdquo; — so good I don&amp;rsquo;t know where to begin. So excellent that I specially wrote &lt;a href="https://github.com/liuzhilong62/blogs/blob/main/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0%E2%80%94%E2%80%94DDIA-v2%20%E8%AE%BE%E8%AE%A1%E6%95%B0%E6%8D%AE%E5%AF%86%E9%9B%86%E5%9E%8B%E5%BA%94%E7%94%A8%EF%BC%88%E7%AC%AC%E4%BA%8C%E7%89%88%EF%BC%89.md" target="_blank" rel="noreferrer"&gt;reading notes&lt;/a&gt; (my only book notes article this year). I wish I had found it sooner.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;A Brief History of Databases&amp;rdquo; — reading history truly brings insight. The story of databases begins here. Some technical things become clearer in hindsight.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;ITIL 4 and DevOps Service Management Certification Guide (2nd Edition)&amp;rdquo; — a classic in IT service management. It elevated my understanding of the operations role — how did these things so closely tied to my work come about? Which parts don&amp;rsquo;t match reality, and why weren&amp;rsquo;t they applied? You can grasp many things from it.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Cloud Native Kubernetes&amp;rdquo; — hardcore, another track entirely&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Docker Deep Dive&amp;rdquo; — decent for understanding containers and container history. The container knowledge itself isn&amp;rsquo;t actually that much.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Brother Bird&amp;rsquo;s Linux Private Kitchen&amp;rdquo; — sorry, I genuinely hadn&amp;rsquo;t read this classic. Came to catch up. The writing approach is well worth learning from. The drawback is that much of it isn&amp;rsquo;t useful for my role.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Machine Learning&amp;rdquo; — ranked here not because the book is bad, but because it&amp;rsquo;s very hard to understand. I gave up about a quarter of the way through. This book showed me the upper limits of my intelligence, and I&amp;rsquo;m sad about it.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Building a Vector Database from Scratch&amp;rdquo; — if you want to read source code, go to GitHub&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Deep Understanding of Go Language&amp;rdquo; — understood nothing at all&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;2024 Extracurricular Book List (ranked by preference):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&amp;ldquo;Cancer Ward&amp;rdquo; — I finished this early in the first half of the year. While reading it, I felt: barring surprises, this book would rank first this year. Nobel Prize in Literature, well-deserved.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Intimate Relationships&amp;rdquo; — understanding relationships with lovers, friends, and bosses. Academic paper style, solid, I like it.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Does God Play Dice? A History of Quantum Physics&amp;rdquo; — setting aside everything else, the writing style provides immense emotional value, making me want to keep reading. I finished it in just a few days.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;The Worlds I See&amp;rdquo; — AI pioneer Fei-Fei Li&amp;rsquo;s autobiography. The story of a girl who grew up in Chengdu venturing into the melting pot of America, eventually leading Google AI, while also narrating the history of AI development.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;21 Lessons for the 21st Century&amp;rdquo; — the final installment of Yuval Harari&amp;rsquo;s trilogy. I loved the first two books, but this one felt just okay. At least it brought closure.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;The Old Man and the Sea&amp;rdquo; — hard to evaluate. I like its temperament, but not its content.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;The Wandering Earth&amp;rdquo; — this is a collection of Liu Cixin&amp;rsquo;s short stories. One day at the library, I bought it because of the first short story. After buying it, I found the other short stories to be very boring and childish. I felt cheated.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Journey to the West&amp;rdquo; — hot take: they can&amp;rsquo;t even explain Tang Sanzang&amp;rsquo;s background properly. A mess, completely confused. I gave up after a little bit. (My evaluation of &amp;ldquo;Romance of the Three Kingdoms&amp;rdquo; last year was very high.)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 class="relative group"&gt;Blog and WeChat Official Account
 &lt;div id="blog-and-wechat-official-account" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#blog-and-wechat-official-account" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;2024 Published Articles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PostgreSQL technical: 21&lt;/li&gt;
&lt;li&gt;Other technical: 2&lt;/li&gt;
&lt;li&gt;Book notes: 1&lt;/li&gt;
&lt;li&gt;Useless articles: 1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I only wrote 25 articles this year, a noticeable decrease from last year.&lt;/p&gt;
&lt;p&gt;WeChat Official Account followers: 600. Though not many, I believe every single one has good taste &amp;#x1f638;&lt;/p&gt;
&lt;p&gt;Writing technical articles is actually quite tiring — it takes far more time than one would imagine. However, you genuinely learn things during the writing process, and the sense of accomplishment from completing a piece is real. Since I feel responsible for my articles, I won&amp;rsquo;t write recklessly about things I don&amp;rsquo;t understand. As for errors arising from misunderstandings, that&amp;rsquo;s actually normal. No one can guarantee that their future self won&amp;rsquo;t criticize their current self — just write correctly for the current state.&lt;/p&gt;
&lt;p&gt;In terms of writing content this year, I gave up writing reading notes for extracurricular books. I wrote quite a few last year, but writing reading notes takes a lot of time with very low value. Low emotional value tasks naturally get abandoned. In fact, my writing content varies each year. Currently, PostgreSQL database technical articles are the only constant — other types aren&amp;rsquo;t as stable. This is normal. The blog was originally meant for database writing. If there&amp;rsquo;s no application scenario for other domains, I won&amp;rsquo;t touch them again after the brief exploratory period.&lt;/p&gt;
&lt;p&gt;One more complaint: domestic blogging platforms only care about article quantity, which is completely at odds with my writing style. Each of my articles is tens of thousands of hand-typed characters. I&amp;rsquo;m a quality-over-quantity blogger. So I can&amp;rsquo;t be bothered anymore — I&amp;rsquo;m planning to abandon CSDN in 2025 and just post on GitHub and my WeChat Official Account.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve been writing on CSDN since 2017. When I first started blogging, there weren&amp;rsquo;t many good blog hosting platforms. Looking at CSDN now: community interaction is zero, and the vast majority of articles on it are terrible. Even I don&amp;rsquo;t want to find CSDN articles myself. It&amp;rsquo;s like a first love of 7-8 years — sometimes you just have to break up.&lt;/p&gt;
&lt;p&gt;2024 Publication Channels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CSDN Blog: &lt;a href="https://liuzhilong.blog.csdn.net/" target="_blank" rel="noreferrer"&gt;https://liuzhilong.blog.csdn.net&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Modb.pro: liuzhilong62&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/liuzhilong62/blogs" target="_blank" rel="noreferrer"&gt;https://github.com/liuzhilong62/blogs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;WeChat Official Account: 破斯特贵斯库儿&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Expected 2025 Channels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/liuzhilong62/blogs" target="_blank" rel="noreferrer"&gt;https://github.com/liuzhilong62/blogs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;WeChat Official Account: 破斯特贵斯库儿&lt;/li&gt;
&lt;li&gt;Other platforms: we&amp;rsquo;ll see&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 class="relative group"&gt;Final Thoughts
 &lt;div id="final-thoughts" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#final-thoughts" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;I seem to talk about work-learning balance every year&amp;hellip; Due to a dramatic increase in workload this year, there was even a period where I couldn&amp;rsquo;t study at all. Balance has been shattered. Not having time to study is unacceptable to me, so I later adjusted my daily schedule (thanks to &amp;ldquo;Atomic Habits&amp;rdquo; — I absolutely love this book), and finally managed to squeeze out some study time. Actually, as long as no one&amp;rsquo;s around, learning efficiency is high.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve collected some quotes I resonated with this year:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Don&amp;rsquo;t let others become dependencies in your task chain &amp;ndash;heisenberg.liu&lt;/li&gt;
&lt;li&gt;Plans that require execution are generally simple plans &amp;ndash;heisenberg.liu&lt;/li&gt;
&lt;li&gt;Things not implemented equal things not done &amp;ndash;somebody&lt;/li&gt;
&lt;li&gt;Solve problems yourself instead of waiting for others to reply &amp;ndash;somebody&lt;/li&gt;
&lt;li&gt;Important things should be done immediately — waiting even a moment means they won&amp;rsquo;t get done &amp;ndash;somebody&lt;/li&gt;
&lt;li&gt;Don&amp;rsquo;t do repetitive low-value tasks. Think more about the context behind this requirement &amp;ndash;heisenberg.liu&lt;/li&gt;
&lt;li&gt;Don&amp;rsquo;t pan for gold in shit. Find ways to get quality information sources &amp;ndash;somebody&lt;/li&gt;
&lt;li&gt;SREs need the ability to configure optimal default parameters and the ability to modify these parameters in bulk &amp;ndash;&amp;ldquo;Enterprise Cloud Computing&amp;rdquo;&lt;/li&gt;
&lt;li&gt;The more miscellaneous tasks you do, the more miscellaneous tasks come your way &amp;ndash;heisenberg.liu&lt;/li&gt;
&lt;li&gt;SREs spend 50% of time on operations and 50% on development &amp;ndash;&amp;ldquo;Enterprise Cloud Computing&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Premature optimization is the root of all evil. Premature code abstraction is also the root of all evil &amp;ndash;somebody&lt;/li&gt;
&lt;li&gt;The speed at which the human brain receives knowledge is limited &amp;ndash;somebody&lt;/li&gt;
&lt;li&gt;If someone won&amp;rsquo;t let you read, leave that person or leave that environment &amp;ndash;heisenberg.liu&lt;/li&gt;
&lt;li&gt;Teams that build knowledge bases are slackers &amp;ndash;somebody&lt;/li&gt;
&lt;li&gt;The value of a standard is determined by the customer &amp;ndash;&amp;ldquo;ITIL 4&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Heroism: working long hours and troubleshooting alone. Long working hours also lead to burnout with the work itself. Those who want to be heroes are only interested in their own achievements and turn a deaf ear to team collaboration &amp;ndash;&amp;ldquo;ITIL 4&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Not all problems need root cause analysis. It depends on the frequency of occurrence and the scope of the failure &amp;ndash;&amp;ldquo;ITIL 4&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Looking back at the plans I set for myself in 2023: only 2 items total, and I completed neither. KPI achievement rate: &lt;strong&gt;0%&lt;/strong&gt; &amp;#x1f604;&lt;/p&gt;
&lt;p&gt;Combining agile operations, agile project management, and OKR thinking: setting a full-year plan for myself at the beginning of the year is simply unreasonable. Looking back at last year and the year before, some of my plans emerged mid-way and won priority battles over other tasks. And some tasks simply couldn&amp;rsquo;t be completed — this should be a normal state. So, I won&amp;rsquo;t set too many flags for myself.&lt;/p&gt;
&lt;p&gt;2025 Plan:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Continue some things&lt;/li&gt;
&lt;li&gt;Think about how to produce output&lt;/li&gt;
&lt;li&gt;Master another track&lt;/li&gt;
&lt;li&gt;PostgreSQL&amp;hellip; haven&amp;rsquo;t figured out what more to do&lt;/li&gt;
&lt;li&gt;Find a way to resume fitness&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title>Getting Started with pg_rewind</title><link>https://lastdba.com/en/2024/08/13/getting-started-with-pg_rewind/</link><pubDate>Tue, 13 Aug 2024 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2024/08/13/getting-started-with-pg_rewind/</guid><description>&lt;h2 class="relative group"&gt;What is pg_rewind?
 &lt;div id="what-is-pg_rewind" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-is-pg_rewind" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;pg_rewind is a PostgreSQL-provided tool. When the timelines of two PG instances diverge, pg_rewind can synchronize them. (For example, the primary is running, the standby failover has been running for a while — at this point the primary and standby timelines have diverged.)&lt;/p&gt;
&lt;p&gt;pg_rewind compares the sizes of files between the source and target, then copies differing files from source to target, including configuration files. However, it does not compare unchanged files, so pg_rewind runs efficiently on large databases with few changes.&lt;/p&gt;</description><content:encoded>
&lt;h2 class="relative group"&gt;What is pg_rewind?
 &lt;div id="what-is-pg_rewind" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-is-pg_rewind" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;pg_rewind is a PostgreSQL-provided tool. When the timelines of two PG instances diverge, pg_rewind can synchronize them. (For example, the primary is running, the standby failover has been running for a while — at this point the primary and standby timelines have diverged.)&lt;/p&gt;
&lt;p&gt;pg_rewind compares the sizes of files between the source and target, then copies differing files from source to target, including configuration files. However, it does not compare unchanged files, so pg_rewind runs efficiently on large databases with few changes.&lt;/p&gt;
&lt;p&gt;pg_rewind can be used after a standby failover: even if the standby has been running independently for some time, it can be pulled back to the same state as the primary and become a standby again.&lt;/p&gt;
&lt;p&gt;During execution, pg_rewind compares the divergence point between primary (source) and standby (target), and transmits the primary&amp;rsquo;s WAL logs after the divergence point to the standby. Therefore, if the primary&amp;rsquo;s WAL after the divergence point is also lost, rewind won&amp;rsquo;t copy nonexistent WAL logs, and the standby will still fail to become a standby. The solution is to use restore.&lt;/p&gt;
&lt;p&gt;!!! When using pg_rewind, back up the target instance. pg_rewind directly overwrites the target database&amp;rsquo;s files. If rewind fails, the target database may be unable to start.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Using pg_rewind
 &lt;div id="using-pg_rewind" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#using-pg_rewind" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;After a primary-standby switchover, the old primary continues running, causing timeline inconsistency. The old primary cannot start as a standby for the new primary.&lt;/p&gt;
&lt;p&gt;When attempting to start the standby, a timeline error appears:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;LOG: entering standby mode
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;FATAL: requested timeline &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; is not a child of this server&lt;span style="color:#960050;background-color:#1e0010"&gt;&amp;#39;&lt;/span&gt;s history
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DETAIL: Latest checkpoint is at 0/6000028 on timeline 1, but in the history of the requested timeline, the server forked off from that timeline at 0/4000098.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;LOG: startup process &lt;span style="color:#f92672"&gt;(&lt;/span&gt;PID 22321&lt;span style="color:#f92672"&gt;)&lt;/span&gt; exited with exit code &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;LOG: aborting startup due to startup process failure
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;LOG: database system is shut down&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;At this point, rewind is needed to realign the primary and standby.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Configure pg_hba on the current primary
Set up login permissions for the pg_rewind user to access the source database. hba changes require a database restart.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;vi $source/pg_hba.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;host all pg 172.17.100.150/32 trust&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;pg_rewind requires a high-privilege user. Newer PG versions allow granting privileges; older versions should use a superuser.
My environment is PG 9.6, so I use the OS superuser directly.&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;wal_log_hints = on parameter configuration
Append &lt;code&gt;wal_log_hints = on&lt;/code&gt; to the target database&amp;rsquo;s postgres.conf, then start and shut down the target database once (at this point the primary is running and the standby is shut down).&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;vi $dest/postgres.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;wal_log_hints &lt;span style="color:#f92672"&gt;=&lt;/span&gt; on&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Execute pg_rewind&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;pg@lzl pg96data_sla&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ /pg/pg96/bin/pg_rewind --target-pgdata /pg/pg96data_pri --source-server&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#39;host=172.17.100.150 port=5433 user=pg password=oracle dbname=postgres&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;servers diverged at WAL position 0/4000098 on timeline &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;rewinding from last common checkpoint at 0/4000028 on timeline &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Done!&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="4"&gt;
&lt;li&gt;Configure standby parameters
Modify IP, port, directory, etc. in postgres.conf and recovery.conf. pg_rewind also copies configuration files over.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;pg@lzl pg96data_pri&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ mv recovery.done recovery.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;pg@lzl pg96data_pri&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ vi recovery.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;pg@lzl pg96data_pri&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ vi postgres.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="5"&gt;
&lt;li&gt;Start the standby&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;pg@lzl pg96data_pri&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ /pg/pg96/bin/pg_ctl -D /pg/pg96data_sla -l /pg/pg96data_sla/server.log start 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;server starting
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;pg@lzl pg96data_sla&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ psql -p5433 postgres
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;psql &lt;span style="color:#f92672"&gt;(&lt;/span&gt;9.6.17&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;postgres&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#75715e"&gt;# \x&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Expanded display is on.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;postgres&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#75715e"&gt;# select * from pg_stat_replication ;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;-&lt;span style="color:#f92672"&gt;[&lt;/span&gt; RECORD &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#f92672"&gt;]&lt;/span&gt;----+------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pid | &lt;span style="color:#ae81ff"&gt;24766&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;usesysid | &lt;span style="color:#ae81ff"&gt;16384&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;usename | lzl
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;application_name | walreceiver
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;client_addr | 172.17.100.150
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;client_hostname | 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;client_port | &lt;span style="color:#ae81ff"&gt;47345&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;backend_start | 2021-07-30 07:44:05.582546+00
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;backend_xmin | 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;state | streaming
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sent_location | 0/4033790
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;write_location | 0/4033790
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;flush_location | 0/4033790
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;replay_location | 0/4033790
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sync_priority | &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sync_state | async&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 class="relative group"&gt;Common Issues
 &lt;div id="common-issues" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#common-issues" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;

&lt;h3 class="relative group"&gt;pg_rewind Error 1
 &lt;div id="pg_rewind-error-1" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#pg_rewind-error-1" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;could not fetch remote file &lt;span style="color:#e6db74"&gt;&amp;#34;global/pg_control&amp;#34;&lt;/span&gt;: ERROR: must be superuser to read files
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Failure, exiting&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Solution: Use a high-privilege user.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;postgres&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#75715e"&gt;# \du&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; List of roles
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Role name | Attributes | Member of 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;-------------+------------------------------------------------------------+-----------
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; lzl | Replication | &lt;span style="color:#f92672"&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; pg | Superuser, Create role, Create DB, Replication, Bypass RLS | &lt;span style="color:#f92672"&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; rewind_user | | &lt;span style="color:#f92672"&gt;{}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;pg&lt;/code&gt; user is the built-in superuser that comes with the PG server, matching the PG installation user. The OS installation user certainly has permission to modify pg_control.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/pg/pg96/bin/pg_rewind --target-pgdata /pg/pg96data_pri --source-server&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#39;host=172.17.100.150 port=5433 user=pg password=oracle dbname=postgres&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;pg_rewind Error 2
 &lt;div id="pg_rewind-error-2" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#pg_rewind-error-2" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;could not connect to server: FATAL: no pg_hba.conf entry &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; host &lt;span style="color:#e6db74"&gt;&amp;#34;172.17.100.150&amp;#34;&lt;/span&gt;, user &lt;span style="color:#e6db74"&gt;&amp;#34;rewind_user&amp;#34;&lt;/span&gt;, database &lt;span style="color:#e6db74"&gt;&amp;#34;postgres&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Failure, exiting&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;No pg_hba.conf entry configured for the connection.
Solution: Configure pg_hba for the user, e.g.:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;host all pg 172.17.100.150/32 trust&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;pg_rewind Error 3
 &lt;div id="pg_rewind-error-3" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#pg_rewind-error-3" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;pg@lzl pg96data_sla&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ /pg/pg96/bin/pg_rewind --target-pgdata /pg/pg96data_pri --source-server&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#39;host=172.17.100.150 port=5433 user=pg password=oracle dbname=postgres&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;target server needs to use either data checksums or &lt;span style="color:#e6db74"&gt;&amp;#34;wal_log_hints = on&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Root causes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;full_page_writes (enabled by default)&lt;/li&gt;
&lt;li&gt;wal_log_hints must be set to on, or PG must have checksums enabled at initdb time.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Solution: Add &lt;code&gt;wal_log_hints = on&lt;/code&gt; to the target database&amp;rsquo;s postgres.conf, then start and shut down the target database once (the target was already shut down — it must be started and shut down again for the parameter to take effect).&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;vi postgres.conf &lt;span style="color:#75715e"&gt;# add to target database config&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;wal_log_hints &lt;span style="color:#f92672"&gt;=&lt;/span&gt; on&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Restart the target database to apply:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;pg@lzl pg96data_sla&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ /pg/pg96/bin/pg_ctl -D /pg/pg96data_pri -l /pg/pg96data_pri/server.log start 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;server starting
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;pg@lzl pg96data_sla&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ /pg/pg96/bin/pg_ctl -D /pg/pg96data_pri -l /pg/pg96data_pri/server.log stop
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;waiting &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; server to shut down.... &lt;span style="color:#66d9ef"&gt;done&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 class="relative group"&gt;References
 &lt;div id="references" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#references" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://www.postgresql.org/docs/9.6/app-pgrewind.html" target="_blank" rel="noreferrer"&gt;https://www.postgresql.org/docs/9.6/app-pgrewind.html&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title>How I Got Into Wuhan University's Part-Time Master's Program</title><link>https://lastdba.com/en/2024/08/13/how-i-got-into-wuhan-universitys-part-time-masters-program/</link><pubDate>Tue, 13 Aug 2024 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2024/08/13/how-i-got-into-wuhan-universitys-part-time-masters-program/</guid><description>&lt;h2 class="relative group"&gt;Why Did I Want to Pursue a Part-Time Master&amp;rsquo;s?
 &lt;div id="why-did-i-want-to-pursue-a-part-time-masters" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-did-i-want-to-pursue-a-part-time-masters" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;To improve my academic credentials. My undergraduate degree is from an ordinary university. A higher degree can add a bit of competitiveness in my career.&lt;/li&gt;
&lt;li&gt;I once submitted my resume to a state-owned enterprise and was completely ghosted. But a colleague with better academic credentials in the same office got through. So for state-owned enterprises, higher education is the knock on the door.&lt;/li&gt;
&lt;li&gt;To make up for failing the graduate entrance exam as a senior and revive the dream of graduate studies.&lt;/li&gt;
&lt;li&gt;Learning is never wrong — this is my creed.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 class="relative group"&gt;Differences Between Full-Time and Part-Time Graduate Programs
 &lt;div id="differences-between-full-time-and-part-time-graduate-programs" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#differences-between-full-time-and-part-time-graduate-programs" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;

&lt;h3 class="relative group"&gt;Study Mode
 &lt;div id="study-mode" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#study-mode" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Full-time means you quit your job; part-time allows you to keep working. This basically locks in part-time as the only option for most working people.&lt;/p&gt;</description><content:encoded>
&lt;h2 class="relative group"&gt;Why Did I Want to Pursue a Part-Time Master&amp;rsquo;s?
 &lt;div id="why-did-i-want-to-pursue-a-part-time-masters" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-did-i-want-to-pursue-a-part-time-masters" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;To improve my academic credentials. My undergraduate degree is from an ordinary university. A higher degree can add a bit of competitiveness in my career.&lt;/li&gt;
&lt;li&gt;I once submitted my resume to a state-owned enterprise and was completely ghosted. But a colleague with better academic credentials in the same office got through. So for state-owned enterprises, higher education is the knock on the door.&lt;/li&gt;
&lt;li&gt;To make up for failing the graduate entrance exam as a senior and revive the dream of graduate studies.&lt;/li&gt;
&lt;li&gt;Learning is never wrong — this is my creed.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 class="relative group"&gt;Differences Between Full-Time and Part-Time Graduate Programs
 &lt;div id="differences-between-full-time-and-part-time-graduate-programs" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#differences-between-full-time-and-part-time-graduate-programs" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;

&lt;h3 class="relative group"&gt;Study Mode
 &lt;div id="study-mode" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#study-mode" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Full-time means you quit your job; part-time allows you to keep working. This basically locks in part-time as the only option for most working people.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Exam Scope
 &lt;div id="exam-scope" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#exam-scope" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Full-time exams are more demanding, usually covering four subjects: advanced math, graduate English, politics, and a specialized course.
Part-time exams are less demanding, covering two subjects: the Management Comprehensive Exam (middle school math, logic, writing) and graduate English.
Except for English, which is similar to the full-time version, the management comprehensive exam content is much easier than the full-time track (more on this later).&lt;/p&gt;

&lt;h3 class="relative group"&gt;Research Direction
 &lt;div id="research-direction" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#research-direction" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Full-time graduate programs lean toward research, emphasizing learning and research output, cultivating students&amp;rsquo; learning and research abilities.&lt;/p&gt;
&lt;p&gt;Part-time programs lean toward enhancing students&amp;rsquo; management skills, delivering management-oriented talent to society.&lt;/p&gt;
&lt;p&gt;These two directions are quite different.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Social Recognition
 &lt;div id="social-recognition" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#social-recognition" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Full-time graduate degrees certainly carry more recognition than part-time ones. After all, the bar is higher, the study pressure is greater, it&amp;rsquo;s the mainstream path, and society recognizes it more. But part-time degrees do carry recognition too — many schools have explicitly stated they treat both equally (on paper). Most importantly, part-time graduate students hold dual certificates (degree certificate and diploma).&lt;/p&gt;
&lt;p&gt;As for employment, it depends on the employer. Some positions only require any graduate degree, while others may explicitly state &amp;ldquo;full-time graduate degree required.&amp;rdquo; But for those who can&amp;rsquo;t quit their jobs to pursue higher education, part-time is practically the only path.
In summary: &lt;strong&gt;Part-time also grants dual certificates, but part-time recognition &amp;lt; full-time recognition.&lt;/strong&gt;&lt;/p&gt;

&lt;h2 class="relative group"&gt;How to Choose a Major
 &lt;div id="how-to-choose-a-major" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#how-to-choose-a-major" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Consider your job nature, career aspirations, and your wallet.&lt;/p&gt;
&lt;p&gt;HR, finance, or corporate executive: MBA&lt;/p&gt;
&lt;p&gt;Technical roles or engineering management: MEM&lt;/p&gt;
&lt;p&gt;Civil servant or public administration: MPA&lt;/p&gt;
&lt;p&gt;Accounting: MPAcc. There are a few other niche options — search online.&lt;/p&gt;
&lt;p&gt;From a financial perspective, tuition varies by school but generally follows similar ranges. Taking Sichuan University as an example: MEM costs about 15,000 yuan per year, MBA about 150,000 yuan per year, MPA roughly similar to MEM.&lt;/p&gt;
&lt;p&gt;For an IT professional like me, with a thin wallet and not seeing myself as an executive, MEM is the better fit.&lt;/p&gt;

&lt;h2 class="relative group"&gt;How to Choose a School
 &lt;div id="how-to-choose-a-school" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#how-to-choose-a-school" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Since the study difficulty is relatively low and social recognition isn&amp;rsquo;t as high as full-time, I recommend choosing a prestigious local university. 211 and 985 universities are strongly recommended — just pick one you like. Many 985 universities set their admission cutoff at the national line, so I personally feel that non-211/985 schools aren&amp;rsquo;t worth applying to. If the scores are the same, why not choose a better school?&lt;/p&gt;
&lt;p&gt;Of course, some 985 universities set their own cutoff lines. You&amp;rsquo;ll need to check the school&amp;rsquo;s department website for historical admission scores. For example, Sichuan University sets its own line every year, typically 20–30 points above the national line.&lt;/p&gt;

&lt;h2 class="relative group"&gt;How Does the Exam Work?
 &lt;div id="how-does-the-exam-work" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#how-does-the-exam-work" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;

&lt;h3 class="relative group"&gt;Exam Content
 &lt;div id="exam-content" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#exam-content" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;The exam is divided into the preliminary exam and the re-examination. The preliminary exam is in late December; the re-examination is in March.&lt;/p&gt;
&lt;p&gt;The preliminary exam is a written test. After registering for the exam and selecting a test venue, you take it in late December — finished in one day, each session 3 hours.&lt;/p&gt;
&lt;p&gt;The re-examination is an interview. A few schools add a written component, but since the pandemic, it&amp;rsquo;s all been online interviews — rarely do you need to write anything during the interview.&lt;/p&gt;
&lt;p&gt;Preliminary exam content (Management Comprehensive Exam):



&lt;img src="https://lastdba.com/img/csdn/c920095c8db9.png" alt="Insert image description" /&gt;&lt;/p&gt;
&lt;p&gt;Re-examination content:



&lt;img src="https://lastdba.com/img/csdn/743ea585843c.png" alt="Insert image description" /&gt;&lt;/p&gt;

&lt;h3 class="relative group"&gt;Early Interview
 &lt;div id="early-interview" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#early-interview" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;The early interview means the school arranges an interview before the preliminary exam — effectively moving the re-examination earlier. Once you pass the early interview, you only need to reach the national line on the preliminary exam. Under the normal process, you&amp;rsquo;d need to exceed the school&amp;rsquo;s own cutoff line.&lt;/p&gt;
&lt;p&gt;Early interviews are only offered by some schools. For example, Tsinghua has an early-admission interview; Sichuan University doesn&amp;rsquo;t. You&amp;rsquo;ll need to check the official website of your target school.&lt;/p&gt;
&lt;p&gt;If you pass the early interview, the pressure on the preliminary exam is indeed lighter.&lt;/p&gt;

&lt;h2 class="relative group"&gt;How to Register
 &lt;div id="how-to-register" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#how-to-register" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;The two most important websites in the graduate exam process are your target school&amp;rsquo;s official website and the China Graduate Admission Website (研招网, YZW).



&lt;img src="https://lastdba.com/img/csdn/85579cc5cd7e.png" alt="Insert image description" /&gt;&lt;/p&gt;
&lt;p&gt;Before registering, check the master&amp;rsquo;s program catalog for your target school and major. For example, part-time engineering management should be selected as follows:



&lt;img src="https://lastdba.com/img/csdn/3a5abec906cf.png" alt="Insert image description" /&gt;&lt;/p&gt;

&lt;h2 class="relative group"&gt;Should You Sign Up for a Training Course?
 &lt;div id="should-you-sign-up-for-a-training-course" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#should-you-sign-up-for-a-training-course" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Many people wonder whether to sign up for a training course. Signing up feels too expensive — what if you don&amp;rsquo;t pass? Not signing up means you don&amp;rsquo;t know how to study, or studying feels too exhausting.&lt;/p&gt;
&lt;p&gt;I have some authority on this question, because I did sign up for one.&lt;/p&gt;
&lt;p&gt;I saw a training course online and asked about the price — 8,000 yuan. On top of that, there was an information gap: I didn&amp;rsquo;t know what the exam covered, how to study, how to register, which school to apply to, or where to search for this information. (Searching &amp;ldquo;part-time graduate&amp;rdquo; on Baidu immediately yields nothing but ads.) Plus, I was genuinely determined to study at the time. So I fell into this trap&amp;hellip;&lt;/p&gt;

&lt;h3 class="relative group"&gt;What Did the Training Course Give Me?
 &lt;div id="what-did-the-training-course-give-me" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-did-the-training-course-give-me" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;First, a pile of study materials — study methods, past exam papers, and so on. Other than the English vocabulary list, which I immediately started memorizing, I barely touched anything else. I printed the past exam papers too, but I never looked at them — not even by the time the exam was over. They looked useful, but in reality, you can search past papers on Taobao and find plenty of officially published versions with detailed explanations — far more useful and less straining on the eyes. And that vocabulary list — strangely, the one the course gave me didn&amp;rsquo;t match the one in Zhang Jian&amp;rsquo;s Yellow Book. I memorized the course&amp;rsquo;s vocabulary for a long time, only to find that some common exam words weren&amp;rsquo;t in the list. Later I switched to Zhang Jian&amp;rsquo;s Yellow Book vocabulary and it felt much better.&lt;/p&gt;
&lt;p&gt;Beyond study materials, the most important component was live-streamed lectures, typically 8–10 PM — two hours of teaching and ten minutes of Q&amp;amp;A.&lt;/p&gt;
&lt;p&gt;The live lectures were useful, especially logic and math. Just listening to those two subjects essentially eliminated the need to buy extra books to thoroughly study the fundamentals of math and logic — you only needed to do the post-class exercises and practice problems. I barely listened to the English classes; I mostly self-studied. Personally, I felt that listening to English lectures was very inefficient and a waste of time — better to memorize more words and do more reading exercises. I only listened to the last two sessions of English writing, which were extremely useful. More on English writing later (with practical tips). Finally, don&amp;rsquo;t fantasize about asking the teacher questions — these online classes have many students, and the Q&amp;amp;A time is only about ten minutes. My questions were never picked.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Benefits of a training course:&lt;/strong&gt;
Convenience of learning. From a working person&amp;rsquo;s perspective, you&amp;rsquo;re already working overtime a lot. Coming home exhausted, expecting yourself to spread out materials and study like it&amp;rsquo;s the gaokao — too hard. But if it&amp;rsquo;s a lecture, you just sit on the sofa and watch the livestream. That&amp;rsquo;s much easier.
Saves time. No need to laboriously make a study plan and constantly adjust it. Listening to lectures is also easier than reading through a thick textbook on your own. Essentially, a training course is trading money for time.&lt;/p&gt;
&lt;p&gt;The good learning state of classmates motivates you. You&amp;rsquo;re not studying alone with no idea how others are doing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The pitfalls of training courses:&lt;/strong&gt;
Quality varies widely. The institution I signed up with was Shangde. I didn&amp;rsquo;t research them beforehand — they were quite mediocre. Some of their programs are contract-based: they refund if you don&amp;rsquo;t pass, but there were traps in the contract, and no one got refunds. Our group had many people fighting for refunds. Also, personal information leaks — basically every student received refund scam calls. Even I, who passed, got five or six such calls.&lt;/p&gt;
&lt;p&gt;Teacher quality is uneven. Some teachers were excellent; others seemed like they were just coasting. Some explanations were outright misleading. In my class, the math and logic teachers were especially good, English was garbage, and writing was misleading&amp;hellip;&lt;/p&gt;
&lt;p&gt;Don&amp;rsquo;t fantasize that a training course will train you into a great candidate. The course is only an aid — it mainly depends on you. From the day I started planning for the exam until the preliminary exam was over, I had basically zero weekends — every one was spent in the library or a café. I declined every social gathering.&lt;/p&gt;
&lt;p&gt;So, should you sign up for a training course?&lt;/p&gt;
&lt;p&gt;I think if you meet all of the following conditions, you can consider it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enough resolve. Since you&amp;rsquo;ve paid, don&amp;rsquo;t let it go to waste. I also don&amp;rsquo;t recommend refund-based programs that give you an escape route.&lt;/li&gt;
&lt;li&gt;Enough money. Online courses start at a few thousand yuan — my 8,000 yuan can serve as a reference. In-person courses are more expensive but offer face-to-face tutoring.&lt;/li&gt;
&lt;li&gt;Unable to bridge the information gap. The information gap may prevent you from planning your own study schedule. If the information gap is what drives you toward a course, I suggest looking at others&amp;rsquo; study plans and successful Bilibili uploaders&amp;rsquo; cases. The biggest source of information is always the school&amp;rsquo;s official website.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you have the time, energy, insufficient funds, or decent learning ability, you absolutely don&amp;rsquo;t need to sign up. In that case, making a study plan that suits you is especially important.&lt;/p&gt;

&lt;h2 class="relative group"&gt;The Preliminary Exam
 &lt;div id="the-preliminary-exam" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-preliminary-exam" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Before the preliminary exam is over, focus only on preparing for the preliminary exam.&lt;/strong&gt; Generally speaking, you can prepare for the re-examination content after the preliminary exam is done.
Preparing for the preliminary exam is the core of your studies, the most energy-consuming and competitive phase — this is where success is decided.&lt;/p&gt;

&lt;h3 class="relative group"&gt;How to Prepare for the Preliminary Exam — Study Plan
 &lt;div id="how-to-prepare-for-the-preliminary-exam--study-plan" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#how-to-prepare-for-the-preliminary-exam--study-plan" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;To prepare for the preliminary exam, you need a study plan that fits you, and you need to throw yourself into it completely.&lt;/p&gt;
&lt;p&gt;The study plan is extremely, extremely, extremely important. You need to first examine yourself — what are your strengths and weaknesses, your circumstances, which subjects you&amp;rsquo;re unfamiliar with, and which ones need long-term study.&lt;/p&gt;
&lt;p&gt;Everyone&amp;rsquo;s situation is different. Let me first share my study plan — you can reference my approach to customizing a plan and my study methods. Because the pressure isn&amp;rsquo;t as high (compared to full-time), I strongly recommend starting in July or August. Starting too late means not enough time; starting too early makes it easy to slack off. Total study time should be 5–6 months. But if your English is really poor, start memorizing words a few months earlier.&lt;/p&gt;
&lt;p&gt;My personal conditions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Not enough time — often worked overtime until 9 PM, weekends generally off. Commute by subway, two hours total both ways.&lt;/li&gt;
&lt;li&gt;Math almost completely forgotten, never touched logic before, Chinese writing has been terrible since childhood, decent English vocabulary, reading comprehension fine, English writing completely unable.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Given the study pressure and my personal conditions, my plan needed to be:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Memorize words. English is definitely the most time-consuming — it requires sustained, long-term vocabulary memorization. Before all other studying, memorize English II vocabulary. Since morning memory retention is best, I memorized words on the subway to work every day and also on weekend mornings. From August until the preliminary exam.&lt;/li&gt;
&lt;li&gt;English reading. Actually, once you&amp;rsquo;ve memorized the words, reading comprehension is easy. English II doesn&amp;rsquo;t have many long, complex sentences — if you know all the words, reading is no problem. But I personally enjoy English reading, so I scheduled daily reading of English originals. I can&amp;rsquo;t say it had a huge impact, but it wasn&amp;rsquo;t useless — consider it a supplement to exam prep. Importantly, hobbies make habits easier to form.&lt;/li&gt;
&lt;li&gt;Math and logic have similar study difficulty. Even though I was completely clueless, they were relatively easy to learn (the concepts are simple; the exam itself is another story — but more on that later). I studied math or logic from 8 PM to 10 PM on weekday evenings (mostly attending lectures — if you don&amp;rsquo;t have lectures, buy materials and self-study). This is also long-term study: early phase learning concepts, late phase practicing. Since I couldn&amp;rsquo;t always leave work on time, sometimes I had to use the evening commute and the one-hour lunch break to complete the daily math and logic tasks. (Never fall behind — one day of delay leads to a huge backlog.)&lt;/li&gt;
&lt;li&gt;Chinese writing. Prepare about one month before the exam — late November or early December. Look at writing materials and try writing yourself. Don&amp;rsquo;t aim for perfection — the main thing is to express the core idea clearly. Trust me, during the exam you&amp;rsquo;ll absolutely be writing in frantic cursive.&lt;/li&gt;
&lt;li&gt;English writing. Prepare about one month before the exam. Remember: absolutely, absolutely do not memorize model essays. Not only is it brutally hard to memorize them, they&amp;rsquo;re nearly impossible to adapt. Memorize 2–3 templates before the exam, then practice with past exam topics using the templates. You only need to swap in words — no situation where you pick up the pen and can&amp;rsquo;t write a single word.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, my weekly plan:



&lt;img src="https://lastdba.com/img/csdn/8b233995a8b3.png" alt="Insert image description" /&gt;&lt;/p&gt;
&lt;p&gt;This arrangement felt quite suitable for me — it fully utilized fragmented time and made good use of weekends. The first 3–4 months build the foundation: English&amp;rsquo;s foundation is vocabulary, logic and math&amp;rsquo;s foundation is concepts. Weekly study on workdays could be consolidated and practiced on weekends. The final 1–1.5 months are mainly for writing and getting the feel of past papers.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Recommended Study Materials
 &lt;div id="recommended-study-materials" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#recommended-study-materials" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;English: Zhang Jian&amp;rsquo;s Yellow Book. Just buy the vocabulary book and past exam papers. Baicizhan (vocabulary app), iReading, WeChat public account: 考研英语外刊 (Graduate English Foreign Journals).&lt;/li&gt;
&lt;li&gt;English writing: I don&amp;rsquo;t recommend any purchasable writing guide. Use universal templates; don&amp;rsquo;t memorize model essays.&lt;/li&gt;
&lt;li&gt;Math: Chen Jian&amp;rsquo;s Math High Score Guide, past exam answer keys.&lt;/li&gt;
&lt;li&gt;Logic: Zhonggong&amp;rsquo;s Logic Easy Pass, past exam answer keys.&lt;/li&gt;
&lt;li&gt;Management comprehensive writing: Buy a popular one — they&amp;rsquo;re all not great. No need to master writing too deeply.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Don&amp;rsquo;t buy practice problem books — buy past papers directly.&lt;/strong&gt; The quality of existing practice problems doesn&amp;rsquo;t compare at all to past papers. For English, no need to buy practice books — directly buy past papers. For math and logic, beyond the built-in exercises that come with foundational study, don&amp;rsquo;t buy extra practice problem books. I did math practice problems for a short period — very time-consuming and ineffective. The key for math and logic is to solidify the fundamentals, cover all the concepts, then do past papers and review the answer explanations. In short, immersive study time (like weekends) should only be spent on past papers. Do the last 20 years&amp;rsquo; worth of papers, then cycle through them again. (20 sets of past papers — only 2 per weekend — takes over two months to finish one round; by the time you redo them, you&amp;rsquo;ve largely forgotten the earlier ones.) &lt;strong&gt;Always save the most recent two years&amp;rsquo; papers untouched — use them for timed self-testing two weeks before the exam.&lt;/strong&gt;&lt;/p&gt;

&lt;h3 class="relative group"&gt;English Study
 &lt;div id="english-study" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#english-study" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;

&lt;h4 class="relative group"&gt;Vocabulary
 &lt;div id="vocabulary" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#vocabulary" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;Morning vocabulary memorization, rain or shine (it works especially well on the subway&amp;hellip;).
Baicizhan — some people like using it. I used it early on too, but I found it ineffective. It covers the entire vocabulary pool; after a year you may not even complete one full cycle, and you&amp;rsquo;ve long forgotten what you studied earlier. So I stopped using it later.
I strongly recommend my personal vocabulary method.&lt;/p&gt;
&lt;p&gt;Everyone&amp;rsquo;s vocabulary is different. At the start, you must go through all the words once (graduate exam vocabulary is about 5,000 words) and pull out the ones you don&amp;rsquo;t know onto a vocabulary list. Since carrying a vocabulary notebook on the subway is slightly awkward, I put it on my phone.&lt;/p&gt;
&lt;p&gt;I have a dedicated vocabulary photo album:&lt;/p&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/63e6fcbbd3e9.png" alt="Insert image description" /&gt;&lt;/p&gt;
&lt;p&gt;When memorizing, open it, zoom in — effectively covering the definitions while memorizing.



&lt;img src="https://lastdba.com/img/csdn/63e6b5373162.png" alt="Insert image description" /&gt;&lt;/p&gt;
&lt;p&gt;Cycle through like this. At first I did 2 pages a day, advancing 1 page a day. Later, 4 pages a day, advancing 4 pages a day. No matter what, cycle through — memorize until you can cover the definition and know the word&amp;rsquo;s meaning. For words easily confused, add them to the list, take another photo, and update the album.&lt;/p&gt;
&lt;p&gt;Before my preliminary exam, I had cycled through these words six or seven times. Basically, aside from beyond-syllabus words, there was nothing I didn&amp;rsquo;t know.&lt;/p&gt;

&lt;h4 class="relative group"&gt;Reading
 &lt;div id="reading" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#reading" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;English total score: 100. Reading ability components = Cloze 10 points + Reading Comprehension 40 points + New Question Type Reading 10 points = 60 points. No matter how poor your English ability, reading comprehension cannot be weak. My reading ability mostly came from daily foreign journal reading, such as iReading and 考研英语外刊. About 20 minutes a day, light study pressure. (Actually, it&amp;rsquo;s mainly vocabulary — if you know the words, sentences are easy to understand.)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;iReading: &amp;ldquo;Love the World&amp;rdquo; foreign journals, one passage a day. Under Reading Plan → More Collections → Foreign Journals → Love the World, subscribe to the monthly issues, one a day. Relatively easy, good for early-stage reading improvement.&lt;/li&gt;
&lt;li&gt;WeChat public account: 考研英语外刊, one passage a day. Updated daily. This account is very well done, highly recommended. Just harder — good for later-stage challenge. If you don&amp;rsquo;t fully understand, that&amp;rsquo;s fine; I sometimes couldn&amp;rsquo;t fully grasp it either, since the difficulty is a bit high.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Read along with morning vocabulary memorization. If short on time, you can also read on the way home.&lt;/p&gt;
&lt;p&gt;Long and complex sentences: English II doesn&amp;rsquo;t have many. Some people dedicate time specifically to studying them. If you want to study long sentences specifically, I especially recommend Liu Xiaoyan&amp;rsquo;s Long Sentences video series (just search on video sites — they&amp;rsquo;re all free). It&amp;rsquo;s very engaging and well-organized, easy to stick with. As for me, I only watched the simple sentence part of Liu Xiaoyan&amp;rsquo;s course and stopped. Because, first, I found that as long as you know the words, you basically understand the sentences; second, the videos are too long and numerous, taking up too much study time.&lt;/p&gt;

&lt;h4 class="relative group"&gt;Writing
 &lt;div id="writing" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#writing" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;Writing is divided into short composition (letter or notice, 10 points) and long composition (data analysis essay — bar chart/pie chart analysis, 15 points).&lt;/p&gt;
&lt;p&gt;Again, do NOT memorize model essays. Before the exam I bought a writing book and memorized 10 model essays — truly, truly excruciating to memorize, and impossible to adapt. After memorizing the model essays, the first time I attempted an English writing question, I couldn&amp;rsquo;t write a single word — no exaggeration.&lt;/p&gt;
&lt;p&gt;The most valuable thing in my training course was the English templates. Using the templates, I worked through all the past years&amp;rsquo; English writing topics — every single one could be adapted. The number of words to swap in doesn&amp;rsquo;t exceed twenty; you just need to be able to write simple sentences. Here are the templates:&lt;/p&gt;
&lt;p&gt;Short composition template — Letter:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Dear Sir or Madam,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; I am an undergraduate who majos in Applied English in this/a university.I am writing this letter &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; the purpose of doing sth.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 1.It,first an formost,is my idea that not only ... but also
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 2.Then more importantly,so ... that...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 3.The last on I must point out is that 简单句,which could be accepted by the majority of 人/.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; So It is the very moment &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; me to &lt;span style="color:#66d9ef"&gt;do&lt;/span&gt; ...,And I am looking forward to your reply.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; yours truly,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; xxx.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Where &amp;ldquo;doing sth&amp;rdquo; includes:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;1.感谢信:expressing my genuine gratitude &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; your kind help
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2.建议信:making some suggestions concerning sth.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;3.投诉信:making my complaints concerning sth.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;4.祝贺信:show my sincere congratulations to you because 句子
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;5.道歉信:offer my sincere apology to you because 句子
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;6.邀请信:invite you to participate in 活动 on behalf of 某人/组织
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;7.通知信:have 某人 informed that 句子&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The letter template works for all types of letters.&lt;/p&gt;
&lt;p&gt;Besides letters, the short composition may — with low probability — test notices. The notice format differs from letters.&lt;/p&gt;
&lt;p&gt;Short composition template — Notice:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Notice
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; In an effort to &lt;span style="color:#66d9ef"&gt;do&lt;/span&gt; sth,I woud like to offer you some detailed information about it.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; The 活动 will be held in the school auditorium at &lt;span style="color:#ae81ff"&gt;7&lt;/span&gt; p.m.,next Saturday,December 28th and the requirements &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; sth. are listed as follows.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 主段内容同书信...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; If you have any questions,please feel free to send on email to
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;studentsunion@123.com or call 1234567.We are looking forward to your participation.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The long composition essentially only involves analyzing bar charts and pie charts. The data falls into two categories: comparing magnitudes and comparing trends. Only the first paragraph differs between the two; the latter two paragraphs are the same.&lt;/p&gt;
&lt;p&gt;Long composition template:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;(&lt;/span&gt;比大小首段&lt;span style="color:#f92672"&gt;)&lt;/span&gt;The diagram clearly shows/illustrates/d that 句子/词组&lt;span style="color:#f92672"&gt;(&lt;/span&gt;the purposes of/attitudes toward/the proportions of&lt;span style="color:#f92672"&gt;)&lt;/span&gt; among participants/respondents in a certain college.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Based on the data offered,one can distinctly see that 对象1 ranks the first/highest among all the categories,accounting &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; 数据1.Next are 对象2 and 对象3 with 数据2 and
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;数据3 respectively ,while 对象4 only constitutes 数据4.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;(&lt;/span&gt;比趋势首段&lt;span style="color:#f92672"&gt;)&lt;/span&gt;The diagram clearly illustrates how 话题 changed during the past several years.Based on the data provided,one can distinctly see that the number of 对象1 rose/fell significantly/slightly/gradually from 数据 in 年 to 数据 in 年,while that the number of 对象2 experienced a gradual/significant increase/decrease during the same period,reaching 数据 in 年.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; From my standpoint,there are two fundamental factors that are responsible &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; this scence.To begin with,the first contributing factor is that 句子.In addition,another important factor that cannot be ignored is that 句子.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; In view of the analysis above,we can conclude that it is of little surprise to see this phenomenon in the current era.Therefore,it can be predicted that 名词词组/动词ing will still take up a large share in the future.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Writing without templates — relying on your own ability — is extremely difficult. Getting an ultra-high score with templates is hard, but getting 70–80% of the score is no problem, and the upfront investment is basically zero. After memorizing the templates, just write through all the past years&amp;rsquo; writing topics once.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Math and Logic Study
 &lt;div id="math-and-logic-study" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#math-and-logic-study" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;

&lt;h4 class="relative group"&gt;Math questions:
 &lt;div id="math-questions" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#math-questions" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/e16c5ab94d30.png" alt="Insert image description" /&gt;&lt;/p&gt;

&lt;h4 class="relative group"&gt;Logic questions:
 &lt;div id="logic-questions" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#logic-questions" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/bc084fe7654f.png" alt="Insert image description" /&gt;&lt;/p&gt;
&lt;p&gt;Math and logic are both multiple choice — nothing special to say. Early phase: learn concepts. Later phase: improve speed.&lt;/p&gt;
&lt;p&gt;Math and logic have a huge number of concepts. The early study phase takes 3–4 months, 2–3 hours a day, to learn all the concepts. After mastering the concepts, practice with past papers and review answer explanations. In the final month, practice with a stopwatch to improve speed: math questions within 70 minutes, logic within 60 minutes.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Chinese Writing Study
 &lt;div id="chinese-writing-study" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#chinese-writing-study" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;The management comprehensive essay is divided into Argument Validity Analysis and Argumentative Essay.&lt;/p&gt;
&lt;p&gt;Argument Validity Analysis is essentially nitpicking — get a writing guide and look through it; it&amp;rsquo;s not hard. You need to find the logical flaws in a lengthy passage of material. When writing, find four problem points. If you haven&amp;rsquo;t studied it, you might struggle to find them; after studying, finding four points is fairly easy. Don&amp;rsquo;t worry about naming the flaws precisely — overgeneralization, equivocation, false dichotomy, etc. Just write &amp;ldquo;xxx does not lead to xxx.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;The Argumentative Essay mainly involves interpreting a short passage. The key is not to misinterpret the theme. Finding the theme is also challenging at first — look at more sample materials to get a feel for it; generally you can locate the theme. The standard structure is introduction-body-conclusion. I recommend using &amp;ldquo;individual – enterprise – nation&amp;rdquo; as the framework (intro – individual – enterprise – nation – conclusion, 5 paragraphs total). Pick a few tried-and-tested points to plug in. Some students with strong writing skills write argumentative essays using other approaches — I certainly admire that. But writing time is extremely limited. Unless you&amp;rsquo;re naturally gifted with lightning-fast thinking, I recommend using a formulaic approach. &lt;strong&gt;Finishing the essay is the top priority.&lt;/strong&gt;&lt;/p&gt;

&lt;h3 class="relative group"&gt;Exam Time Strategy
 &lt;div id="exam-time-strategy" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#exam-time-strategy" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Yes, you need to strategize the exam timing too. Trust me 100% — you will not finish the management comprehensive exam. It&amp;rsquo;s the most time-crunched exam I&amp;rsquo;ve ever taken. You know you can solve the problems, but you have no time to compute.&lt;/p&gt;
&lt;p&gt;On exam day: morning — management comprehensive, 3 hours. Afternoon — English, 3 hours.&lt;/p&gt;
&lt;p&gt;English: 3 hours, relatively little content, no need for repeated recalculation — time is completely sufficient. When I finished, I had 50 minutes left and left early.&lt;/p&gt;
&lt;p&gt;Management comprehensive: 3 hours, absolutely not enough. In my pre-exam self-timed simulations, I consistently took 4 hours. During the real exam, for math — any question over 3 minutes, skip immediately. If it feels computationally heavy, skip immediately. For logic — absolutely cannot use your usual analytical approach. Speed-read the question (logic questions have colossal amounts of text), look at the options, pick whatever feels right. Logic questions requiring computation: temporarily abandon, come back later if time permits. For writing — read the prompt and start writing immediately. Write as fast as you possibly can (both essays combined no more than 1 hour). Every 2 minutes saved could rescue a multiple-choice question.&lt;/p&gt;
&lt;p&gt;You don&amp;rsquo;t have to finish all the multiple-choice (do fill in the answer sheet completely though), but you MUST finish the writing. So the question order is important. Many people do the essays first, then multiple-choice. I did math first, then essays, then logic. Either way, don&amp;rsquo;t leave writing for the end. In the real exam, both essays must be finished within 55 minutes — 1,500 words total, plus reading the prompt and brainstorming. Try it once and you&amp;rsquo;ll know how impossibly short the time is.&lt;/p&gt;
&lt;p&gt;The last 20 minutes: fill in the answer sheet. After filling it in, continue solving problems.&lt;/p&gt;

&lt;h2 class="relative group"&gt;The Re-examination
 &lt;div id="the-re-examination" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-re-examination" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;

&lt;h3 class="relative group"&gt;Basic Information About the Re-examination
 &lt;div id="basic-information-about-the-re-examination" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#basic-information-about-the-re-examination" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;If you&amp;rsquo;ve made it past the national line or the school&amp;rsquo;s own cutoff — congratulations, you&amp;rsquo;ve completed 90% of the journey. The remaining 10% is the re-examination. The re-examination has a mandatory elimination rate (required by national policy), typically around 70–80% passing rate. Since elimination must exist, some people get cut every year. If you don&amp;rsquo;t prepare, you&amp;rsquo;re very likely to be among them. Here&amp;rsquo;s a joke: I got cut from Sichuan University&amp;rsquo;s re-examination~&lt;/p&gt;
&lt;p&gt;Re-examination timeframe: mid-to-late March each year.&lt;/p&gt;
&lt;p&gt;Score release: mid-March.&lt;/p&gt;
&lt;p&gt;Content: spoken English, specialized knowledge, comprehensive interview, politics (Sichuan University: open-book politics, no need to prepare. Wuhan University: closed-book written politics&amp;hellip;)&lt;/p&gt;
&lt;p&gt;Since the pandemic, re-examinations have been online interviews — no written test environment. Experts ask questions; you answer.&lt;/p&gt;
&lt;p&gt;So you have three months to prepare for the re-examination. Conveniently, the preliminary exam ends late December, scores aren&amp;rsquo;t out yet, and February is Chinese New Year — realistically, most people start preparing only when scores are released. Take me as a cautionary example: I received the re-examination notice on March 21, the re-examination was on March 27 — I had six days to prepare, including spoken English and engineering management, which I&amp;rsquo;d never touched before&amp;hellip; So it was embarrassing: I couldn&amp;rsquo;t answer a single one of the examiner&amp;rsquo;s English questions, couldn&amp;rsquo;t answer a single specialized question. Cut from the re-examination.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Post-Adjustment (Tiaoji)
 &lt;div id="post-adjustment-tiaoji" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#post-adjustment-tiaoji" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;When I found out I&amp;rsquo;d failed Sichuan University&amp;rsquo;s re-examination, my mood plummeted. But — every cloud has a silver lining. The adjustment (tiaoji) process was my lifesaver. While searching for adjustment schools, I found Wuhan University.&lt;/p&gt;
&lt;p&gt;The China Graduate Admission Website has a dedicated adjustment window, giving students who failed their initial re-examination three more interview opportunities. You can fill in three preferences — three schools to apply to. Since each school has different re-examination dates and requirements, preparing for all of them is very hard. I focused mainly on preparing for Wuhan University&amp;rsquo;s adjustment. The adjustment, of course, also involves a re-examination — essentially, schools that haven&amp;rsquo;t filled their enrollment quotas run the process again, giving students who weren&amp;rsquo;t admitted in the first round another chance.&lt;/p&gt;
&lt;p&gt;Adjustment window: late March to early April.&lt;/p&gt;

&lt;h3 class="relative group"&gt;How to Prepare for the Re-examination?
 &lt;div id="how-to-prepare-for-the-re-examination" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#how-to-prepare-for-the-re-examination" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;The re-examination is also highly competitive. Lazy people like me are not uncommon&amp;hellip; But no matter what, you&amp;rsquo;ve already invested over half a year — you can&amp;rsquo;t let it go down the drain. (I almost did&amp;hellip;) For non-specialist students like me, the hardest parts of the re-examination are spoken English and specialized knowledge. From score release to the re-examination, you have about one week (while still working!), so learning from scratch is impossible. Based on my experience, the following approaches, in descending order of importance:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Find seniors who&amp;rsquo;ve been through it and get past re-examination materials (discreetly — sharing re-examination materials externally is prohibited) and course materials. See if anyone you know is at that school, or find groups on forums or Tieba.&lt;/li&gt;
&lt;li&gt;Search Bilibili for common graduate re-examination questions. Summarize them and memorize.&lt;/li&gt;
&lt;li&gt;Buy the school&amp;rsquo;s recommended reference books (usually course materials). They&amp;rsquo;re thick; you won&amp;rsquo;t finish them.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally, the most important thing: mock re-examination. Summarize potential English questions, specialized questions, and comprehensive interview questions, then find a partner to act as the examiner for a mock interview.&lt;/p&gt;
&lt;p&gt;There are other re-examination requirements — keep an eye on department updates and your email: score weightings, interview process, dual-camera setup, interview schedule, document preparation, etc.&lt;/p&gt;

&lt;h2 class="relative group"&gt;The End
 &lt;div id="the-end" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-end" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;The 2022 national preliminary exam line was 185. My preliminary score was 210 (English 80, Management Comprehensive 130). Here&amp;rsquo;s my re-examination acceptance notice ^_^



&lt;img src="https://lastdba.com/img/csdn/afd22229a49a.png" alt="Insert image description" /&gt;&lt;/p&gt;
&lt;p&gt;Good luck to all working-student-warriors battered by society but still holding onto your dreams — may your graduate exam go smoothly. You&amp;rsquo;ve got this!!!&lt;/p&gt;</content:encoded></item><item><title>OGG Oracle-to-PostgreSQL Sync — Hands-On Steps</title><link>https://lastdba.com/en/2024/08/13/ogg-oracle-to-postgresql-sync-hands-on-steps/</link><pubDate>Tue, 13 Aug 2024 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2024/08/13/ogg-oracle-to-postgresql-sync-hands-on-steps/</guid><description>&lt;p&gt;Source DB: Oracle (11.2.0.4) 192.168.10.141
Target DB: PGSQL (10.12) 192.168.10.128
OGG software version: (19.1.0.0.4)
OGG download: Oracle GoldenGate Downloads
glibc issue handling: &lt;a href="https://www.cnblogs.com/hxlasky/p/16779047.html" target="_blank" rel="noreferrer"&gt;https://www.cnblogs.com/hxlasky/p/16779047.html&lt;/a&gt;&lt;/p&gt;

&lt;h3 class="relative group"&gt;1. Install OGG Software on Source and Target
 &lt;div id="1-install-ogg-software-on-source-and-target" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-install-ogg-software-on-source-and-target" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Source:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A. Configure response file: oggcore.rsp&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;oracle.install.responseFileVersion=/home/oracle/oggcore.rsp
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;INSTALL_OPTION=ORA11g
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SOFTWARE_LOCATION=/oracle/ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;START_MANAGER=false
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MANAGER_PORT=7809
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DATABASE_LOCATION=/oracle/db/11.2.0.4
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;INVENTORY_LOCATION=/oracle/oraInventory
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;UNIX_GROUP_NAME=oinstall&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;B. Silent install OGG&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;./runInstaller -silent -nowait -responseFile /home/oracle/oggcore.rsp&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;oracle@szgtsp431-or@ecsdb&amp;gt;./runInstaller -silent -nowait -responseFile /home/oracle/oggcore.rsp
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Starting Oracle Universal Installer...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Checking Temp space: must be greater than 120 MB. Actual 32405 MB Passed
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Checking swap space: must be greater than 150 MB. Actual 2048 MB Passed
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-08-14_08-57-27AM. Please wait ...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;You can find the log of this install session at:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; /oracle/oraInventory/logs/installActions2020-08-14_08-57-27AM.log
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Successfully Setup Software.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;The installation of Oracle GoldenGate Core was successful.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Please check &amp;#39;/oracle/oraInventory/logs/silentInstall2020-08-14_08-57-27AM.log&amp;#39; for more details.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;2. Set Database to Archive Mode
 &lt;div id="2-set-database-to-archive-mode" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#2-set-database-to-archive-mode" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;oracle@szgtsp431-or@ecsdb&amp;gt;sqlplus / as sysdba
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SQL*Plus: Release 11.2.0.4.0 Production on Fri Aug 14 09:06:34 2020
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Copyright (c) 1982, 2013, Oracle. All rights reserved.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Connected to:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;With the Partitioning, OLAP, Data Mining and Real Application Testing options
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SQL&amp;gt; archive log list;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Database log mode Archive Mode
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Automatic archival Enabled
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Archive destination /oracle/oradata/archivelog
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Oldest online log sequence 19
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Next log sequence to archive 21
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Current log sequence 21&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;3. Enable Force Logging and Minimum Supplemental Logging
 &lt;div id="3-enable-force-logging-and-minimum-supplemental-logging" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#3-enable-force-logging-and-minimum-supplemental-logging" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;database&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;force&lt;/span&gt; logging;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;database&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;add&lt;/span&gt; supplemental log &lt;span style="color:#66d9ef"&gt;data&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;system&lt;/span&gt; switch logfile;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Verify force logging and minimum supplemental logging enabled:&lt;/p&gt;</description><content:encoded>&lt;p&gt;Source DB: Oracle (11.2.0.4) 192.168.10.141
Target DB: PGSQL (10.12) 192.168.10.128
OGG software version: (19.1.0.0.4)
OGG download: Oracle GoldenGate Downloads
glibc issue handling: &lt;a href="https://www.cnblogs.com/hxlasky/p/16779047.html" target="_blank" rel="noreferrer"&gt;https://www.cnblogs.com/hxlasky/p/16779047.html&lt;/a&gt;&lt;/p&gt;

&lt;h3 class="relative group"&gt;1. Install OGG Software on Source and Target
 &lt;div id="1-install-ogg-software-on-source-and-target" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-install-ogg-software-on-source-and-target" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Source:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A. Configure response file: oggcore.rsp&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;oracle.install.responseFileVersion=/home/oracle/oggcore.rsp
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;INSTALL_OPTION=ORA11g
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SOFTWARE_LOCATION=/oracle/ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;START_MANAGER=false
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MANAGER_PORT=7809
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DATABASE_LOCATION=/oracle/db/11.2.0.4
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;INVENTORY_LOCATION=/oracle/oraInventory
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;UNIX_GROUP_NAME=oinstall&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;B. Silent install OGG&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;./runInstaller -silent -nowait -responseFile /home/oracle/oggcore.rsp&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;oracle@szgtsp431-or@ecsdb&amp;gt;./runInstaller -silent -nowait -responseFile /home/oracle/oggcore.rsp
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Starting Oracle Universal Installer...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Checking Temp space: must be greater than 120 MB. Actual 32405 MB Passed
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Checking swap space: must be greater than 150 MB. Actual 2048 MB Passed
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-08-14_08-57-27AM. Please wait ...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;You can find the log of this install session at:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; /oracle/oraInventory/logs/installActions2020-08-14_08-57-27AM.log
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Successfully Setup Software.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;The installation of Oracle GoldenGate Core was successful.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Please check &amp;#39;/oracle/oraInventory/logs/silentInstall2020-08-14_08-57-27AM.log&amp;#39; for more details.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;2. Set Database to Archive Mode
 &lt;div id="2-set-database-to-archive-mode" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#2-set-database-to-archive-mode" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;oracle@szgtsp431-or@ecsdb&amp;gt;sqlplus / as sysdba
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SQL*Plus: Release 11.2.0.4.0 Production on Fri Aug 14 09:06:34 2020
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Copyright (c) 1982, 2013, Oracle. All rights reserved.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Connected to:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;With the Partitioning, OLAP, Data Mining and Real Application Testing options
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SQL&amp;gt; archive log list;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Database log mode Archive Mode
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Automatic archival Enabled
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Archive destination /oracle/oradata/archivelog
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Oldest online log sequence 19
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Next log sequence to archive 21
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Current log sequence 21&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;3. Enable Force Logging and Minimum Supplemental Logging
 &lt;div id="3-enable-force-logging-and-minimum-supplemental-logging" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#3-enable-force-logging-and-minimum-supplemental-logging" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;database&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;force&lt;/span&gt; logging;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;database&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;add&lt;/span&gt; supplemental log &lt;span style="color:#66d9ef"&gt;data&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;system&lt;/span&gt; switch logfile;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Verify force logging and minimum supplemental logging enabled:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; force_logging,supplemental_log_data_min &lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; v$database;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;4. Set enable_goldengate_replication Parameter
 &lt;div id="4-set-enable_goldengate_replication-parameter" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#4-set-enable_goldengate_replication-parameter" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;system&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;set&lt;/span&gt; enable_goldengate_replication&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;true&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;scope&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;both&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If RAC, all nodes must be modified:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;system&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;set&lt;/span&gt; enable_goldengate_replication&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;true&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;scope&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;both&lt;/span&gt; sid&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#39;*&amp;#39;&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;5. Create OGG User, Tablespace, and Grant Privileges
 &lt;div id="5-create-ogg-user-tablespace-and-grant-privileges" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#5-create-ogg-user-tablespace-and-grant-privileges" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; tablespace tbs_ogg datafile &lt;span style="color:#e6db74"&gt;&amp;#39;/oracle/oradata/datafile/tbs_ogg01.dbf&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;size&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;100&lt;/span&gt;M;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;user&lt;/span&gt; goldengate identified &lt;span style="color:#66d9ef"&gt;by&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;123456&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;default&lt;/span&gt; tablespace tbs_ogg &lt;span style="color:#66d9ef"&gt;temporary&lt;/span&gt; tablespace temp;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;session&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;session&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;system&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; resource &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;connect&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;any&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;dictionary&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; flashback &lt;span style="color:#66d9ef"&gt;any&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;any&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;any&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;insert&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;any&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;update&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;any&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;delete&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;any&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;on&lt;/span&gt; dba_clusters &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;execute&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;on&lt;/span&gt; dbms_flashback &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; sequence &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;any&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; dba &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;grant&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;lock&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;any&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; goldengate;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;6. Enable Table-Level Supplemental Logging
 &lt;div id="6-enable-table-level-supplemental-logging" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#6-enable-table-level-supplemental-logging" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;To sync table data from specific schemas, enable supplemental logging on those tables.&lt;/p&gt;
&lt;p&gt;Check supplemental logging:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;SELECT&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;owner&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;table_name&lt;/span&gt;, log_group_name, log_group_type,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; decode(always, &lt;span style="color:#e6db74"&gt;&amp;#39;ALWAYS&amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;Unconditional&amp;#39;&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;NULL&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;Conditional&amp;#39;&lt;/span&gt;) always
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;FROM&lt;/span&gt; dba_log_groups
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;ORDER&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;BY&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;owner&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;table_name&lt;/span&gt;, log_group_name;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Enable supplemental logging during low-activity window:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;oracle@szgtsp431-or@ecsdb&amp;gt;ggsci
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Oracle GoldenGate Command Interpreter for Oracle
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Linux, x64, 64bit (optimized), Oracle 11g on Oct 17 2019 23:13:12
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Operating system character set identified as US-ASCII.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or) 1&amp;gt; dblogin userid goldengate,password 123456
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Successfully logged into database.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 2&amp;gt; add trandata ecs.*
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2020-08-14 09:13:54 INFO OGG-15132 Logging of supplemental redo data enabled for table ECS.DEPT.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2020-08-14 09:13:54 INFO OGG-15133 TRANDATA for scheduling columns has been added on table ECS.DEPT.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2020-08-14 09:13:54 INFO OGG-15135 TRANDATA for instantiation CSN has been added on table ECS.DEPT.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2020-08-14 09:13:54 INFO OGG-15132 Logging of supplemental redo data enabled for table ECS.INFO.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Verify all supplemental logging added:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; (
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;owner&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;table_name&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; dba_tables &lt;span style="color:#66d9ef"&gt;where&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;owner&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;in&lt;/span&gt; (&lt;span style="color:#e6db74"&gt;&amp;#39;BGLWT&amp;#39;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; minus
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;owner&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;table_name&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; dba_log_groups)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;order&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;by&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;owner&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;table_name&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;-- no rows selected = all table-level supplemental logging added successfully&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;7. Configure Manager Process
 &lt;div id="7-configure-manager-process" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#7-configure-manager-process" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;oracle@szgtsp431-or@ecsdb&amp;gt;ggsci
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or) 1&amp;gt; dblogin userid goldengate,password 123456
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Successfully logged into database.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 2&amp;gt; create subdirs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Creating subdirectories under current directory /home/oracle
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 3&amp;gt; edit param mgr
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PORT 7809
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DYNAMICPORTLIST 7810-7980
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS, MINKEEPDAYS 3
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PURGEDDLHISTORY MINKEEPDAYS 7, MAXKEEPDAYS 10
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;LAGREPORTHOURS 1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;LAGINFOMINUTES 30
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;LAGCRITICALMINUTES 45&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;8. Configure Extract Process
 &lt;div id="8-configure-extract-process" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#8-configure-extract-process" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 7&amp;gt; add extract extecs, tranlog, threads 1,begin now
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT added.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 8&amp;gt; add exttrail ./dirdat/lt, extract extecs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTTRAIL added.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 9&amp;gt; info all
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Program Status Group Lag at Chkpt Time Since Chkpt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MANAGER RUNNING 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT STOPPED EXTECS 00:00:00 00:00:38 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 10&amp;gt; edit param extecs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT extecs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SETENV (ORACLE_HOME = &amp;#34;/oracle/db/11.2.0.4&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SETENV (ORACLE_SID = &amp;#34;ecsdb&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;USERID goldengate, PASSWORD 123456
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTTRAIL ./dirdat/lt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;TRANLOGOPTIONS EXCLUDEUSER goldengate
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;TRANLOGOPTIONS DBLOGREADER
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DBOPTIONS ALLOWUNUSEDCOLUMN
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;FETCHOPTIONS USESNAPSHOT, USELATESTVERSION, MISSINGROW REPORT
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;STATOPTIONS REPORTFETCH
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;WARNLONGTRANS 1h, CHECKINTERVAL 10m
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DYNAMICRESOLUTION
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DISCARDFILE ./dirrpt/extecs.dsc, APPEND, MEGABYTES 1024
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DISCARDROLLOVER AT 6:00
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPORTROLLOVER AT 6:00
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPORTCOUNT EVERY 1 MINUTES, RATE
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DDL INCLUDE MAPPED
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DDLOPTIONS ADDTRANDATA, REPORT
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DDLOPTIONS NOCROSSRENAME, REPORT
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;TABLE ECS.*;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;9. Configure Pump Process
 &lt;div id="9-configure-pump-process" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#9-configure-pump-process" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 11&amp;gt; add extract deliecs, exttrailsource ./dirdat/lt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT added.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 12&amp;gt; add rmttrail ./dirdat/rt, extract deliecs, megabytes 500
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;RMTTRAIL added.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 13&amp;gt; edit param deliecs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT deliecs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PASSTHRU
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DYNAMICRESOLUTION
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;RMTHOST 192.168.10.100, MGRPORT 7809
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;RMTTRAIL ./dirdat/rt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DISCARDFILE ./dirrpt/deliecs.dsc, APPEND, MEGABYTES 1024
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DISCARDROLLOVER AT 6:00
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPORTCOUNT EVERY 1 MINUTES, RATE
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPORT AT 0:00
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPORT AT 1:00
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPORT AT 23:00
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPORTROLLOVER AT 00:00
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;STATOPTIONS RESETREPORTSTATS
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;TABLE ECS.*; &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;10. Start Extract Process
 &lt;div id="10-start-extract-process" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#10-start-extract-process" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 20&amp;gt; start extecs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Sending START request to MANAGER ...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT EXTECS starting
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 21&amp;gt; info all
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Program Status Group Lag at Chkpt Time Since Chkpt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MANAGER RUNNING 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT STOPPED DELIECS 00:00:00 00:06:06 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT RUNNING EXTECS 00:00:00 00:00:01 &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;11. Configure Target OGG Software
 &lt;div id="11-configure-target-ogg-software" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#11-configure-target-ogg-software" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;A. Upload OGG software and extract&lt;/strong&gt;
&lt;strong&gt;B. Configure OGG environment variables&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[pgsql@szgtsp428-or ~]$ vi .bash_profile
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;## .bash_profile
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;## Get the aliases and functions
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;if [ -f ~/.bashrc ]; then
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; . ~/.bashrc
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;fi
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;## User specific environment and startup programs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PATH=$PATH:$HOME/bin
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export PATH
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export PGHOME=/usr/local/pgsql
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export PGDATA=/data/pgsql
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export OGG_HOME=/data/ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export PATH=$PATH:$PGHOME/bin:$OGG_HOME
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;LD_LIBRARY_PATH=$PGHOME/lib
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib:$OGG_HOME/lib
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export LD_LIBRARY_PATH
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export ODBCINI=/home/pgsql/odbc.ini
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export DD_ODBC_HOME=/data/ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[pgsql@szgtsp428-or ~]$ ggsci
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Oracle GoldenGate Command Interpreter for PostgreSQL
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Version 19.1.0.0.200714 OGGCORE_19.1.0.0.0OGGBP_PLATFORMS_200628.2141
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Linux, x64, 64bit (optimized), PostgreSQL on Jun 29 2020 03:59:15
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Operating system character set identified as UTF-8.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or) 1&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;12. Create Database and Table on Target
 &lt;div id="12-create-database-and-table-on-target" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#12-create-database-and-table-on-target" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ecsdb=# \l
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; List of databases
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Name | Owner | Encoding | Collate | Ctype | Access privileges 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;-----------+----------+----------+-------------+-------------+-------------------
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ecsdb | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; postgres | pgsql | UTF8 | en_US.UTF-8 | en_US.UTF-8 | 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; template0 | pgsql | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/pgsql +
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; | | | | | pgsql=CTc/pgsql
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; template1 | pgsql | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/pgsql +
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; | | | | | pgsql=CTc/pgsql
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(4 rows)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ecsdb=# \d
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; List of relations
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Schema | Name | Type | Owner 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;--------+--------------+-------+----------
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; public | student_info | table | postgres
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(1 row)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ecsdb=# select * from student_info;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; id | name | address 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;----+------+---------
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 1 | Zhang San | Guangzhou
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 2 | Li Si | Shenzhen
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 3 | Wang Wu | Shanghai
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 4 | Zhao Liu | Beijing
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 5 | Sun Qi | Wuhan
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 6 | A Da | Chengdu
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 7 | A Er | Nanjing
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(7 rows)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;13. Configure Target Manager Process and Start
 &lt;div id="13-configure-target-manager-process-and-start" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#13-configure-target-manager-process-and-start" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[pgsql@szgtsp428-or ogg]$ ggsci
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Oracle GoldenGate Command Interpreter for PostgreSQL
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or) 1&amp;gt; info all
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Program Status Group Lag at Chkpt Time Since Chkpt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MANAGER STOPPED 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or) 2&amp;gt; create subdirs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Creating subdirectories under current directory /data/ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or) 3&amp;gt; edit param mgr
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;port 7809
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or) 4&amp;gt; info all
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or) 5&amp;gt; start mgr
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Manager started.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or) 7&amp;gt; info all
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Program Status Group Lag at Chkpt Time Since Chkpt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MANAGER RUNNING &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Now start the pump process on source (deliecs):&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;oracle@szgtsp431-or@ecsdb&amp;gt;ggsci
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or) 1&amp;gt; info all
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Program Status Group Lag at Chkpt Time Since Chkpt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MANAGER RUNNING 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT ABENDED DELIECS 00:00:00 01:06:41 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT RUNNING EXTECS 00:00:00 00:00:07 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or) 2&amp;gt; start deliecs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Sending START request to MANAGER ...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT DELIECS starting
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or) 3&amp;gt; info all
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Program Status Group Lag at Chkpt Time Since Chkpt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MANAGER RUNNING 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT RUNNING DELIECS 00:00:00 01:06:55 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT RUNNING EXTECS 00:00:00 00:00:01 &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;14. Target PostgreSQL Parameter Adjustment
 &lt;div id="14-target-postgresql-parameter-adjustment" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#14-target-postgresql-parameter-adjustment" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-ini" data-lang="ini"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;wal_level&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;logical #minimal, replica, or logical&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;max_replication_slots&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;10 #max number of replication slots&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;max_wal_sender&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;10 #maximum number of wal sender processes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;wal_receiver_status_interval&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;10s #optional, keep the system default&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;wal_sender_timeout&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;60s #optional, keep the system default&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;track_commit_timestamp&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;off #optional, keep the system default&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Restart PostgreSQL after adjusting parameters:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[pgsql@szgtsp428-or pgsql]$ pg_ctl stop -D /data/pgsql/ -l /data/pgsql/logfile
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;waiting for server to shut down.... done
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;server stopped
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[pgsql@szgtsp428-or pgsql]$ pg_ctl start -D /data/pgsql/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;waiting for server to start.... done
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;server started&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;15. Data Source Configuration (odbc.ini)
 &lt;div id="15-data-source-configuration-odbcini" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#15-data-source-configuration-odbcini" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-ini" data-lang="ini"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;[ODBC Data Sources]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;PGDSN&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;DataDirect 10.12 PostgreSQL Wire Protocol&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;postgres&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;DataDirect 10.12 PostgreSQL Wire Protocol&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;scott&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;DataDirect 10.12 PostgreSQL Wire Protocol&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;[ODBC]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;IANAAppCodePage&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;InstallDir&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;/data/ogg&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;[PGDSN]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;Driver&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;/data/ogg/lib/GGpsql25.so&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;Description&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;DataDirect 10.12 PostgreSQL Wire Protocol&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;Database&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;ecsdb&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;HostName&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;127.0.0.1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;PortNumber&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;5432&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;LogonID&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;postgres&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;Password&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;123456&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;16. Connection Test
 &lt;div id="16-connection-test" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#16-connection-test" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[pgsql@szgtsp428-or ~]$ cd /data/ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[pgsql@szgtsp428-or ogg]$ ggsci
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or) 1&amp;gt; info all
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Program Status Group Lag at Chkpt Time Since Chkpt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MANAGER RUNNING 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or) 2&amp;gt; dblogin sourcedb pgdsn userid postgres, password postgres
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2020-08-14 11:35:01 INFO OGG-03036 Database character set identified as UTF-8. Locale: en_US.UTF-8.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2020-08-14 11:35:01 INFO OGG-03037 Session character set identified as UTF-8.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Successfully logged into database.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;17. Configure and Start Replicat Process on Target
 &lt;div id="17-configure-and-start-replicat-process-on-target" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#17-configure-and-start-replicat-process-on-target" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Add checkpoint table:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or) 1&amp;gt; dblogin sourcedb pgdsn userid postgres, password 123456
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Successfully logged into database.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or as postgres@pgdsn) 2&amp;gt; add checkpointtable public.chkt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Successfully created checkpoint table public.chkt.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Configure replicat:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or as postgres@pgdsn) 34&amp;gt; edit param repl
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPLICAT repl
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SOURCEDEFS ./dirdef/student_info.def
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SETENV (PGCLIENTENCODING = &amp;#34;UTF8&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SETENV (ODBCINI=&amp;#34;/home/pgsql/odbc.ini&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SETENV (NLS_LANG=&amp;#34;AMERICAN_AMERICA.AL32UTF8&amp;#34;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;targetdb pgdsn userid postgres, password 123456
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DISCARDFILE ./dirrpt/repl.dsc, purge
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MAP ecs.student_info, TARGET public.student_info;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or as postgres@pgdsn) 36&amp;gt; add replicat repl,exttrail ./dirdat/rt,checkpointtable public.chkt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPLICAT added.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or as postgres@pgdsn) 38&amp;gt; start repl
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Sending START request to MANAGER ...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPLICAT REPL starting
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or as postgres@pgdsn) 55&amp;gt; info all
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Program Status Group Lag at Chkpt Time Since Chkpt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MANAGER RUNNING 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPLICAT RUNNING REPL 00:00:00 00:00:08&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;18. Test Verification
 &lt;div id="18-test-verification" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#18-test-verification" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;First, create matching table structure on target:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; student_info (id int &lt;span style="color:#66d9ef"&gt;primary&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;key&lt;/span&gt;, name varchar(&lt;span style="color:#ae81ff"&gt;100&lt;/span&gt;), address varchar(&lt;span style="color:#ae81ff"&gt;100&lt;/span&gt;));&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Then initialize data:&lt;/p&gt;
&lt;p&gt;Configure extinit process on source:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 17&amp;gt; edit param extinit
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT extinit
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;userid goldengate, PASSWORD 123456
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPORTCOUNT EVERY 30 MINUTES, RATE
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DISCARDFILE ./dirrpt/extinit.dsc, APPEND, MEGABYTES 1024
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;RMTHOST 192.168.10.100,MGRPORT 7809, compress
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;RMTTASK replicat,GROUP replinit
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;TABLE ecs.student_info;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 18&amp;gt; ADD EXTRACT extinit, SOURCEISTABLE
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT added.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Configure replinit process on target:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or as postgres@pgdsn) 28&amp;gt; edit param replinit
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPLICAT replinit
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;targetDB pgdsn, USERID postgres, PASSWORD 123456
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;discardfile ./dirrpt/replinit.dsc, PURGE
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SOURCEDEFS ./dirdef/student_info.def
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Map ecs.student_info,target public.student_info;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp428-or as postgres@pgdsn) 29&amp;gt; add replicat repinit, SPECIALRUN
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPLICAT added.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Start Oracle-to-PG data initialization:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI (szgtsp431-or as goldengate@ecsdb) 9&amp;gt; start extinit
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Sending START request to MANAGER ...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXTRACT EXTINIT starting&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Target: (view initialization row count via View report replicat)&lt;/p&gt;
&lt;p&gt;Check both sides:&lt;/p&gt;
&lt;p&gt;Source (Oracle):&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SQL&amp;gt; select * from student_info;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ID NAME ADDRESS
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;---------- ---------- ----------
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 1 Zhang San Guangzhou
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 2 Li Si Shenzhen
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 3 Wang Wu Shanghai
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 4 Zhao Liu Beijing
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 5 Sun Qi Wuhan
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 6 A Da Chengdu
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 7 A Er Nanjing
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 8 A San Beijing
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;8 rows selected.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Target (PostgreSQL):&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ecsdb=# select * from student_info;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; id | name | address 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;----+------+---------
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 1 | Zhang San | Guangzhou
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 2 | Li Si | Shenzhen
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 3 | Wang Wu | Shanghai
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 4 | Zhao Liu | Beijing
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 5 | Sun Qi | Wuhan
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 6 | A Da | Chengdu
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 7 | A Er | Nanjing
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 8 | A San | Beijing
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(8 rows)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Insert data on source:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;SQL&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;insert&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;into&lt;/span&gt; ecs.student_info &lt;span style="color:#66d9ef"&gt;values&lt;/span&gt; (&lt;span style="color:#ae81ff"&gt;10&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#39;aa&amp;#39;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#39;bb&amp;#39;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;row&lt;/span&gt; created.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;SQL&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;commit&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;Commit&lt;/span&gt; complete.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Check target — data synchronized successfully.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Original link: &lt;a href="https://lastdba.com/2024/08/13/ogg" target="_blank" rel="noreferrer"&gt;https://lastdba.com/2024/08/13/ogg&lt;/a&gt;搭建oracle-pg同步实操步骤/&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded></item><item><title>OGG PostgreSQL-to-Oracle Sync — Hands-On Steps</title><link>https://lastdba.com/en/2024/08/13/ogg-postgresql-to-oracle-sync-hands-on-steps/</link><pubDate>Tue, 13 Aug 2024 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2024/08/13/ogg-postgresql-to-oracle-sync-hands-on-steps/</guid><description>&lt;p&gt;OGG software version: (19.1.0.0.4)
Oracle version: 11.2.0.4
PG version: pg10
OGG download: &lt;a href="https://www.oracle.com/technetwork/middleware/goldengate/downloads/index.html" target="_blank" rel="noreferrer"&gt;https://www.oracle.com/technetwork/middleware/goldengate/downloads/index.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;glibc issue handling: &lt;a href="https://www.cnblogs.com/hxlasky/p/16779047.html" target="_blank" rel="noreferrer"&gt;https://www.cnblogs.com/hxlasky/p/16779047.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/6d5467d7acac.png" alt="img" /&gt;&lt;/p&gt;

&lt;h4 class="relative group"&gt;1. Create Database and Table on Source
 &lt;div id="1-create-database-and-table-on-source" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-create-database-and-table-on-source" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root&lt;span style="color:#f92672"&gt;@&lt;/span&gt;node2 &lt;span style="color:#f92672"&gt;~&lt;/span&gt;]&lt;span style="color:#f92672"&gt;#&lt;/span&gt; su &lt;span style="color:#f92672"&gt;-&lt;/span&gt; postgres
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;Last&lt;/span&gt; login: Tue Jul &lt;span style="color:#ae81ff"&gt;21&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;21&lt;/span&gt;:&lt;span style="color:#ae81ff"&gt;08&lt;/span&gt;:&lt;span style="color:#ae81ff"&gt;52&lt;/span&gt; CST &lt;span style="color:#ae81ff"&gt;2020&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;on&lt;/span&gt; pts&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[postgres&lt;span style="color:#f92672"&gt;@&lt;/span&gt;node2 &lt;span style="color:#f92672"&gt;~&lt;/span&gt;]&lt;span style="color:#960050;background-color:#1e0010"&gt;$&lt;/span&gt; pg_ctl &lt;span style="color:#f92672"&gt;-&lt;/span&gt;D &lt;span style="color:#f92672"&gt;/&lt;/span&gt;opt&lt;span style="color:#f92672"&gt;/&lt;/span&gt;pgsql_data &lt;span style="color:#f92672"&gt;-&lt;/span&gt;l logfile &lt;span style="color:#66d9ef"&gt;start&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;waiting &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; server &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;start&lt;/span&gt;.... done
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;server started
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;postgres&lt;span style="color:#f92672"&gt;=#&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;database&lt;/span&gt; test
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;postgres&lt;span style="color:#f92672"&gt;=#&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;c&lt;/span&gt; lzldb
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;postgres&lt;span style="color:#f92672"&gt;=#&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; tab1(id int &lt;span style="color:#66d9ef"&gt;primary&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;key&lt;/span&gt;,name varchar(&lt;span style="color:#ae81ff"&gt;20&lt;/span&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;2. Create Database and Table on Target
 &lt;div id="2-create-database-and-table-on-target" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#2-create-database-and-table-on-target" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sqlplus &lt;span style="color:#f92672"&gt;/&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;as&lt;/span&gt; sysdba
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;SQL&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; ORALZL.tab1(id number &lt;span style="color:#66d9ef"&gt;primary&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;key&lt;/span&gt;,name varchar2(&lt;span style="color:#ae81ff"&gt;20&lt;/span&gt;));&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;3. Extract and Install OGG for PostgreSQL
 &lt;div id="3-extract-and-install-ogg-for-postgresql" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#3-extract-and-install-ogg-for-postgresql" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;-- Unlike OGG for Oracle, OGG for PG only needs extraction. Oracle version requires running runInstaller.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[postgres@node1 ~]$ id postgres
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;uid=54323(postgres) gid=54330(postgres) groups=54330(postgres)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[postgres@node1 ~]$ exit
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;logout
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 ~]# mkdir /ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 ~]# chown -R postgres /ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 ~]# chmod -R 755 /ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 ~]#
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 soft]# ls -l
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;total 240744
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;-rw-r--r--. 1 root root 87028695 Jul 22 02:51 19100200714_ggs_Linux_x64_PostgreSQL_64bit.zip
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 soft]# chmod 777 19100200714_ggs_Linux_x64_PostgreSQL_64bit.zip
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 soft]# unzip 19100200714_ggs_Linux_x64_PostgreSQL_64bit.zip
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Archive: 19100200714_ggs_Linux_x64_PostgreSQL_64bit.zip
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; inflating: ggs_Linux_x64_PostgreSQL_64bit.tar 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; inflating: OGG-19.1.0.0-README.txt 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; inflating: release-notes-oracle-goldengate_19.1.0.200714.pdf 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 soft]# chmod 777 ggs_Linux_x64_PostgreSQL_64bit.tar
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 soft]# su - postgres
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[postgres@node1 ~]$ cd /soft
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[postgres@node1 soft]$ tar -xf ggs_Linux_x64_PostgreSQL_64bit.tar -C /ogg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;4. Configure PG User Environment Variables
 &lt;div id="4-configure-pg-user-environment-variables" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#4-configure-pg-user-environment-variables" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;Source PG:&lt;/p&gt;</description><content:encoded>&lt;p&gt;OGG software version: (19.1.0.0.4)
Oracle version: 11.2.0.4
PG version: pg10
OGG download: &lt;a href="https://www.oracle.com/technetwork/middleware/goldengate/downloads/index.html" target="_blank" rel="noreferrer"&gt;https://www.oracle.com/technetwork/middleware/goldengate/downloads/index.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;glibc issue handling: &lt;a href="https://www.cnblogs.com/hxlasky/p/16779047.html" target="_blank" rel="noreferrer"&gt;https://www.cnblogs.com/hxlasky/p/16779047.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/6d5467d7acac.png" alt="img" /&gt;&lt;/p&gt;

&lt;h4 class="relative group"&gt;1. Create Database and Table on Source
 &lt;div id="1-create-database-and-table-on-source" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-create-database-and-table-on-source" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root&lt;span style="color:#f92672"&gt;@&lt;/span&gt;node2 &lt;span style="color:#f92672"&gt;~&lt;/span&gt;]&lt;span style="color:#f92672"&gt;#&lt;/span&gt; su &lt;span style="color:#f92672"&gt;-&lt;/span&gt; postgres
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;Last&lt;/span&gt; login: Tue Jul &lt;span style="color:#ae81ff"&gt;21&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;21&lt;/span&gt;:&lt;span style="color:#ae81ff"&gt;08&lt;/span&gt;:&lt;span style="color:#ae81ff"&gt;52&lt;/span&gt; CST &lt;span style="color:#ae81ff"&gt;2020&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;on&lt;/span&gt; pts&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[postgres&lt;span style="color:#f92672"&gt;@&lt;/span&gt;node2 &lt;span style="color:#f92672"&gt;~&lt;/span&gt;]&lt;span style="color:#960050;background-color:#1e0010"&gt;$&lt;/span&gt; pg_ctl &lt;span style="color:#f92672"&gt;-&lt;/span&gt;D &lt;span style="color:#f92672"&gt;/&lt;/span&gt;opt&lt;span style="color:#f92672"&gt;/&lt;/span&gt;pgsql_data &lt;span style="color:#f92672"&gt;-&lt;/span&gt;l logfile &lt;span style="color:#66d9ef"&gt;start&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;waiting &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; server &lt;span style="color:#66d9ef"&gt;to&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;start&lt;/span&gt;.... done
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;server started
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;postgres&lt;span style="color:#f92672"&gt;=#&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;database&lt;/span&gt; test
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;postgres&lt;span style="color:#f92672"&gt;=#&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;c&lt;/span&gt; lzldb
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;postgres&lt;span style="color:#f92672"&gt;=#&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; tab1(id int &lt;span style="color:#66d9ef"&gt;primary&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;key&lt;/span&gt;,name varchar(&lt;span style="color:#ae81ff"&gt;20&lt;/span&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;2. Create Database and Table on Target
 &lt;div id="2-create-database-and-table-on-target" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#2-create-database-and-table-on-target" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sqlplus &lt;span style="color:#f92672"&gt;/&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;as&lt;/span&gt; sysdba
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;SQL&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; ORALZL.tab1(id number &lt;span style="color:#66d9ef"&gt;primary&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;key&lt;/span&gt;,name varchar2(&lt;span style="color:#ae81ff"&gt;20&lt;/span&gt;));&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;3. Extract and Install OGG for PostgreSQL
 &lt;div id="3-extract-and-install-ogg-for-postgresql" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#3-extract-and-install-ogg-for-postgresql" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;-- Unlike OGG for Oracle, OGG for PG only needs extraction. Oracle version requires running runInstaller.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[postgres@node1 ~]$ id postgres
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;uid=54323(postgres) gid=54330(postgres) groups=54330(postgres)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[postgres@node1 ~]$ exit
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;logout
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 ~]# mkdir /ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 ~]# chown -R postgres /ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 ~]# chmod -R 755 /ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 ~]#
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 soft]# ls -l
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;total 240744
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;-rw-r--r--. 1 root root 87028695 Jul 22 02:51 19100200714_ggs_Linux_x64_PostgreSQL_64bit.zip
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 soft]# chmod 777 19100200714_ggs_Linux_x64_PostgreSQL_64bit.zip
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 soft]# unzip 19100200714_ggs_Linux_x64_PostgreSQL_64bit.zip
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Archive: 19100200714_ggs_Linux_x64_PostgreSQL_64bit.zip
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; inflating: ggs_Linux_x64_PostgreSQL_64bit.tar 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; inflating: OGG-19.1.0.0-README.txt 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; inflating: release-notes-oracle-goldengate_19.1.0.200714.pdf 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 soft]# chmod 777 ggs_Linux_x64_PostgreSQL_64bit.tar
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[root@node1 soft]# su - postgres
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[postgres@node1 ~]$ cd /soft
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[postgres@node1 soft]$ tar -xf ggs_Linux_x64_PostgreSQL_64bit.tar -C /ogg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;4. Configure PG User Environment Variables
 &lt;div id="4-configure-pg-user-environment-variables" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#4-configure-pg-user-environment-variables" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;Source PG:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;postgres@node1 ~&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ cat .bash_profile
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;## .bash_profile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;## Get the aliases and functions&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt; -f ~/.bashrc &lt;span style="color:#f92672"&gt;]&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;. ~/.bashrc
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;## User specific environment and startup programs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PATH&lt;span style="color:#f92672"&gt;=&lt;/span&gt;$PATH:$HOME/.local/bin:$HOME/bin
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export GGHOME&lt;span style="color:#f92672"&gt;=&lt;/span&gt;/ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export PG_DATA&lt;span style="color:#f92672"&gt;=&lt;/span&gt;/opt/pgsql/pgsql/bin
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export PATH&lt;span style="color:#f92672"&gt;=&lt;/span&gt;$PG_DATA:$PATH
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export PG_HOME&lt;span style="color:#f92672"&gt;=&lt;/span&gt;/opt/pgsql/pgsql
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export LD_LIBRARY_PATH&lt;span style="color:#f92672"&gt;=&lt;/span&gt;$PG_HOME/lib:$LD_LIBRARY_PATH:$GGHOME/lib
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export ODBCINI&lt;span style="color:#f92672"&gt;=&lt;/span&gt;/home/postgres/odbc.ini
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export DD_ODBC_HOME&lt;span style="color:#f92672"&gt;=&lt;/span&gt;/ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export PATH
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;postgres@node1 ~&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ source .bash_profile&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;5. Configure Manager Process
 &lt;div id="5-configure-manager-process" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#5-configure-manager-process" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;postgres@node1 ~&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ cd /ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;postgres@node1 ogg&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ ./ggsci
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Oracle GoldenGate Command Interpreter &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; PostgreSQL
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Version 19.1.0.0.200714 OGGCORE_19.1.0.0.0OGGBP_PLATFORMS_200628.2141
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Linux, x64, 64bit &lt;span style="color:#f92672"&gt;(&lt;/span&gt;optimized&lt;span style="color:#f92672"&gt;)&lt;/span&gt;, PostgreSQL on Jun &lt;span style="color:#ae81ff"&gt;29&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2020&lt;/span&gt; 03:59:15
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Operating system character set identified as UTF-8.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Copyright &lt;span style="color:#f92672"&gt;(&lt;/span&gt;C&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 1995, 2019, Oracle and/or its affiliates. All rights reserved.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node1&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 2&amp;gt; info all
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Program Status Group Lag at Chkpt Time Since Chkpt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MANAGER STOPPED 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node1&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 3&amp;gt; create subdirs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Creating subdirectories under current directory /ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Parameter file /ogg/dirprm: created.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Report file /ogg/dirrpt: created.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Checkpoint file /ogg/dirchk: created.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Process status files /ogg/dirpcs: created.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SQL script files /ogg/dirsql: created.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Database definitions files /ogg/dirdef: created.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Extract data files /ogg/dirdat: created.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Temporary files /ogg/dirtmp: created.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Credential store files /ogg/dircrd: created.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Masterkey wallet files /ogg/dirwlt: created.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Dump files /ogg/dirdmp: created.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node1&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 4&amp;gt; edit params mgr
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node1&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 5&amp;gt; view params mgr
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;port &lt;span style="color:#ae81ff"&gt;7809&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node1&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 6&amp;gt; start mgr
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Manager started.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node1&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 7&amp;gt; info all
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Program Status Group Lag at Chkpt Time Since Chkpt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MANAGER RUNNING &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;6. Adjust Source PostgreSQL Parameters
 &lt;div id="6-adjust-source-postgresql-parameters" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#6-adjust-source-postgresql-parameters" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;postgres@node1 ogg&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ vi /opt/pgsql_data/postgresql.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;wal_level &lt;span style="color:#f92672"&gt;=&lt;/span&gt; logical &lt;span style="color:#75715e"&gt;#minimal, replica, or logical&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;max_replication_slots &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt; &lt;span style="color:#75715e"&gt;#max number of replication slots&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;max_wal_sender &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt; &lt;span style="color:#75715e"&gt;#maximum number of wal sender processes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;wal_receiver_status_interval&lt;span style="color:#f92672"&gt;=&lt;/span&gt;10s &lt;span style="color:#75715e"&gt;#optional, keep the system default&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;wal_sender_timeout &lt;span style="color:#75715e"&gt;#optional, keep the system default&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;track_commit_timestamp &lt;span style="color:#75715e"&gt;#optional, keep the system default&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;wal_receiver_status_interval&lt;span style="color:#f92672"&gt;=&lt;/span&gt;10s
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;wal_sender_timeout &lt;span style="color:#f92672"&gt;=&lt;/span&gt; 60s
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;track_commit_timestamp&lt;span style="color:#f92672"&gt;=&lt;/span&gt;off&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Restart source PostgreSQL after adjustment:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;postgres@node1 ogg&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ pg_ctl -D /opt/pgsql_data -l logfile stop
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;postgres@node1 ogg&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ pg_ctl -D /opt/pgsql_data -l logfile start&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;7. Configure OGG for PG Data Source
 &lt;div id="7-configure-ogg-for-pg-data-source" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#7-configure-ogg-for-pg-data-source" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd /home/postgres/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;vi odbc.ini
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;ODBC Data Sources&lt;span style="color:#f92672"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PGDSN&lt;span style="color:#f92672"&gt;=&lt;/span&gt;DataDirect 7.1 PostgreSQL Wire Protocol
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;postgres&lt;span style="color:#f92672"&gt;=&lt;/span&gt;DataDirect 7.1 PostgreSQL Wire Protocol
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;scott&lt;span style="color:#f92672"&gt;=&lt;/span&gt;DataDirect 7.1 PostgreSQL Wire Protocol
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;ODBC&lt;span style="color:#f92672"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;IANAAppCodePage&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;InstallDir&lt;span style="color:#f92672"&gt;=&lt;/span&gt;/ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;PGDSN&lt;span style="color:#f92672"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Driver&lt;span style="color:#f92672"&gt;=&lt;/span&gt;/ogg/lib/GGpsql25.so
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Description&lt;span style="color:#f92672"&gt;=&lt;/span&gt;DataDirect 7.1 PostgreSQL Wire Protocol
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Database&lt;span style="color:#f92672"&gt;=&lt;/span&gt;test
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;HostName&lt;span style="color:#f92672"&gt;=&lt;/span&gt;192.168.1.112
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PortNumber&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;5432&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;LogonID&lt;span style="color:#f92672"&gt;=&lt;/span&gt;postgres
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Password&lt;span style="color:#f92672"&gt;=&lt;/span&gt;postgres&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;8. Connection Test
 &lt;div id="8-connection-test" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#8-connection-test" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;postgres@node1 ~&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ cd /ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;postgres@node1 ogg&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ ./ggsci
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;--dblogin sourcedb pgdsn userid pg, password &lt;span style="color:#ae81ff"&gt;123456&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node1&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 1&amp;gt; dblogin sourcedb pgdsn userid postgres, password postgres
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2020-07-22 03:10:44 INFO OGG-03036 Database character set identified as UTF-8. Locale: en_US.UTF-8.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2020-07-22 03:10:44 INFO OGG-03037 Session character set identified as UTF-8.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Successfully logged into database.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node1 as postgres@pgdsn&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 2&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;9. Enable Table-Level Supplemental Logging
 &lt;div id="9-enable-table-level-supplemental-logging" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#9-enable-table-level-supplemental-logging" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;Source:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node1&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 3&amp;gt; dblogin sourcedb pgdsn userid postgres, password postgres
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2020-07-22 03:21:01 INFO OGG-03036 Database character set identified as UTF-8. Locale: en_US.UTF-8.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2020-07-22 03:21:01 INFO OGG-03037 Session character set identified as UTF-8.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Successfully logged into database.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node1 as postgres@pgdsn&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 4&amp;gt; add trandata public.tab1 --If table has primary key, this step can be skipped
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Logging of supplemental log data is enabled &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; table public.tab1. REPLICA IDENTITY was DEFAULT and is changed to FULL
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node1 as postgres@pgdsn&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 5&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node1 as postgres@pgdsn&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 5&amp;gt; info trandata public.tab1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Logging of supplemental log data is enabled &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; table public.t1 with REPLICA IDENTITY set to FULL&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;10. Register Extract Process on PG
 &lt;div id="10-register-extract-process-on-pg" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#10-register-extract-process-on-pg" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;Registering an extract process on PG essentially creates a replication slot. The output plugin defaults to test_decoding.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node1 as postgres@pgdsn&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 6&amp;gt; Register Extract ext_pg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 2020-07-22 03:25:27 INFO OGG-25355 Successfully created replication slot &lt;span style="color:#e6db74"&gt;&amp;#39;ext_pg_2947c06e0ea2ec74&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; EXTRACT group &lt;span style="color:#e6db74"&gt;&amp;#39;EXT_PG&amp;#39;&lt;/span&gt; in database &lt;span style="color:#e6db74"&gt;&amp;#39;test&amp;#39;&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;11. Configure Extract and Pump Processes
 &lt;div id="11-configure-extract-and-pump-processes" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#11-configure-extract-and-pump-processes" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;Configure extract process:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; edit param ext_pg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SETENV &lt;span style="color:#f92672"&gt;(&lt;/span&gt; PGCLIENTENCODING &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;UTF8&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; SETENV &lt;span style="color:#f92672"&gt;(&lt;/span&gt;NLS_LANG&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;AMERICAN_AMERICA.AL32UTF8&amp;#34;&lt;/span&gt;&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; extract ext_pg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; SETENV &lt;span style="color:#f92672"&gt;(&lt;/span&gt;ODBCINI&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;/home/pg/odbc.ini&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;)&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; SOURCEDB pgdsn, USERID pg, PASSWORD &lt;span style="color:#ae81ff"&gt;123456&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; exttrail ./dirdat/st
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; TABLE PUBLIC.TAB1;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ----GETTRUNCATES &lt;span style="color:#75715e"&gt;### This feature on PostgreSQL 10.12: ERROR OGG-25541 GETTRUNCATES is not valid. PostgreSQL supports TRUNCATE capture from version 11.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Note: PG to Oracle cannot sync TRUNCATE commands.&lt;/p&gt;
&lt;p&gt;Configure pump process:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; extract pump_pg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; SETENV &lt;span style="color:#f92672"&gt;(&lt;/span&gt;ODBCINI&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;/home/pg/odbc.ini&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; RMTHOST 172.17.100.150, MGRPORT 7809, compress
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; numfiles &lt;span style="color:#ae81ff"&gt;10000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; RMTTRAIL ./dirdat/rt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; TABLE PUBLIC.TAB1;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;12. Add Trail and Start Extract/Pump
 &lt;div id="12-add-trail-and-start-extractpump" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#12-add-trail-and-start-extractpump" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ADD extract ext_pg, TRANLOG,BEGIN now
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; add exttrail ./dirdat/st,extract ext_pg,megabytes &lt;span style="color:#ae81ff"&gt;500&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; add extract pump_pg,exttrailsource ./dirdat/st
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; add rmttrail ./dirdat/rt,extract pump_pg,megabytes &lt;span style="color:#ae81ff"&gt;500&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; start ext_pg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; start pump_pg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;13. Configure defgen
 &lt;div id="13-configure-defgen" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#13-configure-defgen" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;If table structures are consistent, you can configure ASSUMETARGETDEFS.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;edit param defgen
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DEFSFILE ./dirdef/tab1.def, PURGE
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; SOURCEDB pgdsn, USERID pg, PASSWORD &lt;span style="color:#ae81ff"&gt;123456&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; TABLE PUBLIC.tab1;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Generate table definition file:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;defgen paramfile /oggpg/dirdef/tab1.prm&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Copy the defgen file to the target&amp;rsquo;s dirdef directory.&lt;/p&gt;

&lt;h4 class="relative group"&gt;14. Verify Trail Delivery on Target
 &lt;div id="14-verify-trail-delivery-on-target" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#14-verify-trail-delivery-on-target" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;oracle@lzl dirdat&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ cd dirdat
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;oracle@lzl dirdat&lt;span style="color:#f92672"&gt;]&lt;/span&gt;$ ll
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; -rw-r----- &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; pg pg &lt;span style="color:#ae81ff"&gt;1439&lt;/span&gt; Feb &lt;span style="color:#ae81ff"&gt;28&lt;/span&gt; 11:02 rt000000000&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;15. Register Extract Process on PG
 &lt;div id="15-register-extract-process-on-pg" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#15-register-extract-process-on-pg" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;Registering an extract process on PG creates a replication slot:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node1 as postgres@pgdsn&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 6&amp;gt; Register Extract ext_pg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2020-07-22 03:25:27 INFO OGG-25355 Successfully created replication slot &lt;span style="color:#e6db74"&gt;&amp;#39;ext_pg_2947c06e0ea2ec74&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; EXTRACT group &lt;span style="color:#e6db74"&gt;&amp;#39;EXT_PG&amp;#39;&lt;/span&gt; in database &lt;span style="color:#e6db74"&gt;&amp;#39;test&amp;#39;&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;16. Configure Oracle User Environment Variables
 &lt;div id="16-configure-oracle-user-environment-variables" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#16-configure-oracle-user-environment-variables" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export ORACLE_BASE&lt;span style="color:#f92672"&gt;=&lt;/span&gt;/oracle/app/oracle
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; export ORACLE_HOME&lt;span style="color:#f92672"&gt;=&lt;/span&gt;$ORACLE_BASE/product/11.2.0/dbhome_1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; export ORACLE_SID&lt;span style="color:#f92672"&gt;=&lt;/span&gt;oralzl
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; export OGG_HOME&lt;span style="color:#f92672"&gt;=&lt;/span&gt;/oggfororacle
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; export PATH&lt;span style="color:#f92672"&gt;=&lt;/span&gt;$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; export TNS_ADMIN&lt;span style="color:#f92672"&gt;=&lt;/span&gt;$ORACLE_HOME/network/admin
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; export LD_LIBRARY_PATH&lt;span style="color:#f92672"&gt;=&lt;/span&gt;$ORACLE_HOME/lib:$OGG_HOME:$ORACLE_HOME/lib32:/lib/usr/lib:/usr/local/lib&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;17. Configure Oracle Listener and TNS
 &lt;div id="17-configure-oracle-listener-and-tns" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#17-configure-oracle-listener-and-tns" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;OGG for Oracle defaults to using TNS_ADMIN&amp;rsquo;s tns.
You can also manually configure during extract configuration, e.g.: &lt;code&gt;USERID goldengate@127.0.0.1:1521/oralzl, PASSWORD 123456&lt;/code&gt;&lt;/p&gt;

&lt;h4 class="relative group"&gt;18. Install OGG for Oracle on Target
 &lt;div id="18-install-ogg-for-oracle-on-target" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#18-install-ogg-for-oracle-on-target" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;Download OGG software.
Configure oggcore.rsp file:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;oracle.install.responseFileVersion&lt;span style="color:#f92672"&gt;=&lt;/span&gt;/home/oracle/oggcore.rsp
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;INSTALL_OPTION&lt;span style="color:#f92672"&gt;=&lt;/span&gt;ORA11g
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SOFTWARE_LOCATION&lt;span style="color:#f92672"&gt;=&lt;/span&gt;/ogg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;START_MANAGER&lt;span style="color:#f92672"&gt;=&lt;/span&gt;false
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MANAGER_PORT&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;7809&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DATABASE_LOCATION&lt;span style="color:#f92672"&gt;=&lt;/span&gt;/oracle/db/11.2.0.4
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;INVENTORY_LOCATION&lt;span style="color:#f92672"&gt;=&lt;/span&gt;/oracle/oraInventory
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;UNIX_GROUP_NAME&lt;span style="color:#f92672"&gt;=&lt;/span&gt;oinstall&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Silent install OGG:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;./runInstaller -silent -nowait -responseFile /home/oracle/oggcore.rsp&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;19. Oracle Database User and Privileges
 &lt;div id="19-oracle-database-user-and-privileges" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#19-oracle-database-user-and-privileges" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;create user goldengate identified by &lt;span style="color:#e6db74"&gt;&amp;#34;123456&amp;#34;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant create session,alter session to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant alter system to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant resource to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant connect to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; any dictionary to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant flashback any table to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; any table to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; any table to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant insert any table to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant update any table to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant delete any table to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; on dba_clusters to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant execute on dbms_flashback to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant create table to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant create sequence to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant alter any table to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant dba to goldengate;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; grant lock any table to goldengate;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;20. Target Manager Process
 &lt;div id="20-target-manager-process" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#20-target-manager-process" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;edit param mgr
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PORT &lt;span style="color:#ae81ff"&gt;7809&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; DYNAMICPORTLIST 7810-7980
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS, MINKEEPDAYS &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; PURGEDDLHISTORY MINKEEPDAYS 7, MAXKEEPDAYS &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; LAGREPORTHOURS &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; LAGINFOMINUTES &lt;span style="color:#ae81ff"&gt;30&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; LAGCRITICALMINUTES &lt;span style="color:#ae81ff"&gt;45&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;start mgr&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;21. Configure Replicat Process on Target
 &lt;div id="21-configure-replicat-process-on-target" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#21-configure-replicat-process-on-target" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node2&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 8&amp;gt; dblogin userid goldengate@127.0.0.1:1521/oralzl,password &lt;span style="color:#ae81ff"&gt;123456&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GGSCI &lt;span style="color:#f92672"&gt;(&lt;/span&gt;node2 as postgres@pgdsn&lt;span style="color:#f92672"&gt;)&lt;/span&gt; 9&amp;gt; add checkpointtable goldengate.chkt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Successfully created checkpoint table public.chkt.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Replicat process:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; edit param rep_pg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;REPLICAT rep_pg
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; USERID goldengate@127.0.0.1:1521/oralzl, PASSWORD &lt;span style="color:#ae81ff"&gt;123456&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; SOURCEDEFS ./dirdef/tab1.def
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; MAP public.tab1, TARGET oralzl.tab1; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;add replicat rep_pg,exttrail ./dirdat/rt,checkpointtable goldengate.chkt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; start rep_pg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;22. Test Sync
 &lt;div id="22-test-sync" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#22-test-sync" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[postgres&lt;span style="color:#f92672"&gt;@&lt;/span&gt;node1 &lt;span style="color:#f92672"&gt;~&lt;/span&gt;]&lt;span style="color:#960050;background-color:#1e0010"&gt;$&lt;/span&gt; psql
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;postgres&lt;span style="color:#f92672"&gt;=#&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;c&lt;/span&gt; lzldb
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;test&lt;span style="color:#f92672"&gt;=#&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;d tab1;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;​&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;Table&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;public.tab1&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;Column&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;Type&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;Collation&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;Nullable&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;Default&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--------+-----------------------+-----------+----------+---------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; id &lt;span style="color:#f92672"&gt;|&lt;/span&gt; integer &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;not&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;null&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; name &lt;span style="color:#f92672"&gt;|&lt;/span&gt; character varying(&lt;span style="color:#ae81ff"&gt;20&lt;/span&gt;) &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Indexes:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;t1_pkey&amp;#34;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;PRIMARY&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;KEY&lt;/span&gt;, btree (id)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;lzldb&lt;span style="color:#f92672"&gt;=#&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;insert&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;into&lt;/span&gt; t2 &lt;span style="color:#66d9ef"&gt;values&lt;/span&gt;(&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#39;lzl1&amp;#39;&lt;/span&gt;) ;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;INSERT&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;lzldb&lt;span style="color:#f92672"&gt;=#&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; t2;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; id &lt;span style="color:#f92672"&gt;|&lt;/span&gt; name 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;----+------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; lzl1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[postgres&lt;span style="color:#f92672"&gt;@&lt;/span&gt;node2 &lt;span style="color:#f92672"&gt;~&lt;/span&gt;]&lt;span style="color:#960050;background-color:#1e0010"&gt;$&lt;/span&gt;sqlplus &lt;span style="color:#f92672"&gt;/&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;as&lt;/span&gt; sysdba
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;SQL&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; oralzl.tab1; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;​&lt;/span&gt; id name 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;---------- ----------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;​&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; lzl1 &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;blockquote&gt;&lt;p&gt;Original link: &lt;a href="https://lastdba.com/2024/08/13/ogg" target="_blank" rel="noreferrer"&gt;https://lastdba.com/2024/08/13/ogg&lt;/a&gt;搭建pg-oracle同步实操步骤/&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded></item><item><title>Getting Started with HikariCP Connection Pool</title><link>https://lastdba.com/en/2024/08/12/getting-started-with-hikaricp-connection-pool/</link><pubDate>Mon, 12 Aug 2024 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2024/08/12/getting-started-with-hikaricp-connection-pool/</guid><description>&lt;h2 class="relative group"&gt;A Brief Introduction to HikariCP
 &lt;div id="a-brief-introduction-to-hikaricp" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#a-brief-introduction-to-hikaricp" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&amp;ldquo;Hikari&amp;rdquo; means &amp;ldquo;light&amp;rdquo; in Japanese — HikariCP aims to be a Connection Pool as light and fast as light. This nearly Java-only middleware connection pool is extremely lightweight and performance-focused. HikariCP is now the default connection pool for Spring Boot, and with the proliferation of Spring Boot and microservices, HikariCP usage continues to grow.&lt;/p&gt;
&lt;p&gt;On the HikariCP GitHub homepage, there&amp;rsquo;s a performance comparison:



&lt;img src="https://lastdba.com/img/csdn/3da983db32ca.png" alt="在这里插入图片描述" /&gt;
（https://github.com/brettwooldridge/HikariCP-benchmark）&lt;/p&gt;</description><content:encoded>
&lt;h2 class="relative group"&gt;A Brief Introduction to HikariCP
 &lt;div id="a-brief-introduction-to-hikaricp" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#a-brief-introduction-to-hikaricp" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&amp;ldquo;Hikari&amp;rdquo; means &amp;ldquo;light&amp;rdquo; in Japanese — HikariCP aims to be a Connection Pool as light and fast as light. This nearly Java-only middleware connection pool is extremely lightweight and performance-focused. HikariCP is now the default connection pool for Spring Boot, and with the proliferation of Spring Boot and microservices, HikariCP usage continues to grow.&lt;/p&gt;
&lt;p&gt;On the HikariCP GitHub homepage, there&amp;rsquo;s a performance comparison:



&lt;img src="https://lastdba.com/img/csdn/3da983db32ca.png" alt="在这里插入图片描述" /&gt;
（https://github.com/brettwooldridge/HikariCP-benchmark）&lt;/p&gt;
&lt;p&gt;It appears to crush all other database connection pool middleware. However, this performance comparison is somewhat dated and lacks a comparison with Alibaba&amp;rsquo;s homegrown pinnacle connection pool, Druid. I briefly checked &lt;a href="https://github.com/alibaba/druid" target="_blank" rel="noreferrer"&gt;Druid&amp;rsquo;s&lt;/a&gt; GitHub page — it actually has slightly more stars than HikariCP. Druid is clearly stronger in terms of functionality. As for which has better performance, it even sparked &lt;a href="https://github.com/brettwooldridge/hikaricp/issues/232" target="_blank" rel="noreferrer"&gt;a spat between experts&lt;/a&gt;, and I haven&amp;rsquo;t seen any rigorous performance comparison report yet. But that&amp;rsquo;s not the focus of this article&amp;hellip; this article is just to get a basic understanding of HikariCP.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Key Connection Pool Parameters
 &lt;div id="key-connection-pool-parameters" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#key-connection-pool-parameters" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;There aren&amp;rsquo;t that many parameters. Let&amp;rsquo;s pick the important ones:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Parameter&lt;/th&gt;
 &lt;th&gt;Meaning&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;minimumIdle&lt;/td&gt;
 &lt;td&gt;This property controls the minimum number of idle connections HikariCP tries to maintain in the pool. If the number of idle connections drops below this value and the total number of connections in the pool is less than maximumPoolSize, HikariCP will do its best to quickly and efficiently add additional connections. However, for maximum performance and responsiveness to peak demand, we recommend not setting this value and instead letting HikariCP act as a fixed-size connection pool. Default: same as maximumPoolSize.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;maximumPoolSize&lt;/td&gt;
 &lt;td&gt;This property controls the maximum size the pool can reach, including both idle and in-use connections. Basically, this value determines the upper limit of actual connections to the database backend. A reasonable value is best determined by your execution environment. When the pool reaches this size and no idle connections are available, calls to getConnection() will block until timeout after connectionTimeout milliseconds. Default: 10&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;maxLifetime&lt;/td&gt;
 &lt;td&gt;This property controls the maximum lifetime of connections in the pool. A connection in use will never be retired — it is only removed when closed. To avoid mass connection eviction in the pool, this property applies a slight negative attenuation to each connection. We strongly recommend setting this value, and it should be a few seconds shorter than any database or infrastructure-imposed connection time limit. A value of 0 means no maximum lifetime (infinite lifetime), subject to idleTimeout constraints. Minimum allowed: 30000ms (30 seconds). Default: 1800000 (30 minutes).&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;idleTimeout&lt;/td&gt;
 &lt;td&gt;This property controls the maximum time a connection is allowed to sit idle in the pool. This setting only applies when minimumIdle is defined as less than maximumPoolSize. Once the pool reaches minimumIdle connections, idle connections are not retired. Whether a connection is considered idle and retired has a maximum variation of +30 seconds, with an average variation of +15 seconds. A connection is never considered idle and retired before this timeout. A value of 0 means idle connections are never removed from the pool. Minimum allowed: 10000ms (10 seconds). Default: 600000 (10 minutes).&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;keepaliveTime&lt;/td&gt;
 &lt;td&gt;This property controls how frequently HikariCP will attempt to keep a connection alive to prevent it from timing out due to database or network infrastructure. This value must be less than maxLifetime. The &amp;ldquo;keepalive&amp;rdquo; operation only occurs on idle connections. Minimum allowed: 30000ms (30 seconds), but the ideal value is in the range of a few minutes. Default: 0 (disabled).&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The keepaliveTime parameter should be set lower than the database idle connection timeout, TCP idle connection timeout, and all other infrastructure idle timeouts. For PostgreSQL, HikariCP&amp;rsquo;s keepaliveTime should be set to less than PG&amp;rsquo;s &lt;code&gt;idle_in_transaction_session_timeout&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Clearly, maximumPoolSize represents the maximum number of connections to the database. Of course, in general, the actual number of connections in the database won&amp;rsquo;t always stay at maximumPoolSize because the application can&amp;rsquo;t run at peak load from start to finish. Even after a request peak passes, those idle connections should be released after some time according to idleTimeout or maxLifetime settings. To ensure database availability, this value should be set somewhat lower than the database&amp;rsquo;s maximum connections. For PostgreSQL, maximumPoolSize should be set to less than PG&amp;rsquo;s &lt;code&gt;max_connections&lt;/code&gt;. There&amp;rsquo;s room for tuning this parameter, which we&amp;rsquo;ll discuss below.&lt;/p&gt;
&lt;p&gt;minimumIdle is the minimum number of idle connections. For example, if minimumIdle=100 and the database has 10 active sessions, theoretically the total connections in the database should be 100+10. Due to possible connection storms, the actual database connections might be slightly more than active+minimumIdle, but certainly less than maximumPoolSize.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Why are database connections far greater than minimumIdle?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Theoretically, total database connections should only be slightly more than minimumIdle. However, from my actual observation of multi-node connection pool scenarios, even with only 10+ active connections, total database connections far exceed minimumIdle. Observing min(backend_start) and min(state_change) in pg_stat_activity, they stay around maxLifetime, indicating that connection recycling is working. It seems new requests always prefer to establish new connections rather than reuse existing idle ones. Personally, I suspect multi-node deployment is one reason — each node has a low minimumIdle, and some component nodes may have more requests, with instantaneous request counts exceeding minimumIdle, thus creating new connections. Second, it&amp;rsquo;s related to the maxLifetime parameter — maxLifetime&amp;rsquo;s purpose is to rotate connections, releasing those constantly in use. This means used connections need time to be released and ideally shouldn&amp;rsquo;t be reused to avoid extending the release cycle.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Connection Pool Sizing
 &lt;div id="connection-pool-sizing" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#connection-pool-sizing" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;

&lt;h3 class="relative group"&gt;Impact of Excessive Connections
 &lt;div id="impact-of-excessive-connections" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#impact-of-excessive-connections" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;In the database world, &amp;ldquo;as the number of database connections increases, database performance always degrades to some extent.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;For example, Oracle&amp;rsquo;s connection count impact on performance — refer to &lt;a href="https://www.youtube.com/watch?v=_C77sBcAtSQ" target="_blank" rel="noreferrer"&gt;this video&lt;/a&gt;. With unchanged resource configuration and JDBC concurrency, reducing connections from 2048 to 1024 halved the request response time; reducing to 96 connections dropped response time by tens of times!&lt;/p&gt;

&lt;h3 class="relative group"&gt;What&amp;rsquo;s the Right Number of Connections?
 &lt;div id="whats-the-right-number-of-connections" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#whats-the-right-number-of-connections" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;blockquote&gt;&lt;p&gt;Unless you have a database server that has 1000 cores, it is very unlikely that you really want a maximumPoolSize of 2000.&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;Unless your database has 1000 cores, you shouldn&amp;rsquo;t have 2000 connections.&lt;/p&gt;
&lt;p&gt;At the most basic level, the database connection count should be set to the number of CPU cores — this achieves maximum CPU performance mode. But this isn&amp;rsquo;t the full picture. Database consumption isn&amp;rsquo;t just on CPU, but also on disk and network (memory too, but with relatively less impact). For example, disk reads/writes also take time, and the CPU must wait for disk data to return before proceeding. During I/O wait periods (which can be quite long), it&amp;rsquo;s better for the CPU not to be idle but to serve other processes. Therefore, based on waiting times for disk and other devices, the database connection count should ideally be higher than the number of CPU cores.&lt;/p&gt;
&lt;p&gt;Due to SSD and other disk performance improvements, disk access is now very fast — meaning I/O wait times have decreased, implying connection counts should be tuned even lower.&lt;/p&gt;
&lt;p&gt;Tuning too low fails to fully utilize CPU; tuning too high degrades database performance. So what&amp;rsquo;s the right number? HikariCP provides this formula:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;connections = ((core_count * 2) + effective_spindle_count)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Where core_count should not count hyperthreading; effective_spindle_count is the spindle count — if the active dataset is fully cached, effective_spindle_count is zero; as cache hit rate decreases, it should approach the actual spindle count. There&amp;rsquo;s no established formula for SSDs yet, but it&amp;rsquo;s certainly less than the above maximum. Of course, these are all theoretical values — real-world situations are more complex, e.g., long connection issues. See &lt;a href="https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing" target="_blank" rel="noreferrer"&gt;About Pool Sizing&lt;/a&gt; for details.&lt;/p&gt;
&lt;p&gt;Even with 10,000 frontend users, the connection pool cannot be 10,000 — even 1,000 is too many. A smaller connection count, with remaining requests waiting in the pool queue, is the best way to maximize database and CPU performance. See the formula above for connection count settings.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Fixed Pool
 &lt;div id="fixed-pool" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#fixed-pool" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Fixed pool is a concept advocated by HikariCP&amp;rsquo;s author Brett Wooldridge to solve the connection storm problem. The concept is already mentioned in the minimumIdle parameter description:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;For maximum performance and responsiveness to peak demand, we recommend not setting minimumIdle and instead letting HikariCP act as a fixed-size connection pool. Default: same as maximumPoolSize.&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;Setting minimumIdle=maximumPoolSize creates a fixed-size connection pool. minimumIdle&amp;rsquo;s default value equals maximumPoolSize.&lt;/p&gt;
&lt;p&gt;As early as 2014, Brett Wooldridge mentioned this concept — see the &lt;a href="https://www.postgresql.org/message-id/DF286FBF-D1F5-4A10-88AD-EDD5D2AFAABD%40gmail.com" target="_blank" rel="noreferrer"&gt;PG community mailing list&lt;/a&gt;. This passage is important, so I&amp;rsquo;ll translate it verbatim:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;In my experience, even pools that maintain a minimum number of idle connections are problematic in responding to burst demand. If you have a pool with a maximum of 30 connections and a target of 10 minimum idle connections, a burst demand requiring 20 connections means the pool can immediately satisfy 10, but then must try to establish another 10 connections before the application&amp;rsquo;s connection request reaches connectionTimeout. This in turn creates burst demand on the database, slowing down not just connection establishment itself but also transactions that might actually be returning connections to the pool.&lt;/p&gt;
&lt;p&gt;Now, if your peak is 100 connections and your median is 50, this doesn&amp;rsquo;t matter. But I know many workloads where the peak is 1000 and the median is 25 — in such cases you&amp;rsquo;d want to gradually reduce idle connections.&lt;/p&gt;
&lt;p&gt;Ultimately, we adopted a maxPoolSize + minIdle model, where by default they are equal (fixed pool).&lt;/p&gt;
&lt;p&gt;While I don&amp;rsquo;t doubt that such workloads (1000 active connections) exist, if someone is actually doing this, I&amp;rsquo;d love to hear their reasoning. Unless they have over 128 CPU cores and solid-state storage, they&amp;rsquo;re basically wasting effort.&lt;/p&gt;
&lt;p&gt;This also means that even if the pool size is fixed, you want to rotate actual sessions in and out so they don&amp;rsquo;t hang onto maximum virtual memory indefinitely.&lt;/p&gt;
&lt;p&gt;We do this with a maxLifeTime setting to rotate these connections.&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;In real scenarios, fixed pool&amp;rsquo;s protection against connection storm impact is visible. Under fixed pool, when the database&amp;rsquo;s instantaneous active connections spike, the idle connection count drops but the total connection count remains unchanged, and request response time is minimally affected. If maximumPoolSize is set to a value higher than minimumIdle, a connection storm can cause many new sessions to be created instantly, and new session creation is very resource-intensive — this significantly increases request response time.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Connection Leak Case Study
 &lt;div id="connection-leak-case-study" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#connection-leak-case-study" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Since I&amp;rsquo;m not a connection pool expert, I&amp;rsquo;ll just summarize some recently found connection leak information here.&lt;/p&gt;
&lt;p&gt;Connection leaks exhibit the following symptoms:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;Connection is not available&amp;rdquo; exception. Connection leaks, pool saturation, or the database being overwhelmed by excessive active sessions — new requests error out after exceeding &lt;code&gt;connectionTimeout&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Growth of active connections. Database monitoring clearly shows an increase in active sessions.&lt;/li&gt;
&lt;li&gt;Application logs. Application logs also show many connection requests, including active session information.&lt;/li&gt;
&lt;li&gt;Database views and logs. &lt;code&gt;pg_stat_activity&lt;/code&gt; shows all session states and specific SQL, and logs show new connection authentication information.&lt;/li&gt;
&lt;li&gt;HikariCP leak detection. Requires enabling &lt;code&gt;leakDetectionThreshold&lt;/code&gt;. HikariCP can detect connection leaks — this parameter is off by default.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For locating connection leaks, you should:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check application logs, especially around the time the problem first occurred.&lt;/li&gt;
&lt;li&gt;Have a proper monitoring system.&lt;/li&gt;
&lt;li&gt;Be proficient with debug, trace, and other HikariCP settings.&lt;/li&gt;
&lt;li&gt;Set the &lt;code&gt;leakDetectionThreshold&lt;/code&gt; parameter.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Possible causes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Misuse of streaming responses;&lt;/li&gt;
&lt;li&gt;Misuse of raw connections;&lt;/li&gt;
&lt;li&gt;Prolonged operations within &lt;code&gt;@Transactional&lt;/code&gt; method (such as network invocation).&lt;/li&gt;
&lt;li&gt;Configuration errors, &lt;a href="https://mkyong.com/jdbc/hikaripool-1-connection-is-not-available-request-timed-out-after-30002ms/" target="_blank" rel="noreferrer"&gt;reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Virtual threads, &lt;a href="https://github.com/brettwooldridge/HikariCP/issues/2151" target="_blank" rel="noreferrer"&gt;reference&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 class="relative group"&gt;References
 &lt;div id="references" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#references" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/brettwooldridge/HikariCP" target="_blank" rel="noreferrer"&gt;https://github.com/brettwooldridge/HikariCP&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/brettwooldridge/HikariCP/issues/2148" target="_blank" rel="noreferrer"&gt;https://github.com/brettwooldridge/HikariCP/issues/2148&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing" target="_blank" rel="noreferrer"&gt;https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blogs.oracle.com/opal/post/always-use-connection-pools" target="_blank" rel="noreferrer"&gt;https://blogs.oracle.com/opal/post/always-use-connection-pools&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://mkyong.com/jdbc/hikaripool-1-connection-is-not-available-request-timed-out-after-30002ms/" target="_blank" rel="noreferrer"&gt;https://mkyong.com/jdbc/hikaripool-1-connection-is-not-available-request-timed-out-after-30002ms/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://medium.com/@eremeykin/how-to-deal-with-hikaricp-connection-leaks-part-1-1eddc135b464" target="_blank" rel="noreferrer"&gt;https://medium.com/@eremeykin/how-to-deal-with-hikaricp-connection-leaks-part-1-1eddc135b464&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://medium.com/@eremeykin/how-to-deal-with-hikaricp-connection-leaks-part-2-847a9629627f" target="_blank" rel="noreferrer"&gt;https://medium.com/@eremeykin/how-to-deal-with-hikaricp-connection-leaks-part-2-847a9629627f&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title>History of Transactions and SSI — PostgreSQL Database Technology Summit Chengdu Stop Sharing</title><link>https://lastdba.com/en/2024/08/12/history-of-transactions-and-ssi-postgresql-database-technology-summit-chengdu-stop-sharing/</link><pubDate>Mon, 12 Aug 2024 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2024/08/12/history-of-transactions-and-ssi-postgresql-database-technology-summit-chengdu-stop-sharing/</guid><description>&lt;h2 class="relative group"&gt;Preface
 &lt;div id="preface" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#preface" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;

&lt;h3 class="relative group"&gt;PostgreSQL Database Technology Summit Chengdu Stop
 &lt;div id="postgresql-database-technology-summit-chengdu-stop" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#postgresql-database-technology-summit-chengdu-stop" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Recently (June 17, 2023), the &amp;ldquo;PostgreSQL Database Technology Summit Chengdu Stop&amp;rdquo; organized by the PostgreSQL branch of the China Open Source Software Promotion Alliance was successfully held. I had the honor of participating as a speaker and gained a lot from it.



&lt;img src="https://lastdba.com/img/csdn/09a770e6512b.png" alt="Image" /&gt;&lt;/p&gt;
&lt;p&gt;(Summit review and all PPT downloads: &lt;a href="https://mp.weixin.qq.com/s/Gby7uHVV3bR-HvROZCg46Q" target="_blank" rel="noreferrer"&gt;PPT downloads are here | PostgreSQL Technology Summit Chengdu Stop Review&lt;/a&gt;)&lt;/p&gt;</description><content:encoded>
&lt;h2 class="relative group"&gt;Preface
 &lt;div id="preface" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#preface" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;

&lt;h3 class="relative group"&gt;PostgreSQL Database Technology Summit Chengdu Stop
 &lt;div id="postgresql-database-technology-summit-chengdu-stop" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#postgresql-database-technology-summit-chengdu-stop" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Recently (June 17, 2023), the &amp;ldquo;PostgreSQL Database Technology Summit Chengdu Stop&amp;rdquo; organized by the PostgreSQL branch of the China Open Source Software Promotion Alliance was successfully held. I had the honor of participating as a speaker and gained a lot from it.



&lt;img src="https://lastdba.com/img/csdn/09a770e6512b.png" alt="Image" /&gt;&lt;/p&gt;
&lt;p&gt;(Summit review and all PPT downloads: &lt;a href="https://mp.weixin.qq.com/s/Gby7uHVV3bR-HvROZCg46Q" target="_blank" rel="noreferrer"&gt;PPT downloads are here | PostgreSQL Technology Summit Chengdu Stop Review&lt;/a&gt;)&lt;/p&gt;

&lt;h3 class="relative group"&gt;My Sharing
 &lt;div id="my-sharing" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#my-sharing" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;My technical sharing topic was: &lt;strong&gt;Database History and SSI&lt;/strong&gt;.
I&amp;rsquo;ve noticed that many domestic technical blogs describe transactions inaccurately, which can confuse beginners. Additionally, many colleagues aren&amp;rsquo;t very familiar with transaction history and SSI in PostgreSQL. This time, I collected and summarized accurate definitions of transactions, transaction history, and SSI theoretical foundations from Wikipedia, official SQL standards, and various papers. The main thread of the sharing goes from transaction history to anomalies not present in the SQL-92 standard, to how these anomalies can be eliminated, gradually progressing to how SSI is implemented in PostgreSQL.
The entire sharing is divided into 4 parts: Transaction Fundamentals, Transaction History, SSI Theoretical Knowledge, and SSI in PostgreSQL.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Transaction Fundamentals
 &lt;div id="transaction-fundamentals" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#transaction-fundamentals" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Before understanding transaction history and SSI, let&amp;rsquo;s review and revisit some basic transaction knowledge. The entire chapter will revolve around discussing transactions, and basic transaction knowledge will lead into the problems in transaction history.&lt;/p&gt;

&lt;h3 class="relative group"&gt;What is a Transaction?
 &lt;div id="what-is-a-transaction" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-is-a-transaction" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Original meaning of transaction&lt;/strong&gt;: A transaction is an exchange, a deal. Exchange is the original meaning of transaction, and what we call transactions in databases comes from this word.
&lt;strong&gt;Database transaction&lt;/strong&gt;: &lt;em&gt;A transaction is the basic unit of work in a relational database&lt;/em&gt;. For example:
Deleting data from table A and inserting data into table B — we can wrap these two actions into one transaction. Both must complete. But due to unexpected factors, the transaction might fail or be canceled halfway through execution. In that case, all operations in the entire transaction must roll back to the state before the transaction — A doesn&amp;rsquo;t delete and B doesn&amp;rsquo;t insert.&lt;/p&gt;

&lt;h3 class="relative group"&gt;ACID
 &lt;div id="acid" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#acid" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;ACID is an important characteristic of database transactions. It determines whether a transaction is reliable and trustworthy.



&lt;img src="https://lastdba.com/img/csdn/cc73d604121e.png" alt="Image" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Atomicity&lt;/strong&gt;: All operations within a transaction either complete entirely or cancel entirely.
Like atoms in chemistry — indivisible and unsplittable. If a transaction encounters a problem midway and fails to execute, the entire transaction must roll back.
&lt;strong&gt;Consistency&lt;/strong&gt;: When a transaction completes, all data remains in a consistent state.
This definition is actually somewhat vague. Transactions generally operate on data, and the state of data in the database gets updated. Due to transaction operations, data transitions from one state to another. This state must be reasonable and legitimate — the data logic must be consistent with real-world logic. This might be abstract, so here&amp;rsquo;s an example: Say A has 100 yuan, B has 200 yuan, their combined total is 300 yuan. Now B transfers 100 yuan to A. Then A has 200 yuan, B has 100 yuan, and their combined total is still 300 yuan. Key point: &lt;em&gt;The data changes in this virtual world should remain consistent with real-world logic&lt;/em&gt;.
&lt;strong&gt;Isolation&lt;/strong&gt;: The result of executing multiple transactions concurrently must be the same as executing them separately one after another.
For example, with 2 transactions, executing them serially one after another must produce the same result as executing them in parallel. (This is the official understanding from Wikipedia and the definition in the SQL standard — please remember this definition, as it&amp;rsquo;s the focus of this article.)
&lt;strong&gt;Durability&lt;/strong&gt;: After a transaction completes, changes to data are permanent.
If updated data is placed in memory and disappears when the machine powers off, then it should go to disk. But is disk storage safe? What if the disk fails? We could have a high-availability architecture writing multiple copies of data. Extending further, we could have geographic-level disaster recovery. But if we push further — what if multiple regions all fail? From an architectural perspective, this question seems to have no answer. But from the &lt;em&gt;user&amp;rsquo;s perspective&lt;/em&gt;, it&amp;rsquo;s actually easier to understand. For example, when a user deposits money — they put the cash in, and their account should display that amount. This number is permanent for the user. The user believes that even if the sky falls, their account should have this number. That is the meaning of durability.&lt;/p&gt;

&lt;h3 class="relative group"&gt;ANSI SQL-92 Standard
 &lt;div id="ansi-sql-92-standard" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#ansi-sql-92-standard" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/41ff840d82af.png" alt="Image" /&gt;&lt;/p&gt;
&lt;p&gt;In 1992, the American National Standards Institute ANSI SQL-92 standard defined 4 isolation levels and 3 anomaly phenomena.
Although the database industry today mostly follows ISO international standards,



&lt;img src="https://lastdba.com/img/csdn/32fd2f2e70e0.png" alt="Image" /&gt;
this 1992 American standard had a huge impact on the database industry. I believe many database practitioners are familiar with the 4 isolation levels.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Isolation Levels in the SQL-92 Standard
 &lt;div id="isolation-levels-in-the-sql-92-standard" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#isolation-levels-in-the-sql-92-standard" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;ANSI SQL-92 defines 4 isolation levels:



&lt;img src="https://lastdba.com/img/csdn/7b6b2fd5d336.png" alt="Image" /&gt;
Transaction isolation levels from high to low. Notice Serializable: when all transactions in the system execute in parallel, there is no difference from executing them serially — transactions do not affect each other. Doesn&amp;rsquo;t this resemble the definition of Isolation in ACID?
All 4 isolation levels can satisfy all-or-nothing execution of transactions. They only differ in their definitions of isolation. All isolation levels can have atomicity, consistency, and durability, but different isolation levels have different isolation characteristics. &lt;strong&gt;By definition, only Serializable fully satisfies ACID&lt;/strong&gt;.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Anomaly Phenomena in the SQL-92 Standard
 &lt;div id="anomaly-phenomena-in-the-sql-92-standard" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#anomaly-phenomena-in-the-sql-92-standard" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;The SQL-92 standard defines 3 anomaly phenomena. There are many definitions online, but many are not entirely accurate. Here we directly extract the definitions of the 3 anomaly phenomena from the &lt;em&gt;SQL-92 standard document&lt;/em&gt;:&lt;/p&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/80b283e33a76.png" alt="Image" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dirty Read&lt;/strong&gt;: Transaction T1 updates a row. Transaction T2 can read this row before T1 commits. If T1 executes a rollback, T2 will have read a row that was never committed.
&lt;em&gt;Dirty reads have an obvious problem — the user may not know whether the money has actually arrived. Before the transaction completes, the user can query and see money transferred into the account, but if the transaction fails and rolls back for some reason, the money disappears again. This is hard for users to understand.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Non-repeatable Read&lt;/strong&gt;: Transaction T1 reads a row. Transaction T2 updates or deletes that row and commits. If T1 reads that row again, it will find the row has been changed or deleted.
&lt;strong&gt;Phantom Read&lt;/strong&gt;: Transaction T1 reads N rows matching certain conditions. Transaction T2 executes SQL that generates rows satisfying these conditions. When T1 reads again, it finds inconsistent row results.
&lt;em&gt;The difference between non-repeatable read and phantom read is: one is caused by other transactions updating or deleting leading to inconsistent reads within the same transaction; the other is caused by other transactions inserting leading to inconsistent reads within the same transaction.&lt;/em&gt;&lt;/p&gt;

&lt;h3 class="relative group"&gt;SQL-92 Standard and PostgreSQL
 &lt;div id="sql-92-standard-and-postgresql" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#sql-92-standard-and-postgresql" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/2784c3889598.png" alt="Image" /&gt;
In the SQL-92 standard, isolation levels and anomaly phenomena have a stepped relationship. Except for Serializable which has no anomalies, each isolation level adds anomaly phenomena step by step. Now let&amp;rsquo;s look at the following table — this is the isolation levels and anomaly phenomena in PostgreSQL, which is &lt;strong&gt;different&lt;/strong&gt; from the SQL-92 standard.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Why is PostgreSQL&amp;rsquo;s isolation level inconsistent with the SQL-92 standard?
 &lt;div id="why-is-postgresqls-isolation-level-inconsistent-with-the-sql-92-standard" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-is-postgresqls-isolation-level-inconsistent-with-the-sql-92-standard" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Why is Read Uncommitted inconsistent with the SQL-92 standard? Read Uncommitted is simply too strange. In relational databases, it&amp;rsquo;s hard to imagine a scenario for using Read Uncommitted. It severely violates transaction isolation. PostgreSQL treats &amp;ldquo;Read Uncommitted&amp;rdquo; as &amp;ldquo;Read Committed.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Why is Repeatable Read inconsistent with the SQL-92 standard? PostgreSQL implements MVCC (Multi-Version Concurrency Control) through snapshots. The Repeatable Read level in PostgreSQL is actually the Snapshot Isolation level, which doesn&amp;rsquo;t have the Phantom Read anomaly.&lt;/li&gt;
&lt;li&gt;Although the SQL-92 standard has far-reaching influence, many databases haven&amp;rsquo;t fully implemented it.&lt;/li&gt;
&lt;li&gt;The ANSI SQL-92 standard has vague definitions. The SQL-92 standard is very representative in the database industry — &lt;em&gt;&amp;ldquo;It&amp;rsquo;s good, but not good enough.&amp;rdquo;&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 class="relative group"&gt;Transaction History
 &lt;div id="transaction-history" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#transaction-history" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;

&lt;h3 class="relative group"&gt;History of Transactions
 &lt;div id="history-of-transactions" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#history-of-transactions" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;To understand &lt;em&gt;&amp;ldquo;It&amp;rsquo;s good, but not good enough,&amp;rdquo;&lt;/em&gt; we need to review transaction history, going back 40 years.



&lt;img src="https://lastdba.com/img/csdn/9510b3d76415.png" alt="Image" /&gt;
Notice the timing of the SQL-92 standard and the &amp;ldquo;Critique of SQL-92.&amp;rdquo; Although the SQL-92 standard was &amp;ldquo;flawed,&amp;rdquo; it still had a profound impact on the database industry. Subsequently, after many serializability theories were proven, PostgreSQL became the first commercial database to implement SSI.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Critique of the SQL-92 Standard
 &lt;div id="critique-of-the-sql-92-standard" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#critique-of-the-sql-92-standard" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Shortly after the SQL-92 standard was released, some Microsoft engineers and academics critiqued it and proposed more isolation levels and anomaly phenomena.
Where the SQL-92 standard defined 4 isolation levels and 3 anomaly phenomena, the &amp;ldquo;Critique of SQL-92&amp;rdquo; had 6 isolation levels and 8 anomaly phenomena.



&lt;img src="https://lastdba.com/img/csdn/9e1cc8e57c9e.png" alt="Image" /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More isolation levels and anomaly phenomena appeared — they were not defined in ANSI SQL-92.&lt;/li&gt;
&lt;li&gt;Snapshot Isolation sits between Repeatable Read and Serializable. This is also one of the reasons why PostgreSQL&amp;rsquo;s Repeatable Read and Serializable look so similar.&lt;/li&gt;
&lt;li&gt;The Write Skew anomaly was identified. It occurs at the Snapshot Isolation level.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Isolation Levels of Popular Databases
 &lt;div id="isolation-levels-of-popular-databases" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#isolation-levels-of-popular-databases" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/de1258812b3c.png" alt="Image" /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MySQL at Serializable isolation level: reads acquire shared read locks on data, meaning reads block writes.&lt;/li&gt;
&lt;li&gt;Oracle can also set the Serializable isolation level and claims to support serializability, but it&amp;rsquo;s not true serializability — it&amp;rsquo;s just Snapshot Isolation.&lt;/li&gt;
&lt;li&gt;PostgreSQL supports Serializable. It implements serializability on top of Snapshot Isolation, fully named Serializable Snapshot Isolation (SSI), where reads and writes do not block each other.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can see the differences among the three — only PostgreSQL&amp;rsquo;s Serializable has real substance.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Why Did Oracle Deceive Us?
 &lt;div id="why-did-oracle-deceive-us" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-did-oracle-deceive-us" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;What did Oracle deceive us about? It passed off the &lt;em&gt;Snapshot Isolation&lt;/em&gt; isolation level as the &lt;em&gt;Serializable&lt;/em&gt; isolation level.
Why did this happen?
If we add Snapshot Isolation to the ANSI SQL-92 standard:



&lt;img src="https://lastdba.com/img/csdn/88c0c04ad181.png" alt="Image" /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The SQL-92 standard defines fewer anomaly phenomena and doesn&amp;rsquo;t define Snapshot Isolation. By the SQL-92 standard&amp;rsquo;s view, Snapshot Isolation looks similar to Serializable.&lt;/li&gt;
&lt;li&gt;Most relational databases follow the SQL-92 standard, including Oracle. But when better standards later emerged, they didn&amp;rsquo;t make changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Why Do Weak Isolation Levels Have Academic Problems but Few Serious Real-World Issues?
 &lt;div id="why-do-weak-isolation-levels-have-academic-problems-but-few-serious-real-world-issues" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-do-weak-isolation-levels-have-academic-problems-but-few-serious-real-world-issues" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Anomaly phenomena at non-serializable isolation levels generally require high concurrency to manifest. Low-concurrency databases are unlikely to encounter problems.&lt;/li&gt;
&lt;li&gt;When anomaly phenomena do occur, some applications may not notice them, or may detect anomalies but find them unimportant.&lt;/li&gt;
&lt;li&gt;Data might be anomalous, but the application simply returns an error and enters an anomaly handling routine.&lt;/li&gt;
&lt;li&gt;Costs are too high. Not only is the development cost of database serializable isolation levels high, but applications also need adaptation costs for serializability. Just understanding this complex theory is no easy task.&lt;/li&gt;
&lt;li&gt;High-level isolation loses some performance. Extensive modification work may be thankless — applications need to choose between &amp;ldquo;high concurrency&amp;rdquo; and &amp;ldquo;no anomaly phenomena.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Businesses develop based on mechanisms rather than rules. Businesses somewhat adapt to the anomaly phenomena of weak isolation levels, especially Read Committed.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 class="relative group"&gt;What&amp;rsquo;s the Point of Serializable?
 &lt;div id="whats-the-point-of-serializable" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#whats-the-point-of-serializable" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;If weak isolation seems to work fine in the real world, what&amp;rsquo;s the point of Serializable? There is actually a point:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Although applications adapt to weak isolation levels, it doesn&amp;rsquo;t mean they truly understand them.&lt;/li&gt;
&lt;li&gt;Using Serializable, applications can greatly reduce concerns about data anomalies.&lt;/li&gt;
&lt;li&gt;Except for Serializable, all other isolation levels have their own anomaly phenomena and don&amp;rsquo;t fully satisfy ACID&amp;rsquo;s Isolation property.&lt;/li&gt;
&lt;li&gt;Serializable can eliminate anomaly phenomena — the &amp;ldquo;termites&amp;rdquo; — fully ensuring data safety.&lt;/li&gt;
&lt;li&gt;Serializable has been proven theoretically achievable.&lt;/li&gt;
&lt;li&gt;Some serializable implementations do significantly reduce concurrency, but there are other implementations with minimal concurrency impact. For example, Serializable Snapshot Isolation (SSI).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 class="relative group"&gt;SSI Theoretical Knowledge
 &lt;div id="ssi-theoretical-knowledge" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#ssi-theoretical-knowledge" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;After all that about transaction fundamentals and history, we finally arrive at the concept of SSI. But before understanding SSI, we need to understand two more concepts: Serializable and Snapshot Isolation.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Serializable
 &lt;div id="serializable" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#serializable" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/71f922c0363f.png" alt="Image" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Meaning of Serializable&lt;/strong&gt;
If each transaction itself is correct (satisfying certain integrity conditions), then any serial schedule including these transactions is correct (its transactions still satisfy their conditions): &amp;ldquo;Serial&amp;rdquo; means transactions don&amp;rsquo;t overlap in time and cannot interfere with each other — i.e., there exists complete isolation between them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Implementation of Serializable&lt;/strong&gt;
In early transaction development, Serializable was implemented through Strict Two-Phase Locking (S2PL), where reads and writes block each other until the transaction ends. This eliminated anomaly phenomena but S2PL lost high performance.
Besides S2PL, there are other ways to achieve serializability, such as Serializable Snapshot Isolation (SSI).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Significance of Serializable&lt;/strong&gt;
To ensure no anomalies, Serializable sacrifices some concurrency (varying by implementation approach), but it truly guarantees ACID isolation for data. That is to say, databases that haven&amp;rsquo;t implemented serializability don&amp;rsquo;t fully support ACID properties.
Serializable has been proven theoretically achievable, but the real database world is somewhat &amp;ldquo;abnormal.&amp;rdquo; In practice, Serializable is the highest transaction isolation level and is strongly recommended by academics and industry leaders, yet the vast majority of databases run at Read Committed or Snapshot Isolation levels.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Snapshot Isolation
 &lt;div id="snapshot-isolation" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#snapshot-isolation" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Definition of Snapshot Isolation&lt;/strong&gt;
Transactions executing under Snapshot Isolation operate on a snapshot of the database taken at the start of the transaction. When the transaction ends, it will only commit successfully if the values it updated haven&amp;rsquo;t been externally changed since the snapshot was taken.
As the name implies, Snapshot Isolation uses snapshots, which are widely used to implement MVCC, enabling multi-version concurrency mechanisms to support concurrent transaction execution by users.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Emergence of Snapshot Isolation&lt;/strong&gt;
ANSI SQL-92 did not define Snapshot Isolation (SI). This isolation level emerged as the database industry evolved. The 1992 ANSI SQL-92 standard was defined based on database locks, so there was no definition for the Snapshot Isolation level. It wasn&amp;rsquo;t proposed until the 1995 &amp;ldquo;Critique&amp;rdquo; appeared.&lt;/p&gt;

&lt;h3 class="relative group"&gt;SSI
 &lt;div id="ssi" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#ssi" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/8142817784c7.png" alt="Image" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Serializable Snapshot Isolation (SSI)&lt;/strong&gt;
Given the widespread use of Snapshot Isolation and the academic goal that databases should achieve the Serializable isolation level, Serializable Snapshot Isolation (SSI), as the name suggests, implements serializability on top of Snapshot Isolation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why SSI?&lt;/strong&gt;
Due to the vagueness of the ANSI SQL-92 standard, although it didn&amp;rsquo;t define Snapshot Isolation, many databases actually use it. And Snapshot Isolation also has some anomaly phenomena (including Write Skew). SSI emerged to address these anomaly phenomena.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Advantages of SSI over S2PL&lt;/strong&gt;
Traditional serializability is implemented through S2PL. Under S2PL, write operations block other transactions&amp;rsquo; reads and writes. Although it achieves serializability without Write Skew anomalies, it generates many lock conflicts, reducing concurrency performance. In contrast, MVCC implemented through snapshots has non-blocking reads and writes, with only write-write conflicts. SSI built on this foundation has much less impact on concurrency compared to traditional S2PL.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PostgreSQL Implements SSI&lt;/strong&gt;
PostgreSQL began implementing SSI in version 9.1, becoming the first commercial database to implement SSI.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Three Types of Dependencies
 &lt;div id="three-types-of-dependencies" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#three-types-of-dependencies" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/bd6547d3dd94.png" alt="Image" /&gt;
&lt;strong&gt;Read-Write Dependency (wr):&lt;/strong&gt; Transaction T1 writes a version of a data item, and transaction T2 reads this version, meaning T1 precedes T2.
&lt;strong&gt;Write-Write Dependency (ww):&lt;/strong&gt; Transaction T1 writes a version of a data item, and transaction T2 replaces this version with a new one, meaning T1 precedes T2.
&lt;strong&gt;Read-Write Anti-dependency (rw):&lt;/strong&gt; Transaction T1 writes a version of a data item, and transaction T2 reads the version before this one, meaning T2 precedes T1.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Write Skew Theory
 &lt;div id="write-skew-theory" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#write-skew-theory" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;When certain conflicts form a cycle, serialization anomalies occur. That is to say, some concurrently executing transactions are theoretically non-serializable. One of the more easily understood examples is Write Skew.
Write skew only occurs in the rw model — ww and wr won&amp;rsquo;t cause write skew — and transactions must be under concurrent conditions for it to appear.&lt;/p&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/30043eef5317.png" alt="Image" /&gt;
Simple Write Skew: Transaction T1 has an rw anti-dependency on T2, and T2 also has an rw anti-dependency on T1. The concurrent execution of these two transactions is non-serializable.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Real-World Write Skew Problems
 &lt;div id="real-world-write-skew-problems" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#real-world-write-skew-problems" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Many real-world cases can produce Write Skew anomalies. Let&amp;rsquo;s use the classic black-and-white ball problem to understand Write Skew:



&lt;img src="https://lastdba.com/img/csdn/4dada0644aac.png" alt="Image" /&gt;
There are 4 balls in a bag: 2 white and 2 black. Now there are two transactions, P and Q. P changes all black balls to white, Q changes all white balls to black. There can be two serial executions: &amp;lt;P, Q&amp;gt; or &amp;lt;Q, P&amp;gt;. In both cases, the final result is 4 white balls or 4 black balls.
&lt;strong&gt;However&lt;/strong&gt;, Snapshot Isolation allows another result:
Transaction P takes out 2 black balls
Transaction Q takes out 2 white balls
Transaction P changes all black balls in hand to white and puts them back
Transaction Q changes all white balls in hand to black and puts them back
Now the bag still has 2 black balls and 2 white balls. This is impossible in any serial execution.
But this is valid under Snapshot Isolation: each transaction maintains a consistent view of the database, and its write set doesn&amp;rsquo;t overlap with any concurrent transaction&amp;rsquo;s write set, resulting in the white and black balls exchanging.&lt;/p&gt;
&lt;p&gt;We can also make the problem more concrete and practical. Here&amp;rsquo;s a rough example: Suppose I have several bank cards, half frozen and half unfrozen. At one terminal, I execute freezing all cards. At another terminal, I immediately execute unfreezing all cards. From an intent perspective, my cards should all be unfrozen. But a strange phenomenon occurs: previously frozen cards become unfrozen, and previously unfrozen cards become frozen. As a customer, I would be confused.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The black-and-white ball problem illustrates&lt;/strong&gt;: Snapshot Isolation execution results are inconsistent with Serializable execution results. Under Snapshot Isolation, a Write Skew anomaly occurs, and data results don&amp;rsquo;t match expectations.&lt;/p&gt;

&lt;h2 class="relative group"&gt;SSI in PostgreSQL
 &lt;div id="ssi-in-postgresql" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#ssi-in-postgresql" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;

&lt;h3 class="relative group"&gt;How PostgreSQL Handles SSI
 &lt;div id="how-postgresql-handles-ssi" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#how-postgresql-handles-ssi" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;It&amp;rsquo;s actually simple — cancel the pivot transaction that forms the &amp;ldquo;dangerous structure.&amp;rdquo;
We first set the isolation level to Serializable for both. The table has some white balls and some black balls.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;T1&lt;/th&gt;
 &lt;th&gt;T2&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;set default_transaction_isolation = &amp;lsquo;serializable&amp;rsquo;;&lt;/td&gt;
 &lt;td&gt;set default_transaction_isolation = &amp;lsquo;serializable&amp;rsquo;;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;begin; update dots set color = &amp;lsquo;black&amp;rsquo; where color = &amp;lsquo;white&amp;rsquo;;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;begin; update dots set color = &amp;lsquo;white&amp;rsquo; where color = &amp;lsquo;black&amp;rsquo;;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;commit;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;commit;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;ERROR: could not serialize access due to read/write dependencies among transactions DETAIL: Reason code: Canceled on identification as a pivot, during commit attempt. HINT: The transaction might succeed if retried.&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Transaction 1 changes all white to black, Transaction 2 changes all black to white, then both commit. The first transaction to commit succeeds, the second fails. The error says: &lt;em&gt;could not serialize access due to read/write dependencies among transactions, canceled on identification as a pivot. If you retry the transaction, it might succeed.&lt;/em&gt;
Of course it would succeed here — the other transaction has already completed, so one transaction alone cannot form a dependency cycle. At other isolation levels like Repeatable Read or Read Committed, these two transactions would execute without any error, running normally, but the data results would differ from SSI&amp;rsquo;s results.&lt;/p&gt;

&lt;h3 class="relative group"&gt;PostgreSQL SSI Implementation Optimizations
 &lt;div id="postgresql-ssi-implementation-optimizations" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#postgresql-ssi-implementation-optimizations" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;PostgreSQL implements Serializable SSI on top of Snapshot Isolation and has made many optimizations to improve concurrency at high isolation levels. PostgreSQL&amp;rsquo;s SSI optimizations mainly include 3 points:
&lt;strong&gt;Safe Snapshots&lt;/strong&gt;: Read-only transactions that won&amp;rsquo;t create cyclic structures don&amp;rsquo;t need conflict detection, reducing checking overhead and memory burden.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Deferrable Transactions&lt;/strong&gt;: Deferrable transactions can be retried. When a &amp;ldquo;dangerous structure&amp;rdquo; is detected, the deferrable transaction is canceled and then attempted again. Deferrable transactions need to be explicitly declared.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Detection Granularity Escalation&lt;/strong&gt;: Multiple fine-grained locks can be combined into coarse-grained locks to reduce memory overhead.&lt;/p&gt;
&lt;p&gt;Optimization Results — Performance Benchmark Comparison:



&lt;img src="https://lastdba.com/img/csdn/5bba1b13a844.png" alt="Image" /&gt;
The green line is the Snapshot Isolation baseline. The blue line shows PostgreSQL&amp;rsquo;s SSI performance, which is already very close to Snapshot Isolation. The brown line is SSI without read-only transactions — all data-changing transactions — showing how much read-only transaction optimization improves performance. In typical business systems, read-only transactions outnumber change transactions. The red line is serializability implemented through Strict Two-Phase Locking — the performance is abysmal.&lt;/p&gt;
&lt;p&gt;The table below shows concurrency pressure and transaction failure rates. Since some transactions need to be canceled to break cycles, Serializable inevitably cancels more transactions than weak isolation. This table also shows that PostgreSQL&amp;rsquo;s SSI has far higher concurrency and transaction success rates than Strict Two-Phase Locking.&lt;/p&gt;
&lt;p&gt;Optimization Results — Request Volume and Failure Rate:



&lt;img src="https://lastdba.com/img/csdn/fe74c76c6333.png" alt="Image" /&gt;&lt;/p&gt;

&lt;h2 class="relative group"&gt;Summary
 &lt;div id="summary" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#summary" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Serializable can simplify system development problems. Developers don&amp;rsquo;t need to worry about transaction anomalies under concurrency, especially in today&amp;rsquo;s increasingly high-concurrency systems.&lt;/li&gt;
&lt;li&gt;PostgreSQL&amp;rsquo;s Serializable is clearly better than the Strict Two-Phase Locking model. Not only better performance, but also lower transaction abort probability.&lt;/li&gt;
&lt;li&gt;PostgreSQL is the first commercial database to implement SSI, while many traditional relational databases don&amp;rsquo;t support serializability at all. PostgreSQL has taken a big step forward.&lt;/li&gt;
&lt;li&gt;PostgreSQL not only implemented SSI but also made many optimizations on top of it, such as read-only transaction and memory optimizations, with significant results.&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title>How to Solve Index Split Contention?</title><link>https://lastdba.com/en/2024/08/12/how-to-solve-index-split-contention/</link><pubDate>Mon, 12 Aug 2024 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2024/08/12/how-to-solve-index-split-contention/</guid><description>&lt;h2 class="relative group"&gt;Index Splitting
 &lt;div id="index-splitting" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#index-splitting" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;When an index block is nearly full, index splitting occurs. Index splitting comes in two forms: 55 and 91:



&lt;img src="https://lastdba.com/img/csdn/cd43a5c7b484.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/be40fcc99a6d.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The difference between index splitting and the enq: TX - index contention wait event&lt;/strong&gt;
Whether 55 or 91 splitting, both are normal index behavior as data volume increases. Index splitting is a &lt;strong&gt;normal phenomenon&lt;/strong&gt; caused by growing data volume leading to larger indexes — when an index can&amp;rsquo;t hold more data, it naturally needs more index blocks. There are hardly any scenarios with tables but no indexes (only during initial data loading would one consider inserting data first and building indexes afterward). Although index splitting consumes some resources, in today&amp;rsquo;s Oracle environments it can complete quickly. Only when there are too many indexes does it affect insert efficiency.&lt;/p&gt;</description><content:encoded>
&lt;h2 class="relative group"&gt;Index Splitting
 &lt;div id="index-splitting" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#index-splitting" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;When an index block is nearly full, index splitting occurs. Index splitting comes in two forms: 55 and 91:



&lt;img src="https://lastdba.com/img/csdn/cd43a5c7b484.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/be40fcc99a6d.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The difference between index splitting and the enq: TX - index contention wait event&lt;/strong&gt;
Whether 55 or 91 splitting, both are normal index behavior as data volume increases. Index splitting is a &lt;strong&gt;normal phenomenon&lt;/strong&gt; caused by growing data volume leading to larger indexes — when an index can&amp;rsquo;t hold more data, it naturally needs more index blocks. There are hardly any scenarios with tables but no indexes (only during initial data loading would one consider inserting data first and building indexes afterward). Although index splitting consumes some resources, in today&amp;rsquo;s Oracle environments it can complete quickly. Only when there are too many indexes does it affect insert efficiency.&lt;/p&gt;
&lt;p&gt;However, the enq: TX - index contention wait is NOT normal. enq: TX - index contention indicates that SQL statements are waiting on an index block that is currently being split. Essentially, DML concurrency is too high and all sessions are waiting on the splitting index block.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why does enq: TX - index contention always occur on sequentially inserted columns?&lt;/strong&gt;
Although both 55 and 55 splits are possible in real scenarios, enq: TX - index contention frequently occurs with 91 splits. This is because columns like sequences and timestamps usually have indexes, and sequential inserts are common. The rightmost block is always the hot block, and subsequent inserts must wait for the split block to complete before they can proceed — this causes enq: TX - index contention. Why don&amp;rsquo;t UUID indexes cause enq: TX - index contention? Because UUID indexes are unordered — inserting causes UUID index splits, but it&amp;rsquo;s unlikely that subsequent UUID values also land on that same splitting index block. So UUID has index splitting but doesn&amp;rsquo;t form an enq wait queue leading to enq: TX - index contention.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Solutions
 &lt;div id="solutions" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#solutions" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Note: what we need to solve is the index split wait enq: TX - index contention, not index splitting itself. Solutions:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Reverse Index&lt;/strong&gt;
A reverse index stores key values in the opposite order. For example, for the value &amp;lsquo;1111 0001&amp;rsquo;, a normal index places it after &amp;lsquo;0000 0002&amp;rsquo;; with a reverse index, it&amp;rsquo;s placed before &amp;lsquo;0000 0002&amp;rsquo;. Think about a timestamp column — normally it&amp;rsquo;s a rightmost hot spot. After reversing, seconds, minutes, and hours sort first. One index block might contain data from different months but the same second. This way, the rightmost hot block essentially disappears — reverse indexes scatter hot spots across various index blocks.
&lt;em&gt;Limitations&lt;/em&gt;: Requires index modification; may lose index range scan capability. Sequentially growing columns cannot use index range scans (e.g., timestamp columns). In some scenarios, reverse key values might still work — requires specific analysis.
&lt;em&gt;Syntax&lt;/em&gt;:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;CREATE&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;INDEX&lt;/span&gt; reveridx &lt;span style="color:#66d9ef"&gt;ON&lt;/span&gt; tablzl (name) REVERSE;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;2. Hash-Partitioned Index&lt;/strong&gt;
Creating a hash-partitioned index on a regular table is equivalent to keeping the table unchanged but partitioning the index, thus scattering the rightmost hot block across partitions. For example, an 8-partition hash-partitioned index divides the index into 8 segments, creating 8 rightmost hot spots and alleviating the index split problem.
&lt;em&gt;Limitations&lt;/em&gt;: Requires index modification; affects index range query performance — requires balancing insert hot spot mitigation vs. query efficiency.
Equality and IN queries can efficiently use hash-partitioned indexes. From the official documentation:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Queries involving equality and &lt;code&gt;IN&lt;/code&gt; predicates on index partitioning key can efficiently use global hash partitioned index to answer queries quickly&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;However, range scan efficiency decreases — the more partitions, the greater the decrease (though more partitions also provide better hot spot relief). This is clearly a balancing act. Tests show that with 8 partitions, logical reads for range scans increase nearly 8x. After partitioning, indexes within each partition remain ordered, and clustering factor differences are minor — the cost of scanning the index is similar, but the cost of table access increases. If a regular index has 8 entries in one block pointing to 1 data block (1 logical read), after hash partitioning across 8 partitions (1 index block each), it becomes 8 logical reads. This is why range scan index performance degrades.
&lt;em&gt;Syntax&lt;/em&gt;:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;CREATE&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;INDEX&lt;/span&gt; cust_last_name_ix &lt;span style="color:#66d9ef"&gt;ON&lt;/span&gt; customers (cust_last_name)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;GLOBAL&lt;/span&gt; PARTITION &lt;span style="color:#66d9ef"&gt;BY&lt;/span&gt; HASH (cust_last_name)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; PARTITIONS &lt;span style="color:#ae81ff"&gt;4&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;3. Using Table Partitioning to Scatter Indexes&lt;/strong&gt;
Partition the table and create local indexes to scatter the rightmost hot spots.
&lt;em&gt;Limitations&lt;/em&gt;: The partition key cannot be the index column (otherwise it defeats the purpose); requires table modification; if existing SQL already has partition key predicates, range scan efficiency is not affected.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Reduce Concurrency&lt;/strong&gt;
Reducing concurrency is the ultimate weapon. Index split contention is fundamentally caused by excessively high concurrency — generally, without dozens of concurrent inserts, index split contention won&amp;rsquo;t occur.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. Modify Index Block Size&lt;/strong&gt;
Place index blocks in 16K or 32K tablespaces. In theory, this should help because indexes can hold more data and splitting occurs less frequently. However, performance testing is needed, and other parameters may need adjustment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6. Remove the Index&lt;/strong&gt;
Removing the index is also an option. Based on business requirements, if the index is not important, drop it. Or use range queries with partitioned tables, leveraging partition pruning instead of indexes.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Why These Approaches Don&amp;rsquo;t Work???
 &lt;div id="why-these-approaches-dont-work" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-these-approaches-dont-work" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Increasing ITL transaction slots&lt;/strong&gt;: Index block transaction slots may also be insufficient under high concurrency — this is indeed similar to index splitting, but the wait event is enq: TX - allocate ITL entry. If this wait is observed and traced to index blocks, it indicates high concurrency on the index. Reverse indexes and hash-partitioned indexes can also help, and adjusting initrans may solve the problem. However, the root causes of these two wait events differ — index splitting doesn&amp;rsquo;t always come with transaction slot issues.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Adjusting index block PCTFREE&lt;/strong&gt;: PCTFREE indicates that when a block&amp;rsquo;s free space falls below PCTFREE, it is no longer recorded in FREELIST and cannot accept new inserts. Consider two cases: increasing and decreasing PCTFREE. Increasing PCTFREE only worsens index splitting. Decreasing PCTFREE seems effective — similar to adjusting block size in principle — but in real scenarios PCTFREE defaults to 10%, which is already hard to reduce further, so the effect is negligible.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rebuilding indexes to reduce fragmentation&lt;/strong&gt;: This is essentially unrelated — it doesn&amp;rsquo;t solve the rightmost hot block problem.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 class="relative group"&gt;References
 &lt;div id="references" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#references" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://blog.csdn.net/lihuarongaini/article/details/101299328" target="_blank" rel="noreferrer"&gt;https://blog.csdn.net/lihuarongaini/article/details/101299328&lt;/a&gt;
&lt;a href="https://docs.oracle.com/cd/E11882_01/server.112/e41573/data_acc.htm#PFGRF94786" target="_blank" rel="noreferrer"&gt;https://docs.oracle.com/cd/E11882_01/server.112/e41573/data_acc.htm#PFGRF94786&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Acknowledgments: 豪桑, 用哥&lt;/p&gt;</content:encoded></item><item><title>My 2023 Year-End Summary</title><link>https://lastdba.com/en/2024/08/12/my-2023-year-end-summary/</link><pubDate>Mon, 12 Aug 2024 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2024/08/12/my-2023-year-end-summary/</guid><description>&lt;h2 class="relative group"&gt;As a DBA
 &lt;div id="as-a-dba" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#as-a-dba" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Since early 2023, I set my main task for the year — &lt;strong&gt;learn the PostgreSQL database&lt;/strong&gt;. Though I didn&amp;rsquo;t set detailed plans, the overall goal was to finish learning some foundational PostgreSQL knowledge. Later I found I had oversimplified things — the cost of learning PostgreSQL was far greater than I imagined, and I didn&amp;rsquo;t achieve this goal in 2023. For example, the PostgreSQL transaction chapter: I thought I could finish it in 2 weeks, but it took me about 2 months. Regardless, persistent learning did yield some results:&lt;/p&gt;</description><content:encoded>
&lt;h2 class="relative group"&gt;As a DBA
 &lt;div id="as-a-dba" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#as-a-dba" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Since early 2023, I set my main task for the year — &lt;strong&gt;learn the PostgreSQL database&lt;/strong&gt;. Though I didn&amp;rsquo;t set detailed plans, the overall goal was to finish learning some foundational PostgreSQL knowledge. Later I found I had oversimplified things — the cost of learning PostgreSQL was far greater than I imagined, and I didn&amp;rsquo;t achieve this goal in 2023. For example, the PostgreSQL transaction chapter: I thought I could finish it in 2 weeks, but it took me about 2 months. Regardless, persistent learning did yield some results:&lt;/p&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/1783a492fc8a.png" alt="Image" /&gt;&lt;/p&gt;
&lt;p&gt;Among them, the optimizer chapter was actually not completed. Though I&amp;rsquo;m guilty, I still need to explain. The optimization chapter has been in progress for over two months — not because I was slacking off, but because it&amp;rsquo;s simply impossible to finish. It has already reached Typora&amp;rsquo;s text limit — around 8000 characters it starts lagging, so I had to passively split it into parts. It&amp;rsquo;s already split to Part 4:&lt;/p&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/c2313549e7fe.png" alt="Image" /&gt;&lt;/p&gt;
&lt;p&gt;Even so, the optimization chapter is probably less than half done. I can only shamelessly carry it over to the next year&amp;hellip; Personally, I think another 4 months should let me complete the optimization chapter&amp;hellip; Even then, the priority needs to be pushed back — there&amp;rsquo;s really not enough time!&lt;/p&gt;

&lt;h2 class="relative group"&gt;READING
 &lt;div id="reading" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#reading" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;My main profession is databases, so I should spend time on databases, and extracurricular reading should take a back seat. However, I still don&amp;rsquo;t want to give up this part, for three reasons I think:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The value brought by reading is immeasurable in the short term&lt;/li&gt;
&lt;li&gt;Reading brings a pleasant sense of intellectual enrichment&lt;/li&gt;
&lt;li&gt;I use fragmented time to read, only spending 2-3 hours writing reading notes, which doesn&amp;rsquo;t take up too much study time&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;rsquo;ve certainly read some PostgreSQL technical books, but I read them with a targeted approach. For example, for optimization, I&amp;rsquo;d bring together &amp;ldquo;The Internals of PostgreSQL,&amp;rdquo; &amp;ldquo;PostgreSQL Technical Internals: Query Optimization Deep Dive,&amp;rdquo; &amp;ldquo;PostgreSQL Query Engine Source Code Technical Analysis,&amp;rdquo; and &amp;ldquo;The Art of Database Query Optimizer&amp;rdquo; to study a particular knowledge point together. I wasn&amp;rsquo;t focused on whether I&amp;rsquo;d finish them, and I didn&amp;rsquo;t read them cover-to-cover in order. So the reading list here only covers extracurricular books.&lt;/p&gt;
&lt;p&gt;2023 Extracurricular Reading List (ranked by preference):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&amp;ldquo;Homo Deus&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Romance of the Three Kingdoms&amp;rdquo;&lt;/li&gt;
&lt;li&gt;The &amp;ldquo;Space Odyssey&amp;rdquo; series: 2001, 2010, 2060, 3001&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Elon Musk&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Chimpanzee Politics&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Goodbye, the Age of Mediocrity&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Wild&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Are We Smart Enough to Know How Smart Animals Are?&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;To Kill a Mockingbird&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Rich Dad Poor Dad&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;When Breath Becomes Air&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;The Metamorphosis,&amp;rdquo; &amp;ldquo;The Judgment,&amp;rdquo; &amp;ldquo;A Hunger Artist&amp;rdquo; and other Kafka short stories&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Not great: &amp;ldquo;What Life Could Mean to You,&amp;rdquo; &amp;ldquo;How to Win Friends and Influence People,&amp;rdquo; &amp;ldquo;The Courage to Be Disliked&amp;rdquo;&lt;/p&gt;

&lt;h2 class="relative group"&gt;Blog and WeChat Official Account
 &lt;div id="blog-and-wechat-official-account" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#blog-and-wechat-official-account" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;I publish articles through two channels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CSDN Blog: &lt;a href="https://liuzhilong.blog.csdn.net" target="_blank" rel="noreferrer"&gt;https://liuzhilong.blog.csdn.net&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;WeChat Official Account: liuzhilong62&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;rsquo;ve been persisting with blogging for many years. The big change in 2023 was mainly writing about PostgreSQL and increasing technical depth. The WeChat Official Account is a new venture I started this year, and it was a major experiment in 2023. Both blogs and official accounts can be used for technical sharing, but their audiences are somewhat different. A blog can serve as a technical accumulation, while an official account is more like a technical news feed. There are many big names in the community who publish daily (even multiple times a day) — I greatly admire that. But there are also big names who focus on quality articles without worrying about daily posting. I personally prefer the latter approach — learning a domain&amp;rsquo;s knowledge roughly in one go, which feels more holistic and targeted. Often I split longer articles into parts for the official account (I don&amp;rsquo;t even like reading overly long articles myself). On my blog I don&amp;rsquo;t split them, so readers interested in a particular article can search for it on CSDN — it&amp;rsquo;s easier to read there.&lt;/p&gt;
&lt;p&gt;Why write?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Self-learning value&lt;/li&gt;
&lt;li&gt;Technical research value&lt;/li&gt;
&lt;li&gt;Dissemination value&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The efficiency of active learning far exceeds passive learning, just like this learning pyramid (image from &amp;ldquo;Rich Dad Poor Dad&amp;rdquo; — the value of extracurricular reading!):&lt;/p&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/a5205d91518d.png" alt="img" /&gt;&lt;/p&gt;
&lt;p&gt;Opportunities like hands-on practice and presentations are rare and hard to come by. Outputting what you&amp;rsquo;ve learned as articles greatly improves your understanding of knowledge points. Reading an article might take just ten minutes, but producing it as an article may take more than ten times that long.&lt;/p&gt;
&lt;p&gt;This year I also tried doing pure translation-style technical articles. Although the technical research value isn&amp;rsquo;t high, there&amp;rsquo;s still learning value and dissemination value. Reading something once versus translating it once leads to different levels of understanding, just like what I said above: active learning. However, what bothers me a bit now is: previously, for things I couldn&amp;rsquo;t understand, I&amp;rsquo;d use Google Translate for a rough pass and then polish it myself. Now with GPT, it can translate an entire article and I barely need to change any words or sentences. The active learning value has been severely diluted — the AI is doing all the learning&amp;hellip;&lt;/p&gt;
&lt;p&gt;My writing style changed significantly in 2023. I wrote about various things and tried everything. Of course, I know one should focus on vertical content, but I still couldn&amp;rsquo;t resist doing random things — I haven&amp;rsquo;t even settled on a name for my official account yet. Currently, what&amp;rsquo;s clear is: technical articles and extracurricular reading notes, with technical articles as the main focus. Other types of articles probably won&amp;rsquo;t be written anymore. Whether I&amp;rsquo;ll adjust later, I don&amp;rsquo;t know. At least the official account still has room for adjustment. Anyway, let&amp;rsquo;s keep it like this — launch first, adjust later.&lt;/p&gt;
&lt;p&gt;2023 blog statistics are hard to track now. I can only provide blog data from 2017 to 2023 as a snapshot.&lt;/p&gt;
&lt;p&gt;CSDN Blog:&lt;/p&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/d6b07e98d21d.png" alt="Image" /&gt;&lt;/p&gt;
&lt;p&gt;WeChat Official Account followers:&lt;/p&gt;
&lt;p&gt;


&lt;img src="https://lastdba.com/img/csdn/dd005d674681.png" alt="Image" /&gt;&lt;/p&gt;

&lt;h2 class="relative group"&gt;Final Thoughts
 &lt;div id="final-thoughts" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#final-thoughts" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;The biggest realization of 2023 — time. There&amp;rsquo;s really not enough time!&lt;/p&gt;
&lt;p&gt;On June 17, 2023, I participated in the PostgreSQL Database Technology Summit Chengdu stop and shared my fresh, hot-off-the-press PostgreSQL transaction knowledge with the experts. It was my first time on stage and I was quite nervous. I must thank Boss Can for the opportunity. There was a small episode during this sharing that shows how pressed for time I was in 2023. I also had part-time graduate studies — the day of the sharing was also my final exam day. After finishing my talk, I rushed straight to the airport&amp;hellip; In the end, I missed 3 exams and had to retake them&amp;hellip; It was too hard.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve completely given up on work-life balance — having a work-learning balance would be good enough. Every day after work I don&amp;rsquo;t think about resting but about going home to study. In the end, there were still many things unfinished, left to my 2024 self.&lt;/p&gt;
&lt;p&gt;Expectations for 2024:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Complete my thesis and graduate smoothly&lt;/li&gt;
&lt;li&gt;Finish the PostgreSQL optimization section&lt;/li&gt;
&lt;li&gt;We&amp;rsquo;ll see about the rest&lt;/li&gt;
&lt;/ol&gt;</content:encoded></item><item><title>People from Another World</title><link>https://lastdba.com/en/2024/08/12/people-from-another-world/</link><pubDate>Mon, 12 Aug 2024 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2024/08/12/people-from-another-world/</guid><description>&lt;p&gt;​


&lt;img src="https://lastdba.com/img/csdn/13ea4ca5d98b.png" alt="" /&gt;&lt;/p&gt;

&lt;h2 class="relative group"&gt;Vacation
 &lt;div id="vacation" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#vacation" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;I took a long vacation and went back to my hometown before my leave days expired — not just to escape the busyness of work, but also to visit my grandparents. For working people like us, going back to our hometown is really difficult. If it&amp;rsquo;s just a weekend trip, we&amp;rsquo;d only get one day of rest before having to head back — too exhausting. We don&amp;rsquo;t get many vacation days to begin with, and when we do, most people think about driving out to see some scenery or just staying home for a few days doing nothing. No one usually thinks of using their precious leave to visit elderly relatives back home.&lt;/p&gt;</description><content:encoded>&lt;p&gt;​


&lt;img src="https://lastdba.com/img/csdn/13ea4ca5d98b.png" alt="" /&gt;&lt;/p&gt;

&lt;h2 class="relative group"&gt;Vacation
 &lt;div id="vacation" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#vacation" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;I took a long vacation and went back to my hometown before my leave days expired — not just to escape the busyness of work, but also to visit my grandparents. For working people like us, going back to our hometown is really difficult. If it&amp;rsquo;s just a weekend trip, we&amp;rsquo;d only get one day of rest before having to head back — too exhausting. We don&amp;rsquo;t get many vacation days to begin with, and when we do, most people think about driving out to see some scenery or just staying home for a few days doing nothing. No one usually thinks of using their precious leave to visit elderly relatives back home.&lt;/p&gt;
&lt;p&gt;Ironically, the leave I used to visit my grandparents was childcare leave, not some kind of &amp;ldquo;eldercare leave.&amp;rdquo; It seems the world doesn&amp;rsquo;t have such a thing as &amp;ldquo;eldercare leave&amp;rdquo; — only family visit leave. Although there is legally a &amp;ldquo;family visit leave&amp;rdquo; provision, never mind that it isn&amp;rsquo;t specifically designed for visiting the elderly — just look at those impossibly long qualifiers. For the vast majority of people, family visit leave essentially doesn&amp;rsquo;t exist.&lt;/p&gt;
&lt;p&gt;Using childcare leave not to care for children but to visit the elderly — I imagine most people wouldn&amp;rsquo;t do that. Am I the only oddball who would? Well, at least this is how I see it: raising children and caring for the elderly are equally important; we shouldn&amp;rsquo;t favor one over the other. Society and working people tend to prioritize the former. Regardless, I still wanted to go back and spend time with them, to see what the old couple does every day, how they live, whether they face any difficulties, and how they cope with those difficulties. So I went back, alone.&lt;/p&gt;
&lt;p&gt;The end of the road.
The place where the old couple lives is where I grew up. It&amp;rsquo;s quite hidden — you have to turn off the main road onto a mountain path and go a long way, all the way to the end. It feels like a place cut off from the world. When you arrive there, it&amp;rsquo;s as if all connection to the outside world ceases to exist.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s not actually my ancestral hometown, but I prefer to call it that. It&amp;rsquo;s a mining area. Because it&amp;rsquo;s built into the mountainside, the mine has a striking three-dimensional quality — so much so that I&amp;rsquo;m in awe of the predecessors who designed it. I still don&amp;rsquo;t quite know how to describe the administrative level of this place. It&amp;rsquo;s not a village, not a town — more modern than a village but smaller than a town. When I was little I thought this place was huge; now I realize you can walk through the entire mining area in just ten minutes.&lt;/p&gt;
&lt;p&gt;The whole place relies on coal mining as its economic pillar. It once prospered, but now it has declined significantly. There are still miners who go underground, but in the living quarters, you no longer see young people like me. The mine has an elementary school; when I attended, there were about 70 students per grade. Now there are only seven.&lt;/p&gt;
&lt;p&gt;The childhood memories there are overwhelmingly strong — like a paradise, a sanctuary untouched by worldly strife, another world. Being far from modern society, you only need the basics to get by, and time seems to pass slowly. A place like this is indeed very suitable for retirement — and indeed, there are many elderly people here.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Food
 &lt;div id="food" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#food" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;When I was little, the market was fairly lively. I remember the poultry vendor would submerge whole chickens in something black and tar-like before plucking them — the poultry area was always filthy. Now the market no longer sells fresh meat; you can only buy vegetables grown by nearby farmers. If you want fresh meat, you have to go to the village market day or take a bus into the city.&lt;/p&gt;
&lt;p&gt;Because the old couple is extremely frugal, I was initially worried they lived too simply — maybe just rice and vegetables every day. When I went back this time, I didn&amp;rsquo;t tell them exactly when I&amp;rsquo;d arrive. When I got home, I found they had even bought braised duck — I was quite relieved. My return made them very happy, and with just the three of us, they made five or six dishes every day. I even started to wonder if I was there to keep them company or to cause them trouble.&lt;/p&gt;
&lt;p&gt;Maybe I&amp;rsquo;ve been spoiled by the rich flavors of the outside world. At first, when they asked, &amp;ldquo;Is this dish good?&amp;rdquo; I couldn&amp;rsquo;t bring myself to say what I really thought. At moments like this, I recall a line from some book: &amp;ldquo;Humans cannot directly judge the value of something; only by comparing it to something else do they know its worth.&amp;rdquo; The same goes for food. When you taste something for the first time, you don&amp;rsquo;t actually know if it&amp;rsquo;s good or not. If you do know, it must be because you&amp;rsquo;ve already compared it to something in your memory. When I was little and first tried hotpot, adults would always ask, &amp;ldquo;Is this hotpot good?&amp;rdquo; To be honest, I had no idea — I didn&amp;rsquo;t even know what &amp;ldquo;good&amp;rdquo; was supposed to taste like. I just ate.&lt;/p&gt;
&lt;p&gt;Now my palate has indeed grown more demanding, but here, I wanted to reset everything, to press that &amp;ldquo;restore factory settings&amp;rdquo; button. I can say with complete sincerity: what they cook is delicious.&lt;/p&gt;
&lt;p&gt;One more thing: at one point I offered to wash the dishes. They said, &amp;ldquo;Put them down, you don&amp;rsquo;t know how — we wash dishes with rice water. You wouldn&amp;rsquo;t get them clean. Dish soap is full of chemicals; we don&amp;rsquo;t use that stuff.&amp;rdquo;&lt;/p&gt;

&lt;h2 class="relative group"&gt;Traditional Chinese Medicine
 &lt;div id="traditional-chinese-medicine" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#traditional-chinese-medicine" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;On this trip, I discovered a fact: elderly people are extremely dependent on medication. Their medicine cabinets are always stuffed with all kinds of drugs — Western medicine, Chinese medicine, cold medicine, anti-inflammatory drugs, ointments, supplements — a whole pile. Whenever they feel something wrong with their body, they reach for whatever they think will help. During my visit, my rhinitis flared up (an old problem of mine) — nonstop sneezing and runny nose. They kept urging me to take cold medicine, recommending Ganmaoling or cephalosporin. I must have said at least ten times: &amp;ldquo;It&amp;rsquo;s rhinitis, not a cold.&amp;rdquo; They, of course, had no idea how to treat this kind of rhinitis, so they just kept urging me to take cold medicine.&lt;/p&gt;
&lt;p&gt;One day I took them into the city. Besides a supermarket run, the more important errand was buying medicine. Buying medicine meant both Chinese and Western.&lt;/p&gt;
&lt;p&gt;The Chinese medicine was purchased at a Yunnan herbal shop. The shop owner had a buzz cut, a black T-shirt, a silver necklace, and a brown beaded bracelet — he looked quite burly. With his tough-guy appearance, I didn&amp;rsquo;t even dare to speak loudly to him, though my grandfather didn&amp;rsquo;t seem to notice any of that. The shop was mostly filled with herbs I couldn&amp;rsquo;t name, sold by weight, quite expensive — not your typical Chinese medicine. Clearly, my grandfather was a regular customer; the owner knew him. But it seemed my grandfather didn&amp;rsquo;t really know how to pick herbs either: &amp;ldquo;Boss, just weigh me 300 yuan&amp;rsquo;s worth based on my health condition.&amp;rdquo; So the owner grabbed a bit from here, a bit from there, and finally ground everything into powder.&lt;/p&gt;
&lt;p&gt;Maybe I&amp;rsquo;ve studied too much — I&amp;rsquo;ve always been skeptical of traditional Chinese medicine, simply because I find it lacks convincing rationale. I was quite worried they&amp;rsquo;d get scammed; these herbal medicine dealers prey specifically on the elderly. But my grandfather said: &amp;ldquo;Before, your grandmother had constant headaches. After taking this medicine, the headaches stopped.&amp;rdquo; So it seemed to work. Western medicine is indeed far too unfriendly to the elderly.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Western Medicine
 &lt;div id="western-medicine" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#western-medicine" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;After buying the Chinese medicine, we walked a long way to a pharmacy to buy Western medicine. That pharmacy might be one of the few they know.&lt;/p&gt;
&lt;p&gt;The vast majority of drugs in that pharmacy couldn&amp;rsquo;t be reimbursed. Only in a tiny, shabby room deep inside were a small selection of reimbursable drugs. I looked around and barely recognized any of them — all named with chemical formulas, completely incomprehensible. Only things like Ganmaoling and loquat syrup were familiar. My grandfather fell into the same difficulty choosing. He recognized cephalosporin, but the pharmacy girl said they didn&amp;rsquo;t have it. He got a bit angry and said to her: &amp;ldquo;Don&amp;rsquo;t you have any decent medicine?&amp;rdquo; (&amp;ldquo;Decent medicine&amp;rdquo;? I tried to parse what he meant.) The girl pulled out a red box of nicely packaged health supplements from somewhere. My grandfather couldn&amp;rsquo;t read the tiny text on the box, so he asked me to read it to him and tell him what it treated. I looked at it — the thing claimed to treat everything — so I didn&amp;rsquo;t read it and handed it back to the girl. In the end, they only picked up a few common cold and cough remedies.&lt;/p&gt;
&lt;p&gt;My grandfather repeatedly told me along the way that he gets 170 yuan of medical insurance reimbursement per year. I could tell he really, really wanted to spend that 170 yuan, to stockpile some medicine at home. That&amp;rsquo;s why he wanted to go to a Western pharmacy, and that&amp;rsquo;s why we walked all the way to this pharmacy that accepts insurance reimbursement.&lt;/p&gt;
&lt;p&gt;But there was some trouble at checkout. The cashier girl had looked unhappy from the start. She took the medicine and rattled off a bunch of things I didn&amp;rsquo;t understand — and my grandfather clearly didn&amp;rsquo;t either. The only thing we caught was: &amp;ldquo;These can&amp;rsquo;t be reimbursed.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;The girl said: &amp;ldquo;There&amp;rsquo;s a threshold fee of 150 yuan for reimbursement, and you haven&amp;rsquo;t paid the threshold fee yet.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;My grandfather said: &amp;ldquo;Is the threshold fee like the 150-yuan bed fee hospitals used to charge?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;The girl paused, then said impatiently: &amp;ldquo;Yes, yes, whatever you say is right.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;My grandfather got a bit angry: &amp;ldquo;Forget it, I don&amp;rsquo;t want them!&amp;rdquo;&lt;/p&gt;
&lt;p&gt;I quickly asked the girl what exactly this threshold fee meant. Without a word, she pointed to a notice posted on the window — a table explaining the threshold fee. I couldn&amp;rsquo;t quite make sense of it either, but I understood that this threshold fee had to be paid. I thought about it — when I see a doctor, I just swipe my insurance card directly. What&amp;rsquo;s all this about reimbursement? I was even more confused.&lt;/p&gt;
&lt;p&gt;I said: &amp;ldquo;Can I use my insurance card?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;The girl said: &amp;ldquo;Out-of-region cards won&amp;rsquo;t work.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;I said: &amp;ldquo;Can I just pay with Alipay?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Seeing me about to pay, my grandfather immediately stopped me: &amp;ldquo;There&amp;rsquo;s absolutely no way I&amp;rsquo;m letting you pay for this.&amp;rdquo; He pulled cash from his bag and paid. I understood — for me, a hundred-something yuan is nothing, but for them, it&amp;rsquo;s still money they&amp;rsquo;re reluctant to part with.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Technology
 &lt;div id="technology" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#technology" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;We marvel at how fast technology advances, always bringing new things that change our way of life and make it more convenient. Working people chase technology and immerse themselves in it. But for the elderly, technology is an entirely different story.&lt;/p&gt;
&lt;p&gt;In every aspect of elderly people&amp;rsquo;s lives, things involving technology are exceedingly rare. The most commonly used thing is a phone — a smartphone. They seem to have adapted well to the fast-paced entertainment of apps like Douyin (TikTok), and they also play with their phones watching short videos before bed. (What they use is probably not actual Douyin, but some other app with recommended short videos.)&lt;/p&gt;
&lt;p&gt;But that&amp;rsquo;s about the limit. They don&amp;rsquo;t really understand how phones work. For example, when they make phone calls — whether it&amp;rsquo;s my grandmother or grandfather — neither of them hangs up after finishing a call. It&amp;rsquo;s not that they don&amp;rsquo;t want to; they just don&amp;rsquo;t know where to find the hang-up button. If after a call they look at the phone and see a red hang-up button, they&amp;rsquo;ll press it. But if the screen is locked or the screen has changed, they won&amp;rsquo;t know how. My grandmother said to me: &amp;ldquo;Take a look at my phone — after I hang up, why does it keep making noise, keep making noise~&amp;rdquo; In fact, the call hadn&amp;rsquo;t ended at all; the screen had just gone dark and she thought it was hung up. If they call someone else, it&amp;rsquo;s fine, but if they call each other, it could be a disaster — because no one hangs up.&lt;/p&gt;
&lt;p&gt;And WeChat messages — they have absolutely no grasp of how WeChat messages work. They don&amp;rsquo;t know how to find someone&amp;rsquo;s chat window, don&amp;rsquo;t know who sent them a message, don&amp;rsquo;t know where messages go. Later, when we went traveling and I took photos for them, they asked me to put the photos on their phones (meaning in their photo albums). I had to operate both of their phones one by one to download photos from WeChat, making sure the downloaded photos were immediately visible in the album — otherwise, they&amp;rsquo;d never find them.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Traveling
 &lt;div id="traveling" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#traveling" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Taking the old couple out to travel was an important mission of this trip. I hadn&amp;rsquo;t originally planned it — I just wanted to empty my mind, breathe some fresh air, and stay there experiencing the slow passage of time. But they really enjoy going out. As soon as I arrived, my grandfather proactively suggested I could drive them somewhere for fun.&lt;/p&gt;
&lt;p&gt;We visited Zhu De&amp;rsquo;s Former Residence, Langzhong Ancient City, and Nanchong — two days and one night. Traveling with elderly people requires more consideration — they can&amp;rsquo;t sit in a car too long or walk too much. So we couldn&amp;rsquo;t really do that many things. But their philosophy of travel is different from ours; they lean more toward &amp;ldquo;checking in,&amp;rdquo; valuing the fact that they&amp;rsquo;ve &amp;ldquo;been here.&amp;rdquo; So they absolutely must take photos at landmark spots with the place name written on them~&lt;/p&gt;
&lt;p&gt;They also prefer crowded places over scenic spots with few people. In Langzhong, they clearly enjoyed being inside the ancient city — the bustling, noisy, lively atmosphere. They even video-called my aunt and shouted, &amp;ldquo;We&amp;rsquo;re in Langzhong!!&amp;rdquo; (with heavy emphasis), grinning ear to ear. Meanwhile, at White Pagoda Hill (you can drive up, very elderly-friendly), overlooking the panoramic view of Langzhong, I was immersed in a &amp;ldquo;what a view&amp;rdquo; moment. My grandmother looked for two minutes, took two photos, and that was it. I said, &amp;ldquo;Look at the scenery, it&amp;rsquo;s so beautiful — we came all the way up here.&amp;rdquo; She replied, &amp;ldquo;I already looked.&amp;rdquo;&lt;/p&gt;

&lt;h2 class="relative group"&gt;The Shed
 &lt;div id="the-shed" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-shed" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Usually, my grandfather goes to the small park to watch others play cards, and my grandmother plays mahjong — no money involved.&lt;/p&gt;
&lt;p&gt;Besides cards, the place they spend the most time is the shed downstairs. A few discarded stools and chairs from various families are gathered under the shed, with a stove in the middle where they burn firewood in winter. Everyone upstairs and downstairs knows each other — all grandparent-aged, on very good terms with my grandparents. Neighbors will sit together and chat whenever they&amp;rsquo;re free. This is the most important social venue for the &amp;ldquo;neighborhood&amp;rdquo; (it&amp;rsquo;s not really a neighborhood, just two buildings).&lt;/p&gt;
&lt;p&gt;One evening, I sat in the shed listening to them talk. One grandmother said: &amp;ldquo;Your grandson is so good, taking leave to come back and keep the elderly company. We all say your grandson is wonderful.&amp;rdquo; I was a bit embarrassed, but thought — let this evaluation stay in the minds of these elders.&lt;/p&gt;
&lt;p&gt;One grandfather said: &amp;ldquo;I told xx&amp;rsquo;s family: come back once a month, spend time with the elderly, no need to give them money. What would they use that money for? They can get by just fine. But you&amp;rsquo;ve grown up and left, and without company for a long time, they feel lonely.&amp;rdquo; I thought, this old man really understands things. He added: &amp;ldquo;Once, so-and-so died. His whole family came back for the funeral. They brought him fruit and food — what&amp;rsquo;s the use? Did he get to eat any of it? To put it bluntly, that was all for show — for us to see. Once a person is gone, none of it matters.&amp;rdquo; Wow. This old man truly gets it.&lt;/p&gt;
&lt;p&gt;Coming back once a month is extremely difficult for working people — it&amp;rsquo;s just not realistic. Next year I won&amp;rsquo;t even have this childcare leave anymore. When will I come back next time? I can&amp;rsquo;t think of an answer. As we pass day after day in relentless busyness at work, how do the elderly pass their days — day after day of idleness and loneliness?&lt;/p&gt;

&lt;h2 class="relative group"&gt;Random Thoughts
 &lt;div id="random-thoughts" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#random-thoughts" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;How should the elderly face death? Every time they mention death, it&amp;rsquo;s always with a joking tone, but more than that, there&amp;rsquo;s resignation. How should a person face death? When I&amp;rsquo;m old and the deadline is approaching, how will I face it?&lt;/p&gt;
&lt;p&gt;While chatting in the shed, I couldn&amp;rsquo;t name any of these grandparent-aged people, but they all remembered me, knew how I grew up. My life seems to be a part of their lives, proof of my existence — even if this memory only lasts for a time. Yet that still has meaning, doesn&amp;rsquo;t it? The bonds of life exist in this way. There are billions of people in this world, and the vast, vast majority are fleeting meteors — remembered by no one, mentioned in no record.&lt;/p&gt;
&lt;p&gt;This society is remarkably unfriendly to the elderly. Social rules are too complex; they struggle to understand phones, healthcare, and insurance systems, so they can only huddle within their own social circles and flee from this incomprehensible society. At the same time, society has developed rapidly in recent years — children have mostly moved away for their own families and careers. For the elderly, they&amp;rsquo;re happy to see their children thriving, but the distance is vast, and mutual companionship is hard to come by. While society focuses on childcare and increasing birth benefits, no one pays attention to the issue of eldercare and companionship. I doubt there will ever be such a thing as &amp;ldquo;eldercare leave.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;My grandmother has poor hearing. Even with a hearing aid, it&amp;rsquo;s only slightly better. Often when I talk to her, she doesn&amp;rsquo;t follow at all and answers about something else entirely. But I can&amp;rsquo;t bring myself to raise my voice — it feels so rude. Leaning in close to speak makes her self-conscious. I suggested they come live with us in Chengdu, but she wouldn&amp;rsquo;t agree under any circumstances. I think maybe it&amp;rsquo;s because her hearing loss makes her afraid of communicating with people, timid in social situations. Only there, in the mining community, do the neighbors treat her well — it gives her a sense of security. One elderly woman said: &amp;ldquo;Being hard of hearing is good — it adds years to your life.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Written — April 2023&lt;/p&gt;
&lt;p&gt;The term &amp;ldquo;Popo&amp;rdquo; (a Chinese term for grandmother) still exists in my generation, but my children no longer say &amp;ldquo;Popo&amp;rdquo; — they say &amp;ldquo;Nainai&amp;rdquo; instead. Perhaps &amp;ldquo;Popo&amp;rdquo; is the last time this term will be used in our family line — may be the last call. Let it be preserved in this essay.&lt;/p&gt;</content:encoded></item><item><title>Some Features of PostgreSQL Logical Replication</title><link>https://lastdba.com/en/2024/08/12/some-features-of-postgresql-logical-replication/</link><pubDate>Mon, 12 Aug 2024 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2024/08/12/some-features-of-postgresql-logical-replication/</guid><description>&lt;p&gt;I&amp;rsquo;ve already written a fairly detailed &lt;a href="https://blog.csdn.net/qq_40687433/article/details/129291207" target="_blank" rel="noreferrer"&gt;article about logical replication&lt;/a&gt; before, so I won&amp;rsquo;t repeat the basics here. However, some knowledge points inevitably get missed. Recently I&amp;rsquo;ve discovered some interesting logical replication features.&lt;/p&gt;

&lt;h2 class="relative group"&gt;replica identity and old/new values
 &lt;div id="replica-identity-and-oldnew-values" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#replica-identity-and-oldnew-values" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;replica identity is used to identify a row during logical replication.
The above statement is certainly correct, but it doesn&amp;rsquo;t explain the changes in old and new data.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;code&gt;DEFAULT&lt;/code&gt;
Records the old values of the columns of the primary key, if any. This is the default for non-system tables.
&lt;code&gt;USING INDEX&lt;/code&gt; index_name
Records the old values of the columns covered by the named index, that must be unique, not partial, not deferrable, and include only columns marked &lt;code&gt;NOT NULL&lt;/code&gt;. If this index is dropped, the behavior is the same as &lt;code&gt;NOTHING&lt;/code&gt;.
&lt;code&gt;FULL&lt;/code&gt;
Records the old values of all columns in the row.
&lt;code&gt;NOTHING&lt;/code&gt;
Records no information about the old row. This is the default for system tables.&lt;/p&gt;</description><content:encoded>&lt;p&gt;I&amp;rsquo;ve already written a fairly detailed &lt;a href="https://blog.csdn.net/qq_40687433/article/details/129291207" target="_blank" rel="noreferrer"&gt;article about logical replication&lt;/a&gt; before, so I won&amp;rsquo;t repeat the basics here. However, some knowledge points inevitably get missed. Recently I&amp;rsquo;ve discovered some interesting logical replication features.&lt;/p&gt;

&lt;h2 class="relative group"&gt;replica identity and old/new values
 &lt;div id="replica-identity-and-oldnew-values" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#replica-identity-and-oldnew-values" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;replica identity is used to identify a row during logical replication.
The above statement is certainly correct, but it doesn&amp;rsquo;t explain the changes in old and new data.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;code&gt;DEFAULT&lt;/code&gt;
Records the old values of the columns of the primary key, if any. This is the default for non-system tables.
&lt;code&gt;USING INDEX&lt;/code&gt; index_name
Records the old values of the columns covered by the named index, that must be unique, not partial, not deferrable, and include only columns marked &lt;code&gt;NOT NULL&lt;/code&gt;. If this index is dropped, the behavior is the same as &lt;code&gt;NOTHING&lt;/code&gt;.
&lt;code&gt;FULL&lt;/code&gt;
Records the old values of all columns in the row.
&lt;code&gt;NOTHING&lt;/code&gt;
Records no information about the old row. This is the default for system tables.&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;The PG official documentation only explains the old value situation for replica identity — for example, it doesn&amp;rsquo;t even mention that NOTHING won&amp;rsquo;t replicate update/delete. This shows the importance of old values.&lt;/p&gt;
&lt;p&gt;Creating a replication link:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; pg_create_logical_replication_slot(&lt;span style="color:#e6db74"&gt;&amp;#39;pubtestlzl2&amp;#39;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#39;test_decoding&amp;#39;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pg_recvlogical &lt;span style="color:#f92672"&gt;-&lt;/span&gt;d lzldb &lt;span style="color:#75715e"&gt;--slot=pubtestlzl2 --start -f recv.sql &amp;amp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Normal test_decoding replication link simulation:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--replica identity defaults to d: uses primary key when available; without primary key, defaults to nothing, unable to replicate update and delete
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;M&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; lzltest(a bigint &lt;span style="color:#66d9ef"&gt;primary&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;key&lt;/span&gt;,b varchar(&lt;span style="color:#ae81ff"&gt;100&lt;/span&gt;),&lt;span style="color:#66d9ef"&gt;c&lt;/span&gt; varchar(&lt;span style="color:#ae81ff"&gt;100&lt;/span&gt;));
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;CREATE&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;TABLE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;M&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;insert&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;into&lt;/span&gt; lzltest &lt;span style="color:#66d9ef"&gt;values&lt;/span&gt;(&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#39;bbbbbb&amp;#39;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#39;ccccccccc&amp;#39;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;INSERT&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;M&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;update&lt;/span&gt; lzltest &lt;span style="color:#66d9ef"&gt;set&lt;/span&gt; b&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#39;b&amp;#39;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;UPDATE&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;recvlogical output:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt;.lzltest: &lt;span style="color:#66d9ef"&gt;INSERT&lt;/span&gt;: a[bigint]:&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; b[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;bbbbbb&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;c&lt;/span&gt;[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;ccccccccc&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt;.lzltest: &lt;span style="color:#66d9ef"&gt;UPDATE&lt;/span&gt;: a[bigint]:&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; b[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;b&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;c&lt;/span&gt;[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;ccccccccc&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;With replica identity as default, updating a non-primary-key field — all fields have only new values.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;M&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;update&lt;/span&gt; lzltest &lt;span style="color:#66d9ef"&gt;set&lt;/span&gt; a&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#39;111&amp;#39;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;UPDATE&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt;.lzltest: &lt;span style="color:#66d9ef"&gt;UPDATE&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;old&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;key&lt;/span&gt;: a[bigint]:&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;tuple: a[bigint]:&lt;span style="color:#ae81ff"&gt;111&lt;/span&gt; b[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;bb&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;c&lt;/span&gt;[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;ccccccccc&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;With replica identity as default, updating the primary key — the identity column&amp;rsquo;s old and new values are decoded; other fields only have new values.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;M&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; lzltest replica &lt;span style="color:#66d9ef"&gt;identity&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;full&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;ALTER&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;TABLE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;M&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;update&lt;/span&gt; lzltest &lt;span style="color:#66d9ef"&gt;set&lt;/span&gt; b&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#39;b&amp;#39;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;UPDATE&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt;.lzltest: &lt;span style="color:#66d9ef"&gt;UPDATE&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;old&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;key&lt;/span&gt;: a[bigint]:&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; b[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;b&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;c&lt;/span&gt;[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;ccccccccc&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;tuple: a[bigint]:&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; b[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;b&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;c&lt;/span&gt;[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;ccccccccc&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;With replica identity set to full, both old and new values for the entire row are preserved.&lt;/p&gt;
&lt;p&gt;Whether in default (primary key) or full mode, all column information is recorded. The difference lies in whether old data is present. In default mode:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;insert: inherently new data, so naturally no old values — all column new values are recorded.&lt;/li&gt;
&lt;li&gt;update: records new values for all columns; &lt;strong&gt;only the identity column has old values (if the identity column was updated)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;delete: inherently old data, but not all columns are necessarily recorded. The same rule applies: &lt;em&gt;only the identity column has old values&lt;/em&gt; — only the identity column is recorded.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Summary: When replica identity is default, regardless of the operation (INSERT, UPDATE, DELETE), as long as it&amp;rsquo;s old data, only the identity column is recorded; as long as it&amp;rsquo;s new data, all columns are recorded.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When changing from default to full, the decoded log volume difference isn&amp;rsquo;t particularly large, because new data always includes all columns. (Excluding scenarios that are &lt;em&gt;entirely&lt;/em&gt; deletes) the log volume decoded under full is less than twice that of default.&lt;/p&gt;

&lt;h2 class="relative group"&gt;pgoutput cannot be peeked
 &lt;div id="pgoutput-cannot-be-peeked" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#pgoutput-cannot-be-peeked" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Create a replication slot using pgoutput:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; pg_create_logical_replication_slot(&lt;span style="color:#e6db74"&gt;&amp;#39;pubtestlzl&amp;#39;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#39;pgoutput&amp;#39;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Then try to peek or receive — both fail:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; pg_logical_slot_peek_changes(&lt;span style="color:#e6db74"&gt;&amp;#39;pubtestlzl&amp;#39;&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pg_recvlogical &lt;span style="color:#f92672"&gt;-&lt;/span&gt;d lzldb &lt;span style="color:#75715e"&gt;--slot=pubtestlzl --start -f recv.sql &amp;amp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-c" data-lang="c"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pg_recvlogical: error: could not send replication command &lt;span style="color:#e6db74"&gt;&amp;#34;START_REPLICATION SLOT &amp;#34;&lt;/span&gt;pubtestlzl&lt;span style="color:#e6db74"&gt;&amp;#34; LOGICAL 0/0&amp;#34;&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; ERROR: client sent proto_version&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; but we only support protocol &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; or higher
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CONTEXT: slot &lt;span style="color:#e6db74"&gt;&amp;#34;pubtestlzl&amp;#34;&lt;/span&gt;, output plugin &lt;span style="color:#e6db74"&gt;&amp;#34;pgoutput&amp;#34;&lt;/span&gt;, in the startup callback
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pg_recvlogical: disconnected; waiting &lt;span style="color:#ae81ff"&gt;5&lt;/span&gt; seconds to try again&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;You cannot peek or use pg_recvlogical to receive from a pgoutput replication slot. Since pgoutput is the output plugin for publish-subscribe, this plugin cannot be manually peeked or received&amp;hellip;&lt;/p&gt;

&lt;h2 class="relative group"&gt;Publish-Subscribe Doesn&amp;rsquo;t Have to Be PG-to-PG
 &lt;div id="publish-subscribe-doesnt-have-to-be-pg-to-pg" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#publish-subscribe-doesnt-have-to-be-pg-to-pg" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;create publication&lt;/code&gt; and &lt;code&gt;create subscription&lt;/code&gt; are PG internal commands that can also be used to create links between PG databases.
Third-party software can similarly use create publication and simulate subscriptions to create replication slots. This is better than directly creating replication slots because publications can manage replicated tables.&lt;/p&gt;

&lt;h2 class="relative group"&gt;TOAST and Logical Decoding
 &lt;div id="toast-and-logical-decoding" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#toast-and-logical-decoding" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;TOAST columns being sent are NOT decoded! This means an entire row of data may only have part of it transmitted (when TOAST columns themselves haven&amp;rsquo;t been updated).&lt;/p&gt;
&lt;p&gt;Normal decoding decodes all columns:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--Create a test_decoding replication slot
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; pg_create_logical_replication_slot(&lt;span style="color:#e6db74"&gt;&amp;#39;logical_dest&amp;#39;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#39;test_decoding&amp;#39;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; pg_create_logical_replication_slot 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; (logical_dest,&lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A80040E0)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;row&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--Create a table with small columns
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; test1(a int &lt;span style="color:#66d9ef"&gt;primary&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;key&lt;/span&gt;,b varchar(&lt;span style="color:#ae81ff"&gt;100&lt;/span&gt;),&lt;span style="color:#66d9ef"&gt;c&lt;/span&gt; varchar(&lt;span style="color:#ae81ff"&gt;100&lt;/span&gt;));
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;CREATE&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;TABLE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt;&lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; pg_replication_slots;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; slot_name &lt;span style="color:#f92672"&gt;|&lt;/span&gt; plugin &lt;span style="color:#f92672"&gt;|&lt;/span&gt; slot_type &lt;span style="color:#f92672"&gt;|&lt;/span&gt; datoid &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;database&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;temporary&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; active &lt;span style="color:#f92672"&gt;|&lt;/span&gt; active_pid &lt;span style="color:#f92672"&gt;|&lt;/span&gt; xmin &lt;span style="color:#f92672"&gt;|&lt;/span&gt; catalog_xmin &lt;span style="color:#f92672"&gt;|&lt;/span&gt; restart_lsn &lt;span style="color:#f92672"&gt;|&lt;/span&gt; confirmed_flush_lsn &lt;span style="color:#f92672"&gt;|&lt;/span&gt; wal_status &lt;span style="color:#f92672"&gt;|&lt;/span&gt; safe_wal_size 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--------------+---------------+-----------+--------+----------+-----------+--------+------------+--------+--------------+--------------+---------------------+------------+---------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; logical_dest &lt;span style="color:#f92672"&gt;|&lt;/span&gt; test_decoding &lt;span style="color:#f92672"&gt;|&lt;/span&gt; logical &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;418679&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; lzldb &lt;span style="color:#f92672"&gt;|&lt;/span&gt; f &lt;span style="color:#f92672"&gt;|&lt;/span&gt; f &lt;span style="color:#f92672"&gt;|&lt;/span&gt; [&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;] &lt;span style="color:#f92672"&gt;|&lt;/span&gt; [&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;] &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483335&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A80040A8 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A80040E0 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; reserved &lt;span style="color:#f92672"&gt;|&lt;/span&gt; [&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;row&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;insert&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;into&lt;/span&gt; test1 &lt;span style="color:#66d9ef"&gt;values&lt;/span&gt; (&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#39;qwer&amp;#39;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#39;qwer&amp;#39;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;INSERT&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Time: &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;.&lt;span style="color:#ae81ff"&gt;915&lt;/span&gt; ms
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; pg_logical_slot_peek_changes(&lt;span style="color:#e6db74"&gt;&amp;#39;logical_dest&amp;#39;&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; lsn &lt;span style="color:#f92672"&gt;|&lt;/span&gt; xid &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;data&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--------------+-----------+--------------------------------------------------------------------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A8004C78 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483335&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;BEGIN&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483335&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A80103E8 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483335&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;COMMIT&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483335&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A8018B30 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483369&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;BEGIN&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483369&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A8018B30 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483369&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt;.test1: &lt;span style="color:#66d9ef"&gt;INSERT&lt;/span&gt;: a[integer]:&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; b[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;qwer&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;c&lt;/span&gt;[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;qwer&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A8018C50 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483369&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;COMMIT&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483369&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(&lt;span style="color:#ae81ff"&gt;5&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;rows&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--insert is decoded, containing all columns
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;update&lt;/span&gt; test1 &lt;span style="color:#66d9ef"&gt;set&lt;/span&gt; b&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#39;zxcv&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;where&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;c&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#39;qwer&amp;#39;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;UPDATE&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Time: &lt;span style="color:#ae81ff"&gt;4&lt;/span&gt;.&lt;span style="color:#ae81ff"&gt;005&lt;/span&gt; ms
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; pg_logical_slot_peek_changes(&lt;span style="color:#e6db74"&gt;&amp;#39;logical_dest&amp;#39;&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; lsn &lt;span style="color:#f92672"&gt;|&lt;/span&gt; xid &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;data&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--------------+-----------+--------------------------------------------------------------------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A8004C78 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483335&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;BEGIN&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483335&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A80103E8 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483335&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;COMMIT&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483335&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A8018B30 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483369&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;BEGIN&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483369&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A8018B30 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483369&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt;.test1: &lt;span style="color:#66d9ef"&gt;INSERT&lt;/span&gt;: a[integer]:&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; b[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;qwer&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;c&lt;/span&gt;[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;qwer&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A8018C50 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483369&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;COMMIT&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483369&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A801D018 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483378&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;BEGIN&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483378&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A801D018 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483378&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt;.test1: &lt;span style="color:#66d9ef"&gt;UPDATE&lt;/span&gt;: a[integer]:&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; b[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;zxcv&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;c&lt;/span&gt;[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;qwer&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A801D098 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483378&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;COMMIT&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483378&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(&lt;span style="color:#ae81ff"&gt;8&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;rows&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--update is decoded, containing all columns&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Normally, without TOAST, decoded data includes all columns of the row.&lt;/p&gt;
&lt;p&gt;TOAST decoding test:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--Enlarge the columns
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; test1 &lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;column&lt;/span&gt; b &lt;span style="color:#66d9ef"&gt;type&lt;/span&gt; varchar(&lt;span style="color:#ae81ff"&gt;3000&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;ALTER&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;TABLE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Time: &lt;span style="color:#ae81ff"&gt;8&lt;/span&gt;.&lt;span style="color:#ae81ff"&gt;091&lt;/span&gt; ms
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; test1 &lt;span style="color:#66d9ef"&gt;alter&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;column&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;c&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;type&lt;/span&gt; varchar(&lt;span style="color:#ae81ff"&gt;3000&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;ALTER&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;TABLE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Time: &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;.&lt;span style="color:#ae81ff"&gt;937&lt;/span&gt; ms
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--A batch random function
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;create&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;or&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;replace&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;function&lt;/span&gt; f_random_str(&lt;span style="color:#66d9ef"&gt;length&lt;/span&gt; INTEGER) &lt;span style="color:#66d9ef"&gt;returns&lt;/span&gt; character varying
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;LANGUAGE&lt;/span&gt; plpgsql
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;AS&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;$$&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;DECLARE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;result&lt;/span&gt; varchar(&lt;span style="color:#ae81ff"&gt;3000&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;BEGIN&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;SELECT&lt;/span&gt; array_to_string(ARRAY(&lt;span style="color:#66d9ef"&gt;SELECT&lt;/span&gt; chr((&lt;span style="color:#ae81ff"&gt;65&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; round(random() &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;25&lt;/span&gt;)) :: integer)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;FROM&lt;/span&gt; generate_series(&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;length&lt;/span&gt;)), &lt;span style="color:#e6db74"&gt;&amp;#39;&amp;#39;&lt;/span&gt;) &lt;span style="color:#66d9ef"&gt;INTO&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;result&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;result&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;END&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;$$&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;CREATE&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;FUNCTION&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--Insert data
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;insert&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;into&lt;/span&gt; test1 &lt;span style="color:#66d9ef"&gt;values&lt;/span&gt; (&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;,f_random_str(&lt;span style="color:#ae81ff"&gt;2000&lt;/span&gt;),f_random_str(&lt;span style="color:#ae81ff"&gt;2000&lt;/span&gt;));
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;INSERT&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--Check for TOAST
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;SELECT&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; n.nspname &lt;span style="color:#66d9ef"&gt;as&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;schema&lt;/span&gt;, 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; s.oid::regclass &lt;span style="color:#66d9ef"&gt;as&lt;/span&gt; relname, 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; s.reltoastrelid::regclass &lt;span style="color:#66d9ef"&gt;as&lt;/span&gt; toast_name, 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; pg_relation_size(s.reltoastrelid) &lt;span style="color:#66d9ef"&gt;AS&lt;/span&gt; toast_size 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;FROM&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; pg_class s &lt;span style="color:#66d9ef"&gt;join&lt;/span&gt; pg_namespace n 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;on&lt;/span&gt; s.relnamespace &lt;span style="color:#f92672"&gt;=&lt;/span&gt; n.oid 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;WHERE&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; relkind &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;r&amp;#39;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;AND&lt;/span&gt; reltoastrelid &lt;span style="color:#f92672"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;AND&lt;/span&gt; n.nspname &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;public&amp;#39;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;ORDER&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;BY&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;DESC&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;schema&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; relname &lt;span style="color:#f92672"&gt;|&lt;/span&gt; toast_name &lt;span style="color:#f92672"&gt;|&lt;/span&gt; toast_size 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--------+---------+--------------------------+------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; test1 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; pg_toast.pg_toast_418714 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;8192&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;row&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--Update via primary key, updating a TOAST column
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;update&lt;/span&gt; test1 &lt;span style="color:#66d9ef"&gt;set&lt;/span&gt; b&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#39;zxcv&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;where&lt;/span&gt; a&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;UPDATE&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; pg_logical_slot_peek_changes(&lt;span style="color:#e6db74"&gt;&amp;#39;logical_dest&amp;#39;&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; lsn &lt;span style="color:#f92672"&gt;|&lt;/span&gt; xid &lt;span style="color:#f92672"&gt;|&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;--------------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A851FD90 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483420&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;BEGIN&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483420&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A85216E0 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483420&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt;.test1: &lt;span style="color:#66d9ef"&gt;INSERT&lt;/span&gt;: a[integer]:&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; b[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;GIORCXQQWDBGTUNDZXAWMPYOUEGTECWTVQGDQGSPMEPJNPUQIFMESLRASBZWGONETRENDCHLDWVTDWJLTGRYUMFDOWHLEYLUTECPOVCYXFIATLKVEQTHSC&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A85218A0 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483420&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;COMMIT&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483420&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A8525CA8 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483429&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;BEGIN&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483429&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A8525D50 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483429&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;table&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;public&lt;/span&gt;.test1: &lt;span style="color:#66d9ef"&gt;UPDATE&lt;/span&gt;: a[integer]:&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; b[character varying]:&lt;span style="color:#e6db74"&gt;&amp;#39;zxcv&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;c&lt;/span&gt;[character varying]:unchanged&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;toast&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;datum
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A8525DE0 &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483429&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;COMMIT&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483429&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Column c, which has TOAST and was not involved in the update, has no decoded data — it directly outputs toast datum unchanged: &lt;code&gt;unchanged-toast-datum&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Testing with wal2json:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; pg_create_logical_replication_slot(&lt;span style="color:#e6db74"&gt;&amp;#39;logical_json&amp;#39;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#39;wal2json&amp;#39;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; pg_create_logical_replication_slot 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; (logical_json,&lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A87CAB58)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;row&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;update&lt;/span&gt; test1 &lt;span style="color:#66d9ef"&gt;set&lt;/span&gt; b&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#39;zxcv&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;where&lt;/span&gt; a&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;UPDATE&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;pset format wrapped
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;Output&lt;/span&gt; format &lt;span style="color:#66d9ef"&gt;is&lt;/span&gt; wrapped.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;pset columns &lt;span style="color:#ae81ff"&gt;200&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Target width &lt;span style="color:#66d9ef"&gt;is&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;200&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; pg_logical_slot_peek_changes(&lt;span style="color:#e6db74"&gt;&amp;#39;logical_json&amp;#39;&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;[ RECORD &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; ]&lt;span style="color:#75715e"&gt;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;lsn &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A87CACF8
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;xid &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483495&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;data&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;{&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;change&amp;#34;&lt;/span&gt;:[&lt;span style="color:#960050;background-color:#1e0010"&gt;{&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;kind&amp;#34;&lt;/span&gt;:&lt;span style="color:#e6db74"&gt;&amp;#34;update&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;schema&amp;#34;&lt;/span&gt;:&lt;span style="color:#e6db74"&gt;&amp;#34;public&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;table&amp;#34;&lt;/span&gt;:&lt;span style="color:#e6db74"&gt;&amp;#34;test1&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;columnnames&amp;#34;&lt;/span&gt;:[&lt;span style="color:#e6db74"&gt;&amp;#34;a&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;b&amp;#34;&lt;/span&gt;],&lt;span style="color:#e6db74"&gt;&amp;#34;columntypes&amp;#34;&lt;/span&gt;:[&lt;span style="color:#e6db74"&gt;&amp;#34;integer&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;character varying(3000)&amp;#34;&lt;/span&gt;],&lt;span style="color:#e6db74"&gt;&amp;#34;columnvalues&amp;#34;&lt;/span&gt;:[&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;zxcv&amp;#34;&lt;/span&gt;],&lt;span style="color:#e6db74"&gt;&amp;#34;oldkeys&amp;#34;&lt;/span&gt;:&lt;span style="color:#960050;background-color:#1e0010"&gt;{&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;keynames&amp;#34;&lt;/span&gt;:[&lt;span style="color:#e6db74"&gt;&amp;#34;a&amp;#34;&lt;/span&gt;],.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt;.&lt;span style="color:#e6db74"&gt;&amp;#34;keytypes&amp;#34;&lt;/span&gt;:[&lt;span style="color:#e6db74"&gt;&amp;#34;integer&amp;#34;&lt;/span&gt;],&lt;span style="color:#e6db74"&gt;&amp;#34;keyvalues&amp;#34;&lt;/span&gt;:[&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;]&lt;span style="color:#960050;background-color:#1e0010"&gt;}}&lt;/span&gt;]&lt;span style="color:#960050;background-color:#1e0010"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;update&lt;/span&gt; test1 &lt;span style="color:#66d9ef"&gt;set&lt;/span&gt; b&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#39;zxcv&amp;#39;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;where&lt;/span&gt; a&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;UPDATE&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Time: &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;.&lt;span style="color:#ae81ff"&gt;391&lt;/span&gt; ms
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;select&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;from&lt;/span&gt; pg_logical_slot_peek_changes(&lt;span style="color:#e6db74"&gt;&amp;#39;logical_json&amp;#39;&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;null&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;[ RECORD &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; ]&lt;span style="color:#75715e"&gt;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;lsn &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A87CACF8
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;xid &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483495&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;data&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;{&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;change&amp;#34;&lt;/span&gt;:[&lt;span style="color:#960050;background-color:#1e0010"&gt;{&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;kind&amp;#34;&lt;/span&gt;:&lt;span style="color:#e6db74"&gt;&amp;#34;update&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;schema&amp;#34;&lt;/span&gt;:&lt;span style="color:#e6db74"&gt;&amp;#34;public&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;table&amp;#34;&lt;/span&gt;:&lt;span style="color:#e6db74"&gt;&amp;#34;test1&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;columnnames&amp;#34;&lt;/span&gt;:[&lt;span style="color:#e6db74"&gt;&amp;#34;a&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;b&amp;#34;&lt;/span&gt;],&lt;span style="color:#e6db74"&gt;&amp;#34;columntypes&amp;#34;&lt;/span&gt;:[&lt;span style="color:#e6db74"&gt;&amp;#34;integer&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;character varying(3000)&amp;#34;&lt;/span&gt;],&lt;span style="color:#e6db74"&gt;&amp;#34;columnvalues&amp;#34;&lt;/span&gt;:[&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;zxcv&amp;#34;&lt;/span&gt;],&lt;span style="color:#e6db74"&gt;&amp;#34;oldkeys&amp;#34;&lt;/span&gt;:&lt;span style="color:#960050;background-color:#1e0010"&gt;{&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;keynames&amp;#34;&lt;/span&gt;:[&lt;span style="color:#e6db74"&gt;&amp;#34;a&amp;#34;&lt;/span&gt;],.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt;.&lt;span style="color:#e6db74"&gt;&amp;#34;keytypes&amp;#34;&lt;/span&gt;:[&lt;span style="color:#e6db74"&gt;&amp;#34;integer&amp;#34;&lt;/span&gt;],&lt;span style="color:#e6db74"&gt;&amp;#34;keyvalues&amp;#34;&lt;/span&gt;:[&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;]&lt;span style="color:#960050;background-color:#1e0010"&gt;}}&lt;/span&gt;]&lt;span style="color:#960050;background-color:#1e0010"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;[ RECORD &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; ]&lt;span style="color:#75715e"&gt;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;lsn &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;349&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;A8CCA0D8
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;xid &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;872483509&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;data&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;{&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;change&amp;#34;&lt;/span&gt;:[&lt;span style="color:#960050;background-color:#1e0010"&gt;{&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;kind&amp;#34;&lt;/span&gt;:&lt;span style="color:#e6db74"&gt;&amp;#34;update&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;schema&amp;#34;&lt;/span&gt;:&lt;span style="color:#e6db74"&gt;&amp;#34;public&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;table&amp;#34;&lt;/span&gt;:&lt;span style="color:#e6db74"&gt;&amp;#34;test1&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;columnnames&amp;#34;&lt;/span&gt;:[&lt;span style="color:#e6db74"&gt;&amp;#34;a&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;b&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;c&amp;#34;&lt;/span&gt;],&lt;span style="color:#e6db74"&gt;&amp;#34;columntypes&amp;#34;&lt;/span&gt;:[&lt;span style="color:#e6db74"&gt;&amp;#34;integer&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;character varying(3000)&amp;#34;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;character varying(3000)&amp;#34;&lt;/span&gt;],&lt;span style="color:#e6db74"&gt;&amp;#34;columnvalues&amp;#34;&lt;/span&gt;:[&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#34;zxcv&amp;#34;&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt;.,&lt;span style="color:#e6db74"&gt;&amp;#34;qwer&amp;#34;&lt;/span&gt;],&lt;span style="color:#e6db74"&gt;&amp;#34;oldkeys&amp;#34;&lt;/span&gt;:&lt;span style="color:#960050;background-color:#1e0010"&gt;{&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;keynames&amp;#34;&lt;/span&gt;:[&lt;span style="color:#e6db74"&gt;&amp;#34;a&amp;#34;&lt;/span&gt;],&lt;span style="color:#e6db74"&gt;&amp;#34;keytypes&amp;#34;&lt;/span&gt;:[&lt;span style="color:#e6db74"&gt;&amp;#34;integer&amp;#34;&lt;/span&gt;],&lt;span style="color:#e6db74"&gt;&amp;#34;keyvalues&amp;#34;&lt;/span&gt;:[&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;]&lt;span style="color:#960050;background-color:#1e0010"&gt;}}&lt;/span&gt;]&lt;span style="color:#960050;background-color:#1e0010"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;--When updating, column c data is not decoded&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;wal2json shows the same behavior.&lt;/p&gt;
&lt;p&gt;MySQL&amp;rsquo;s &lt;a href="https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_row_image" target="_blank" rel="noreferrer"&gt;&lt;code&gt;binlog_row_image&lt;/code&gt;&lt;/a&gt; parameter can adjust whether binlog records large fields:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;full&lt;/code&gt; (Log all columns)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;minimal&lt;/code&gt; (Log only changed columns, and columns needed to identify rows)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;noblob&lt;/code&gt; (Log all columns, except for unneeded BLOB and TEXT columns)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;PG has absolutely no such control — by default, TOAST columns are not decoded, and there are no other options to configure~&lt;/p&gt;</content:encoded></item><item><title>Chatting About American TV Shows — June 2023</title><link>https://lastdba.com/en/2023/06/01/chatting-about-american-tv-shows-june-2023/</link><pubDate>Thu, 01 Jun 2023 00:00:00 +0000</pubDate><guid>https://lastdba.com/en/2023/06/01/chatting-about-american-tv-shows-june-2023/</guid><description>&lt;p&gt;​
I just finished watching the &lt;em&gt;Yellowstone&lt;/em&gt; series and decided to write a bit about the American shows I&amp;rsquo;ve watched recently — eleven in total. Here&amp;rsquo;s a quick review of each.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Yellowstone
 &lt;div id="yellowstone" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#yellowstone" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Yellowstone&lt;/em&gt; is already at its fifth season, and it looks like they&amp;rsquo;ll keep going. When I first started watching, I genuinely got hooked — a beautiful, grand series with stunning cinematography and gorgeous scenery. Plus, you get to see how real American ranchers herd cattle — actual ranchers really do have that old-money landowner vibe&amp;hellip;&lt;/p&gt;</description><content:encoded>&lt;p&gt;​
I just finished watching the &lt;em&gt;Yellowstone&lt;/em&gt; series and decided to write a bit about the American shows I&amp;rsquo;ve watched recently — eleven in total. Here&amp;rsquo;s a quick review of each.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Yellowstone
 &lt;div id="yellowstone" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#yellowstone" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Yellowstone&lt;/em&gt; is already at its fifth season, and it looks like they&amp;rsquo;ll keep going. When I first started watching, I genuinely got hooked — a beautiful, grand series with stunning cinematography and gorgeous scenery. Plus, you get to see how real American ranchers herd cattle — actual ranchers really do have that old-money landowner vibe&amp;hellip;&lt;/p&gt;
&lt;p&gt;Season one&amp;rsquo;s plot holds up fine — the dynamics between the Dutton family, the Native Americans, the state government, and the developers work well, and you can casually enjoy watching cowboys herd cattle along the way. But the plot in later seasons&amp;hellip; is unexpectedly bad. Downright incomprehensible. It lowers the bar for screenwriting.&lt;/p&gt;
&lt;p&gt;Zooming into the show&amp;rsquo;s core: why do so many people love this series? Because &lt;em&gt;Yellowstone&lt;/em&gt; doesn&amp;rsquo;t just depict authentic cowboy life (they even filmed some genuine ranch cowboy life later on) — it also reflects the harsh reality that old ranches can barely survive under modern societal development. And cowboy culture and private land are the very heart of American identity. It&amp;rsquo;s not just the Dutton family stubbornly trying to preserve the ranching way of life — it almost feels like a clash between urban American development and native cultural preservation.&lt;/p&gt;
&lt;p&gt;I can responsibly say: the plot definitely gets worse with each season — so bad that the main storyline becomes unwatchable. But if they release more seasons, this show will still be my top priority over everything else.&lt;/p&gt;
&lt;p&gt;Personal rating: ⭐️⭐️⭐️⭐️⭐️&lt;/p&gt;
&lt;p&gt;Recommended: ⭐️⭐️⭐️&lt;/p&gt;

&lt;h2 class="relative group"&gt;1923
 &lt;div id="1923" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1923" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;A &lt;em&gt;Yellowstone&lt;/em&gt; prequel series. Maybe because &lt;em&gt;Yellowstone&lt;/em&gt; is so famous, this prequel &lt;em&gt;1923&lt;/em&gt; ended up with a bit too many stars — it left a bad impression from the start. Perhaps the creators thought &lt;em&gt;Yellowstone&lt;/em&gt;&amp;rsquo;s plot wasn&amp;rsquo;t good enough, and that a show purely about cowboys would be hard to craft a compelling script for, so they added two subplots to &lt;em&gt;1923&lt;/em&gt;. But adding subplots created another problem: the show doesn&amp;rsquo;t feel enough like &lt;em&gt;Yellowstone&lt;/em&gt;. Constant cutting between storylines — no &amp;ldquo;slow-paced&amp;rdquo; &lt;em&gt;Yellowstone&lt;/em&gt; vibe.&lt;/p&gt;
&lt;p&gt;The Native American girl&amp;rsquo;s storyline seems completely disconnected from the main plot — no idea when it&amp;rsquo;ll tie in. But this Native girl subplot is actually pretty good. Native lands were stolen, and their children were sent to boarding schools to be forcibly indoctrinated with white Christian beliefs. This subplot genuinely carries the &lt;em&gt;Yellowstone&lt;/em&gt; spirit. The Native characters are cold-blooded killers too — none of that &amp;ldquo;bullet in the body but still politicking&amp;rdquo; dissonance. The narrative flows smoothly without dragging; this subplot is quite watchable.&lt;/p&gt;
&lt;p&gt;As for the Africa subplot&amp;hellip; while they do capture some scenery, it&amp;rsquo;s just not as good as the Dutton ranch — doesn&amp;rsquo;t have that feeling. And once they leave Africa, it starts dragging, heavily focusing on a grand romance set against the era&amp;rsquo;s backdrop — but what does that have to do with &lt;em&gt;Yellowstone&lt;/em&gt;? And this storyline waited an entire season without converging into the main plot&amp;hellip; An entire season of setup for one character, framed as &amp;ldquo;the Dutton ranch&amp;rsquo;s hope rests on him&amp;rdquo; — the stakes are too high, and the subplot itself isn&amp;rsquo;t that compelling. Season two is highly likely to be a massive flop.&lt;/p&gt;
&lt;p&gt;The early part of &lt;em&gt;1923&lt;/em&gt; still had some ranch-versus-the-tide-of-history flavor. Later it&amp;rsquo;s pure padding — they don&amp;rsquo;t even film cattle herding anymore. Completely devoid of interest. Can&amp;rsquo;t even muster a decent fight. Kind of bad. Only eight episodes in the whole season, and the plot starts falling apart halfway through — didn&amp;rsquo;t learn anything from &lt;em&gt;Yellowstone&lt;/em&gt; except how to botch the ending.&lt;/p&gt;
&lt;p&gt;You can tell this show wanted to inherit &lt;em&gt;Yellowstone&lt;/em&gt; but also try something new — depicting that era&amp;rsquo;s America and Europe (even colonial Africa) — but ended up being a mess of everything and nothing. If you want to revisit that era, I recommend &lt;em&gt;Boardwalk Empire&lt;/em&gt;, which is set around the same time (Prohibition era) and has far more period atmosphere than this show.&lt;/p&gt;
&lt;p&gt;Personal rating: ⭐️⭐️⭐️&lt;/p&gt;
&lt;p&gt;Recommended: ⭐️⭐️&lt;/p&gt;

&lt;h2 class="relative group"&gt;1883
 &lt;div id="1883" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1883" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;1883&lt;/em&gt; — a grand, tragic Western epic. A &lt;em&gt;Yellowstone&lt;/em&gt; series entry, the prequel to the prequel. It feels like watching an epic saga, leaving you wanting more. It&amp;rsquo;s no longer just a simple TV show — the cinematography even has literary and artistic qualities, while also carrying a slice of American pioneering history. The U.S. had just emerged from the Civil War, everything was waiting to be rebuilt&amp;hellip;&lt;/p&gt;
&lt;p&gt;I personally really enjoy shows like &lt;em&gt;Yellowstone&lt;/em&gt; — the filming style suits my taste. But the main series plot is aggressively terrible; I&amp;rsquo;d rather just watch them ride horses on the ranch and skip the main storyline entirely. &lt;em&gt;1883&lt;/em&gt; fills that gap perfectly — not too much complex plot (but not too little either), just right. Look at the valley, look at the horses, add some epic BGM, and the immersion is strong.&lt;/p&gt;
&lt;p&gt;The entire &lt;em&gt;1883&lt;/em&gt; series doesn&amp;rsquo;t actually have much plot, but it tells a very complete story. America had just ended its Civil War, in an era of lawlessness — cowboys, bandits, sheriffs, European immigrants, Native Americans&amp;hellip; There&amp;rsquo;s some classic cowboy shootout action, but the focus is more on cowboy life and immigrants&amp;rsquo; yearning for freedom. Yet the road to freedom is full of hardship: horse thieves, Native tribes, rattlesnakes, tornadoes, and this unforgiving land. A deeply profound show. Other than the female lead&amp;rsquo;s runny nose being a minus, there&amp;rsquo;s nothing to criticize. The plot is that rare combination of complete and perfectly proportioned. Very, very highly recommended.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a favorite line describing cowboys:&lt;/p&gt;
&lt;p&gt;Personal rating: ⭐️⭐️⭐️⭐️⭐️&lt;/p&gt;
&lt;p&gt;Recommended: ⭐️⭐️⭐️⭐️⭐️&lt;/p&gt;

&lt;h2 class="relative group"&gt;Tulsa King
 &lt;div id="tulsa-king" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#tulsa-king" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;A pure thrill ride. Starring 70-something Sylvester Stallone as an old-school mobster who&amp;rsquo;s been locked up for decades, now reasserting order over a small city&amp;rsquo;s underworld. &amp;ldquo;It&amp;rsquo;s not that I can&amp;rsquo;t adapt — it&amp;rsquo;s that people today have messed-up rules.&amp;rdquo; Us old-school gangsters follow a code~ The plot has no real flaws, no dragging — just pure entertainment. Not sure if they&amp;rsquo;ll keep making more.&lt;/p&gt;
&lt;p&gt;Personal rating: ⭐️⭐️⭐️⭐️&lt;/p&gt;
&lt;p&gt;Recommended: ⭐️⭐️⭐️⭐️⭐️&lt;/p&gt;

&lt;h2 class="relative group"&gt;Wednesday
 &lt;div id="wednesday" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#wednesday" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;A fun watch, pretty decent. I&amp;rsquo;d never seen a gothic Lolita-style American show before, and it looks pretty good. The early parts are quite engaging and fresh. Later, when it leans into mystery, it falls off — everyone can tell who&amp;rsquo;s behind it, except Wednesday (the main character)&amp;hellip; (A lot of American mystery shows are like this — start strong, then gradually fall apart.) If you&amp;rsquo;ve never tried the gothic Lolita style, give it a shot.&lt;/p&gt;
&lt;p&gt;Personal rating: ⭐️⭐️⭐️⭐️&lt;/p&gt;
&lt;p&gt;Recommended: ⭐️⭐️⭐️&lt;/p&gt;

&lt;h2 class="relative group"&gt;The Last of Us
 &lt;div id="the-last-of-us" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-last-of-us" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Adapted from the video game of the same name — which I somehow never played! Precisely because I hadn&amp;rsquo;t played it, I could watch the show with a calm mind. Starring the hugely popular Lyanna Mormont (Bella Ramsey) and Oberyn Martell (Pedro Pascal) from &lt;em&gt;Game of Thrones&lt;/em&gt; — both deliver smooth, natural performances. It&amp;rsquo;s a post-apocalyptic zombie-type show, but the zombies aren&amp;rsquo;t from a virus — they&amp;rsquo;re from a fungal infection. The zombies&amp;rsquo; brains are full of fungus. One memorable scene: Bella&amp;rsquo;s character cuts open the head of a zombie stuck between rocks, and the fungus inside spills out — still alive. Maybe because of the fungus element, it&amp;rsquo;s more satisfying than the average zombie show. The visuals are great — not dark and murky, and not overly disgusting. A complete, well-told story with excellent cinematography. There&amp;rsquo;s one segment near the end that personally left me with some psychological discomfort, but overall the plot absolutely holds up. Several smaller storylines are beautifully told. Very good overall, highly recommended.&lt;/p&gt;
&lt;p&gt;Personal rating: ⭐️⭐️⭐️⭐️&lt;/p&gt;
&lt;p&gt;Recommended: ⭐️⭐️⭐️⭐️⭐️&lt;/p&gt;

&lt;h2 class="relative group"&gt;Boardwalk Empire
 &lt;div id="boardwalk-empire" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#boardwalk-empire" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;A series spanning four seasons, now complete. Set in 1920s America, right after Prohibition was enacted. Women stood outside bars calling for their rights; politicians publicly supported women while privately running bootlegging operations; gangsters stepped out of cars in trench coats, Thompson submachine guns blazing&amp;hellip; Boardwalk Empire is about the gangster empire of Atlantic City (just below New York), built on bootlegging into a wealth rivaling nations. I imagine many have seen &lt;em&gt;Once Upon a Time in America&lt;/em&gt; — you can roughly think of this show as its TV series counterpart. This one is hard to summarize — let&amp;rsquo;s go season by season.&lt;/p&gt;
&lt;p&gt;Season one is god-tier. Plenty of risqué scenes, and the plot isn&amp;rsquo;t just smooth — it&amp;rsquo;s miraculous. Women, black communities, bootlegging, jazz, gang wars, WWI veterans&amp;hellip; Gangsters have essentially seized control of the city — even the newspapers don&amp;rsquo;t care what the mayor says.&lt;/p&gt;
&lt;p&gt;Season two is a direct continuation of season one — also excellent.&lt;/p&gt;
&lt;p&gt;Season three introduces problems. It doesn&amp;rsquo;t feel like a continuation of the first two seasons (though some plot threads connect) — it could almost stand alone. Is the plot bad? Yes, it&amp;rsquo;s disconnected. But is it terrible? Taken on its own, it&amp;rsquo;s not flawed — it&amp;rsquo;s even somewhat entertaining. This season has many brilliant segments: Half-Face taking on ten men alone, the jaw-dropping plotline of the formidable madam, extended solo blues performances by black characters — all superb!&lt;/p&gt;
&lt;p&gt;Season four is full of issues. I thought my favorite character, dormant for three seasons, would finally take center stage and do something meaningful — instead, he was hastily written off. Dear writers, if that&amp;rsquo;s how it was going to be, could you not have put him on the poster? Made it seem like something big was coming — got my hopes up for nothing&amp;hellip; Season four&amp;rsquo;s protagonist has risen too high, making it hard to drive the plot (you could already feel this in season three). The only highlight of season four is the protagonist&amp;rsquo;s childhood flashbacks — a perfect closure to his arc.&lt;/p&gt;
&lt;p&gt;Many characters&amp;rsquo; later arcs are unsatisfying, but many characters&amp;rsquo; mid-series arcs are just too brilliant&amp;hellip; Although this show isn&amp;rsquo;t hugely popular, it did win awards, and you can see many scenes being referenced by later, higher-profile American shows. For example, Gus Fring&amp;rsquo;s arc in &lt;em&gt;Breaking Bad&lt;/em&gt; borrows from Half-Face; King Tommen&amp;rsquo;s suicide in &lt;em&gt;Game of Thrones&lt;/em&gt; &amp;ldquo;completely&amp;rdquo; borrows from the butler&amp;rsquo;s suicide&amp;hellip;&lt;/p&gt;
&lt;p&gt;I really love this show — it immerses you in the glamorous cities of that era, the decadent urban life, the jazz of underground speakeasies, the gangsters&amp;hellip; A narrative that holds nothing back (I mean that about everything). The series as a whole is excellent, rich with period atmosphere.&lt;/p&gt;
&lt;p&gt;Personal rating: ⭐️⭐️⭐️⭐️⭐️&lt;/p&gt;
&lt;p&gt;Recommended: ⭐️⭐️⭐️⭐️&lt;/p&gt;

&lt;h2 class="relative group"&gt;Band of Brothers
 &lt;div id="band-of-brothers" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#band-of-brothers" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m sure many have heard of this show&amp;rsquo;s reputation. Yes — I somehow hadn&amp;rsquo;t seen it. My elementary-school-level writing ability and limited education prevent me from offering any meaningful critique. Only one word can describe it: divine. I&amp;rsquo;ll find a chance to watch it again~&lt;/p&gt;
&lt;p&gt;Personal rating: ⭐️⭐️⭐️⭐️⭐️&lt;/p&gt;
&lt;p&gt;Recommended: ⭐️⭐️⭐️⭐️⭐️&lt;/p&gt;

&lt;h2 class="relative group"&gt;The Pacific
 &lt;div id="the-pacific" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-pacific" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;The Pacific&lt;/em&gt; was made shortly before &lt;em&gt;Band of Brothers&lt;/em&gt;. It&amp;rsquo;s actually a very good show, but then that monster came along, and this one&amp;rsquo;s reputation never reached the same heights. &lt;em&gt;Band of Brothers&lt;/em&gt; covers the European theater of WWII; this show covers the Pacific theater. Strangely, the two shows mirror their respective theaters — the European theater is far better known, and the shows follow suit&amp;hellip; Even within the show, at the same dinner table, a European theater soldier shows off a captured Nazi banner while the Pacific theater soldier has nothing to show — a touch of melancholy.&lt;/p&gt;
&lt;p&gt;Though not as famous, this is a very, very highly recommended show.&lt;/p&gt;
&lt;p&gt;Personal rating: ⭐️⭐️⭐️⭐️⭐️&lt;/p&gt;
&lt;p&gt;Recommended: ⭐️⭐️⭐️⭐️⭐️&lt;/p&gt;

&lt;h2 class="relative group"&gt;The Mandalorian
 &lt;div id="the-mandalorian" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-mandalorian" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;The Mandalorian&lt;/em&gt; is already at its third season. Also starring Pedro Pascal, also a dad-with-kid storyline&amp;hellip; The first two seasons were quite good and fairly popular. This third season? Not so much. The Mandalorian should probably remain a ronin-like figure driving the plot forward — a whole group of Mandalorians building a homeland just doesn&amp;rsquo;t feel right. The protagonist&amp;rsquo;s identity even gets a bit diluted. (Run, man — take the kid and adventure across the galaxy — isn&amp;rsquo;t that better?)&lt;/p&gt;
&lt;p&gt;My appreciation for this show is premised on liking the Star Wars universe. In China, Star Wars fans are genuinely rare. If you&amp;rsquo;re not into it, you probably won&amp;rsquo;t get through it — feel free to skip.&lt;/p&gt;
&lt;p&gt;Personal rating: ⭐️⭐️⭐️⭐️⭐️&lt;/p&gt;
&lt;p&gt;Recommended: ⭐️&lt;/p&gt;

&lt;h2 class="relative group"&gt;The White Tower (Shiroi Kyoto)
 &lt;div id="the-white-tower-shiroi-kyoto" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-white-tower-shiroi-kyoto" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;This one is a Japanese drama. I want to end with it, because it truly is exceptional — near perfect. Though it&amp;rsquo;s somewhat old, it never feels boring while watching. Many ideas are surprisingly forward-thinking, the plot rises and falls dramatically, good and evil are never absolute, and several female characters are beautifully drawn. You&amp;rsquo;ll see some classic love triangles and plot twists, and revisiting them is still quite rewarding. Professor Zaizen&amp;rsquo;s final act brings the entire series to a perfect close. Japanese drama — number one!&lt;/p&gt;
&lt;p&gt;Personal rating: ⭐️⭐️⭐️⭐️⭐️&lt;/p&gt;
&lt;p&gt;Recommended: ⭐️⭐️⭐️⭐️⭐️&lt;/p&gt;

&lt;h2 class="relative group"&gt;Closing
 &lt;div id="closing" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#closing" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;All of these are worth watching, and many are masterpieces. Some shows I couldn&amp;rsquo;t find subtitled versions for, so I watched them raw — like the &lt;em&gt;Yellowstone&lt;/em&gt; prequel &lt;em&gt;1883&lt;/em&gt;. Since the dialogue wasn&amp;rsquo;t overly complex, I managed to get through it (the narration is quite sophisticated)&amp;hellip; Marking my first raw viewing.&lt;/p&gt;
&lt;p&gt;These are basically all the shows I&amp;rsquo;ve watched in the last half year or so, so I&amp;rsquo;m bundling them together. There are many other brilliant shows from earlier that left a deep impression — I&amp;rsquo;ll save that for another time when I&amp;rsquo;m in the mood~&lt;/p&gt;
&lt;p&gt;Hoping to find more good shows in the second half of the year.&lt;/p&gt;
&lt;p&gt;​&lt;/p&gt;</content:encoded></item></channel></rss>