Re: Parent/child context relation in pg_get_backend_memory_contexts()

Поиск
Список
Период
Сортировка
От Melih Mutlu
Тема Re: Parent/child context relation in pg_get_backend_memory_contexts()
Дата
Msg-id CAGPVpCQqiE+KO4NwErNEY45UgXX6R2ySBem46NkLPvo=qap89w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Parent/child context relation in pg_get_backend_memory_contexts()  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: Parent/child context relation in pg_get_backend_memory_contexts()
Список pgsql-hackers
Hi David,

Thanks for v8 patch. Please see attached v9.

David Rowley <dgrowleyml@gmail.com>, 11 Tem 2024 Per, 04:16 tarihinde şunu yazdı:
I did a bit more work in the attached.  I changed "level" to be
1-based and because it's the column before "path" I find it much more
intuitive (assuming no prior knowledge) that the "path" column relates
to "level" somehow as it's easy to see that "level" is the same number
as the number of elements in "path". With 0-based levels, that's not
the case.

Please see the attached patch.  I didn't update any documentation.

I updated documentation for path and level columns and also fixed the tests as level starts from 1.

+ while (queue != NIL)
+ {
+ List *nextQueue = NIL;
+ ListCell *lc;
+
+ foreach(lc, queue)
+ {

I don't think we need this outer while loop. Appending to the end of a queue naturally results in top-to-bottom order anyway, keeping two lists, "queue" and "nextQueue", might not be necessary. I believe that it's safe to append to a list while iterating over that list in a foreach loop. v9 removes nextQueue and appends directly into queue.

Thanks,
--
Melih Mutlu
Microsoft
Вложения

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

Предыдущее
От: Ilya Gladyshev
Дата:
Сообщение: REINDEX not updating partition progress
Следующее
От: Ilya Gladyshev
Дата:
Сообщение: Re: CREATE INDEX CONCURRENTLY on partitioned index