Re: unlogged sequences

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: unlogged sequences
Дата
Msg-id 30556154-ab75-902d-e30c-dad4a1999125@enterprisedb.com
обсуждение исходный текст
Ответ на Re: unlogged sequences  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: unlogged sequences  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: unlogged sequences  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
On 01.04.22 18:31, Peter Eisentraut wrote:
>> Consider that an identity sequence creates an "internal" dependency 
>> and a serial sequence creates an "auto" dependency.
>>
>> An "internal" dependency means that the internal object shouldn't 
>> really be operated on directly.  (In some cases it's allowed for 
>> convenience.) So I think in that case the sequence must follow the 
>> table's persistence in all cases.  This is accomplished by setting the 
>> initial persistence to the table's, making ALTER TABLE propagate 
>> persistence changes, and prohibiting direct ALTER SEQUENCE SET.
> 
> But to make pg_upgrade work for identity sequences of unlogged tables, 
> we need to allow ALTER SEQUENCE ... SET LOGGED on such sequences.  Which 
> I guess is not a real problem in the end.

Here is an updated patch that fixes this pg_dump/pg_upgrade issue and 
also adds a few more comments and documentation sentences about what 
happens and what is allowed.  I didn't change any behaviors; it seems we 
didn't have consensus to do that.

These details about how tables and sequences are linked or not are 
pretty easy to adjust, if people still have some qualms.
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Joseph Koshakow
Дата:
Сообщение: Re: Fix overflow in DecodeInterval
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: unlogged sequences