Skip to content

Commit

Permalink
[#22449] YSQL: import wal2json wal2json_2_6
Browse files Browse the repository at this point in the history
Summary:
Subtree merge wal2json into
src/postgres/third-party-extensions/wal2json. Ran the following:

```
git remote add wal2json https://github.com/eulerto/wal2json.git
git fetch wal2json wal2json_2_6:tags/wal2json_2_6
git subtree add --prefix=src/postgres/third-party-extensions/wal2json wal2json wal2json_2_6
```

```
    Add 'src/postgres/third-party-extensions/wal2json/' from commit '75629c2e1e81a12350cc9d63782fc53252185d8d'

    git-subtree-dir: src/postgres/third-party-extensions/wal2json
    git-subtree-mainline: 66ed3a5
    git-subtree-split: 75629c2
```

Choose wal2json_2_6 since it is the latest version that supports PG 11
according to their [[ https://github.com/eulerto/wal2json/tree/master?tab=readme-ov-file#unix-based-operating-systems | README ]].
Integrating wal2json into the build and YB specific changes will be done as a followup diff.
Jira: DB-11366

Test Plan: jenkins: compile only

Reviewers: sumukh.phalgaonkar, jason, skumar

Reviewed By: jason

Subscribers: steve.varnau, yql

Differential Revision: https://phorge.dev.yugabyte.com/D36690
  • Loading branch information
Devansh Saxena committed Jul 23, 2024
2 parents 7c55b95 + 4f973bf commit 5ac65eb
Show file tree
Hide file tree
Showing 68 changed files with 9,878 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/postgres/third-party-extensions/wal2json/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/regression.diffs
/regression.out
/results/
/wal2json.bc
/wal2json.so
*.o
27 changes: 27 additions & 0 deletions src/postgres/third-party-extensions/wal2json/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2013-2024, Euler Taveira de Oliveira
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

* Neither the name of the Euler Taveira de Oliveira nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 changes: 37 additions & 0 deletions src/postgres/third-party-extensions/wal2json/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
MODULES = wal2json

REGRESS = cmdline insert1 update1 update2 update3 update4 delete1 delete2 \
delete3 delete4 savepoint specialvalue toast bytea message typmod \
filtertable selecttable include_timestamp include_lsn include_xids \
include_domain_data_type truncate type_oid actions position default \
pk rename_column numeric_data_types_as_string

PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)

# message API is available in 9.6+
ifneq (,$(findstring $(MAJORVERSION),9.4 9.5))
REGRESS := $(filter-out message, $(REGRESS))
endif

# truncate API is available in 11+
ifneq (,$(findstring $(MAJORVERSION),9.4 9.5 9.6 10))
REGRESS := $(filter-out truncate, $(REGRESS))
endif

# actions API is available in 11+
# this test should be executed in prior versions, however, truncate will fail.
ifneq (,$(findstring $(MAJORVERSION),9.4 9.5 9.6 10))
REGRESS := $(filter-out actions, $(REGRESS))
endif

# make installcheck
#
# It can be run but you need to add the following parameters to
# postgresql.conf:
#
# wal_level = logical
# max_replication_slots = 10
#
# Also, you should start the server before executing it.
Loading

0 comments on commit 5ac65eb

Please sign in to comment.