pg_sql | Unsorted

Telegram-канал pg_sql - PostgreSQL

2806

English speaking PostgreSQL public chat. This group is for discussions on PostgreSQL-related topics and strives to provide best-effort support as well.

Subscribe to a channel

PostgreSQL

Spammers are getting smart gosh..

Читать полностью…

PostgreSQL

All: apparently @Jasmine_dgFVvfK liked a lot of stuff, which I can neither remove nor ban her (she's not in the group apparently). I apologize, and maybe some other admin has a clue how to get rid of that kind of spam?

Читать полностью…

PostgreSQL

Your pg_control is probably a garbage.

(Or you are pointing pg_rewind to something that's not a postgres).

Читать полностью…

PostgreSQL

Hi people
Does any one need Postgres job support or interview support please ping me

Читать полностью…

PostgreSQL

How to migrate data from csv file to aurora postgres

Читать полностью…

PostgreSQL

I am new to Postgres.Postgres was installed & working fine..pgagent is installed & jobs are created and scheduled.but the jobs are not starting as per the schedule..i tried simple insert statement also..it's also not at all working...if we run the same code in the query window.it's executing.No errors in error log also.we are using Centos OS.

Читать полностью…

PostgreSQL

That's generally a good idea, however using transaction mode isn't trivial. Much less trivial than understanding one's own pooler config, at least 😏

Читать полностью…

PostgreSQL

You have 2 datasources
40*14 = 560
20*14 = 280
That's 820 max connections. Apparently they get used enough in a round-robin fashion that they don't get earmarked as idle by the pools.
I reckon

SELECT now()-state_change FROM pg_stat_activity;
will not show any connections with less than 30 seconds.

Anyway, if you have this many servers, you should tweak the pool settings anyway, unless you can guarantee your DB server can really handle those 820 connections when they're active!

Читать полностью…

PostgreSQL

spring.datasource.tomcat.initial-size=10
spring.datasource.tomcat.max-wait=30000
spring.datasource.tomcat.max-active=40
spring.datasource.tomcat.max-idle=5
spring.datasource.tomcat.min-idle=4

spring.datasource.hikari.connection-timeout=30000
spring.datasource.hikari.minimum-idle=5
spring.datasource.hikari.maximum-pool-size=20
spring.datasource.hikari.idle-timeout=100000
spring.datasource.hikari.max-lifetime=1000

This I already set but the problem persists. Could you please guide?

Читать полностью…

PostgreSQL

Check your pooler, postgresql will not close idle connections

Читать полностью…

PostgreSQL

Psql uses one connection and \c changes the current db but doesn't open any additional one

Читать полностью…

PostgreSQL

It depends on many factors like database size, hardware, write vs read workload, the kind of queries you're doing etc.

Читать полностью…

PostgreSQL

You should share about what your workload is and the issues you're having

Читать полностью…

PostgreSQL

spring.datasource.tomcat.initial-size=10
spring.datasource.tomcat.max-wait=30000
spring.datasource.tomcat.max-active=40
spring.datasource.tomcat.max-idle=5
spring.datasource.tomcat.min-idle=4

spring.datasource.hikari.connection-timeout=30000
spring.datasource.hikari.minimum-idle=5
spring.datasource.hikari.maximum-pool-size=20
spring.datasource.hikari.idle-timeout=100000
spring.datasource.hikari.max-lifetime=1000

This is the hicaricp conf

Читать полностью…

PostgreSQL

You probably have a client side connection pool (e.g. HikariCP) and configured that to use up to 800 connections. They usually default to actually use them if they get them 🤷‍♂

Читать полностью…

PostgreSQL

And can we get rid of the likes?

Читать полностью…

PostgreSQL

Try running pg_controldata on your $PGDATA and see if that produces some reasonable results.

Читать полностью…

PostgreSQL

Hi guys, i am facing this error when using pg_rewind ‘WAL segment size must be a power of two between 1 MB and 1 GB, but the control file specifies 131072 byte’
Any idea why ?

Читать полностью…

PostgreSQL

## csv with header
$ psql -U$db_user -h$db_host -p$db_port -d DB_NAME \
-c "\COPY TB_NAME FROM 'data_sample.csv' WITH (FORMAT CSV, header);"

## csv without header
$ psql -U$db_user -h$db_host -p$db_port -d DB_NAME \
-c "\COPY TB_NAME FROM 'data_sample.csv' WITH (FORMAT CSV);"

## csv without header, specify column
$ psql -U$db_user -h$db_host -p$db_port -d DB_NAME \
-c "\COPY TB_NAME(COL1,COL2) FROM 'data_sample.csv' WITH (FORMAT CSV);"
maybe that

Читать полностью…

PostgreSQL

pgagent might have died. you probably want to check if it's still running.

Читать полностью…

PostgreSQL

Yes needs a bit of understanding of pgbouncer. It works best with these type of application pools. App developers usually spawn large number of kubernetes pods with significantly tiny connection pools (compared to good old days of bare-metal) and hence large number of idle connections. Session pooling isn't good enough for such mechanism. Generally those with managed services cope by scaling instance memory but if it's self hosted then pgbouncer is the way.

Читать полностью…

PostgreSQL

What prevents you from using pgbouncer additionally to HikariCP? We use pgbouncer in transaction mode in addition to application connection pool. That keeps idle sessions under control.

Читать полностью…

PostgreSQL

I'm not familiar with that. I suggest looking for more specialised or professional support

Читать полностью…

PostgreSQL

(there is no reason to do so)

Читать полностью…

PostgreSQL

Ok. As per my knowledge postgresql doesn't have an inbuilt feature to close idle connection (v12). I already set the max pool size and timeout setting in hicaricp. Still more than 1000 connections are idle . How to resolve this?

Читать полностью…

PostgreSQL

There are also other parametrrs likes random_page_cost

Читать полностью…

PostgreSQL

As of now,we are migration data from Oracle to postgres. So before going to live we have to tune these parameters. Is it possible for based on database size?

Читать полностью…

PostgreSQL

Hello All,
Anyone have experience on tuning parameters please help me on below parameterd. After migrate from Oracle to postgres, we need to tune these parameters.

shared_buffers
huge_pages
huge_page_size
temp_buffers
work_mem
hash_mem_multiplier
maintenance_work_mem
autovacuum_work_mem
vacuum_buffer_usage_limit
logical_decoding_work_mem
min_dynamic_shared_memory
max_parallel_workers_per_gather
max_parallel_maintenance_workers
max_parallel_workers
max_worker_processes

Читать полностью…

PostgreSQL

Yes. tomcat and hikaricp .. in hikaricp max_connection is 20 in 14 applications.
But I want to know from a postgresql perspective, how it creates connection and closes it. Suppose I write psql -U postgres.. it creates a new connection, now if I do \c mydb.. will it create a new connection or use the existing one?

Читать полностью…

PostgreSQL

How connections are created in postgresql when connected by jdbc. In my case it suddenly reaches 800 where the max_connection is 1000. I don't know what's happening in the backend. If anyone knows plz help

Читать полностью…
Subscribe to a channel