From: | "osumi(dot)takamichi(at)fujitsu(dot)com" <osumi(dot)takamichi(at)fujitsu(dot)com> |
---|---|
To: | 'Amit Kapila' <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Japin Li <japinli(at)hotmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Marco Nenciarini <marco(dot)nenciarini(at)2ndquadrant(dot)it>, Andres Freund <andres(at)anarazel(dot)de> |
Subject: | RE: Forget close an open relation in ReorderBufferProcessTXN() |
Date: | 2021-05-19 10:35:30 |
Message-ID: | OSBPR01MB488889AFFDF66A66459DECCBED2B9@OSBPR01MB4888.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wednesday, May 19, 2021 1:52 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > > I am not sure but I
> > > > think we should prohibit truncate on user_catalog_tables as we
> > > > prohibit truncate on system catalog tables (see below [1]) if we
> > > > want plugin to lock them, otherwise, as you said it might lead to
> deadlock.
> > > > For the matter, I think we should once check all other operations
> > > > where we can take an exclusive lock on [user]_catalog_table, say
> > > > Cluster command, and compare the behavior of same on system
> > > > catalog tables.
> > > >
> > > > [1]
> > > > postgres=# truncate pg_class;
> > > > ERROR: permission denied: "pg_class" is a system catalog
> > > > postgres=# cluster pg_class;
> > > > ERROR: there is no previously clustered index for table "pg_class"
> > > >
> > >
> > > Please ignore the cluster command as we need to use 'using index'
> > > with that command to make it successful. I just want to show the
> > > truncate command behavior for which you have asked the question.
> > Thank you so much for clarifying the direction.
> > I agree with the changing the TRUNCATE side.
> > I'll make a patch based on this.
> >
>
> Isn't it a better idea to start a new thread where you can summarize whatever
> we have discussed here about user_catalog_tables? We might get the opinion
> from others about the behavior change you are proposing.
You are right. So, I've launched it with the patch for this.
Best Regards,
Takamichi Osumi
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2021-05-19 10:40:33 | Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options |
Previous Message | Fabien COELHO | 2021-05-19 10:32:37 | Re: pgbench test failing on 14beta1 on Debian/i386 |