aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonpath.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-07-27 13:30:07 +0900
committerMichael Paquier <michael@paquier.xyz>2023-07-27 13:30:07 +0900
commit320c311fda912226bcb2e82b507b498161581dd2 (patch)
treea7bc388c1cd3dd333480fecb1cf93e1637f8ead6 /src/backend/utils/adt/jsonpath.c
parentb635ac03e80237838bec8b224eb4dea97985fda3 (diff)
downloadpostgresql-320c311fda912226bcb2e82b507b498161581dd2.tar.gz
postgresql-320c311fda912226bcb2e82b507b498161581dd2.zip
worker_spi: Switch to TAP tests
This commit moves worker_spi to use TAP tests. sql/worker_spi.sql is gone, replaced by an equivalent set of queries in a TAP script, without worker_spi loaded in shared_preload_libraries: - One query to launch a worker dynamically, relying now on "postgres" as the default database to connect to. - Two wait queries with poll_query_until(), one to wait for the worker schema to be initialized and a second to wait for a tuple processed by the worker. - Server reload to accelerate the main loop of the spawned worker. More coverage is added for workers registered when the library is loaded with shared_preload_libraries, while on it, checking that these are connecting to the database set in the GUC worker_spi.database. A local run of these test is showing that TAP is slightly faster than the original, while providing more coverage (3.7s vs 4.4s). There was also some discussions about keeping the SQL tests, but this would require initializing twice a cluster, increasing the runtime of the tests up to 5.6s here. These tests will be expanded more in an upcoming patch aimed at adding support for custom wait events for the Extension class, still under discussion, to check the new in-core APIs with and without a library set in shared_preload_libraries. Bharath has written the part where shared_preload_libraries is used, while I have migrated the existing SQL tests to TAP. Author: Bharath Rupireddy, Michael Paquier Reviewed-by: Masahiro Ikeda Discussion: https://postgr.es/m/CALj2ACWR9ncAiDF73unqdJF1dmsA2R0efGXX2624X+YVxcAVWg@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/jsonpath.c')
0 files changed, 0 insertions, 0 deletions