pgsql: Fix assertion failures while processing NEW_CID record in logica

2022-10-19 Thread Amit Kapila
Fix assertion failures while processing NEW_CID record in logical decoding. When the logical decoding restarts from NEW_CID, since there is no association between the top transaction and its subtransaction, both are created as top transactions and have the same LSN. This caused the assertion failu

pgsql: Fix assertion failures while processing NEW_CID record in logica

2022-10-19 Thread Amit Kapila
Fix assertion failures while processing NEW_CID record in logical decoding. When the logical decoding restarts from NEW_CID, since there is no association between the top transaction and its subtransaction, both are created as top transactions and have the same LSN. This caused the assertion failu

pgsql: Fix assertion failures while processing NEW_CID record in logica

2022-10-19 Thread Amit Kapila
Fix assertion failures while processing NEW_CID record in logical decoding. When the logical decoding restarts from NEW_CID, since there is no association between the top transaction and its subtransaction, both are created as top transactions and have the same LSN. This caused the assertion failu

pgsql: Fix assertion failures while processing NEW_CID record in logica

2022-10-19 Thread Amit Kapila
Fix assertion failures while processing NEW_CID record in logical decoding. When the logical decoding restarts from NEW_CID, since there is no association between the top transaction and its subtransaction, both are created as top transactions and have the same LSN. This caused the assertion failu

pgsql: Fix assertion failures while processing NEW_CID record in logica

2022-10-19 Thread Amit Kapila
Fix assertion failures while processing NEW_CID record in logical decoding. When the logical decoding restarts from NEW_CID, since there is no association between the top transaction and its subtransaction, both are created as top transactions and have the same LSN. This caused the assertion failu

pgsql: Fix assertion failures while processing NEW_CID record in logica

2022-10-19 Thread Amit Kapila
Fix assertion failures while processing NEW_CID record in logical decoding. When the logical decoding restarts from NEW_CID, since there is no association between the top transaction and its subtransaction, both are created as top transactions and have the same LSN. This caused the assertion failu

pgsql: Fix assertion failures while processing NEW_CID record in logica

2022-10-19 Thread Amit Kapila
Fix assertion failures while processing NEW_CID record in logical decoding. When the logical decoding restarts from NEW_CID, since there is no association between the top transaction and its subtransaction, both are created as top transactions and have the same LSN. This caused the assertion failu

pgsql: Better handle interrupting TAP tests

2022-10-19 Thread Alvaro Herrera
Better handle interrupting TAP tests Set up a signal handler for INT/TERM so that we run our END block if we get them. In END, if the exit status indicates a problem, call _update_pid(-1) to improve chances of the stop working in case start() hasn't returned yet. Also, change END's teardown_node

pgsql: Get rid of XLogCtlInsert->forcePageWrites

2022-10-19 Thread Alvaro Herrera
Get rid of XLogCtlInsert->forcePageWrites After commit 39969e2a1e4d, ->forcePageWrites is no longer very interesting: we can just test whether runningBackups is different from 0. This simplifies some code, so do away with it. Reviewed-by: Bharath Rupireddy Discussion: https://postgr.es/m/39969e2

pgsql: Track LLVM 15 changes.

2022-10-19 Thread Thomas Munro
Track LLVM 15 changes. Per https://llvm.org/docs/OpaquePointers.html, support for non-opaque pointers still exists and we can request that on our context. We have until LLVM 16 to move to opaque pointers, a much larger change. Back-patch to 11, where LLVM support arrived. Author: Thomas Munro

pgsql: Track LLVM 15 changes.

2022-10-19 Thread Thomas Munro
Track LLVM 15 changes. Per https://llvm.org/docs/OpaquePointers.html, support for non-opaque pointers still exists and we can request that on our context. We have until LLVM 16 to move to opaque pointers, a much larger change. Back-patch to 11, where LLVM support arrived. Author: Thomas Munro

pgsql: Track LLVM 15 changes.

2022-10-19 Thread Thomas Munro
Track LLVM 15 changes. Per https://llvm.org/docs/OpaquePointers.html, support for non-opaque pointers still exists and we can request that on our context. We have until LLVM 16 to move to opaque pointers, a much larger change. Back-patch to 11, where LLVM support arrived. Author: Thomas Munro

pgsql: Track LLVM 15 changes.

2022-10-19 Thread Thomas Munro
Track LLVM 15 changes. Per https://llvm.org/docs/OpaquePointers.html, support for non-opaque pointers still exists and we can request that on our context. We have until LLVM 16 to move to opaque pointers, a much larger change. Back-patch to 11, where LLVM support arrived. Author: Thomas Munro

pgsql: Track LLVM 15 changes.

2022-10-19 Thread Thomas Munro
Track LLVM 15 changes. Per https://llvm.org/docs/OpaquePointers.html, support for non-opaque pointers still exists and we can request that on our context. We have until LLVM 16 to move to opaque pointers, a much larger change. Back-patch to 11, where LLVM support arrived. Author: Thomas Munro

pgsql: Track LLVM 15 changes.

2022-10-19 Thread Thomas Munro
Track LLVM 15 changes. Per https://llvm.org/docs/OpaquePointers.html, support for non-opaque pointers still exists and we can request that on our context. We have until LLVM 16 to move to opaque pointers, a much larger change. Back-patch to 11, where LLVM support arrived. Author: Thomas Munro

pgsql: Remove pg_backup_start_callback and reuse similar code

2022-10-19 Thread Alvaro Herrera
Remove pg_backup_start_callback and reuse similar code We had two copies of almost identical logic to revert shared memory state when a running backup aborts; we can remove pg_backup_start_callback if we adapt do_pg_abort_backup so that it can be used for this purpose too. However, in order for t