Re: Upgrade & Rollback plan: My customer requests rollback via old-version standby (13 ↔ 17) — need community advice

2025-10-18 Thread Vu Le (JData - HN)
Dear Bruce and Laurenz, Thank you very much for taking the time to share your valuable advice with me. The information you provided was highly useful, and I appreciate the specific guidance. I intend to dedicate time to research your suggestions further. I look forward to applying this knowledg

Database in another drive

2025-10-18 Thread Arbol One
Is there a way to either create the database or save the data in another drive? I am using Win11, not my choice since 1998, and, not surprisingly, the WinOS had a crash; I lost all kinds of information including PostgreSQL (postgres (PostgreSQL) 18.0), its databases, tables, data, etc., what a n

Index rebuilding strategy

2025-10-18 Thread Siraj G
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. Thanks Siraj

Re: Are SQL-language function lock ordering deadlocks solved in PostgreSQL 18?

2025-10-18 Thread Merlin Moncure
On Mon, Oct 6, 2025 at 10:54 AM Bernice Southey wrote: > Hi pgsql-general community, > > I tried the simple test from the original mail [1] and indeed got > deadlocks in version 17, but not 18. Yet absence of evidence is not > proof of no race conditions. > > This might be my favourite change in

Re: Database in another drive

2025-10-18 Thread Tim Gerber
Yes, you can either set the default tablespace to the desired drive or create a tablespace on the E: drive and specify the db objects to use it. Best to look at: https://www.postgresql.org/docs/current/manage-ag-tablespaces.html Best Regards, Tim On Mon, Oct 13, 2025 at 3:19 PM Arbol One wrote:

Re: Upgrade & Rollback plan: My customer requests rollback via old-version standby (13 ↔ 17) — need community advice

2025-10-18 Thread Laurenz Albe
On Fri, 2025-10-10 at 15:26 +0700, Vu Le (JData - HN) wrote: > I'm currently planning a major version upgrade from PostgreSQL 13.x to > 17.x in a production environment. > > My customer has requested the following rollback approach, and I’d > like to confirm if it’s technically feasible or advisab

Re: pgpass file in postresql.auto.conf?

2025-10-18 Thread Laurenz Albe
On Fri, 2025-09-26 at 12:05 +, Dan Mahoney (Gushi) wrote: > In the interest of automation, I've set up a pgpass file for my > pg_basebackup between master and standby. This all works, thusly: > > pg_basebackup -d > 'postgres://[email protected]:5432/foo?sslmode=verify-ca' -F p > --wal-metho

Re: Enquiry about TDE with PgSQL

2025-10-18 Thread Laurenz Albe
On Fri, 2025-10-17 at 00:49 -0400, Ron Johnson wrote: > On Thu, Oct 16, 2025 at 6:05 PM Greg Sabino Mullane > wrote: > > > > TDE, on the other hand, is a very complex and difficult thing to add into  > > Postgres. > > TDE was added to SQL Server, with (to us, at least) minimally-noticed > over

Re: Option on `postgres` CLI to shutdown when there are no more active connections?

2025-10-18 Thread Ron Johnson
On Thu, Oct 16, 2025 at 6:22 PM Tom Lane wrote: > Greg Sabino Mullane writes: > > On Mon, Oct 13, 2025 at 3:19 PM David Barsky wrote: > >> Anyways, I'll try to get at what motivated this whole discussion: would > >> there be community opposition to adding a CLI flag that'd exit/shutdown > all >

Re: Option on `postgres` CLI to shutdown when there are no more active connections?

2025-10-18 Thread David Barsky
> If testing is all scripted, then why not put "pg_ctl stop" at the end of the script? Sorry for the delay. It’s _mostly_ scripted, but two major reasons: 1. If that script is cancelled or interrupted for any reason, it’s possible that `pg_ctl stop` won't be called and I'd have a leaked proce

Re: Downgrade pgsql 17 to pgsql 12 question

2025-10-18 Thread Ashish Mukherjee
I think the conclusion is to do a more thorough testing before the upgrade next time. Have updated our playbook for upgrades to include more thorough testing. On Tue, Sep 30, 2025 at 8:17 PM Adrian Klaver wrote: > On 9/30/25 01:23, Ashish Mukherjee wrote: > > Thank you all for your inputs. > > >

Re: Does Java 8 support drivers 42.2.19 and 42.7.6?

