Re: Don't choke on files that are removed while pg_rewind runs.

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: Don't choke on files that are removed while pg_rewind runs.
Дата
Msg-id 20200713061010.GC23581@telsasoft.com
обсуждение исходный текст
Ответы Re: Don't choke on files that are removed while pg_rewind runs.  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-hackers
commit b36805f3c54fe0e50e58bb9e6dad66daca46fbf6
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date:   Sun Jun 28 21:35:51 2015 +0300

...

|@@ -175,22 +175,31 @@ libpqProcessFileList(void)
|                pg_fatal("unexpected result set while fetching file list\n");
| 
|        /* Read result to local variables */
|        for (i = 0; i < PQntuples(res); i++)
|        {
|                char       *path = PQgetvalue(res, i, 0);
|                int                     filesize = atoi(PQgetvalue(res, i, 1));
|                bool            isdir = (strcmp(PQgetvalue(res, i, 2), "t") == 0);
|                char       *link_target = PQgetvalue(res, i, 3);
|                file_type_t type;
| 
|+               if (PQgetisnull(res, 0, 1))
...
|+                       continue;

Every other access to "res" in this loop is to res(i), which I believe is what
was intended here, too.  Currently, it will dumbly loop but skip *every* row if
the 2nd column (1: size) of the first row (0) is null.

-- 
Justin



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: possibility to read dumped table's name from file