Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fUWj6-0001h7-Qc for pgsql-bugs@arkaria.postgresql.org; Sun, 17 Jun 2018 12:24:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fUWj4-0005wQ-Jq for pgsql-bugs@arkaria.postgresql.org; Sun, 17 Jun 2018 12:24:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fUWj3-0005wH-V3 for pgsql-bugs@lists.postgresql.org; Sun, 17 Jun 2018 12:24:10 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fUWiz-0003FP-I8 for pgsql-bugs@lists.postgresql.org; Sun, 17 Jun 2018 12:24:08 +0000 Received: by mail-wr0-x242.google.com with SMTP id o12-v6so14007332wrm.12 for ; Sun, 17 Jun 2018 05:24:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rapidloop.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9Na3c+K1hOo0CehJn6p08Z+BGG55fr7nuRcy/qCajAU=; b=LrJNsN01aNrhfLwSf41E+xDpy1bBptntMULAqqY9HzdYntfgj8XTWANGXaCm/RGnjN qdoCpP6nnsf04W0t7zIBtwv0fHEK2kZgrvrB1P0bp9UgnXjbIic9gTAURTA8USbvin7c tSHgLp81wmQ5n166s4vqyGsYaBCP0pjxh+qVs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9Na3c+K1hOo0CehJn6p08Z+BGG55fr7nuRcy/qCajAU=; b=stBftatfrG4Y3KVoYuYdR9LMWTpcDysCShtyDyrJiLRH9eaz5i8mk73wJsYhdeGU4o CUquTQ62hoJFs0k51KYM/jBQ8PdzDXvt07Yqidm1GiOWoQ8o+/Bsyt5MPtcPYKa3NTBZ LJlkksNRo4UMWpHBkTKpHxix8EHglmuQNhz4t6ll0+CPqzm5yhlWP6LPxfH+DUkd+72M /9ptDUS48EQxFtWNUSD82KSyGTCWQFD8BaWlbp0gZi+IBvg14Kz7yyI+ITlKisoUF9dv kavlyf5jfrvjL8HeBSsV4FxkdXKxV+hrzO/WnU4ohmnwCgOW5dR9iqxhZzDbYuh99OOo +KOw== X-Gm-Message-State: APt69E3QOCZEd/oLgqGb/FD4jBbrC+O86COhNKy2pVtu6eurhg8Tvyic U+Z4oc0gfY50IsZHCZuJCjkFQHyrtoaQAauxxKlw1w== X-Google-Smtp-Source: ADUXVKJuzsUc6nch51w/bFw9w4AiuJx5y/EE4WxU+nm8TJ+sVg+ckwzmq3f22RQNzORXOg9XELe3tz51bY3kmv0BzNU= X-Received: by 2002:adf:ae8b:: with SMTP id y11-v6mr7785000wrc.234.1529238244019; Sun, 17 Jun 2018 05:24:04 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:4504:0:0:0:0:0 with HTTP; Sun, 17 Jun 2018 05:24:03 -0700 (PDT) In-Reply-To: <20180617120653.GD1411@paquier.xyz> References: <152922564661.24801.3078728743990100425@wrigleys.postgresql.org> <20180617120653.GD1411@paquier.xyz> From: Mahadevan Ramachandran Date: Sun, 17 Jun 2018 17:54:03 +0530 Message-ID: Subject: Re: BUG #15245: pg_stat_all_tables does not include partition master tables To: Michael Paquier Cc: pgsql-bugs@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Well, to the user it looks like a table because he created it using a CREATE TABLE command and he can use it like a normal table. The view is named "_all_tables" so he'd expect, well, all the tables to be listed there. Doesn't it seem logical? -Mahadevan On Sun, Jun 17, 2018 at 5:36 PM, Michael Paquier wrote: > On Sun, Jun 17, 2018 at 08:54:06AM +0000, PG Bug reporting form wrote: >> The system view pg_catalog.pg_stat_all_tables (and therefore also >> pg_catalog.pg_stat_user_tables) do not list partition master tables (CREATE >> TABLE ... PARTITION BY ..). >> >> This is because it only includes rows from pg_class with relkind IN ('r', >> 't', 'm') (as defined in src/backend/catalog/system_views.sql). >> >> IMHO, it should also include rows with relkind = 'p'. > > Why? A parent partition has no physical presence and no data of its > own. > -- > Michael