-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
experimental support for pg_anon #9706
base: main
Are you sure you want to change the base?
Conversation
75b83d2
to
f54250b
Compare
Signed-off-by: Luís Tavares <[email protected]>
5589 tests run: 5367 passed, 0 failed, 222 skipped (full report)Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
d202885 at 2024-11-11T13:55:05.996Z :recycle: |
f54250b
to
d9da270
Compare
@luist18 You don't need to use it, CI works for your's PRs straight away |
9446c2e
to
43a4b9e
Compare
fc14d32
to
f76582f
Compare
f76582f
to
4845f4f
Compare
e91a3fb
to
d202885
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for reviewing in draft PR, I've just spotted a couple of things, and wanted to let you know ❤️
# This is an experimental extension, never got to real production. | ||
# !Do not remove! It can be present in shared_preload_libraries and compute will fail to start if library is not found. | ||
ENV PATH="/usr/local/pgsql/bin/:$PATH" | ||
RUN wget https://github.com/luist18/postgresql_anonymizer/archive/refs/heads/add-guc-hook.tar.gz -O pg_anon.tar.gz && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note, that this should be moved to neondatabase-labs
/neondatabase
before merging (and preferably tagged / used from a commit hash)
echo 'trusted = true' >> /usr/local/pgsql/share/extension/anon.control && \ | ||
find /usr/local/pgsql -type f | sed 's|^/usr/local/pgsql/||' > /after.txt &&\ | ||
mkdir -p /extensions/anon && cp /usr/local/pgsql/share/extension/anon.control /extensions/anon && \ | ||
sort -o /before.txt /before.txt && sort -o /after.txt /after.txt && \ | ||
comm -13 /before.txt /after.txt | tar --directory=/usr/local/pgsql --zstd -cf /extensions/anon.tar.zst -T - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 4 lines are not necessary (they were added to make anon a "custom" extension, which lives in a separate repo; here, it's a no-op); we can remove them.
echo 'trusted = true' >> /usr/local/pgsql/share/extension/anon.control && \ | |
find /usr/local/pgsql -type f | sed 's|^/usr/local/pgsql/||' > /after.txt &&\ | |
mkdir -p /extensions/anon && cp /usr/local/pgsql/share/extension/anon.control /extensions/anon && \ | |
sort -o /before.txt /before.txt && sort -o /after.txt /after.txt && \ | |
comm -13 /before.txt /after.txt | tar --directory=/usr/local/pgsql --zstd -cf /extensions/anon.tar.zst -T - | |
echo 'trusted = true' >> /usr/local/pgsql/share/extension/anon.control |
RUN case "${PG_VERSION}" in "v17") \ | ||
echo "v17 extensions are not supported yet. Quit" && exit 0;; \ | ||
esac && \ | ||
patch -p1 </ext-src/pg_anon.patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably can delete the patch as well
@bayandin thank you for the review. I want to get the image tag to create a small internal POC. This is not supposed to be merged any time soon |
Problem
Summary of changes
Checklist before requesting a review
Checklist before merging