pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Test decoding of two-phase transactions during the build of a co
6+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2021-01-09 e33d004900  Fix the test for decoding of two-phase transactions.
* pgsql: Test decoding of two-phase transactions during the build of a co
@ 2021-01-05 09:36  Amit Kapila <akapila@postgresql.org>
  0 siblings, 1 reply; 6+ messages in thread

From: Amit Kapila @ 2021-01-05 09:36 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Test decoding of two-phase transactions during the build of a consistent snapshot.

Commit a271a1b50e added the capability to allow decoding at prepare time.
This adds an isolation testcase to test that decoding happens at commit
time when the consistent snapshot state is reached after prepare but
before commit prepared.

Author: Ajin Cherian
Reviewed-by: Amit Kapila
Discussion:
https://postgr.es/m/02DA5F5E-CECE-4D9C-8B4B-418077E2C010@postgrespro.ru
https://postgr.es/m/CAMGcDxeqEpWj3fTXwqhSwBdXd2RS9jzwWscO-XbeCfso6ts3+Q@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5a3574d7b33480de51692962e6fd25d00c05718a

Modified Files
--------------
contrib/test_decoding/Makefile                     |  3 +-
.../test_decoding/expected/twophase_snapshot.out   | 41 +++++++++++++++++
contrib/test_decoding/specs/twophase_snapshot.spec | 53 ++++++++++++++++++++++
3 files changed, 96 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pgsql: Test decoding of two-phase transactions during the build of a co
@ 2021-01-09 05:47  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Amit Kapila <akapila@postgresql.org>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2021-01-09 05:47 UTC (permalink / raw)
  To: Amit Kapila <akapila@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

Amit Kapila <akapila@postgresql.org> writes:
> Test decoding of two-phase transactions during the build of a consistent snapshot.

It seems this test case isn't 100% stable:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=chipmunk&dt=2021-01-08%2023%3A56%3A57

========================== output_iso/regression.diffs ================
inline patch 1: /home/pgbfarm/buildroot/HEAD/pgsql.build/contrib/test_decoding/output_iso/results/twophase_snapshot.out (+6/-0 lines) download inline-1.patchdiff -U3 /home/pgbfarm/buildroot/HEAD/pgsql.build/contrib/test_decoding/expected/twophase_snapshot.out /home/pgbfarm/buildroot/HEAD/pgsql.build/contrib/test_decoding/output_iso/results/twophase_snapshot.out --- /home/pgbfarm/buildroot/HEAD/pgsql.build/contrib/test_decoding/expected/twophase_snapshot.out 2021-01-07 02:49:30.231809843 +0200 +++ /home/pgbfarm/buildroot/HEAD/pgsql.build/contrib/test_decoding/output_iso/results/twophase_snapshot.out 2021-01-09 04:01:26.730510078 +0200 @@ -26,6 +26,8 @@ data BEGIN +COMMIT +BEGIN table public.do_write: INSERT: id[integer]:2 COMMIT step s2cp: COMMIT PREPARED 'test1'; @@ -33,6 +35,10 @@ data BEGIN +COMMIT +BEGIN +COMMIT +BEGIN table public.do_write: INSERT: id[integer]:1 PREPARE TRANSACTION 'test1' COMMIT PREPARED 'test1'
I think we've seen this extra-transactions symptom before, but I don't recall the details at this late hour. regards, tom lane ^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: pgsql: Test decoding of two-phase transactions during the build of a co
@ 2021-01-09 06:48  Amit Kapila <amit.kapila16@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Amit Kapila @ 2021-01-09 06:48 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Amit Kapila <akapila@postgresql.org>; pgsql-committers <pgsql-committers@lists.postgresql.org>

