Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 12 17:19
    wantdrink commented #744
  • Dec 12 16:52
    sgotti closed #744
  • Dec 12 16:52
    sgotti commented #744
  • Dec 12 16:34
    wantdrink opened #744
  • Dec 12 08:31
    sgotti commented #743
  • Dec 12 01:06
    codervinod opened #743
  • Dec 11 08:53
    sgotti commented #740
  • Dec 11 05:52
    satyanash review_requested #738
  • Dec 10 17:14
    sandhose synchronize #740
  • Dec 10 16:42
    sgotti commented #728
  • Dec 10 13:37
    maksm90 commented #739
  • Dec 10 10:27
    sgotti closed #742
  • Dec 10 10:27
    sgotti commented #742
  • Dec 10 10:20
    ccmehk opened #742
  • Dec 10 07:41
    ccmehk commented #740
  • Dec 10 06:14
    satyanash synchronize #738
  • Dec 10 05:56
    satyanash synchronize #738
  • Dec 10 05:53
    satyanash synchronize #738
  • Dec 09 15:47
    sgotti commented #740
  • Dec 09 15:45
    sgotti commented #728
Soheil Pourbafrani
@ahoora08
Recently when I try to install the stolon using the brew package, It installs Postgresql 12. How can I force it to install Postgresql 11?
buddy
@buddy
Dear community, I need help. I have deployed a stolon cluster using etcd, but now I want to switch this cluster to a consul. How can I do this without losing data in the postgresql?
guruguruguru
@guruguruguru
@yelowstar what do you want to use tablespaces for? Are you planning to use different storages with stolon? for logical seperation you have a lot of possibilities inside postgres (database, schema)...
@ahoora08 I am not using brew so I have no experience with that but have you tried to install another version (like brew install stolon@version) or checked what brew info gives back?
Soheil Pourbafrani
@ahoora08
@guruguruguru I have installed the version 0.14.0 before. Now I'm trying to install the same version but It installs Postgresql 12 instead. Thanks, I try installing other versions
Soheil Pourbafrani
@ahoora08
The brew stolon package has no formula other than stolon!
yelowstar
@yelowstar

@yelowstar what do you want to use tablespaces for? Are you planning to use different storages with stolon? for logical seperation you have a lot of possibilities inside postgres (database, schema)...

My scripts for creating tables in schema required tablespace. And I have up to 50 schemas

