autovacuum freeze recommendations at table level

2024-08-10 Thread Durgamahesh Manne
Hi Respected Team, Could you please let me know that how this freeze parameters work Update query runs on table through which data being modified daily in this case Total records in table is about 20lakhs current setting for this table is Access method: heap if it reaches > 0.1*200+1000 = 2,

Re: Insert works but fails for merge

2024-08-10 Thread yudhi s
Apology for the confusion. The other column is the txn_timestamp in the composite unique key, which is also the partition key. But yes we cant use both in the ON clause because of certain business requirements. We realized it late. And that's why "on conflict " We are unable to use. On Sun, 11 A

Re: Insert works but fails for merge

2024-08-10 Thread Adrian Klaver
On 8/10/24 13:23, yudhi s wrote: On Sat, Aug 10, 2024 at 8:22 PM Adrian Klaver > wrote: Why not use INSERT ... ON CONFLICT instead of MERGE? > > MERGE INTO tab1 AS target > USING (VALUES ('5efd4c91-ef93-4477-840c-a723ae212d99', 123,

Re: Column type modification in big tables

2024-08-10 Thread Lok P
On Sat, Aug 10, 2024 at 5:47 PM sud wrote: > > > My 2cents. > If you have enough time then from a simplicity point of view, your single > line alter command may look good, but how are you going to see the amount > of progress it has made so far and how much time it's going to take to > finish. A

Re: Insert works but fails for merge

2024-08-10 Thread yudhi s
On Sat, Aug 10, 2024 at 8:22 PM Adrian Klaver wrote: > > > Why not use INSERT ... ON CONFLICT instead of MERGE? > > > > > MERGE INTO tab1 AS target > > USING (VALUES ('5efd4c91-ef93-4477-840c-a723ae212d99', 123, > > '2024-08-09T11:33:49.402585600Z','2024-08-09T11:33:49.402585600Z')) AS > > source

Re: Soluton on Lock:extend issue

2024-08-10 Thread Christophe Pettus
> On Aug 10, 2024, at 09:52, Durgamahesh Manne > wrote: > Lock:extend (version 14.11) PostgreSQL version 16 contains improvements that significantly reduce the amount of contention on extend locks; upgrading will almost certainly help.

Soluton on Lock:extend issue

2024-08-10 Thread Durgamahesh Manne
Hi Lock:extend (version 14.11) How to resolve lock:extend issue even there is surge in concurrent sessions (insert and update) on same table Reduction on concurrent sessions would be solved but that is not a solution and there is no network bandwidth issue Is there any parameter to tune to mini

Re: Insert works but fails for merge

2024-08-10 Thread Adrian Klaver
On 8/10/24 05:07, yudhi s wrote: Thank You Adrian and David. Even converting the merge avoiding the WITH clause/CTE as below , is still making it fail with the same error. So it seems , only direct "insert into values" query can be auto converted/casted but not the other queries. In ou

Re: Insert works but fails for merge

2024-08-10 Thread David G. Johnston
On Saturday, August 10, 2024, yudhi s wrote: > > In our case , we were using this merge query in application code(in Java) > as a framework to dynamically take these values as bind values and do the > merge of input data/message. > I’d do most anything before resorting to dynamic SQL. Usually o

Re: Column type modification in big tables

2024-08-10 Thread sud
On Sat, Aug 10, 2024 at 12:52 AM Lok P wrote: > > On Fri, Aug 9, 2024 at 9:19 PM Greg Sabino Mullane > wrote: > >> On Fri, Aug 9, 2024 at 6:39 AM Lok P wrote: >> >>> Thank you so much. Will definitely try to evaluate this approach. The >>> Only concern I have is , as this data is moving downstr

Re: Insert works but fails for merge

2024-08-10 Thread yudhi s
On Sat, Aug 10, 2024 at 2:56 AM Adrian Klaver wrote: > On 8/9/24 14:13, yudhi s wrote: > > Hello, > > It's version 15.4 postgres. Where we have an insert working fine, but > > then a similar insert with the same 'timestamp' value, when trying to be > > executed through merge , it fails stating "Y

Re: Re: searching for libpq5-14.1-42PGDG.rhel8.x86_64

2024-08-10 Thread Ron Johnson
On Sat, Aug 10, 2024 at 5:45 AM 王瞿 wrote: > > Hi Laurenz Albe > > Thank you! > > > >The client libraries for this version are in > >https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-8-x86_64/postgresql14-14.1-1PGDG.rhel8.x86_64.rpm > > But My project was specified to use the package >

Re:Re: searching for libpq5-14.1-42PGDG.rhel8.x86_64

2024-08-10 Thread 王瞿
Hi Laurenz Albe Thank you! >The client libraries for this version are in >https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-8-x86_64/postgresql14-14.1-1PGDG.rhel8.x86_64.rpm But My project was specified to use the package libpq5-14.1-42PGDG.rhel8.x86_64.rpm. There are only lat