Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sCrV8-008bYV-02 for pgsql-general@arkaria.postgresql.org; Fri, 31 May 2024 01:56:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sCrV7-007u6R-3a for pgsql-general@arkaria.postgresql.org; Fri, 31 May 2024 01:56:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sCrV6-007u6J-L1 for pgsql-general@lists.postgresql.org; Fri, 31 May 2024 01:56:12 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sCrV2-002kmx-1J for pgsql-general@postgresql.org; Fri, 31 May 2024 01:56:11 +0000 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-52b89fcdcc7so109508e87.3 for ; Thu, 30 May 2024 18:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717120565; x=1717725365; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=KF2yUGepqZA0ADL7XKLSjZ71jb8ubbu123dUBtY+aQ8=; b=V4otEmCEBF/q4y5ShMFqexul4GdPuIZ0WL3YQHtqrmrA6Ox0nVjc9MkmRBx7Ap7eX5 6IYN9mIJ7D0y+ka/1yFN0XiG4146gAwdeHGhKJhugeEDHjUGUxsccq8e2PHlqucoBkuT 86mWDwRj3g3IKl+e7vjcsq8oRWtt25yC/ylQc+uIqMwwSyoMApOK9EPg2ifjsLaB4/VY 4hr+HJ1r3a0RO/xqQ5tLfDmwJ1UXssd3vcAEXB9Soq0IFhrw3lMhBJ2agjkDPO6cXw3u drSL0unwZS1XWNSrqdE/rcNFWxS0LzFtQnEhVinqc6iWg1FeFRkUJNZRBek/MPhmfk+9 bQgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717120565; x=1717725365; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KF2yUGepqZA0ADL7XKLSjZ71jb8ubbu123dUBtY+aQ8=; b=rxuFqBni27iPxuk5MkdN0pYBP/VUXs61KxZT0XXu6uqQGx44elI3qJuOrAKo0dvQyE Hfiuxnvlj16vOacrNXciLxU6ft8D3fo5NP/k/WPpOrGDiuW70EqyiGb+8oBrmArpLTOJ KNU+qkLHCJm8xe/2mdUpm+Ta2OhtAs5M7NKoMXgqtUKHKuQU1pbFA0qadXjQik1IkKsV owPJTAwJi8GajdeoEzBZGN/yDfXJ/u6img7wm6HnJQL3123QEofVJwBa8f5w6h1QG8uj /j/1d6svhev8Ig1FCztnOLDFmnfYrccCmBDsu2N/A8RJn1WJUgC5zRGLkRIMXr5uPhw+ Wpww== X-Forwarded-Encrypted: i=1; AJvYcCXntQ1E9WNCd4NCzoH2x3G+kKxaInZsNqoc7+tNjDh5l0tSMOGilHMfABhpYdkKuA78/sv8NyAwAlGMk5jlIq5X8biUMpG/jJbAy/pc X-Gm-Message-State: AOJu0Yx35eoTkUIzYmWc8It3E06visuZ2XnI7VNBVK17SWy6L+6qdEMi uktrMZVISGXw5oDVUpyFSfa+VAVYmKVWv5oqiDS8JwZJquGPO02UUv9J6E/MA0Do17OBdtzVDkh lLab7bHnKmecbjoiEooaFgvzFCKA= X-Google-Smtp-Source: AGHT+IE6DnZ9SrHGxscPC/IOQ+TyvC27AbvBkE8F4dWP33hk4VnuTLPTj49XcgOrWAWiAb9Qt/8cc2VyxLLIJogitPI= X-Received: by 2002:a19:4314:0:b0:528:ab83:3ee with SMTP id 2adb3069b0e04-52b89598f2fmr177088e87.31.1717120564957; Thu, 30 May 2024 18:56:04 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Rowley Date: Fri, 31 May 2024 13:55:38 +1200 Message-ID: Subject: Re: [EXT] Re: How to delete column level Stats/Histogram To: "Wong, Kam Fook (TR Technology)" , pgsql-general Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk (please keep communication on the list) On Fri, 31 May 2024 at 13:43, Wong, Kam Fook (TR Technology) wrote: > > Silly question why did I run into this problem below? Will the autovacuum analyze abc reset it back which I don't want it to. > > DELETE FROM pg_statistic WHERE starelid = 'abc'::regclass and staattnum = (SELECT attnum FROM pg_attribute WHERE attrelid = 'abc'::regclass AND attname = 'bg_org_partner'); > > SQL Error [42P01]: ERROR: relation "abc" does not exist > Position: 52 The schema for the abc table will need to be in your search_path. You'll need to be connected to the correct database too. David