question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DROP INDEX doesn't seem to work

See original GitHub issue

Description

I’m trying to run DROP INDEX, but it doesn’t seem to work.

When I log in using psql and run DROP INDEX 'my_index_...';, it works, but when I run the same command in pgcli, it’s asking me to confirm the “destructive” command, but when I run \di again, the index is still there

And it’s not a refresh issue, because even when I disconnect and reconnect, the index is still there

Your environment

  • Please provide your OS and version information.
Manjaro Linux
  • Please provide your CLI version.
Version: 3.1.0
  • What is the output of pip freeze command.
acme==1.14.0
aio-pika==6.5.3
aiormq==3.3.1
appdirs==1.4.4
asgiref==3.3.1
astroid==2.5.6
attrs==20.1.0
beautifulsoup4==4.8.2
black==20.8b1
bleach==3.3.0
bleach-whitelist==0.0.11
cachetools==3.1.1
certbot==1.0.0
certbot-dns-google==1.0.0
certifi==2019.6.16
cffi==1.14.5
chardet==3.0.4
click==7.1.2
ConfigArgParse==1.4
configobj==5.0.6
coverage==5.5
cryptography==3.4.7
cssselect==1.1.0
decorator==5.0.7
defusedxml==0.6.0
distro==1.5.0
Django==3.1.8
django-admin-list-filter-dropdown==1.0.3
django-better-admin-arrayfield==1.4.2
django-bootstrap4==1.1.1
django-dbconn-retry==0.1.5
django-debug-toolbar==3.2.1
django-mailbox==4.8.1
django-markdownx==3.0.1
django-model-utils==4.1.1
django-pgviews==0.5.7
django-polymorphic==3.0.0
django-prettyjson==0.4.1
django-prometheus==1.1.0
django-storages==1.7.2
django-stubs==1.2.0
django-timezone-field==4.0
dnspython==2.1.0
docutils==0.17.1
ecdsa==0.14.1
email-validator==1.1.2
et-xmlfile==1.0.1
expiringdict==1.2.1
Flask==1.1.2
freezegun==1.1.0
future==0.17.1
google-api-core==1.24.0
google-api-python-client==2.3.0
google-auth==1.30.0
google-auth-httplib2==0.1.0
google-auth-oauthlib==0.4.4
google-cloud-core==1.5.0
google-cloud-logging==1.15.0
google-cloud-storage==1.25.0
google-resumable-media==0.5.0
googleapis-common-protos==1.51.0
grpcio==1.37.1
grpcio-status==1.37.1
grpcio-tools==1.37.1
gspread==3.7.0
httplib2==0.19.1
idna==2.8
imap-tools==0.40.0
importlib-metadata==1.7.0
iniconfig==1.0.1
inotify-simple==1.2.1
isort==4.3.21
itsdangerous==1.1.0
jdcal==1.4.1
Jinja2==2.11.3
josepy==1.8.0
jsonpatch==1.26
jsonpointer==2.0
jsonschema==3.0.2
lazy-object-proxy==1.4.3
lockfile==0.12.2
luigi==3.0.2
lxml==4.6.3
Markdown==3.2.2
MarkupSafe==1.1.1
mccabe==0.6.1
mock==4.0.3
multidict==5.1.0
mypy==0.812
mypy-extensions==0.4.3
mypy-protobuf==1.16
networkx==2.4
nose==1.3.7
nose-exclude==0.5.0
numpy==1.20.2
oauth2client==4.1.3
oauthlib==3.1.0
openpyxl==3.0.2
packaging==20.4
pamqp==2.3.0
pandas==1.1.4
parameterized==0.7.0
parsedatetime==2.6
pathspec==0.8.1
peewee==3.14.4
phonenumbers==8.12.12
Pillow==8.2.0
pluggy==0.13.1
pony==0.7.14
prometheus-client==0.7.1
protobuf==3.13.0
psycopg2==2.8.6
psycopg2-binary==2.8.6
ptvsd==4.3.2
py==1.10.0
pyasn1==0.4.7
pyasn1-modules==0.2.6
pycparser==2.20
pycryptodome==3.9.8
PyHamcrest==2.0.2
PyJWT==1.7.1
pylint==2.8.3
pylint-django==2.0.13
pylint-plugin-utils==0.6
Pympler==0.8
pyOpenSSL==20.0.1
pyparsing==2.4.7
pyquery==1.4.1
pyRFC3339==1.1
pyrsistent==0.16.0
PySocks==1.7.1
pytest==6.1.0
python-daemon==2.3.0
python-dateutil==2.8.0
python-dotenv==0.9.0
python-etcd==0.4.5
python-jose==3.0.0
python-mimeparse==1.6.0
python3-openid==3.1.0
pytz==2019.2
redis==3.3.11
regex==2021.4.4
requests==2.25.1
requests-oauthlib==1.3.0
requests-toolbelt==0.9.1
rsa==4.7.2
selenium==3.141.0
Simperium3==0.1.3
simpleeval==0.9.10
simplejson==3.13.2
six==1.15.0
sncli==0.4.1
social-auth-app-django==3.1.0
social-auth-core==3.2.0
soupsieve==2.2.1
sqlparse==0.3.0
standardjson==0.3.1
toml==0.10.1
toposort==1.5
tornado==6.1
twilio==6.31.1
typed-ast==1.4.1
typing-extensions==3.7.4.3
tzlocal==2.0.0
uritemplate==3.0.1
urllib3==1.25.10
urwid==2.1.2
webencodings==0.5.1
Werkzeug==1.0.1
wrapt==1.11.2
xlrd==1.2.0
XlsxWriter==1.2.6
yarl==1.6.3
zipp==3.1.0
zope.component==5.0.0
zope.event==4.5.0
zope.hookable==5.0.1
zope.interface==5.4.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
amjithcommented, Jun 9, 2021

Thanks for getting back to us. Feel free to reopen if this happens again. 👍

0reactions
farzadmfcommented, Jun 9, 2021

OK, so I tried again, and I’m not sure what’s happening, but it works now, sorry 🙁

Maybe it was a quoting issue? Because I think I was using single quotes before, but now it’s giving me an error when I use single quotes, and it drops the index when I use double quotes.

So, I’m going to close this now, sorry again if I was too quick to open this issue (but yesterday, I didn’t get any errors and I thought it worked and I re-deployed our environment, only for it to fail after 20 minutes because DROP INDEX hadn’t worked before)

I will update here in case it happens again

Read more comments on GitHub >

github_iconTop Results From Across the Web

drop index indexname is not working fine when i try to use this ...
I get an error when i try to drop my index, or when I try to view my index using this kind of...
Read more >
Dropping indexes doesn't seem to release space to the OS ...
1 Answer 1 · The index is in a tablespace on a different filesystem from the one you're checking. · The OS/filesystem has...
Read more >
DROP INDEX (Transact-SQL) - SQL Server - Microsoft Learn
The DROP INDEX statement does not apply to indexes created by defining PRIMARY KEY or UNIQUE constraints. To remove the constraint and ...
Read more >
dropIndex doesn't generate the correct name for a unique index
A fix for this would add a unique option to dropIndex so that it can generate the correct index name. The text was...
Read more >
Cannot drop the index "'file_sources.file_sources_uuid_type ...
As a workaround the database admin in my team tried to create the index missing but it doesn't work as expected, after the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found