Re: Table AM and DROP TABLE [ Was: Table AM and DDLs]

2022-11-16 Thread Andres Freund
Hi, On 2022-11-16 14:49:59 +0100, Mats Kindahl wrote: > I think the discussion went a little sideways, so let me recap what I'm > suggesting: > >1. I mentioned that there is a missing callback when the filenode is >unlinked and this is particularly evident when dropping a table. >2.

Re: Table AM and DROP TABLE [ Was: Table AM and DDLs]

2022-11-16 Thread Mats Kindahl
Hello all, I think the discussion went a little sideways, so let me recap what I'm suggesting: 1. I mentioned that there is a missing callback when the filenode is unlinked and this is particularly evident when dropping a table. 2. It was correctly pointed out to me that an implementor

Re: Table AM and DROP TABLE [ Was: Table AM and DDLs]

2022-10-12 Thread Michael Paquier
On Sun, Oct 02, 2022 at 09:53:01AM -0700, Andres Freund wrote: > The CF entry for this patch doesn't currently apply and there has been a bunch > of feedback on the approach. Mats, are you actually waiting for further > feedback right now? Okay, for now this has been marked as RwF. -- Michael

Re: Table AM and DROP TABLE [ Was: Table AM and DDLs]

2022-10-02 Thread Andres Freund
Hi, The CF entry for this patch doesn't currently apply and there has been a bunch of feedback on the approach. Mats, are you actually waiting for further feedback right now? Greetings, Andres Freund

Re: Table AM and DROP TABLE [ Was: Table AM and DDLs]

2022-08-01 Thread Andres Freund
Hi, On 2021-04-05 21:57:12 +0200, Mats Kindahl wrote: >2. In the storage layer, the function RelationDropStorage is called, >which will record the table to be dropped in the pendingDeletes > > When committing (or aborting) the transaction, there are two calls that are > interesting, in

Re: Table AM and DROP TABLE [ Was: Table AM and DDLs]

2022-07-29 Thread Mats Kindahl
On Wed, Feb 16, 2022 at 10:07 AM Heikki Linnakangas wrote: > On 27/09/2021 14:59, Aleksander Alekseev wrote: > > Hi hackers, > > > >> As a matter of fact, I think the patch I suggested is the right > approach: > >> let me elaborate on why. > >> [...] > >> It is straightforward to replace it by

Re: Table AM and DROP TABLE [ Was: Table AM and DDLs]

2022-02-16 Thread Heikki Linnakangas
On 27/09/2021 14:59, Aleksander Alekseev wrote: Hi hackers, As a matter of fact, I think the patch I suggested is the right approach: let me elaborate on why. [...] It is straightforward to replace it by implementing the Table AM methods above, but we are missing a callback on dropping the

Re: Table AM and DROP TABLE [ Was: Table AM and DDLs]

2021-10-27 Thread Aleksander Alekseev
Hi hackers, > I'm going to mark it as "Ready for Committer" unless anyone objects. I updated the status of the patch. To clarify, Alexander and I replied almost at the same time. The drawbacks noted by Alexander are fixed in the v2 version of the patch. -- Best regards, Aleksander Alekseev

Re: Table AM and DROP TABLE [ Was: Table AM and DDLs]

2021-09-27 Thread Alexander Kuzmenkov
On 05.04.2021 22:57, Mats Kindahl wrote: Now, suppose that we want to replace the storage layer with a different one. It is straightforward to replace it by implementing the Table AM methods above, but we are missing a callback on dropping the table. If we have that, we can record the

Re: Table AM and DROP TABLE [ Was: Table AM and DDLs]

2021-09-27 Thread Aleksander Alekseev
Hi hackers, > As a matter of fact, I think the patch I suggested is the right approach: > let me elaborate on why. > [...] > It is straightforward to replace it by implementing the Table AM methods > above, but we are missing a callback on dropping the table. If we have that, > we can record the

Table AM and DROP TABLE [ Was: Table AM and DDLs]

2021-04-05 Thread Mats Kindahl
On Mon, Mar 22, 2021 at 12:16 AM Andres Freund wrote: > Hi, > > On 2021-03-03 22:15:18 +0100, Mats Kindahl wrote: > > On Tue, Feb 23, 2021 at 2:11 AM Andres Freund > wrote: > > Thanks for the answer and sorry about the late reply. > > Mine is even later ;) > :) Seems I keep the tradition. :)

Re: Table AM and DDLs

2021-03-21 Thread Andres Freund
Hi, On 2021-03-03 22:15:18 +0100, Mats Kindahl wrote: > On Tue, Feb 23, 2021 at 2:11 AM Andres Freund wrote: > Thanks for the answer and sorry about the late reply. Mine is even later ;) > > I don't think that's quite right. It's not exactly obvious from the > > name, but

Re: Table AM and DDLs

2021-03-03 Thread Mats Kindahl
On Tue, Feb 23, 2021 at 2:11 AM Andres Freund wrote: > Hi, > Hi Andres, Thanks for the answer and sorry about the late reply. > On 2021-02-22 08:33:21 +0100, Mats Kindahl wrote: > > I started to experiment with the table access method interface to see if > it > > can be used for some ideas I

Re: Table AM and DDLs

2021-02-22 Thread Andres Freund
Hi, On 2021-02-22 08:33:21 +0100, Mats Kindahl wrote: > I started to experiment with the table access method interface to see if it > can be used for some ideas I have. Cool. > The `relation_set_new_filenode` is indirectly called from > `heap_create_with_catalog`, but there is no corresponding

Table AM and DDLs

2021-02-21 Thread Mats Kindahl
Hi all, I am quite new to PostgreSQL so forgive me if my understanding of the code below is wrong and please clarify what I have misunderstood. I started to experiment with the table access method interface to see if it can be used for some ideas I have. For the experiment, I am using a simple