Re: Inefficient use of index scan on 2nd column of composite index during concurrent activity

2024-10-14 Thread Durgamahesh Manne
On Fri, 11 Oct, 2024, 23:33 Durgamahesh Manne, wrote: > > > On Fri, Oct 11, 2024 at 9:57 PM Greg Sabino Mullane > wrote: > >> On Fri, Oct 11, 2024 at 9:28 AM Durgamahesh Manne < >> maheshpostgr...@gmail.com> wrote: >> >>> composite key (placedon,id) >>> In concurrent mode if i use id at where cl

Re: How to Copy/Load 1 billions rows into a Partition Tables Fast

2024-10-14 Thread David Rowley
On Tue, 15 Oct 2024 at 06:59, Wong, Kam Fook (TR Technology) wrote: > I am trying to copy a table (Postgres) that is close to 1 billion rows into a > Partition table (Postgres) within the same DB. What is the fastest way to > copy the data? This table has 37 columns where some of which are te

Re: How to Copy/Load 1 billions rows into a Partition Tables Fast

2024-10-14 Thread Juan Rodrigo Alejandro Burgos Mella
Hi Wong On one occasion I had to upload 600 million records, and the most viable and safest option was to generate plans and upload them through a massively parallelized process (because for each process we audited that everything was correct) Atte. JRBM El lun, 14 oct 2024 a las 14:59, Wong, Ka

Re: How to Copy/Load 1 billions rows into a Partition Tables Fast

2024-10-14 Thread Muhammad Usman Khan
Hi, There are many methods to achieve this and one of them is pg_bulkload utility as described in previous email but I always preferred using python multiprocessing which I think is more efficient. Below is the code which you can modify as per your requirement: import multiprocessing import psycop

Re: Changing postgres User

2024-10-14 Thread Adrian Klaver
On 10/14/24 15:09, Zac Warham wrote: Hi Adrian, Thank you for the link to the documentation however it is the UID and GID of 1001:1001 that is required, not the username which I believe this is intended for? Is there a similar option for UID and GID? Apologies if my original question was not

Re: Changing postgres User

2024-10-14 Thread Tom Lane
Zac Warham writes: > Thank you for the link to the documentation however it is the UID and GID of > 1001:1001 that is required, not the username which I believe this is intended > for? Is there a similar option for UID and GID? Apologies if my original > question was not clear in this manner.

Re: Changing postgres User

2024-10-14 Thread Zac Warham
Hi Adrian, Thank you for the link to the documentation however it is the UID and GID of 1001:1001 that is required, not the username which I believe this is intended for? Is there a similar option for UID and GID? Apologies if my original question was not clear in this manner. Zac

Re: Changing postgres User

2024-10-14 Thread Adrian Klaver
On 10/14/24 13:11, Zac Warham wrote: Hi, We are trying to setup a postgresql Docker container alongside pgadmin and caddy for use in the PrairieLearn student testing software. Our main set back is that the PrairieLearn production environment user runs as user 1001:1001 and as such we have had

Re: How to Copy/Load 1 billions rows into a Partition Tables Fast

2024-10-14 Thread Durgamahesh Manne
On Mon, 14 Oct, 2024, 23:29 Wong, Kam Fook (TR Technology), < kamfook.w...@thomsonreuters.com> wrote: > I am trying to copy a table (Postgres) that is close to 1 billion rows > into a Partition table (Postgres) within the same DB. What is the fastest > way to copy the data? This table has 37 co

Changing postgres User

2024-10-14 Thread Zac Warham
Hi, We are trying to setup a postgresql Docker container alongside pgadmin and caddy for use in the PrairieLearn student testing software. Our main set back is that the PrairieLearn production environment user runs as user 1001:1001 and as such we have had to rename the postgres user within Lin

Re: Help in dealing with OOM

2024-10-14 Thread Joe Conway
On 10/14/24 14:37, Siraj G wrote: This is from the OS log (/var/log/kern.log): oom- kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.sli      ce/system-postgresql.slice/postgresql@12-main.service,task=postgres,pid=2334587,uid=114   494 Oct 1

