pgsql: Ignore invalidated slots while computing oldest catalog Xmin

2022-11-22 Thread Alvaro Herrera
Ignore invalidated slots while computing oldest catalog Xmin Once a logical slot has acquired a catalog_xmin, it doesn't let go of it, even when invalidated by exceeding the max_slot_wal_keep_size, which means that dead catalog tuples are not removed by vacuum anymore since the point is invalidate

pgsql: Ignore invalidated slots while computing oldest catalog Xmin

2022-11-22 Thread Alvaro Herrera
Ignore invalidated slots while computing oldest catalog Xmin Once a logical slot has acquired a catalog_xmin, it doesn't let go of it, even when invalidated by exceeding the max_slot_wal_keep_size, which means that dead catalog tuples are not removed by vacuum anymore since the point is invalidate

pgsql: Ignore invalidated slots while computing oldest catalog Xmin

2022-11-22 Thread Alvaro Herrera
Ignore invalidated slots while computing oldest catalog Xmin Once a logical slot has acquired a catalog_xmin, it doesn't let go of it, even when invalidated by exceeding the max_slot_wal_keep_size, which means that dead catalog tuples are not removed by vacuum anymore since the point is invalidate

pgsql: Ignore invalidated slots while computing oldest catalog Xmin

2022-11-22 Thread Alvaro Herrera
Ignore invalidated slots while computing oldest catalog Xmin Once a logical slot has acquired a catalog_xmin, it doesn't let go of it, even when invalidated by exceeding the max_slot_wal_keep_size, which means that dead catalog tuples are not removed by vacuum anymore since the point is invalidate

pgsql: Improve comments atop pg_get_replication_slots.

2022-11-22 Thread Amit Kapila
Improve comments atop pg_get_replication_slots. Update comments atop pg_get_replication_slots to make it clear that it shows all replication slots that currently exist on the database cluster. Author: sirisha chamarthi Discussion: https://postgr.es/m/cakrakexrufpeiws+stgfm-rffw19sudxju66jkyri13k

pgsql: Remove useless MERGE test

2022-11-22 Thread Alvaro Herrera
Remove useless MERGE test This was trying to exercise an ERROR we don't actually have. Backpatch to 15. Reported by Teja Mupparti Discussion: https://postgr.es/m/sn6pr2101mb1040bdaf740ea4389484e92bf0...@sn6pr2101mb1040.namprd21.prod.outlook.com Branch -- master Details --- https://gi

pgsql: Remove useless MERGE test

2022-11-22 Thread Alvaro Herrera
Remove useless MERGE test This was trying to exercise an ERROR we don't actually have. Backpatch to 15. Reported by Teja Mupparti Discussion: https://postgr.es/m/sn6pr2101mb1040bdaf740ea4389484e92bf0...@sn6pr2101mb1040.namprd21.prod.outlook.com Branch -- REL_15_STABLE Details --- htt

pgsql: Prevent port collisions between concurrent TAP tests

2022-11-22 Thread Andrew Dunstan
Prevent port collisions between concurrent TAP tests Currently there is a race condition where if concurrent TAP tests both test that they can open a port they will assume that it is free and use it, causing one of them to fail. To prevent this we record a reservation using an exclusive lock, and

pgsql: Prevent port collisions between concurrent TAP tests

2022-11-22 Thread Andrew Dunstan
Prevent port collisions between concurrent TAP tests Currently there is a race condition where if concurrent TAP tests both test that they can open a port they will assume that it is free and use it, causing one of them to fail. To prevent this we record a reservation using an exclusive lock, and

pgsql: Prevent port collisions between concurrent TAP tests

2022-11-22 Thread Andrew Dunstan
Prevent port collisions between concurrent TAP tests Currently there is a race condition where if concurrent TAP tests both test that they can open a port they will assume that it is free and use it, causing one of them to fail. To prevent this we record a reservation using an exclusive lock, and

pgsql: Prevent port collisions between concurrent TAP tests

2022-11-22 Thread Andrew Dunstan
Prevent port collisions between concurrent TAP tests Currently there is a race condition where if concurrent TAP tests both test that they can open a port they will assume that it is free and use it, causing one of them to fail. To prevent this we record a reservation using an exclusive lock, and

pgsql: Prevent port collisions between concurrent TAP tests

2022-11-22 Thread Andrew Dunstan
Prevent port collisions between concurrent TAP tests Currently there is a race condition where if concurrent TAP tests both test that they can open a port they will assume that it is free and use it, causing one of them to fail. To prevent this we record a reservation using an exclusive lock, and

pgsql: YA attempt at taming worst-case behavior of get_actual_variable_

2022-11-22 Thread Tom Lane
YA attempt at taming worst-case behavior of get_actual_variable_range. We've made multiple attempts at preventing get_actual_variable_range from taking an unreasonable amount of time (3ca930fc3, fccebe421). But there's still an issue for the very first planning attempt after deletion of a large nu

pgsql: YA attempt at taming worst-case behavior of get_actual_variable_

2022-11-22 Thread Tom Lane
YA attempt at taming worst-case behavior of get_actual_variable_range. We've made multiple attempts at preventing get_actual_variable_range from taking an unreasonable amount of time (3ca930fc3, fccebe421). But there's still an issue for the very first planning attempt after deletion of a large nu

pgsql: YA attempt at taming worst-case behavior of get_actual_variable_

2022-11-22 Thread Tom Lane
YA attempt at taming worst-case behavior of get_actual_variable_range. We've made multiple attempts at preventing get_actual_variable_range from taking an unreasonable amount of time (3ca930fc3, fccebe421). But there's still an issue for the very first planning attempt after deletion of a large nu

pgsql: YA attempt at taming worst-case behavior of get_actual_variable_

2022-11-22 Thread Tom Lane
YA attempt at taming worst-case behavior of get_actual_variable_range. We've made multiple attempts at preventing get_actual_variable_range from taking an unreasonable amount of time (3ca930fc3, fccebe421). But there's still an issue for the very first planning attempt after deletion of a large nu

pgsql: YA attempt at taming worst-case behavior of get_actual_variable_

2022-11-22 Thread Tom Lane
YA attempt at taming worst-case behavior of get_actual_variable_range. We've made multiple attempts at preventing get_actual_variable_range from taking an unreasonable amount of time (3ca930fc3, fccebe421). But there's still an issue for the very first planning attempt after deletion of a large nu

pgsql: YA attempt at taming worst-case behavior of get_actual_variable_

2022-11-22 Thread Tom Lane
YA attempt at taming worst-case behavior of get_actual_variable_range. We've made multiple attempts at preventing get_actual_variable_range from taking an unreasonable amount of time (3ca930fc3, fccebe421). But there's still an issue for the very first planning attempt after deletion of a large nu

pgsql: Give better hints for ambiguous or unreferenceable columns.

2022-11-22 Thread Tom Lane
Give better hints for ambiguous or unreferenceable columns. Examine ParseNamespaceItem flags to detect whether a column name is unreferenceable for lack of LATERAL, or could be referenced if a qualified name were used, and give better hints for such cases. Also, don't phrase the message to imply t