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 1miv8m-0007y5-3t for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Nov 2021 09:04:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1miv8k-0000JT-4I for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Nov 2021 09:04:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miv8j-0000JJ-LO for pgsql-bugs@lists.postgresql.org; Fri, 05 Nov 2021 09:04:01 +0000 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1miv8c-00067w-Rm for pgsql-bugs@lists.postgresql.org; Fri, 05 Nov 2021 09:04:00 +0000 Received: by mail-qt1-x82d.google.com with SMTP id l12so6058653qtx.7 for ; Fri, 05 Nov 2021 02:03:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=p91VhHydB4jfc4WEY/kDdQUyNCHY8Jt6SfV+FGONyA8=; b=BbGKg+Y7ksKPBfRAHdlGPZG1lTfIp9PZLSxkwZg9OP2/fpe6MpNQSH4ufkOi5TjAOe P4jRkX4wXbcyurk9+Ntbl19J/VxVwqZbtbCuajAr4PhCp+xLR36UtHnz2XVKuYJz6ZKb 8DEvqc+L7Ygf5aDwdrcuNypcTmDgpnjUwxD68= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=p91VhHydB4jfc4WEY/kDdQUyNCHY8Jt6SfV+FGONyA8=; b=H284roGv+QwhBPBhbPEZAraBRRiSYpRA/h/dmaasD9Yd0/k11dbvvc9qoqWVeOpp5T aCceU/VhtFxZ1HPeLqXpRF5GnUFut9MIvOE3brQl0ex5wI+06cAl1vyj6NBmVgapDO2T ZJ8FsEEwyZslOTICIan313RzsuTr3ZrLhZFbIsPVGZGq/h0j+I6/f/SpmrPc8RegbjKr 0/ENOtEmKUXR3EzwfUNQ+gzgAFJeg9pWcm7T3rWBz7y4g88KRDd+fvNXsc+F40E692hu aaDo6KczzlOCIIm4zXJGFRjZK+MXl4PUnDSR7EhAVnpi1sK11iK5J1bDKjDMhJaKM2h1 6Pfg== X-Gm-Message-State: AOAM530S04S0FHPBcZMSJkkqPKLj26DSTVQ+TPdRbTsALtwAJ22gVvRQ IPh4uPCK14XnSnvo0AMzB8wISw== X-Google-Smtp-Source: ABdhPJykoJMCjcj2yd3SC1CvAxB0wvpnSiAuFAwDxBmOchwYhHKQLu3sQbiLwp6TWSjlWDLUBTPsJA== X-Received: by 2002:ac8:5916:: with SMTP id 22mr33737074qty.288.1636103032788; Fri, 05 Nov 2021 02:03:52 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::46]) by smtp.gmail.com with ESMTPSA id w9sm5302668qko.19.2021.11.05.02.03.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Nov 2021 02:03:51 -0700 (PDT) Date: Fri, 5 Nov 2021 02:03:47 -0700 From: Noah Misch To: Semab Tariq Cc: Thomas Munro , Sandeep Thakkar , Robert Haas , Andrey Borodin , Andres Freund , CM Team , PostgreSQL mailing lists , Michael Paquier , Tom Lane , Peter Geoghegan Subject: Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data Message-ID: <20211105090347.GB671366@rfd.leadboat.com> References: <6A1F66DD-9A4E-4EB4-BF56-369FDBF30204@yandex-team.ru> <20211103044203.GA570491@rfd.leadboat.com> <20211105013553.GA671366@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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.) --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="step-to-crash-v0.1.patch" Author: Noah Misch Commit: Noah Misch 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); --0OAP2g/MAC+5xKAE--