pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Noah Misch <noah@leadboat.com>
To: Semab Tariq <semab.tariq@enterprisedb.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Sandeep Thakkar <sandeep.thakkar@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Andres Freund <andres@anarazel.de>
Cc: CM Team <cm@enterprisedb.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Geoghegan <pg@bowt.ie>
Subject: Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data
Date: Fri, 5 Nov 2021 02:03:47 -0700
Message-ID: <20211105090347.GB671366@rfd.leadboat.com> (raw )
In-Reply-To: <CABimMB4RYDOtVKLp34U7n316ARr4cBBX0dxEgEXMA7X-Coh2=Q@mail.gmail.com >
References: <CANFyU97socOyfjyhS6ZYvguBdP=Fqqu-SK2z1_QT4t7-P5qzLQ@mail.gmail.com >
<6A1F66DD-9A4E-4EB4-BF56-369FDBF30204@yandex-team.ru >
<CANFyU94Xa8a5+4sZ7PxOiDLq+yN89g6y-9nNk-eLEvX6YUXbXA@mail.gmail.com >
<CA+TgmobbOFpogLx6Qem1=WxGo9ineTSTwNE4_ucdgeBtyDCGrg@mail.gmail.com >
<CANFyU96pdjUgGEopmU6KhaU782ff7HF4gvJ1RBqsbXiUWYQvMg@mail.gmail.com >
<20211103044203.GA570491@rfd.leadboat.com >
<CABimMB4mRs9N3eivR-=qF9M8oWc5E6OX7GywsWF0DXN4P5gNEA@mail.gmail.com >
<CA+hUKG+67HCS6sJta2xiaf3Fbw+wx_jyGT+E7nKXWqK5zNyJ7Q@mail.gmail.com >
<20211105013553.GA671366@rfd.leadboat.com >
<CABimMB4RYDOtVKLp34U7n316ARr4cBBX0dxEgEXMA7X-Coh2=Q@mail.gmail.com >
On Fri, Nov 05, 2021 at 11:02:16AM +0500, Semab Tariq wrote:
> After configure when i run make -C sarc/test/subscription check
> PROVE_TESTS=t/080_step_equalTupleDescs.pl it got stucked I am attaching
> regress_log_080_step_equalTupleDescs file and log file of make command
Thanks. Please replace the previous test case patch with this one, and run it
again. (On your platform, gdb needs an explicit path to the executable.)
Attachments:
step-to-crash-v0.1.patch (text/plain, 2.6K) download
Author: Noah Misch <noah@leadboat.com>
Commit: Noah Misch <noah@leadboat.com>
diff --git a/src/test/subscription/t/080_step_equalTupleDescs.pl b/src/test/subscription/t/080_step_equalTupleDescs.pl
new file mode 100644
index 0000000..3d9f98d
--- /dev/null
+++ b/src/test/subscription/t/080_step_equalTupleDescs.pl
@@ -0,0 +1,99 @@
+# run with: make -C src/test/subscription check PROVE_TESTS=t/080_step_equalTupleDescs.pl
+# email src/test/subscription/tmp_check/log/regress_log_080_step_equalTupleDescs
+
+use strict;
+use warnings;
+use PostgreSQL::Test::Cluster;
+use PostgreSQL::Test::Utils;
+use Test::More tests => 1;
+use IPC::Run;
+
+my $node = PostgreSQL::Test::Cluster->new('main');
+$node->init;
+$node->start;
+
+my $in = '';
+my $out = '';
+my $timer = IPC::Run::timeout(180);
+my $psql = $node->background_psql('postgres', \$in, \$out, $timer,
+ on_error_stop => 0);
+
+$in .= q{
+SELECT pg_backend_pid(), 'after_pid';
+};
+$psql->pump until $out =~ /^([0-9]*)\|after_pid/m;
+my $pid = $1;
+print "backend pid: $pid\n";
+
+my $gdb_cmd_file = $node->basedir . '/commands-gdb';
+PostgreSQL::Test::Utils::append_to_file($gdb_cmd_file, q{
+b equalTupleDescs
+ignore 1 9
+set logging file } . $node->basedir . q{/gdb_started.txt
+set logging on
+set logging off
+continue
+p *tupdesc1
+p *tupdesc2
+p tupdesc1->attrs[0]
+p tupdesc1->attrs[1]
+p tupdesc1->attrs[2]
+p tupdesc2->attrs[0]
+p tupdesc2->attrs[1]
+p tupdesc2->attrs[2]
+backtrace full
+set $loopvar = 25000
+while ($loopvar--)
+ stepi
+end
+quit
+});
+
+$ENV{PATH} =~ /^([^:]*):/;
+my $bindir = $1;
+die "could not guess bindir from PATH=$ENV{PATH}" unless $1;
+
+my $gdb_cmdline = [qw(gdb --batch --nx --pid), $pid, '-x', $gdb_cmd_file,
+ "$bindir/postgres"];
+print("# Running: " . join(" ", @{$gdb_cmdline}) . "\n");
+my $gdb = IPC::Run::start($gdb_cmdline, $timer);
+sleep .1 while !-f $node->basedir.'/gdb_started.txt';
+
+# first 28 lines of src/test/regress/sql/alter_table.sql
+$in .= q{
+--
+-- ALTER_TABLE
+--
+
+-- Clean up in case a prior regression run failed
+SET client_min_messages TO 'warning';
+DROP ROLE IF EXISTS regress_alter_table_user1;
+RESET client_min_messages;
+
+CREATE USER regress_alter_table_user1;
+
+--
+-- add attribute
+--
+
+CREATE TABLE attmp (initial int4);
+
+COMMENT ON TABLE attmp_wrong IS 'table comment';
+COMMENT ON TABLE attmp IS 'table comment';
+COMMENT ON TABLE attmp IS NULL;
+
+ALTER TABLE attmp ADD COLUMN xmin integer; -- fails
+
+ALTER TABLE attmp ADD COLUMN a int4 default 3;
+
+ALTER TABLE attmp ADD COLUMN b name;
+
+ALTER TABLE attmp ADD COLUMN c text;
+};
+
+$in .= q{
+\q
+};
+$psql->finish;
+$gdb->finish;
+ok(1);
view thread (107+ messages) latest in thread
Message-ID: <20211105090347.GB671366@rfd.leadboat.com>
Permalink: ../20211105090347.GB671366@rfd.leadboat.com/
Also on: postgresql.org/message-id/20211105090347.GB671366@rfd.leadboat.com
copy link · copy postgr.es · copy git am
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noah@leadboat.com, semab.tariq@enterprisedb.com, thomas.munro@gmail.com, sandeep.thakkar@enterprisedb.com, robertmhaas@gmail.com, x4mmm@yandex-team.ru, andres@anarazel.de, cm@enterprisedb.com, pgsql-bugs@lists.postgresql.org, michael@paquier.xyz, tgl@sss.pgh.pa.us, pg@bowt.ie
Subject: Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data
In-Reply-To: <20211105090347.GB671366@rfd.leadboat.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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