2025-10-18 Thread Vladimir Sitnikov
>Can I ask the developers if Java 8 officially supports drivers 42.2.19 and 42.7.6? It is important that support is provided fully and without problems. Both pgjdbc 42.2.19 and pgjdbc 42.7.6 should work fine with Java 8. The set of known issues differs between the versions. 42.2.19 was tested wit

Re: Downgrade pgsql 17 to pgsql 12 question

2025-10-18 Thread Ashish Mukherjee
Thank you all for your inputs. Well, Percona TDE was leading to the queries being very inefficient / slow after upgrading to pgsql 17. Explain analyze shows that query planning time shoots up crazily. A decision was taken to go back to pgsql 12, which worked out fine as there was no incompatibilit

Re: Downgrade pgsql 17 to pgsql 12 question

2025-10-18 Thread Laurenz Albe
On Tue, 2025-09-30 at 13:53 +0530, Ashish Mukherjee wrote: > Now the consideration is to use some other encryption option for the > database which will work fine on pgsql 17. Cybertec's technology is > one route, the other is EDB. I am happy to hear experiences of folks > here with pgsql encryption

Pgbackrest changing RepoServer to new one

2025-10-18 Thread KK CHN
List, I am in need of changing Repo Server of an existing working pgbackrest setup(RHEL 9.3 , pgbackrest 2.52.1 database version 16) *I have googled, got the information that I need to do * 1. First shutdown the Postgre Server cluster/instance. ( This is a production server, downtime perm

Alerting on memory use and instance crash

2025-10-18 Thread sud
Hi Experts, It's postgres version 16. I have two questions on alerting as below. 1)If we want to have alerting on any node/instance that gets crashed :- In other databases like Oracle the catalog Views like "GV$Instance" used to give information on whether the instances are currently active/down

Re: Postgre and AIO

2025-10-18 Thread Dominique Devienne
On Mon, Sep 29, 2025 at 2:07 PM Weck, Luis wrote: > Now that AIO landed in v18, > [...] index updating happens one at a time. > [...] it took a long time sequentially reading the index for each value These have nothing to do with Async-IO IMHO. For your first case, each index is its own file, so

Re: Alerting on memory use and instance crash

2025-10-18 Thread sud
Thank you. My understanding may be wrong here.And my apology as I am using the example of Oracle again even though these two are not the same. But being worked for a long time in Oracle so trying to understand exactly how it's different. In oracle RAC(real application cluster) database, we have si

Re: No POSTGIS in PostgreSQL 18

2025-10-18 Thread Adrian Klaver
On 9/28/25 23:22, Mark Idiong wrote: Dear Webmaster, I am learning SQL using PostgreSQL 18, just released. And I realized there is no POSTGIS support. Yes there is https://postgis.net/ "This version requires PostgreSQL 12 - 18beta3, ..." Request guidance on how to activate this function a

Re: Option on `postgres` CLI to shutdown when there are no more active connections?

2025-10-18 Thread Dominique Devienne
On Mon, Oct 13, 2025 at 5:08 PM Ron Johnson wrote: > On Mon, Oct 13, 2025 at 4:47 AM Dominique Devienne > wrote: > [snip] >> There's apparently no way to abstract the "transport" between libpq >> and the server, must be TCP (or *nix only socket files), cannot be an >> in-memory channel (for the

Clarification on restart_lsn behavior in logical decoding

2025-10-18 Thread Rajendra Kumar Dangwal
Hi PG users. We are using PostgreSQL’s logical decoding feature with Debezium to capture CDC events and stream them to Kafka. To verify whether the required position to resume from after a connector restart is still available on the server, we compare the processed LSNs with the restart_lsn of the

RE: Index (primary key) corrupt?

2025-10-18 Thread Wim Rouquart
Internal Hi, Apologies for the late response, had other fish to fry... In response to your questions: > What is full(15.x) version of Postgres are you using? 15.14 >Is it the community version or a fork or SaaS? Standard release indeed, running on RHAT8 > What do you get for queries below?:

Re: Query on Patch and Upgrade History in PostgreSQL

2025-10-18 Thread Adrian Klaver
On 9/24/25 01:17, loganathan P wrote: Dear All, How do I find the date and time of applied minor patches and upgrades in a PostgreSQL database level? In addition to looking at package information, as others have mentioned, there is: https://git.postgresql.org/gitweb/?p=postgresql.git Cli

Re: pg_hint_tables

2025-10-18 Thread Adrian Klaver
On 9/30/25 12:51, Wong, Kam Fook (TR Technology) wrote: I am trying to use pg_hint_tables in AWS Aurora Postgres. I changed the Postgres parameter "pg_hint_plan.enable_hint_table = 1". Then I logout but can't login anymore with the following error message. To be clear it is pg_hint_plan not

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

2025-10-18 Thread David G. Johnston
On Tuesday, September 23, 2025, Samuel Marks wrote: > > $subject You can only upsert/provoke a meaningful conflict on the singular table being inserted into. There are other features like functions and triggers that may get you something usable. David J.

Re: Option on `postgres` CLI to shutdown when there are no more active connections?

2025-10-18 Thread Tom Lane
Rob Sargent writes: > On 10/12/25 16:10, David Barsky wrote: >>> Postgres is not an embedded database, if you want that experience then >>> use a database that is designed to be embedded. >> That's fair, especially from an operational standpoint. However, I _think_ >> Postgres can get really clos

Re: Downgrade pgsql 17 to pgsql 12 question

2025-10-18 Thread Adrian Klaver
On 10/1/25 02:33, Ashish Mukherjee wrote: I think the conclusion is to do a more thorough testing before the upgrade next time. Have updated our playbook for upgrades to include more thorough testing. /I upgraded multiple non TDE databases from v12 to v17 and they are all fine./ Then rais

Query on Patch and Upgrade History in PostgreSQL

2025-10-18 Thread loganathan P
Dear All, How do I find the date and time of applied minor patches and upgrades in a PostgreSQL database level? Thanks. Regards, Loganathan P

Direct Major Upgrade (13.7 → 17.6) with pg_upgrade: Clarifying the need for Intermediate Minor Fixes/Scripts

2025-10-18 Thread Vu Le (JData - HN)
Hi pgsql-general community, I am planning a significant major version upgrade for a large-scale PostgreSQL production environment, currently running PostgreSQL 13.7. Our target is the latest major version, 17.6, utilizing the pg_upgrade tool. My core question revolves around the recommended Extra

Re: Pgbackrest changing RepoServer to new one

2025-10-18 Thread Ron Johnson
On Thu, Oct 9, 2025 at 3:16 AM KK CHN wrote: > List, > > I am in need of changing Repo Server of an existing working pgbackrest > setup(RHEL 9.3 , pgbackrest 2.52.1 database version 16) > > *I have googled, got the information that I need to do * > > 1. First shutdown the Postgre Server cl

Re: Direct Major Upgrade (13.7 → 17.6) with pg_upgrade: Clarifying the need for Intermediate Minor Fixes/Scripts

2025-10-18 Thread Vu Le (JData - HN)
Hi Greg, Much appreciated for the clear confirmation! It’s great to know that `pg_upgrade` takes care of all structural changes, and that the remaining "extra works" are indeed a rare manual check. I will follow your advice and use common sense during the final review. Thanks for the guidance and t

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

2025-10-18 Thread Samuel Marks
the AS syntax can alternatively be used for aliases https://www.postgresql.org/docs/current/sql-select.html `SELECT actual_tablename table0 WHERE table0.column00 = 1` (I used a space) On Tue, Sep 23, 2025 at 3:52 PM Adrian Klaver wrote: > > On 9/23/25 13:36, Samuel Marks wrote: > > Attempt: > >

Re: Option on `postgres` CLI to shutdown when there are no more active connections?

2025-10-18 Thread Ron Johnson
On Mon, Oct 13, 2025 at 4:47 AM Dominique Devienne wrote: [snip] > There's apparently no way to abstract the "transport" between libpq > and the server, must be TCP (or *nix only socket files), cannot be an > in-memory channel (for the embedded non-shared case), > I'd bet a nickel that local soc

Re: Alerting on memory use and instance crash

2025-10-18 Thread Adrian Klaver
On 10/8/25 11:58, sud wrote: Thank you. My understanding may be wrong here.And my apology as I am using the example of Oracle again even though these two are not the same. But being worked for a long time in Oracle so trying to understand exactly how it's different. In oracle RAC(real applic

Does Java 8 support drivers 42.2.19 and 42.7.6?

2025-10-18 Thread Артем Романюк
Good afternoon! Dear PostgreSQL community. Can I ask the developers if Java 8 officially supports drivers 42.2.19 and 42.7.6? It is important that support is provided fully and without problems. Thank you!

Re: Downgrade pgsql 17 to pgsql 12 question

2025-10-18 Thread Merlin Moncure
On Fri, Sep 26, 2025 at 8:16 AM Ashish Mukherjee wrote: > Hello, > > I have a strange requirement to downgrade from pgsql 17 to pgsql 12. This > is because we found in production certain incompatibilities between both > versions for our database. It should have been caught in testing but was > no

Re: Alerting on memory use and instance crash

2025-10-18 Thread Rahila Syed
Hi, The other question I had was , are there any pg_* views using which, we are > able to see which session/connection is using the highest amount of memory? > I don't see any such columns in pg_stats_activity > >From a purely postgresql database point of view, this feature is being developed, y

Re: Upgrade & Rollback plan: My customer requests rollback via old-version standby (13 ↔ 17) — need community advice

2025-10-18 Thread Vu Le (JData - HN)
Thank you very much, Laurenz. After reading several sources, I can confirm that this approach is indeed not feasible at all. I’m planning to prepare a short proposal and report to the customer, focusing on the major risks they would face rather than trying to implement it. If possible, could you p

Re: Are compression requirements needed when building only libraries?

2025-10-18 Thread Laurenz Albe
On Thu, 2025-10-09 at 16:58 +0200, Uilian Ries wrote: > > My PostgreSQL is built with support for all these libraries, and I find > > that my libraries are linked with "libz" > > Which libraries? libpgtypes, libpq, libecpg, libecpg_compat? libpq, libecpg and libecpg_compat are linked with libz.s

pg_running_stats - mergeable running statistics (Welford/Chan) extension for postgresql

2025-10-18 Thread Chanukya SDS
Hi all, I’d like to share a new PostgreSQL extension called pg_running_stats. It implements mergeable, numerically stable running statistics using the Welford and Chan algorithms. Unlike the built-in aggregates such as avg(), variance(), and stddev(), which require scanning the entire dataset, pg

Re: pg_hint_tables

2025-10-18 Thread Rob Sargent
I am top posting because I believe you have “hikacked” a thread. Rather than replying to an existing thread unrelated to your topic you should start your own specific thread. > On Sep 30, 2025, at 2:13 PM, Adrian Klaver wrote: > > On 9/30/25 12:51, Wong, Kam Fook (TR Technology) wrote: >>

Re: Can't create a table with vector type as a non-super user

2025-10-18 Thread Adrian Klaver
On 9/30/25 6:35 AM, mrudula attili wrote: Hello Team, Concern: As its a production environment, we are not really happy to give away the usage on public schema. Is there a way we could get the end users make use of the extension without granting usage on public schema In addition to

Re: PostgreSQL 18 not available for Noble?

2025-10-18 Thread Ray O'Donnell
On 28 September 2025 21:54:01 Adrian Klaver wrote: On 9/28/25 13:46, Ray O'Donnell wrote: Hi all, As per $subject - is PG 18 not available for Ubuntu Noble (24.04)? According to the below it is: https://www.postgresql.org/download/linux/ubuntu/ Hi Adrian, That's what I though, right en

Re: Postgre and AIO

2025-10-18 Thread Xuneng Zhou
Hi, On Mon, Sep 29, 2025 at 8:07 PM Weck, Luis wrote: > > This is more of a question of capability and to make me understand how > exactly AIO work in Postgres. > > Now that AIO landed in v18, I was thinking of a use case which has annoyed me > sometimes, which is inserting lots of data into a

RE: Index (primary key) corrupt?

2025-10-18 Thread Wim Rouquart
Internal Yes indeed, i just restore the database to before the rebuild. > So the problem goes away once you’ve reindexed yet you claim it’s consistent? > What are you doing to get the problem to recur after you’ve done reindex to > make it work? > > David I was assuming the OP has a dump o

Re: Alerting on memory use and instance crash

2025-10-18 Thread veem v
My 2cents:- In regards to the memory consumption question of OP:- Wouldn't the column "temp_blks_read" and "temp_blks_written" in pg_stats_statements provide details around the memory consumption i.e. when the query exceeds the work_mem then it tries occupying the temp blocks. Something as below. C