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

[PSQL] Postgres server crashes when "CREATE INDEX" is run on existing table with data #930

Closed
ndeodhar opened this issue Mar 5, 2019 · 0 comments
Assignees
Labels
kind/bug This issue is a bug

Comments

@ndeodhar
Copy link
Contributor

ndeodhar commented Mar 5, 2019

When index is created on an existing table containing data, Postgres server crashes.

postgres=# CREATE INDEX foo_a ON foo(a);
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
@ndeodhar ndeodhar self-assigned this Mar 5, 2019
@ndeodhar ndeodhar added the kind/bug This issue is a bug label Mar 5, 2019
yugabyte-ci pushed a commit that referenced this issue Mar 12, 2019
…isting table with data

Summary:
Before:
While creating an index on existing table with data, postgres server would crash.
```
CREATE TABLE foo(a INT, b INT, c INT, d INT);
INSERT INTO foo VALUES(1,1,1,1);
CREATE INDEX foo_a ON foo(a);
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
```

Now:
```
CREATE TABLE foo(a INT, b INT, c INT, d INT);
INSERT INTO foo VALUES(1,1,1,1);

postgres=# create index foo_d on foo(a);
CREATE INDEX
postgres=# select * from foo where a=1;
 a | b | c | d
---+---+---+---
 1 | 1 | 1 | 1
(1 row)

```

Test Plan: Jenkins

Reviewers: robert

Reviewed By: robert

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D6281
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This issue is a bug
Projects
None yet
Development

No branches or pull requests

1 participant