guruguruguru
@guruguruguru
@yelowstar I still dont see any need for tablespaces, if it is neccessary to set it in the script you can use pg_default. I am not sure but I think to use tablespaces in stolon you just have to make sure that the directories for the tablespaces are available on every possible keeper node
@ahoora08 sorry i do not use brew and cannot help you with that :-(
Soheil Pourbafrani
@ahoora08
@guruguruguru Thanks for your response. I make the stolon package from the source but actually I have no idea how can I introduce the PostgreSQL to the stolon. Should I install the PostgreSQL using the ubuntu repositories before I make the stolon? Could you pls give me some advice.
guruguruguru
@guruguruguru
@ahoora08 I dont really understand what you want to achieve? so i dont know enough about what brew does exactly but stolon should work for itself and should not need any more postgresql installations. I am running stolon in K8S which pretty much does everything automatically with the helm chart. So what do you want to do exactly?
Soheil Pourbafrani
@ahoora08
@guruguruguru Forget about the brew. What I'm trying to know is that when someone makes the stolon source, there is no need to install the Postgresql separately? Actually I'm trying to build a PostgreSQL plugin so I need to know where is the Postgresql that stolon use it for the keepers
guruguruguru
@guruguruguru
@ahoora08 Sorry I am not sure about that. Do you build a Docker image? In my case postgres is in /usr/lib/postgresql/11/
Soheil Pourbafrani
@ahoora08
@guruguruguru Yes, I'm trying to build a stolon docker image with an additional Postgres plugin. Finally, I uninstall the PostgreSQL 12 dependency from the brew stolen package and install the PostgreSQL 10, instead. Now it works as expected.
guruguruguru
@guruguruguru
@ahoora08 what do you mean by postgresql plugin? extension?
then you can copy the extension to /usr/share/postgresql/$PGVERSION/extension
olivier beyler
@OlivierBeyler_twitter
Hello, I've got a question about the pv use by slolon. I can create PV by using different storage class. I'm asking myself if it's a good idea to use localPV instead of replicated volume such as cStor from openebs. I think that as each postgresql has his own volume and do the replication of the master, there is no need to securize the volume by duplicate it 3 times.
yelowstar
@yelowstar
Recently I tested automatic fail-over by turning off virtual machine where is one of three node of k8s. Unfortunately automatic failover failed. Here are logs:
2019-12-06T12:49:42.677Z INFO cmd/keeper.go:1491 our db requested role is standby {"followedDB": "b61bcb8e"}
2019-12-06T12:49:42.677Z INFO cmd/keeper.go:1510 already standby
2019-12-06T12:49:42.693Z INFO cmd/keeper.go:1610 postgres parameters not changed
2019-12-06T12:49:42.693Z INFO cmd/keeper.go:1637 postgres hba entries not changed
2019-12-06 12:49:43.353 UTC [60] FATAL: terminating walreceiver due to timeout
2019-12-06 12:49:43.354 UTC [56] LOG: invalid resource manager ID 54 at 0/6DAB8ED0
2019-12-06T12:49:47.734Z INFO cmd/keeper.go:1441 our db requested role is master
2019-12-06T12:49:47.735Z INFO cmd/keeper.go:1470 promoting to master
2019-12-06T12:49:47.736Z INFO postgresql/postgresql.go:507 promoting database
2019-12-06 12:49:47.739 UTC [56] LOG: received promote request
2019-12-06 12:49:47.739 UTC [10860] FATAL: terminating walreceiver process due to administrator command
2019-12-06 12:49:47.740 UTC [56] LOG: redo done at 0/6DAB8E98
2019-12-06 12:49:47.741 UTC [56] LOG: last completed transaction was at log time 2019-12-06 12:46:12.67132+00
2019-12-06 12:49:47.754 UTC [56] LOG: selected new timeline ID: 2
2019-12-06 12:49:56.396 UTC [10882] LOG: incomplete startup packet
2019-12-06 12:49:59.520 UTC [10890] LOG: incomplete startup packet
2019-12-06 12:50:06.395 UTC [10898] LOG: incomplete startup packet
2019-12-06 12:50:09.519 UTC [10907] LOG: incomplete startup packet
2019-12-06 12:50:16.396 UTC [10915] LOG: incomplete startup packet
2019-12-06 12:50:19.520 UTC [10920] LOG: incomplete startup packet
2019-12-06 12:50:26.396 UTC [10931] LOG: incomplete startup packet
2019-12-06 12:50:29.520 UTC [10936] LOG: incomplete startup packet
2019-12-06 12:50:36.396 UTC [10948] LOG: incomplete startup packet
2019-12-06 12:50:39.520 UTC [10954] LOG: incomplete startup packet
2019-12-06 12:50:46.396 UTC [10965] LOG: incomplete startup packet
pg_ctl: server did not promote in time
waiting for server to promote............................................................... stopped waiting
2019-12-06T12:50:47.856Z ERROR cmd/keeper.go:1473 failed to promote instance {"error": "error: exit status 1"}
2019-12-06 12:50:49.520 UTC [10970] LOG: incomplete startup packet
2019-12-06T12:50:52.874Z INFO cmd/keeper.go:1441 our db requested role is master
2019-12-06T12:50:52.875Z INFO cmd/keeper.go:1470 promoting to master
2019-12-06T12:50:52.875Z INFO postgresql/postgresql.go:507 promoting database
2019-12-06 12:50:56.396 UTC [10985] LOG: incomplete startup packet
2019-12-06 12:50:59.520 UTC [10990] LOG: incomplete startup packet
2019-12-06 12:51:06.396 UTC [11001] LOG: incomplete startup packet
2019-12-06 12:51:09.520 UTC [11006] LOG: incomplete startup packet
2019-12-06 12:51:16.396 UTC [11017] LOG: incomplete startup packet
2019-12-06 12:51:19.520 UTC [11022] LOG: incomplete startup packet
2019-12-06 12:51:26.396 UTC [11034] LOG: incomplete startup packet
2019-12-06 12:51:29.520 UTC [11039] LOG: incomplete startup packet
2019-12-06 12:51:36.396 UTC [11050] LOG: incomplete startup packet
2019-12-06 12:51:39.520 UTC [11055] LOG: incomplete startup packet
2019-12-06 12:51:46.396 UTC [11066] LOG: incomplete startup packet
2019-12-06 12:51:49.520 UTC [11071] LOG: incomplete startup packet
waiting for server to promote............................................................... stopped waiting
pg_ctl: server did not promote in time
2019-12-06T12:51:52.995Z ERROR cmd/keeper.go:1473 failed to promote instance {"error": "error: exit status 1"}
2019-12-06 12:51:56.396 UTC [11082] LOG: incomplete startup packet
yelowstar
@yelowstar

@guruguruguru

@yelowstar I still dont see any need for tablespaces, if it is neccessary to set it in the script you can use pg_default. I am not sure but I think to use tablespaces in stolon you just have to make sure that the directories for the tablespaces are available on every possible keeper node

What about performance ? Don't you have performance boost if we keep indexes in different tablespace ?

guruguruguru
@guruguruguru
@yelowstar As long as it is the same storage I do not think so...
Simone Gotti
@sgotti

@yelowstar

waiting for server to promote............................................................... stopped waiting
pg_ctl: server did not promote in time

Stolon correctly tried to promote the instance but the pg_ctl promote command failed. So we cannot do nothing, you should check why it doesn't promote. Usually promote fails when the underlying storage isn't accessible.

@OlivierBeyler_twitter Yes, you can use localPV
yelowstar
@yelowstar
@sgotti Thank's for suggestion.
Mayur
@mayurgn86
Hi @sgotti I wanted to check if you got chance to look in to sorintlab/stolon#741 ?
we'd want to implement and fine tune the roles per somponent as mentioned
rutaveej-shah
@rutaveej-shah
Hi team, I am new to stolon. I have deployed the stolon on my on prem kubernetes environment. I have tried to test the perfomance of the stolon using pg_bench. But the perfomace report is not looking good. Any idea how can we increase the performance ?
guruguruguru
@guruguruguru
@rutaveej-shah maybe you can share the results with us? do you have significant differences between stolon and a standalone postgres inside the same kubernetes cluster? maybe you need to increase the resources for the pods? maybe your storage is slow? which pg_bench parameters were used and what are the resources used for the deployments and statefulsets? please give more information
rutaveej-shah
@rutaveej-shah
@guruguruguru I have done the test using pg_bench which is utility provide by postgres. transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 20
number of threads: 2
number of transactions per client: 10000
number of transactions actually processed: 200000/200000
latency average = 41.002 ms
tps = 487.782956 (including connections establishing)
tps = 487.795405 (excluding connections establishing)
This is the test result I got which is quite low.
I have try to increase the shared_buffer as well but still the performance is low.
I have currently applied the 8 GB ram and 400m CPU.
Below is my pg_configuration.
max_connections: "100"
listen_addresses: "*"
shared_buffers: "1024MB"
dynamic_shared_memory_type: "posix"
max_wal_size: "8GB"
min_wal_size: "640MB"
log_destination: "stderr"
logging_collector: "on"
log_directory: "log"
log_filename: "postgresql-%m%d.log"
log_truncate_on_rotation: "on"
log_rotation_age: "1d"
log_rotation_size : "0"
log_connections : "on"
log_hostname: "on"
log_line_prefix: "%m | PID:%p | APP:%a | USR:%u | HOST:%r | DB:%d | "
log_statement: "ddl"
log_timezone: "Europe/Stockholm"
temp_tablespaces: "temp_01,temp_02"
lc_messages: "en_US.UTF-8"
lc_monetary: "en_US.UTF-8"
lc_numeric: "en_US.UTF-8"
lc_time: "en_US.UTF-8"
Please do let me know if you need more info
Simone Gotti
@sgotti
@rutaveej-shah The unique difference between a standalone postgres instance and stolon is that you have the stolon-proxy between the client and the postgres instance but the stolon-proxy shouldn't introduce any noticeable overhead on a good network. When we did some pg_bench tests we didn't see any difference. So I don't see your request really related to stolon. Obviously using only 400m CPU means a very low cpu budget. Instead if you did a comparisons between a standalone postgres instance and stolon let us know how to reproduce it (and use a greater cpu budget).
rutaveej-shah
@rutaveej-shah
@sgotti Thanks for this quick response. I have increase the resource limit 8 GB RAM and 4 CPU But still the performance is below avergare. With the same configuration I have deployed on bare metal server but the performance is very high.
If we go for the bare metal sever where postgres is deployed then with the same configuration I got the TPS around 3000 and on Kubernetes I got about 600 TPS
I can provide you my value.yaml file which has been used for this
guruguruguru
@guruguruguru
I think you have to lower your expectations when comparing k8s nodes to bare metal
on k8s you usually share everything with other nodes (cpu, mem, storage, esp. storage), i did a lot of benchmarks against aws/rds, google cloud sql, k8s, ovirt/kvm and bare metal...bare metal wins all the time
by a huge margin
rutaveej-shah
@rutaveej-shah
@guruguruguru Have you done the performance testing for the stolon using pg_bench. If yes would you share some results with me ?
I know the performance would not be that much but still it would be around 1000 to 1500 tps
I want to achieve that much. If you can provide me some guideline for the same. It would be great help.
Thanks for the quick response . :)
guruguruguru
@guruguruguru
@rutaveej-shah I am not sure if I can attach pictures here, you can give me an e-mail adress and I will send it to you
sorry, this is german, if anything is unclear just ask me
guruguruguru
@guruguruguru
and KOOPA= K8S