Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Дата
Msg-id CAM3SWZSq8q3X31LuKODRREuc77no6DLXj6XTTPz9w4-Puf-r8A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
> ---
>  doc/src/sgml/ddl.sgml                 |  23 +++
>  doc/src/sgml/indices.sgml             |  11 +-
>  doc/src/sgml/mvcc.sgml                |  43 ++++--
>  doc/src/sgml/plpgsql.sgml             |  20 ++-
>  doc/src/sgml/postgres-fdw.sgml        |   8 ++
>  doc/src/sgml/ref/create_index.sgml    |   7 +-
>  doc/src/sgml/ref/create_rule.sgml     |   6 +-
>  doc/src/sgml/ref/create_table.sgml    |   5 +-
>  doc/src/sgml/ref/create_trigger.sgml  |   5 +-
>  doc/src/sgml/ref/create_view.sgml     |  36 ++++-
>  doc/src/sgml/ref/insert.sgml          | 258 ++++++++++++++++++++++++++++++++--
>  doc/src/sgml/ref/set_constraints.sgml |   6 +-
>  doc/src/sgml/trigger.sgml             |  46 ++++--
>  13 files changed, 426 insertions(+), 48 deletions(-)
>
> #1 internal documentation stats:
>
>  doc/src/sgml/indexam.sgml        | 133 ++++++++++++++++++++++++++++++++++++---
>  src/backend/access/nbtree/README |  90 +++++++++++++++++++++++++-
>  src/backend/executor/README      |  35 +++++++++++
>  3 files changed, 247 insertions(+), 11 deletions(-)
>
> #2 internal documentation stats:
>
> ---
>  src/backend/executor/README | 49 +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)

Just to put that in context, here are the documentation changes from
the original LATERAL commit:
doc/src/sgml/keywords.sgml                |   2 +-doc/src/sgml/queries.sgml                 |  83
+++++++++++++++++++++++++++++++++++++++++-doc/src/sgml/ref/select.sgml              | 102
+++++++++++++++++++++++++++++++++++++++++++++-------

Commit 0ef0b30 added data-modifying CTE docs (docs only). That looks like:
doc/src/sgml/queries.sgml    | 177
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++---doc/src/sgml/ref/select.sgml |  49 ++++++++++++++---2 files
changed,214 insertions(+), 12 deletions(-)
 

> Have I not provided a total of 4 isolation tests illustrating
> interesting concurrency/visibility interactions? That's a lot of
> isolation tests. Here is the tests commit stat:
>
>  31 files changed, 1159 insertions(+), 8 deletions(-)

And to put the tests in context, here are the stats from the original
Hot Standby commit:
src/test/regress/expected/hs_standby_allowed.out    |  215
++++++++++++++++++++++++++src/test/regress/expected/hs_standby_check.out      |   20
+++src/test/regress/expected/hs_standby_disallowed.out|  137
+++++++++++++++++src/test/regress/expected/hs_standby_functions.out |   40 +++++src/test/regress/pg_regress.c
           |   33 ++--src/test/regress/sql/hs_primary_extremes.sql        |   74
+++++++++src/test/regress/sql/hs_primary_setup.sql          |   25 +++src/test/regress/sql/hs_standby_allowed.sql
 |  121 +++++++++++++++src/test/regress/sql/hs_standby_check.sql           |   16
++src/test/regress/sql/hs_standby_disallowed.sql     |  105 +++++++++++++src/test/regress/sql/hs_standby_functions.sql
    |   24 +++src/test/regress/standby_schedule                   |   21 +++
 

So (at least as measured by raw lines of tests), this feature is
better tested than the original Hot Standby commit, and by a wide
margin. Tests also serve as an explanatory tool for the feature (in
particular, isolation tests can be used in this way).
-- 
Peter Geoghegan



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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: Reducing lock strength of adding foreign keys
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Reducing the cost of sinval messaging