Skip to content
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

Emit one index statement per line #4621

Closed
pnorman opened this issue Jul 24, 2022 · 0 comments · Fixed by #4622
Closed

Emit one index statement per line #4621

pnorman opened this issue Jul 24, 2022 · 0 comments · Fixed by #4622
Labels

Comments

@pnorman
Copy link
Collaborator

pnorman commented Jul 24, 2022

By emitting one index statement per line and stripping any newlines out of the WHERE conditions, this allows use of our indexes with xargs, e.g.

scripts/indexes.py --fillfactor 100 | xargs -d'\n' -P20 -I_CREATE_ psql -Xqat -d flex -c "_CREATE_"

With newline changes, the above command will create up to 20 indexes in parallel.

Unknown: should this be standard or a command-line option? If a command-line option, should it use \0 instead, which allows use with xargs -0 instead of relying on GNU-specific behavior around quotes and -d?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant