Re: Index rebuilding strategy

2025-09-24 Thread Ron Johnson
On Wed, Sep 24, 2025 at 4:51 PM Alban Hertroys wrote: > > > On 24 Sep 2025, at 22:42, Siraj G wrote: > > > > Hello Experts! > > > > What are the top pointers we should consider for index rebuild? Check > its size, bloat estimate, heavy Updates/Deletes? > > > > Please highlight the best practice

Re: How do I upsert depending on a second table?

2025-09-24 Thread Adrian Klaver
On 9/24/25 10:02, Samuel Marks wrote: On Wed, Sep 24, 2025 at 10:13 AM Adrian Klaver mailto:[email protected]>> wrote: Yes but it's meant to divide by zero. That cancels the whole transaction stopping it from going through. It being a transaction lets me guarantee that at point of u

Re: How do I upsert depending on a second table?

2025-09-24 Thread Adrian Klaver
On 9/24/25 10:02, Samuel Marks wrote: On Wed, Sep 24, 2025 at 10:13 AM Adrian Klaver Yes but it's meant to divide by zero. That cancels the whole transaction stopping it from going through. It being a transaction lets me guarantee that at point of update or insert [upsert] the org owner match

Re: Index rebuilding strategy

2025-09-24 Thread Laurenz Albe
On Thu, 2025-09-25 at 02:12 +0530, Siraj G wrote: > What are the top pointers we should consider for index rebuild? Check its > size,  bloat estimate, heavy Updates/Deletes? https://www.cybertec-postgresql.com/en/should-i-rebuild-my-postgresql-index/ Yours, Laurenz Albe

Re: Index rebuilding strategy

2025-09-24 Thread Alban Hertroys
> On 24 Sep 2025, at 22:42, Siraj G wrote: > > Hello Experts! > > What are the top pointers we should consider for index rebuild? Check its > size, bloat estimate, heavy Updates/Deletes? > > Please highlight the best practices. I think just any pointers of corruption, really. OS updates wi

Re: How do I upsert depending on a second table?

2025-09-24 Thread Samuel Marks
On Wed, Sep 24, 2025 at 10:13 AM Adrian Klaver wrote: > > On 9/23/25 23:44, Juan Rodrigo Alejandro Burgos Mella wrote: > > The insert works because there is no data in the repo table that > > conflicts with the entered full name. > > Except this part: > > SELECT 1/COUNT(*) > FROM org > WHERE name

Re: How do I upsert depending on a second table?

2025-09-24 Thread David G. Johnston
This thread is annoyingly full of replies that do not follow the established conventions for making threads like this readable online and in the archive. Please: 1. Avoid top-posting and instead include your replies inline (or, at worse, at the end) 2. Remove content not relevant to your immediate

Re: How do I upsert depending on a second table?

2025-09-24 Thread Adrian Klaver
On 9/23/25 23:44, Juan Rodrigo Alejandro Burgos Mella wrote: The insert works because there is no data in the repo table that conflicts with the entered full name. Except this part: SELECT 1/COUNT(*) FROM org WHERE name = 'org0' AND owner = 'wrong user'; will cause a divide by 0 error and a

Re: Query on Patch and Upgrade History in PostgreSQL

2025-09-24 Thread Ron Johnson
On Wed, Sep 24, 2025 at 6:37 AM Laurenz Albe wrote: > On Wed, 2025-09-24 at 13:47 +0530, loganathan P wrote: > > How do I find the date and time of applied minor patches and upgrades in > a PostgreSQL database level? > > This information is not stored inside the database. > A minor upgrade just m

Re: Query on Patch and Upgrade History in PostgreSQL

2025-09-24 Thread Laurenz Albe
On Wed, 2025-09-24 at 13:47 +0530, loganathan P wrote: > How do I find the date and time of applied minor patches and upgrades in a > PostgreSQL database level? This information is not stored inside the database. A minor upgrade just means replacing the files and restarting the server. If you ar