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

Duplicate rows returned when execute SHOW DATABASES #610

Open
flant-team-zulu opened this issue May 6, 2024 · 4 comments
Open

Duplicate rows returned when execute SHOW DATABASES #610

flant-team-zulu opened this issue May 6, 2024 · 4 comments

Comments

@flant-team-zulu
Copy link

image

prometheus-community/postgres_exporter#732

@x4m
Copy link
Collaborator

x4m commented May 6, 2024

That's a bug. Thanks for letting us know! I think I saw it before, but it's not fixed yet.
Some locking issue in a console command.

@x4m
Copy link
Collaborator

x4m commented May 6, 2024

Do you observe it as a stable result or it was one-time issue?

@flant-team-zulu
Copy link
Author

flant-team-zulu commented May 7, 2024

This is reproducible
PG has one db mydatabase with 3 users - mydatabase, kafka_connect_analytic and kafka_connect
Here is config example:

`
daemonize no
log_to_stdout yes
pid_file "/pid/odyssey.pid"
log_format "%p %l %c %i %s %h %d %m\n"
log_debug no
log_config yes
log_session yes
log_query no
log_stats yes
stats_interval 60
readahead 4096
nodelay yes
keepalive 7200
client_max 5000
cache 300
cache_chunk 16384
resolvers 1
workers 1

listen {
    host "*"
    port 6432
    tls "disable"
}
storage "local" {
    type "local"
}
database "console" {
    user "odyssey" {
        authentication "clear_text"
        password "zzzzzzzzzzzzzzz"
        pool "session"
        storage "local"
    }
}
database default {
    user default {
        # none, block, clear_text, md5, scram-sha-256
        authentication "block"
        storage "local"
        pool "session"
    }
}

storage "mydatabase" {
  type "remote"
  host "10.3.11.11"
  port 5432
}
database "mydatabase" {
  user "mydatabase" {
    authentication "md5"
    password "md5zzzzzzzzzzzzzzzzzz"
    pool "session"
    pool_size 500
    pool_discard no
    pool_ttl 60
    storage "mydatabase"
    client_fwd_error yes
  }
  user "kafka_connect_analytic" {
    authentication "md5"
    password "md5zzzzzzzzzzzzzzzz"
    pool "session"
    pool_size 500
    pool_discard yes
    pool_ttl 60
    storage "mydatabase"
    client_fwd_error yes
  }
  user "kafka_connect" {
    authentication "md5"
    password "md5zzzzzzzzzzzzzzzzzzz"
    pool "session"
    pool_size 500
    pool_discard yes
    pool_ttl 60
    storage "mydatabase"
    client_fwd_error yes
  }
}

`

result

console=> show databases;
   name    |    host    | port | database   |       force_user       | pool_size | reserve_pool | pool_mode | max_connections | current_connections | paused | disabled 
-----------+------------+------+------------+------------------------+-----------+--------------+-----------+-----------------+---------------------+--------+----------
 console   |            |    0 | console    | odyssey                |         0 |            0 | session   |               0 |                   2 |      0 |        0
mydatabase | 10.3.11.11 | 5432 | mydatabase | mydatabase             |       500 |            0 | session   |               0 |                  95 |      0 |        0
mydatabase | 10.3.11.11 | 5432 | mydatabase | kafka_connect_analytic |       500 |            0 | session   |               0 |                   0 |      0 |        0
mydatabase | 10.3.11.11 | 5432 | mydatabase | kafka_connect          |       500 |            0 | session   |               0 |                   0 |      0 |        0
mydatabase | 10.3.11.11 | 5432 | mydatabase | kafka_connect          |       500 |            0 | session   |               0 |                   1 |      0 |        0
(5 rows)

@Mrazish
Copy link

Mrazish commented Jun 5, 2024

any ETA/workaround for this issue? It breaks up monitoring :(

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

3 participants