8000 Deleting comments · Issue #51 · dataegret/pgcompacttable · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Deleting comments #51

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

Open
iriswind opened this issue Jun 11, 2023 · 1 comment
Open

Deleting comments #51

iriswind opened this issue Jun 11, 2023 · 1 comment

Comments

@iriswind
Copy link
iriswind commented Jun 11, 2023

The developers in my team noticed that the comments that they left on the indexes were deleted.
Apparently, it is not a reindex concurrently operation that is being produced, but the creation of a new index and the removal of the old one.
I give a diff that may close this problem:

801,802c801
<     pg_catalog.pg_relation_size(indexoid) as idxsize,
<     coalesce(obj_description(cst.oid),obj_description(indexoid)) as comm
---
>     pg_catalog.pg_relation_size(indexoid) as idxsize
819c818
< LEFT JOIN pg_catalog.pg_constraint cst ON
---
> LEFT JOIN pg_catalog.pg_constraint ON
902,903c901
< DROP INDEX CONCURRENTLY " . _dbh->quote_identifier($schema_name) . "." . _dbh->quote_identifier($tmp_index_name) . ";
< COMMENT ON INDEX " . _dbh->quote_identifier($schema_name) . "." . _dbh->quote_identifier($index_data->{indexname}) . " IS " . _dbh->quote($index_data->{comm}) ;
---
> DROP INDEX CONCURRENTLY " . _dbh->quote_identifier($schema_name) . "." . _dbh->quote_identifier($tmp_index_name) . ";";

@Melkij
Copy link
Collaborator
Melkij commented Jun 11, 2023

Yeah, I remembered this when I helped implement native reindex concurrently in postgresql 12.
Not sure if it makes sense now. The tool uses native reindex concurrently if available. Old-style create-rename-drop is a bit deprecated.

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

No branches or pull requests

2 participants
0