Help in dealing with OOM

2024-10-14 Thread Siraj G
Hello Experts! My secondary instance has been unstable today. The service is crashing with Out of Memory. Please see below error (/var/log/postgresql/postgresql-2024-10-14.log): 10.2.52.50,2024-10-14 15:28:11 IST,686671,finance_revamp,finance_b2b,1,LOG: duration: 1148.527 ms statement: SELECT "

How to Copy/Load 1 billions rows into a Partition Tables Fast

2024-10-14 Thread Wong, Kam Fook (TR Technology)
I am trying to copy a table (Postgres) that is close to 1 billion rows into a Partition table (Postgres) within the same DB. What is the fastest way to copy the data? This table has 37 columns where some of which are text data types. Thank you Kam Fook Wong This e-mail is for the sole use o

Re: Hello, how should I fix it?

2024-10-14 Thread Bruce Momjian
On Mon, Oct 14, 2024 at 04:21:11AM +, 吴 其键 wrote: > I am running in Kali NetHunter chroot, using the official Kali apt repository > to install PostgreSQL 16.4. The error is pretty clear that that configuation, either the operating system or chroot, does not support shared memory.

Re: repmgr 5.4.1 dependend package on RHEL9

2024-10-14 Thread Adrian Klaver
On 10/14/24 00:09, Ron Johnson wrote: On Mon, Oct 14, 2024 at 2:06 AM Mukesh Tanuku > wrote: Hello everyone, Question: We are installing *repmgr 5.4.1* along with postgres 15.6 on RHEL 9 and facing an issue with the dependent development package

Re: how to use trace_lock_oidmin config correctly

2024-10-14 Thread Vijaykumar Jain
ok pls ignore. i think this flag has to be used along with trace_locks = on flag. now it works. PostgreSQL: Documentation: 17: 19.17. Developer Options sorry for the noise. /* postgres=# show trace_lock_oid

how to use trace_lock_oidmin config correctly

2024-10-14 Thread Vijaykumar Jain
I do not see logs for locks linked to attaching and detaching partitions if I use the trace_lock_oidmin config set to oid below the table of concern, basically any locking on objects above the threshold oid do not log. from the doc: PostgreSQL: Documentation: 17: 19.17. Developer Options

Re: Hello, how should I fix it?

2024-10-14 Thread Erik Wienhold
Please do not top post. Inline or bottom posting is preferred here. https://wiki.postgresql.org/wiki/Mailing_Lists#Email_etiquette_mechanics On 2024-10-14 06:21 +0200, 吴 其键 wrote: > I am running in Kali NetHunter chroot, using the official Kali apt > repository to install PostgreSQL 16.4. I'm no

Re: Hello, how should I fix it?

2024-10-14 Thread 吴 其键
I am running in Kali NetHunter chroot, using the official Kali apt repository to install PostgreSQL 16.4. 获取Outlook for Android From: Erik Wienhold Sent: Monday, October 14, 2024 12:27:45 AM To: Adrian Klaver Cc: 吴 其键 ; pgsql-general@list

Re: Naive question about multithreading/multicore

2024-10-14 Thread Marc SCHAEFER
Hello, On Sun, Oct 13, 2024 at 08:16:04AM +1300, Thomas Munro wrote: > > template1=> SELECT COUNT(*) FROM pg_class a, pg_class b, pg_class c; > > > > I see only one 100% CPU PostgreSQL process. > > If you set set min_parallel_table_scan_size = 0 then it uses Without it, it uses one CPU and takes

Re: repmgr 5.4.1 dependend package on RHEL9

2024-10-14 Thread Ron Johnson
On Mon, Oct 14, 2024 at 2:06 AM Mukesh Tanuku wrote: > Hello everyone, > > Question: We are installing *repmgr 5.4.1* along with postgres 15.6 on > RHEL 9 and facing an issue with the dependent development package json-c > *-devel-0.14-11.el9.x86_64**. *This package is not available on > RHEL re