On Sat, Jan 9, 2021 at 11:17 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Amit Kapila <akapila@postgresql.org> writes:
> > Test decoding of two-phase transactions during the build of a consistent snapshot.
>
> It seems this test case isn't 100% stable:
>
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=chipmunk&dt=2021-01-08%2023%3A56%3A57
>
> ========================== output_iso/regression.diffs ================
> diff -U3 /home/pgbfarm/buildroot/HEAD/pgsql.build/contrib/test_decoding/expected/twophase_snapshot.out /home/pgbfarm/buildroot/HEAD/pgsql.build/contrib/test_decoding/output_iso/results/twophase_snapshot.out
> --- /home/pgbfarm/buildroot/HEAD/pgsql.build/contrib/test_decoding/expected/twophase_snapshot.out       2021-01-07 02:49:30.231809843 +0200
> +++ /home/pgbfarm/buildroot/HEAD/pgsql.build/contrib/test_decoding/output_iso/results/twophase_snapshot.out     2021-01-09 04:01:26.730510078 +0200
> @@ -26,6 +26,8 @@
>  data
>
>  BEGIN
> +COMMIT
> +BEGIN
>  table public.do_write: INSERT: id[integer]:2
>  COMMIT
>  step s2cp: COMMIT PREPARED 'test1';
> @@ -33,6 +35,10 @@
>  data
>
>  BEGIN
> +COMMIT
> +BEGIN
> +COMMIT
> +BEGIN
>  table public.do_write: INSERT: id[integer]:1
>  PREPARE TRANSACTION 'test1'
>  COMMIT PREPARED 'test1'
>
> I think we've seen this extra-transactions symptom before,
> but I don't recall the details at this late hour.
>

I'll look into it.

-- 
With Regards,
Amit Kapila.





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pgsql: Test decoding of two-phase transactions during the build of a co
@ 2021-01-09 07:29  Amit Kapila <amit.kapila16@gmail.com>
  parent: Amit Kapila <amit.kapila16@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Amit Kapila @ 2021-01-09 07:29 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Amit Kapila <akapila@postgresql.org>; pgsql-committers <pgsql-committers@lists.postgresql.org>

On Sat, Jan 9, 2021 at 12:18 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Sat, Jan 9, 2021 at 11:17 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >
> >
> > I think we've seen this extra-transactions symptom before,
> > but I don't recall the details at this late hour.
> >
>
> I'll look into it.
>

I think I know whats going on here. I have responded to the thread on
pgsql-hackers [1].

[1] - https://www.postgresql.org/message-id/CAA4eK1J5onGc-sHLj3moS247rJK6KpvM_wAfiOHs6YFnHHs3%2Bw%40mail.g...

-- 
With Regards,
Amit Kapila.





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pgsql: Test decoding of two-phase transactions during the build of a co
@ 2021-01-09 07:38  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Amit Kapila <amit.kapila16@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2021-01-09 07:38 UTC (permalink / raw)
  To: Amit Kapila <amit.kapila16@gmail.com>; +Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>

Amit Kapila <amit.kapila16@gmail.com> writes:
> I think I know whats going on here. I have responded to the thread on
> pgsql-hackers [1].

Ah, yeah, the autovacuum theory fits the facts: chipmunk is pretty
slow, and it's not failed 100% of the time.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pgsql: Test decoding of two-phase transactions during the build of a co
@ 2021-01-09 12:40  Amit Kapila <amit.kapila16@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Amit Kapila @ 2021-01-09 12:40 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>

On Sat, Jan 9, 2021 at 1:09 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Amit Kapila <amit.kapila16@gmail.com> writes:
> > I think I know whats going on here. I have responded to the thread on
> > pgsql-hackers [1].
>
> Ah, yeah, the autovacuum theory fits the facts: chipmunk is pretty
> slow, and it's not failed 100% of the time.
>

I have pushed the fix. It is difficult to reproduce the exact case but
I have reproduced it with a parallel empty xact and pushed the fix.

-- 
With Regards,
Amit Kapila.





^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2021-01-09 12:40 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 09:36 pgsql: Test decoding of two-phase transactions during the build of a co Amit Kapila <akapila@postgresql.org>
2021-01-09 05:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-01-09 06:48   ` Amit Kapila <amit.kapila16@gmail.com>
2021-01-09 07:29     ` Amit Kapila <amit.kapila16@gmail.com>
2021-01-09 07:38       ` Tom Lane <tgl@sss.pgh.pa.us>
2021-01-09 12:40         ` Amit Kapila <amit.kapila16@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox