Re: BUG #15954: Unable to alter partitioned table to set logged
От | David Rowley |
---|---|
Тема | Re: BUG #15954: Unable to alter partitioned table to set logged |
Дата | |
Msg-id | CAKJS1f_spvCFUGOhhXSR1AmKMJ8c3mU7iY=mGUkh85L6eB-WAQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #15954: Unable to alter partitioned table to set logged (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: BUG #15954: Unable to alter partitioned table to set logged
Re: BUG #15954: Unable to alter partitioned table to set logged |
Список | pgsql-bugs |
On Wed, 14 Aug 2019 at 14:48, Michael Paquier <michael@paquier.xyz> wrote: > > On Wed, Aug 14, 2019 at 01:57:26PM +1200, David Rowley wrote: > > I'd say it's broken in a sense that we can create an unlogged > > partitioned table in the first place. I think that should have been > > blocked. > > I don't think that it is that crazy to be able to define a partitioned > table as unlogged, assuming that we could use that to make the > children inherit the same state. Since we have no persistence inheritance feature, what are you proposing here? If we allow SET [UN]LOGGED on a partitioned table to cascade down to each partition, then do we need to insist that the child partition's persistence setting does not deviate from the parents? Or would altering the parent just change the partitions that were not already set that way? What would the behaviour be of doing ATTACH PARTITION on a logged table onto an unlogged partitioned table? Also, since there is no CREATE LOGGED TABLE syntax, what would users do if that wanted to create a logged partition on an unlogged partition hierarchy? For this to work ATTACH PARTITION would have to not mess with the persistence setting but the user would have to CREATE TABLE ... (LIKE partitioned_table); then ATTACH PARTITION. That seems a bit messy to me, it's inevitable that someone would eventually complain and ask for a CREATE LOGGED TABLE syntax. I think if we don't allow mixed persistence partition hierarchies we'll get complaints. I think it's valid to have them, just imagine implementing a highspeed queue that does not require durability on non-processed items. Processing an item updates the "processed" flag which moves the tuple into a logged partition, thus making it durable. So my thoughts are that unless someone is proposing to think of all the corner cases for partitions inheriting their persistence from their partitioned table, then allowing UNLOGGED partitioned tables is busted. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-bugs по дате отправления: