Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lkdzG-000241-5j for pgsql-sql@arkaria.postgresql.org; Sun, 23 May 2021 02:37:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lkdzE-0007pN-CW for pgsql-sql@arkaria.postgresql.org; Sun, 23 May 2021 02:37:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lkdzD-0007pE-Rs for pgsql-sql@lists.postgresql.org; Sun, 23 May 2021 02:37:03 +0000 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lkdz7-0004hZ-9s for pgsql-sql@lists.postgresql.org; Sun, 23 May 2021 02:37:02 +0000 Received: by mail-pj1-x1042.google.com with SMTP id n6-20020a17090ac686b029015d2f7aeea8so9341300pjt.1 for ; Sat, 22 May 2021 19:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gisticinc-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=Lg1zYxgnlRJPCSXCsNM0QwJYuHxFdX+PN06du30IUwU=; b=wQzjYMfFvmIFpWJkuJTTLvMsKEj83pl0No9g0B5SeIIJj85hMD9us7fX5wSLYVCONP kN6j8quVMAw0O8dUHBmukmO2OK42qagm9rFCdi8YzAXPN5mFkqDuL/vWSvYqNpWn8KDV WPfq7G+65mENGzQ24kEv1pWJQrdi62rFttFvAV2WwUtQZ1OS6mRi+xC03eaqhfhE7KsH bPBzcbbH7sDViu/c72NhUuW7YxmYwAaVFzNfjSYhHlCAR8b2vlbkVEqTXki7+jhjdY/q 4l52ZKOpzuHq8HKWRW8fMquU0Z9mis1B88TbanTBGt7lBNRA1+YbE24mN6qBITv3WkDi jAoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Lg1zYxgnlRJPCSXCsNM0QwJYuHxFdX+PN06du30IUwU=; b=ugCLrB1o/zMVI4TZ7TJFejEI9Qaa0QOB3jSwqi9Jo21jHA1i7wr3cQykEVtH2bYVl3 zamITQ+6Tp2N3uK9jVEeX8vR792dxuv7RgU8EJpojVDdInYbkBHYMRs+sV/agTPTNXlB 3vG9EPOsNG5D7fiuJ/0lkvbxDF4gZuocZuBlNbfCkCYfiGvtYcdpCm+GbJJJdmIfBIHW k6DUwIF3JytCqzH+wFWMfvT9bQ1pxwlZ+CnGTbXxbn1JA0Ru4OGnZkz833iYp8zU1KCd SXHf7xgLef0csRiIh8kkkrxE6keFSTuI5aav52j20SVpkpk8BQqCLgR7rOpm1V4RgpnD iBcw== X-Gm-Message-State: AOAM530L8nJt2HSyp2Uux431E0gBNGa0cFN6QtCjCwLne4e+/4c63AeC lampkRw4YrkWKEbZwgoHvkt36CA6nc4sTSZ7 X-Google-Smtp-Source: ABdhPJxp4BZB26FsLkbL5PAgYSKM+nTF3sIZLWrkunrwIYpVyhwrJ5tPejeDN64pLYDJ8cFwdN1sBA== X-Received: by 2002:a17:90b:10d:: with SMTP id p13mr17723974pjz.131.1621737415805; Sat, 22 May 2021 19:36:55 -0700 (PDT) Received: from snowflake.tempe.gistic.com (wsip-72-215-195-71.ph.ph.cox.net. [72.215.195.71]) by smtp.gmail.com with ESMTPSA id a16sm7720982pfa.95.2021.05.22.19.36.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 22 May 2021 19:36:55 -0700 (PDT) Subject: Re: Getting transaction details from the WAL? To: Christophe Pettus Cc: pgsql-sql@lists.postgresql.org References: <1510da2a-da65-3af7-4a83-88f5856de1fb@gisticinc.com> <52014f4e-b1d5-06fd-660e-b58f4f1188de@gisticinc.com> <72F6C54D-3787-4016-B765-45672851FD72@thebuild.com> From: Bo Guo Message-ID: <0d35264c-aa83-e6aa-1bf9-006495581f82@gisticinc.com> Date: Sat, 22 May 2021 19:36:52 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <72F6C54D-3787-4016-B765-45672851FD72@thebuild.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is great, Thanks, Chrsitophe! Bo On 5/22/21 7:03 PM, Christophe Pettus wrote: > >> On May 22, 2021, at 19:00, Bo Guo wrote: >> >> I am wondering if it is possible to get content changes to a particular table from a point-in-time by exploring the WAL or any other artifacts relating to transaction management. > Perhaps the easiest way to do this is to use logical decoding, which you can use to capture changes from the WAL, converting them to other formats. While it forms the basis of logical replication, there are other plug-ins to the framework. You might look at wal2json: > > https://github.com/eulerto/wal2json > > or the test plugin in contrib/ > > https://www.postgresql.org/docs/current/test-decoding.html