Re: pg_sequence catalog

Поиск
Список
Период
Сортировка
От Andreas Karlsson
Тема Re: pg_sequence catalog
Дата
Msg-id 33299570-8ca0-44d5-cf40-4a8e68fb5807@proxel.se
обсуждение исходный текст
Ответ на Re: pg_sequence catalog  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: pg_sequence catalog  (Andreas Karlsson <andreas@proxel.se>)
Список pgsql-hackers
On 11/10/2016 05:29 AM, Peter Eisentraut wrote:
> On 11/8/16 6:43 PM, Andreas Karlsson wrote:
>> - A worry is that it might get a bit confusing to have both the future
>> catalog pg_sequence and the view pg_sequences.
>
> We already have this in other cases: pg_index/pg_indexes,
> pg_user_mapping/pg_user_mappings.  It's an established naming system by now.

Then I am fine with it.

>> - I think it would be useful to include is_cycled in the view.
>
> It's there under the name "cycle".

You are right, my bad, I managed to confuse myself.

>> - Shouldn't last_value be NULL directly after we have created the
>> sequence but nobody has called nextval() yet?
>>
>> - I noticed that last_value includes the cached values, but that also
>> seems to me like the correct thing to do.
>
> The documentation now emphasizes that this is the value stored on disk.
> This matches what Oracle does.

We also store is_called on disk, I think that if is_called is false then 
last_value should be NULL. Either that or we should add is_called.

I will give the patch another review some time this week when i can find 
the time.

Andreas



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

Предыдущее
От: "Tsunakawa, Takayuki"
Дата:
Сообщение: Re: [bug fix] Cascading standby cannot catch up and get stuck emitting the same message repeatedly
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Dynamic shared memory areas