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 1rfvOy-0039qE-3o for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Mar 2024 05:25:44 +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 1rfvOv-00BLZw-RM for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Mar 2024 05:25:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rfvOv-00BLZo-Hg for pgsql-hackers@lists.postgresql.org; Fri, 01 Mar 2024 05:25:42 +0000 Received: from mail-yw1-f175.google.com ([209.85.128.175]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rfvOt-002ChQ-AL for pgsql-hackers@postgresql.org; Fri, 01 Mar 2024 05:25:41 +0000 Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-60925d20af0so18464167b3.2 for ; Thu, 29 Feb 2024 21:25:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709270738; x=1709875538; h=cc: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=1GVRJ4bn2fXW4yUmUj6mURk0Xtmz5Ouqpfw9d2rcxxw=; b=tSbIC1hQwYsRRgYIQznzRJFuvufO3Lu9JbSu3vH3Fyvl4IA5/9ZgQn4Z3cVa1IxBnP qUMsYs4zhfo6bVRpDyPglXP+CwJ2kM7kroiQi81mGuU8fKZj9q28N8rfFhuQ7u1WZkoG Pg3axhcEbVuuFwmdjFcBNUhMif18sAc2eGCJk2kZHiHvGPrGB24v2QuuNgkPgdgT9QwD 1BkjrfdzvnC2wxc+RDH3zU7D4BfzyPos9JcfNxaALLsQyICXedqVOHUdV1hYLBTPkqGw Nv2afthoCWxXJkAEuQt7eEZgkJQW3TqU5si4ZIH62ItYoAR3YnCvlMin9vyNsAWN7ZWK m7tQ== X-Forwarded-Encrypted: i=1; AJvYcCWl7RXs87HE+Bua0y6JnKycu2baEEspxk8GlH6C5zw3nw7nH/DyzZ96oXrvwuh5qMPFhLHzWGyxtLeCs5C/MDlCYC14cfyfdQffcth+ X-Gm-Message-State: AOJu0YzSIwOJE8UrKfZbpztlAXi7PW37IpFWofJfZPPsKCBIscAWtOe/ 0DPrwkPSLUJPBQt1WhGna+3kWi1xsP1zaORKCpxD++QSSQYEz4004RKr0/U2L1J3B8wGu4Ou5mD UQo8DgcEY2fH3Dhh5M2ioZ7UmLq4tXLlvuwKrkg== X-Google-Smtp-Source: AGHT+IEd5IINuYtaivSKXiWQp4+okJQPQimXv6QrhcCsPPHO1k+j69uyuXZk12qkLqrYP07Ac/ArXZWxNwSU7fS9oHE= X-Received: by 2002:a81:7343:0:b0:609:205c:82b2 with SMTP id o64-20020a817343000000b00609205c82b2mr721023ywc.0.1709270737972; Thu, 29 Feb 2024 21:25:37 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jelte Fennema-Nio Date: Fri, 1 Mar 2024 06:25:27 +0100 Message-ID: Subject: Re: ALTER TABLE SET ACCESS METHOD on partitioned tables To: Michael Paquier Cc: Justin Pryzby , Peter Eisentraut , Soumyadeep Chakraborty , Zhihong Yu , pgsql-hackers@postgresql.org, Ashwin Agrawal , vanjared@vmware.com Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 1 Mar 2024 at 06:15, Michael Paquier wrote: > > On Fri, Mar 01, 2024 at 05:43:25AM +0100, Jelte Fennema-Nio wrote: > > I think we should set the AM OID explicitly. Because an important > > thing to consider is: What behaviour makes sense when later > > default_table_access_method is changed? > > I think if someone sets it explicitly on the partitioned table, they > > would want the AM of the partitioned table to stay the same when > > default_table_access_method is changed. Which requires storing the AM > > OID afaict. > > Oops, I think I misread that. You just mean to always set relam when > using an AM in the SET ACCESS METHOD clause. Apologies for the noise. Correct, I intended to say that "SET ACCESS METHOD heap" on a partitioned table should store heap its OID. Because while storing 0 might be simpler, it will result in (imho) wrong behaviour when later the default_table_access_method is changed. behavior won't result in the (imho) intended. i.e. it's not simply a small detail in what the catolog looks like, but there's an actual behavioural change.