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

Should start different database processes if using different --install-dir arguments #399

Closed
e-gineer opened this issue Apr 15, 2021 · 0 comments · Fixed by #412
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@e-gineer
Copy link
Contributor

Describe the bug

If run twice with different --install-dir arguments then Steampipe should create separate DB instances.

Steampipe version (steampipe -v)

v0.4.0

To reproduce

/tmp $ steampipe --install-dir /tmp/a service start

Steampipe database service is now running:

  Host(s):  localhost, 127.0.0.1, 192.168.7.220
  Port:     9193
  Database: steampipe
  User:     steampipe
  Password: 519a-4b58-EXAMPLE

Connection string:

  postgres://steampipe:519a-4b58-EXAMPLE@localhost:9193/steampipe?sslmode=disable

Steampipe service is running in the background.

  # Get status of the service
  steampipe service status
  
  # Restart the service
  steampipe service restart

  # Stop the service
  steampipe service stop

/tmp $ ps aux | grep steampipe
nathan            1619   0.0  0.0  4399420    740 s000  S+    3:57PM   0:00.01 grep steampipe
nathan            1612   0.0  0.0  4751440   1696   ??  Ss    3:56PM   0:00.00 postgres: steampipe: logical replication launcher                                                         
nathan            1611   0.0  0.0  4469612    908   ??  Ss    3:56PM   0:00.00 postgres: steampipe: stats collector                                                         
nathan            1610   0.0  0.0  4751440   1100   ??  Ss    3:56PM   0:00.00 postgres: steampipe: walwriter                                                         
nathan            1609   0.0  0.0  4751440   1092   ??  Ss    3:56PM   0:00.00 postgres: steampipe: background writer                                                         
nathan            1608   0.0  0.0  4620368   1024   ??  Ss    3:56PM   0:00.00 postgres: steampipe: checkpointer                                                         
nathan            1606   0.0  0.0  4469612    888   ??  Ss    3:56PM   0:00.00 postgres: steampipe: logger                                                         
nathan            1605   0.0  0.0  4611444  11768 s000  S     3:56PM   0:00.03 /tmp/a/db/12.1.0/postgres/bin/postgres -p 9193 -c listen_addresses="*" -c application_name=steampipe -c cluster_name=steampipe -c autovacuum=off -c bgwriter_lru_maxpages=0 -c effective-cache-size=64kB -c fsync=off -c full_page_writes=off -c maintenance-work-mem=1024kB -c password_encryption=scram-sha-256 -c random-page-cost=0.01 -c seq-page-cost=0.01 -c temp-buffers=800kB -c timezone=UTC -c track_activities=off -c track_counts=off -c wal-buffers=32kB -c work-mem=64kB -c jit=off -c log_statement=all -c log_min_duration_statement=2000 -c logging_collector=on -c log_min_error_statement=error -c log_directory=/tmp/a/logs -c log_filename=database-%Y-%m-%d.log -D /tmp/a/db/12.1.0/data
/tmp $ 
/tmp $ steampipe --install-dir /tmp/b service start

Steampipe database service is now running:

  Host(s):  localhost, 127.0.0.1, 192.168.7.220
  Port:     9193
  Database: steampipe
  User:     steampipe
  Password: df0f-40fa-EXAMPLE

Connection string:

  postgres://steampipe:df0f-40fa-EXAMPLE@localhost:9193/steampipe?sslmode=disable

Steampipe service is running in the background.

  # Get status of the service
  steampipe service status
  
  # Restart the service
  steampipe service restart

  # Stop the service
  steampipe service stop

/tmp $ 
/tmp $ ps aux | grep steampipe
nathan            1630   0.0  0.0  4399420    740 s000  S+    3:57PM   0:00.00 grep steampipe
nathan            1612   0.0  0.0  4751440   1696   ??  Ss    3:56PM   0:00.00 postgres: steampipe: logical replication launcher                                                         
nathan            1611   0.0  0.0  4469612    908   ??  Ss    3:56PM   0:00.00 postgres: steampipe: stats collector                                                         
nathan            1610   0.0  0.0  4751440   1164   ??  Ss    3:56PM   0:00.01 postgres: steampipe: walwriter                                                         
nathan            1609   0.0  0.0  4751440   1252   ??  Ss    3:56PM   0:00.00 postgres: steampipe: background writer                                                         
nathan            1608   0.0  0.0  4620368   1024   ??  Ss    3:56PM   0:00.00 postgres: steampipe: checkpointer                                                         
nathan            1606   0.0  0.0  4469612    888   ??  Ss    3:56PM   0:00.00 postgres: steampipe: logger                                                         
nathan            1605   0.0  0.0  4612468  11776 s000  S     3:56PM   0:00.03 /tmp/a/db/12.1.0/postgres/bin/postgres -p 9193 -c listen_addresses="*" -c application_name=steampipe -c cluster_name=steampipe -c autovacuum=off -c bgwriter_lru_maxpages=0 -c effective-cache-size=64kB -c fsync=off -c full_page_writes=off -c maintenance-work-mem=1024kB -c password_encryption=scram-sha-256 -c random-page-cost=0.01 -c seq-page-cost=0.01 -c temp-buffers=800kB -c timezone=UTC -c track_activities=off -c track_counts=off -c wal-buffers=32kB -c work-mem=64kB -c jit=off -c log_statement=all -c log_min_duration_statement=2000 -c logging_collector=on -c log_min_error_statement=error -c log_directory=/tmp/a/logs -c log_filename=database-%Y-%m-%d.log -D /tmp/a/db/12.1.0/data
/tmp $ 
@e-gineer e-gineer added the bug Something isn't working label Apr 15, 2021
@kaidaguerre kaidaguerre added this to the 0.4.1 milestone Apr 19, 2021
ahirreddy pushed a commit to ahirreddy/steampipe that referenced this issue Jul 8, 2024
…e config file and index doc with better info on authenticating. Closes turbot#270 Closes turbot#399 (turbot#268)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants