Re: How do I check for NULL

2025-12-08 Thread Ron Johnson
On Mon, Dec 8, 2025 at 9:51 PM Ron Johnson wrote: > On Mon, Dec 8, 2025 at 9:40 PM Igor Korot wrote: > >> Hi, ALL, >> Consider the following scenario: >> >> CREATE TABLE test(a INT, b VARCHAR(256), c INT, d VARCHAR(256), /* >> more fields follows*/); &g

Re: How do I check for NULL

2025-12-08 Thread Ron Johnson
On Mon, Dec 8, 2025 at 9:40 PM Igor Korot wrote: > Hi, ALL, > Consider the following scenario: > > CREATE TABLE test(a INT, b VARCHAR(256), c INT, d VARCHAR(256), /* > more fields follows*/); > CREATE UNIQUE INDEX test_x( b, c, d ); > > Now I try to do: > > INSERT INTO test VALUES( 0, 'abc', 1234

Re: Frosen logical replication

2025-12-05 Thread Ron Johnson
On Fri, Dec 5, 2025 at 11:48 AM Marcos Pegoraro wrote: > Em sex., 5 de dez. de 2025 às 09:03, Marcos Pegoraro > escreveu: > >> I have a logical replication where I want to replicate only one schema. >> All worked fine, it copied all tables to subscriber, except one. That >> table has 8GB and it

Re: Extract only maximum date from column

2025-12-04 Thread Ron Johnson
On Thu, Dec 4, 2025 at 2:55 PM Rich Shepard wrote: > I want the script to extract only the maximum `next_contact' date and > haven't learned how to do this from my reading of web sites. > > The script: > > select p.person_nbr, p.company_nbr, c.next_contact > from people as p, contacts as c > wher

Re: Upgrade Failover Cluster

2025-12-04 Thread Ron Johnson
On Thu, Dec 4, 2025 at 2:00 AM BUBACZ Martin wrote: > Hi All, > > > > I’m fairly new to postgresql and I have a question concerning upgrading a > 2 node failover physical replication cluster. I’m automating the cluster > installation and maintenance by using Puppet. All runs good so far. > > > >

Re: wdavdaemon / Microsoft Defender for Endpoint on Linux and slow Postgres recovery?

2025-12-02 Thread Ron Johnson
On Tue, Dec 2, 2025 at 3:35 PM Christoph Moench-Tegeder wrote: > ## Colin 't Hart ([email protected]): > > > I wonder if anyone here has any experience with configuring exclusions so > > that the WAL files can be processed faster? > > https://learn.microsoft.com/en-us/defender-endpoint/linux-e

Re: Wal streaming

2025-11-26 Thread Ron Johnson
On Wed, Nov 26, 2025 at 2:26 PM Adrian Klaver wrote: > On 11/25/25 23:27, Andrew wrote: > > Hi, > > > > I’m using Postgres 17 and the latest versions of repmgr and barman > > > > 1. I’m replicating my database to another node using streaming > replication. wal_level=replica, hot_standby=on. > > 2

Re: Question on PostgreSQL Table Partitioning – Performance of Queries That Do Not Use the Partition Key

2025-11-26 Thread Ron Johnson
An old greybeard COBOL programmer would say that a critical *OLTP* table should *only* be accessed via one index (customer_id, sale_id, PK, etc), and there should be as few indices as possible on the table. The DBA would then partition based on that index. Any reports should be run from a separat

Re: Question on PostgreSQL Table Partitioning – Performance of Queries That Do Not Use the Partition Key

2025-11-26 Thread Ron Johnson
On Wed, Nov 26, 2025 at 8:32 AM atma ram wrote: > Hi, > > Question on PostgreSQL Table Partitioning – Performance of Queries That Do > Not Use the Partition Key > > We have a table that is approximately 1.6 GB in size. Query performance > has started to degrade. Although we have multiple indexes,

Re: DROP ROLE blocked by pg_init_privs

2025-11-25 Thread Ron Johnson
On Tue, Nov 25, 2025 at 7:36 PM immerrr again wrote: > > > I have written a couple of queries to manually clean up the system > tables pg_init_privs/pg_shdepends instead (see [1]) > > Sorry, wrong link [1]. Should have been > > 1. > https://www.postgresql.org/message-id/CAERznn-QWVpAvqnyF%3DrZfiu

Re: Schema design: user account deletion vs. keeping family tree data

2025-11-25 Thread Ron Johnson
On Tue, Nov 25, 2025 at 4:08 PM Jan Claeys wrote: [snip] > Genealogy is messy, and you will have to be able to store all sorts of > data you didn’t expect at first thought (see also the website about > names Rob Sargent linked to). > You also seem to make assumptions about relations being 1:1 or

Re: Selecting all variations of job title in a list

2025-11-25 Thread Ron Johnson
On Tue, Nov 25, 2025 at 2:05 PM Rich Shepard wrote: > On Tue, 25 Nov 2025, Ron Johnson wrote: > > > Maybe regex_match() with a bunch of OR clauses. > > > > In bash, I'd do something like: > > grep -E ' ^Asst Gen Mgr.*|^Env Mgr.*|^Gen Mgr.*|^Mgr.*|^Plant M

Re: Selecting all variations of job title in a list

2025-11-25 Thread Ron Johnson
On Tue, Nov 25, 2025 at 11:33 AM Rich Shepard wrote: > Companies can have slightly different titles for the same job; for example > (using abbreviations). 'Asst Gen Mgr.', 'Env Mgr,', 'Gen Mgr,'. 'Mgr,', > 'Plant Mgr.' > > I want to select all people table rows that contain these varieties. I kno

Re: set role command

2025-11-24 Thread Ron Johnson
On Mon, Nov 24, 2025 at 2:46 PM Tom Lane wrote: > =?utf-8?Q?=C3=81lvaro?= Herrera writes: > > On 2025-Nov-24, Tom Lane wrote: > >> I don't think so. They are just shorthand for issuing a SET to the > >> original value, so how do they break the model in a way that that > >> doesn't? > > > No, be

Re: Way to retrieve UserName/Password

2025-11-22 Thread Ron Johnson
On Sat, Nov 22, 2025 at 10:22 PM Igor Korot wrote: > Hi, ALL, > I successfully built the server and I previously had the odbc driver > installed. > > I can successfully connect from psql from the Terminal, and from isql > unixODBC utility. > > However, what I wonder is - is there a simple way to

Re: postgres in swap space

2025-11-17 Thread Ron Johnson
On Mon, Nov 17, 2025 at 4:41 PM Adrian Klaver wrote: > On 11/17/25 13:12, Ron Johnson wrote: > > On Mon, Nov 17, 2025 at 3:50 PM Laurenz Albe > <mailto:[email protected]>> wrote: > > > > On Mon, 2025-11-17 at 18:25 +0100, Marc Millas wrote: > >

Re: postgres in swap space

2025-11-17 Thread Ron Johnson
On Mon, Nov 17, 2025 at 3:50 PM Laurenz Albe wrote: > On Mon, 2025-11-17 at 18:25 +0100, Marc Millas wrote: > > Can someone point me to any doc describing why and how much space > postgres uses on the swap of a debian machine ? > > it's an old postgres 10, because it is used by a product for whic

Re: postgres in swap space

2025-11-17 Thread Ron Johnson
On Mon, Nov 17, 2025 at 12:25 PM Marc Millas wrote: > hello, > Can someone point me to any doc describing why and how much space postgres > uses on the swap of a debian machine ? > it's an old postgres 10, because it is used by a product for which only > this version is certified. > (no comment o

Re: failure to drop table due to pg_temp_7 schema

2025-11-15 Thread Ron Johnson
On Sat, Nov 15, 2025 at 10:00 AM Peter 'PMc' Much < [email protected]> wrote: > > Hi, > trying to unload (and then reload) a development application, > failed with this error: > > fin(dev)> Que.migrate! version: 0 > ERROR: cannot drop table que_jobs because other objects depend on it

Re: Pgbackrest info output interpretation

2025-11-14 Thread Ron Johnson
On Fri, Nov 14, 2025 at 3:27 AM KK CHN wrote: > Hi, > > I am having confusion trying to understand the database size, backupsize > and repo backup size.. > > In my DB server I have du output as follows. > > /data/edb/as16 > [root@db1 as16]# du -h -d 1 > 5.3G./data > 25G ./tablespace > 30G

Re: Enquiry about long-running queries

2025-11-07 Thread Ron Johnson
On Fri, Nov 7, 2025 at 8:49 AM Ashish Mukherjee wrote: > Hello, > > I have a query like this showing up on my production database - > > s05=> SELECT pid, user, usename, application_name, client_addr, > client_hostname, client_port, datname, now() - query_start as "runtime", > state, wait_event_ty

Re: Enquiry about TDE with PgSQL

2025-10-31 Thread Ron Johnson
On Fri, Oct 31, 2025 at 4:53 PM Bruce Momjian wrote: > On Fri, Oct 31, 2025 at 09:04:32PM +0100, Kai Wagner wrote: > > On Fri, Oct 31, 2025 at 7:22 PM Bruce Momjian wrote: > > > > On Fri, Oct 31, 2025 at 06:33:54PM +0100, Álvaro Herrera wrote: > > > On 2025-Oct-31, Bruce Momjian wrote: >

Re: Why isn't my table auto-analyzed/vacuumed?

2025-10-31 Thread Ron Johnson
On Fri, Oct 31, 2025 at 4:52 PM Adrian Klaver wrote: > On 10/31/25 13:03, Dimitrios Apostolou wrote: > > On Thursday 2025-10-30 18:00, Ron Johnson wrote: > > > >> > >> > SELECT reltuples FROM pg_class WHERE relname = > >> 'test_runs_

Re: Enquiry about TDE with PgSQL

2025-10-31 Thread Ron Johnson
On Fri, Oct 31, 2025 at 11:25 AM Greg Sabino Mullane wrote: > On Fri, Oct 31, 2025 at 10:54 AM Bruce Momjian wrote: > >> Disk-level and partition-level encryption typically encrypts >> the entire disk or partition using the same key, with all data >> automatically decrypt

Re: Why isn't my table auto-analyzed/vacuumed?

2025-10-30 Thread Ron Johnson
On Thu, Oct 30, 2025 at 2:41 PM Dimitrios Apostolou wrote: > On Thursday 2025-10-30 18:00, Ron Johnson wrote: > > >On Thu, Oct 30, 2025 at 11:55 AM Dimitrios Apostolou > wrote: > > > > SELECT name,setting FROM pg_settings WHERE name ILIKE '%factor%&#x

Re: Why isn't my table auto-analyzed/vacuumed?

2025-10-30 Thread Ron Johnson
On Thu, Oct 30, 2025 at 11:55 AM Dimitrios Apostolou wrote: > Hello list, > > I have a table that is constantly growing, and it's not being > vacuumed/analyzed. I think my problem is rather common, but how to even > debug it if "nothing works"? > > I've already set log_autovacuum_min_duration = 0

Re: Postgres memoizing inner loop of join when outer loop join key is guaranteed unique?

2025-10-29 Thread Ron Johnson
That looks like statistical noise to me. On Wed, Oct 29, 2025 at 5:34 PM Jacob Jackson wrote: > I was curious to see whether there was any reason I wasn't seeing for > Postgres to decide the memoized version was lower cost and try to memoize > these operations. > > On Wed, Oct

Re: Postgres memoizing inner loop of join when outer loop join key is guaranteed unique?

2025-10-29 Thread Ron Johnson
What's the actual problem? Does enable_memoize=on return incorrect results? Because a 45 microsecond (yes, 45 microseconds: 0.138 milliseconds = 138 microseconds; same for the others) slowdown isn't something I'd get too worked up about. On Wed, Oct 29, 2025 at 2:29 PM Jacob Jackson wrote: > H

Re: Two sequences associated with one identity column

2025-10-29 Thread Ron Johnson
I'd have expected the CREATE SEQUENCE and ALTER TABLE to be separate that can go in the post-data section, and be there even in schema-only dumps because it was easier for whoever added sections to pg_dump. After all, what really matters is the destination, not the journey. On Wed, Oct 29, 2025 a

Re: Download statistics

2025-10-25 Thread Ron Johnson
On Sat, Oct 25, 2025 at 10:38 AM Tom Lane wrote: > "Peter J. Holzer" writes: > > The discussion about people avoiding .0 releases over in the "Index > > corruption ..." thread made me wonder how the distribution really looks > > like. How many people do install X.0, X.1, etc. for each major vers

Re: Index corruption issue after migration from RHEL 7 to RHEL 9 (PostgreSQL 11 streaming replication)

2025-10-25 Thread Ron Johnson
On Sat, Oct 25, 2025 at 10:21 AM Adrian Klaver wrote: > On 10/24/25 21:50, David Rowley wrote: > > On Sat, 25 Oct 2025 at 17:36, Adrian Klaver > wrote: > >> I am not following, from your previous post: > >> > >> "Beta versions are meant for test instances. It'd be > >> good if people encouraged

Re: Index corruption issue after migration from RHEL 7 to RHEL 9 (PostgreSQL 11 streaming replication)

2025-10-24 Thread Ron Johnson
On Fri, Oct 24, 2025 at 10:54 AM Adrian Klaver wrote: > On 10/24/25 05:53, Greg Sabino Mullane wrote: > > On Thu, Oct 23, 2025 at 11:49 AM Adrian Klaver > > mailto:[email protected]>> wrote: > > > > I am not sure version 18 would a good choice at this time, it has > > just been re

Re: Index corruption issue after migration from RHEL 7 to RHEL 9 (PostgreSQL 11 streaming replication)

2025-10-24 Thread Ron Johnson
On Fri, Oct 24, 2025 at 8:59 AM Greg Sabino Mullane wrote: > On Thu, Oct 23, 2025 at 10:51 AM Bala M wrote: > >> Any advice, recommendations, or shared experiences from others who have >> performed similar migrations would be greatly appreciated. > > > Some related advice: put some system in pla

Re: Index corruption issue after migration from RHEL 7 to RHEL 9 (PostgreSQL 11 streaming replication)

2025-10-23 Thread Ron Johnson
On Thu, Oct 23, 2025 at 11:21 AM Greg Sabino Mullane wrote: > >>- >> >>*Acceptable downtime:* ~1 day >>- >> >>*Logical replication:* Not feasible due to the number of schemas, >>tables, and overall data volume >> >> I'm not sure why this is not feasible. Can you expand on this

Re: Index corruption issue after migration from RHEL 7 to RHEL 9 (PostgreSQL 11 streaming replication)

2025-10-22 Thread Ron Johnson
On Wed, Oct 22, 2025 at 1:35 PM Greg Sabino Mullane wrote: > On Wed, Oct 22, 2025 at 6:53 AM Bala M wrote: > >> >>- >> >>PostgreSQL Version: 11.15 >> >> > Ouch! Not only is the major version end of life, but that's not even the > latest revision of 11. > Do pre-built PG11 binaries even

Re: Extend CREATE POLICY to add IF EXISTS

2025-10-21 Thread Ron Johnson
Doesn't CREATE OR REPLACE have limitations based on parameter-list changes? On Tue, Oct 21, 2025 at 10:08 AM Paul Austin wrote: > Álvaro, > > Yes, a CREATE OR REPLACE would also be useful. > > However, the CREATE IF NOT EXISTS is also useful when you aren't concerned > that the POLICY is going t

Re: Arrays vs separate tables

2025-10-20 Thread Ron Johnson
On Mon, Oct 20, 2025 at 10:07 AM Rich Shepard wrote: > On Mon, 20 Oct 2025, Michał Kłeczek wrote: > > > There is also another concern - do you want to make sure phone numbers > are > > not shared? > > Michal, > > Shared with whom? I run a solo professional services consultancy so there's > only m

Re: Convert date and time colums to datetime

2025-10-20 Thread Ron Johnson
On Mon, Oct 20, 2025 at 8:58 AM Rich Shepard wrote: > On Mon, 20 Oct 2025, Rob Sargent wrote: > > >> Okay. Now I'm curious: why do you write this? > > > The way I read your description of how you use these columns currently > > suggests to me that they could be handled by a single timestamp colum

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: 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: 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-17 Thread Ron Johnson
On Wed, Oct 8, 2025 at 11:42 AM sud wrote: > 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 inform

Re: Alerting on memory use and instance crash

2025-10-17 Thread Ron Johnson
On Wed, Oct 8, 2025 at 2:58 PM sud wrote: [snip] > Do you mean in normal Postgres it's alway a single instance/memory and > single storage attached? then I also do not see any such cluster level > views in aws aurora postgres too? > Yup. > Pardon if it's a silly one to ask. > A Google for "wh

Re: Enquiry about TDE with PgSQL

2025-10-17 Thread Ron Johnson
On Fri, Oct 17, 2025 at 3:01 AM Laurenz Albe wrote: > 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 P

Re: Enquiry about TDE with PgSQL

2025-10-16 Thread Ron Johnson
On Thu, Oct 16, 2025 at 6:05 PM Greg Sabino Mullane wrote: > I would like to enquire that based on the anecdotal experience of group >> members, which TDE solution works best for PgSQL 17 databases. > > > Generally speaking, there is no "best". People use whatever vendor they > happen to already

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

2025-10-13 Thread Ron Johnson
On Sat, Oct 11, 2025 at 11:21 PM Adrian Klaver wrote: > On 10/11/25 19:56, Ron Johnson wrote: > > On Sat, Oct 11, 2025 at 7:11 PM Adrian Klaver > <mailto:[email protected]>> wrote: > > > > > I think OP is looking for AUTO_CLOSE, like SQL Server (a

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

2025-10-13 Thread Ron Johnson
On Sat, Oct 11, 2025 at 7:11 PM Adrian Klaver wrote: > On 10/8/25 12:39, David Barsky wrote: > > Hiya folks, > > > > I'm a bit of a newcomer when it comes to PostgreSQL, so I apologize if > > this is > > the wrong mailing list. Anyways, my two questions: > > > > 1. Is there any interest in adding

Re: Database in another drive

2025-10-13 Thread Ron Johnson
On Mon, Oct 13, 2025 at 4:19 PM Arbol One wrote: > 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've been using Windows on (local, telecommuting) corporate PCs f

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

2025-10-13 Thread Ron Johnson
On Mon, Oct 13, 2025 at 3:19 PM David Barsky wrote: [snip] > 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 Postgres > processes once all pending connections close? E.g., something similar to

Re: Downgrade pgsql 17 to pgsql 12 question

2025-09-30 Thread Ron Johnson
No restoring to unencrypted PG 17? On Tue, Sep 30, 2025 at 4:23 AM Ashish Mukherjee wrote: > 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 cra

Re: Correct query for monitor

2025-09-26 Thread Ron Johnson
On Fri, Sep 26, 2025 at 4:15 PM veem v wrote: > Thank you so much for the quick response. I have a follow up question on > this as below, > > If we want to identify, what exact query inside a procedure is taking a > longer time:- Using any pg_* views, Is there an easy way to tie the > query_id of

Re: Downgrade pgsql 17 to pgsql 12 question

2025-09-26 Thread Ron Johnson
On Fri, Sep 26, 2025 at 10:27 AM Laurenz Albe wrote: > On Fri, 2025-09-26 at 17:48 +0530, Ashish Mukherjee wrote: > [snip] > > pg_restore: error: while PROCESSING TOC: > > error: pg_restore: error: pg_restore: from TOC entry 17168; 1259 > 58572315 TABLE pkgs s14 > > pg_restore: error: pg_re

Re: pgpass file in postresql.auto.conf?

2025-09-26 Thread Ron Johnson
On Fri, Sep 26, 2025 at 8:06 AM Dan Mahoney (Gushi) wrote: > Hey folks, > > 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 > -

Re: Additional options for COPY from

2025-09-25 Thread Ron Johnson
On Thu, Sep 25, 2025 at 3:49 PM Bryan Sayer wrote: > Hi, > > I'm not sure if this is the best list to ask this (and I am very new to > PostgreSQL) but I think more options are needed in the COPY from command, > in order to better deal with exceptions. By exceptions I mean data not > consistent wi

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: 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: MVCC and all that...

2025-09-20 Thread Ron Johnson
On Wed, Sep 10, 2025 at 11:08 AM Ellen Allhatatlan < [email protected]> wrote: [snip] > So, you have table X - it has 2M rows (say, 0.5 GB) in the first file > (along with all the other tables). The 2GB limit is hit, more data is > added. 0.7 GB is added to table X - these records go into

Re: pg_restore scan

2025-09-18 Thread Ron Johnson
gt; Because? >> >> What did you find? >> >> > >> > I might be blind as I can't find information about 'offset' in pg_dump >> > documentation. >> > Where can I find more info about this? >> >> It is not in the user

Re: Index (primary key) corrupt?

2025-09-18 Thread Ron Johnson
On Thu, Sep 18, 2025 at 10:58 AM Wim Rouquart wrote: > Hello, > > > When doing a pg_dump of one of our databases one of the tables primary > keys doesn’t get exported. Pg_dump just skips this index, without any > warning whatsoever (verbose mode was used to doublecheck). > > > > When doing a REIN

Re: pg_restore scan

2025-09-18 Thread Ron Johnson
been so happy seeing > IOwait on my system! > > I might be blind as I can't find information about 'offset' in pg_dump > documentation. > Where can I find more info about this? > > Regards, > Rianto > > On Wed, 17 Sept 2025 at 13:48, Ron Johnson &g

Re: pg_restore scan

2025-09-16 Thread Ron Johnson
s ! > > > > > > On Wed, 17 Sept 2025 at 11:02, Ron Johnson > wrote: > >> So, piping or redirecting to a file? If so, then that's the problem. >> >> pg_dump directly to a file puts file offsets in the TOC. >> >> This how I do custom dum

Re: pg_restore scan

2025-09-16 Thread Ron Johnson
So, piping or redirecting to a file? If so, then that's the problem. pg_dump directly to a file puts file offsets in the TOC. This how I do custom dumps: cd $BackupDir pg_dump -Fc --compress=zstd:long -v -d${db} -f ${db}.dump 2> ${db}.log On Tue, Sep 16, 2025 at 8:54 PM R Wahyudi wrote: > pg

Re: EDB Windows Installer on Windows Server 2025

2025-09-16 Thread Ron Johnson
On Tue, Sep 16, 2025 at 1:55 PM Adrian Klaver wrote: > On 9/16/25 08:14, Adrian Klaver wrote: > > On 9/16/25 02:09, Daniel Westermann (DWE) wrote: > >> Hi, > >> > >> Is this table outdated?: > >> https://www.postgresql.org/download/windows/ > >> > >> ... or is the EDB installer indeed not support

Re: Fast switchover

2025-09-11 Thread Ron Johnson
On Mon, Sep 8, 2025 at 11:03 AM legrand legrand wrote: > Hello all the readers, > > For some projects we need a fast *manual* switchover to address Near Zero > downtime maintenance > (not speaking here about automated failover like those provided by HA > tools, but just planned, controlled operat

Re: MVCC and all that...

2025-09-10 Thread Ron Johnson
On Wed, Sep 10, 2025 at 6:20 PM Justin wrote: > On Wed, Sep 10, 2025 at 5:28 PM Nico Williams > wrote: > >> [snip] > I would really like out-of-band hints. These would be hints not >> specified in the SQL itself but to be sent separately and which address >> table sources or joins by name, li

Re: MVCC and all that...

2025-09-10 Thread Ron Johnson
On Tue, Sep 9, 2025 at 8:41 PM Justin wrote: [snip] > Multiple transactions per connection. I am asking WHY is that a feature. > when one can have multiple sessions, what is the difference? running > multiple transactions in single or multiple sessions means moving part of > transaction logic

Re: MVCC and all that...

2025-09-09 Thread Ron Johnson
On Tue, Sep 9, 2025 at 8:41 PM Justin wrote: > I read through the article its click bait/flame war just waiting to happen. > > Article is a list of cherry picked PG drawbacks that can be mitigated or > worked around. > > On the bulk updating. I'm shaking my finger at any one that locks up 25% >

Re: Fast switchover

2025-09-08 Thread Ron Johnson
On Mon, Sep 8, 2025 at 12:37 PM Klaus Darilion wrote: > > > *From:* Ron Johnson > *Sent:* Monday, September 8, 2025 6:10 PM > *To:* [email protected] > *Subject:* Re: Fast switchover > > > > On Mon, Sep 8, 2025 at 11:03 AM legrand legrand < >

Re: PostgreSQL include directive in plpgsql language PL/pgSQL

2025-09-05 Thread Ron Johnson
On Fri, Sep 5, 2025 at 9:14 AM PALAYRET Jacques wrote: > Hello, > > In a PL/pgSQL function, there is no command for sharing a common part of > the body of several functions, is there? > > In my case, I would like a function that returns a numeric value; this > value is associated with several oth

Re: Debugging query performance in postgres

2025-09-04 Thread Ron Johnson
On Thu, Sep 4, 2025 at 12:58 PM veem v wrote: > Hello, > We have a situation in which we had a dml query within a procedure that > was running fine but suddenly the plan flipped and it started running > longer. > That sounds like something that bit me once. Took a while to figure out, and was v

Re: psql --html and to_char()

2025-08-27 Thread Ron Johnson
On Wed, Aug 27, 2025 at 6:13 PM Greg Sabino Mullane wrote: > On Wed, Aug 27, 2025 at 11:28 AM Ron Johnson > wrote: > >> Is there a way around this, other than writing my own HTMLifier? >> > > Not unless your to_char() output can be coerced back into a numeric. (f

psql --html and to_char()

2025-08-27 Thread Ron Johnson
PG 17, if relevant. It's great that "psql --html" adds align="right" to numeric fields. But... psql understandably forgets that when the numeric field is passed to to_char(). Is there a way around this, other than writing my own HTMLifier? -- Death to , and butter sauce. Don't boil me, I'm sti

Re: In-order pg_dump (or in-order COPY TO)

2025-08-27 Thread Ron Johnson
On Wed, Aug 27, 2025 at 10:42 AM Tom Lane wrote: > Ron Johnson writes: > > On Wed, Aug 27, 2025 at 10:16 AM Tom Lane wrote: > >> Don't use --format=custom (and not -v either). That causes pg_dump to > >> include the OIDs and pg_dump object IDs of all t

Re: In-order pg_dump (or in-order COPY TO)

2025-08-27 Thread Ron Johnson
On Wed, Aug 27, 2025 at 10:16 AM Tom Lane wrote: > Dimitrios Apostolou writes: > > Dump is from PostgreSQL 16, it's pg_dump writing to stdout: > > > pg_dump -v --format=custom --compress=none --no-toast-compression > --serializable-deferrable db_name | borg create ... > > Don't use --format=cu

Re: In-order pg_dump (or in-order COPY TO)

2025-08-26 Thread Ron Johnson
On Tue, Aug 26, 2025 at 6:08 PM Tom Lane wrote: > Dimitrios Apostolou writes: > > Unfortunately after I did pg_restore to a new server, I notice that the > > dumps from the new server are not being de-duplicated, all blocks are > > considered new. > > > This means that the data has been signific

Re: In-order pg_dump (or in-order COPY TO)

2025-08-26 Thread Ron Johnson
On Tue, Aug 26, 2025 at 4:31 PM David G. Johnston < [email protected]> wrote: > On Tue, Aug 26, 2025 at 12:43 PM Dimitrios Apostolou > wrote: > >> Could the >> row-order have changed when doing COPY FROM with pg_restore? > > > There is no reliable, meaningful, row ordering when it comes

Re: In-order pg_dump (or in-order COPY TO)

2025-08-26 Thread Ron Johnson
On Tue, Aug 26, 2025 at 3:44 PM Dimitrios Apostolou wrote: > Hello list, > > I am storing dumps of a database (pg_dump custom format) in a > de-duplicating backup server. Each dump is many terabytes in size, so > deduplication is very important. And de-duplication itself is based on > rolling che

Re: Feature request: A method to configure client-side TLS ciphers for streaming replication

2025-08-26 Thread Ron Johnson
That's the responsibility of your ssl configuration, I think. https://www.postgresql.org/message-id/39BE74F7-903A-467F-AA15-E7062361A8E2%40yesql.se > > Ron Johnson 于2025年8月26日 周二21:00写道: > >> On Tue, Aug 26, 2025 at 3:28 AM xx Z wrote: >> >>> Hello PostgreSQL

Re: DISABLE TRIGGER doc wrong?

2025-08-26 Thread Ron Johnson
On Tue, Aug 26, 2025 at 9:01 AM Dominique Devienne wrote: > On Tue, Aug 26, 2025 at 2:54 PM Ron Johnson > wrote: > > On Tue, Aug 26, 2025 at 3:01 AM Dominique Devienne > wrote: > >> ERROR: permission denied: "RI_ConstraintTrigger_c_1226298044" is a > &

Re: Feature request: A method to configure client-side TLS ciphers for streaming replication

2025-08-26 Thread Ron Johnson
On Tue, Aug 26, 2025 at 3:28 AM xx Z wrote: > Hello PostgreSQL community, > > I have a question regarding the configuration of streaming replication. > > When setting up streaming replication over TLS, I've noticed that while > the primary server can restrict its supported encryption algorithms u

Re: DISABLE TRIGGER doc wrong?

2025-08-26 Thread Ron Johnson
On Tue, Aug 26, 2025 at 3:01 AM Dominique Devienne wrote: [snip] > ERROR: permission denied: "RI_ConstraintTrigger_c_1226298044" is a > system trigger > > (yes, that's a large OID... For a 1 year old DB) > PG's OID allocation of "user-land" OIDs doesn't start at 16384 anymore. And it can seem q

Re: Domains vs data types

2025-08-20 Thread Ron Clarke
Opinion: domains are useful if you give them names that are full of meaning. For example if you have the same type of data accross tables "item_number" or "account" etc so that you can use them to describe what you want stored in them and ensure the same defaults, nulls etc are applied accross tabl

Re: Domains vs data types

2025-08-20 Thread Ron Johnson
On Wed, Aug 20, 2025 at 11:05 AM Adrian Klaver wrote: [snip] > > Personally I don't see that integer --> aint really helps. > No one's going to create the domain "aint", but a DB designer in a rigorous environment _will_ create multiple, meaningfully-named domains, all of which happen to be INTE

Re: Streaming replica hangs periodically for ~ 1 second - how to diagnose/debug

2025-08-20 Thread Ron Johnson
Scot's email wasn't gibberish to me (reading from chrome). Spaces between every character, and 99.9689% signature block (I did the math!), but all English (and a giant png file). On Wed, Aug 20, 2025 at 5:41 AM Alban Hertroys wrote: > > > > On 19 Aug 2025, at 22:25, Scot Kreienkamp > wrote: >

Re: Offline PostgreSQL installation: what are the rpm packages to install ?

2025-08-18 Thread Ron Johnson
>From links in https://www.postgresql.org/download/linux/redhat/, I found a link, and started exploring. https://ftp.postgresql.org/pub/repos/yum/ is where you want to start. These are the directories you want: https://ftp.postgresql.org/pub/repos/yum/17/redhat/ https://ftp.postgresql.org/pub/repos

Re: Questions about the continuity of WAL archiving

2025-08-12 Thread Ron Johnson
How often does your primary node crash, and then not recover due to WALs corruption or WALs not existing? If it's _ever_ happened, you should _fix that_ instead of rolling your own WAL archival.process. On Tue, Aug 12, 2025 at 10:05 PM px shi wrote: > Hi, Adrian > > Given that you are using a l

Re: Questions about the continuity of WAL archiving

2025-08-12 Thread Ron Johnson
crashes under high load, the archived WAL logs on S3 may be > discontinuous. > 1) PG does not purge WAL files that are needed for immediate crash recovery. 2) PgBackRest can archive (compressed and encrypted) WAL files to S3. https://pgbackrest.org/user-guide-rhel.html#s3-support > > Ron

Re: Inquiry: Using PostgreSQL as a Staging Database for SAP ERP Data Export

2025-08-12 Thread Ron Johnson
This link says that there's an ADBC driver for Postgresql: https://arrow.apache.org/adbc/current/driver/status.html You should probably research _IT_ and SAP as to why your SAP installation does not have the PG driver. On Tue, Aug 12, 2025 at 10:36 AM Ian Huang wrote: > Hi Greg, > > Thanks for

Re: Backups with filesystem snapshots

2025-08-11 Thread Ron Johnson
On Mon, Aug 11, 2025 at 9:01 AM Nick Cleaton wrote: > If I take an instantaneous filesystem-level snapshot of the postgres > data directory underneath a running postgres server, is that a safe > backup without doing any pg_start_backup/pg_stop_backup ? > > It seems like it should be, so long as I

Re: Questions about the continuity of WAL archiving

2025-08-08 Thread Ron Johnson
On Fri, Aug 8, 2025 at 2:26 PM Greg Sabino Mullane wrote: > There is a scenario: the current timeline of the PostgreSQL primary node >> is 1, and the latest WAL file is 100. The standby node has also received up >> to WAL file 100. However, the latest WAL file archived is only file 80. If >> the

Re: Approach for DB migration

2025-08-06 Thread Ron Johnson
On Thu, Aug 7, 2025 at 12:21 AM Siraj G wrote: > Yes Ron, database migration service. But it works better if we have to > migrate all the DBs in one shot > Is that really a problem? But if there's a problem with DMS, then logical replication should do the trick. > sinc

Re: Approach for DB migration

2025-08-06 Thread Ron Johnson
On Wed, Aug 6, 2025 at 9:30 PM Siraj G wrote: > Hello Experts! > > I have this environment with 100+ DBs and would like to migrate to GCP's > cloud SQL for Postgres. > > Primary: 48 CPUs, 48GB memory > Secondary/Read Replica: 80 CPUs, 128GB memory > PG version: 12.22 (we have already started the

Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array

2025-08-06 Thread Ron Johnson
Puzzling. I'd do: pg_dump --schema-only xxx_pub_dev_2_db | grep -i -A5 _sa_setup_role Note the -i. That _might_ be important. On Wed, Aug 6, 2025 at 4:18 PM Rumpi Gravenstein wrote: > Just coming back to this. Don't know how to interpret this: > > xxx_pub_dev_2_db=# select proname, pronamesp

Re: Is there any limit on the number of rows to import using copy command

2025-07-24 Thread Ron Johnson
On Thu, Jul 24, 2025 at 8:00 PM [email protected] < [email protected]> wrote: [snip] > 3. Regarding moving the logic to procedure. Won't the trigger work? > Will it be a burden for 86420 records? It's working, if we insert few > thousand records. After split of trigger function, it's

Re: Performance of JSON type in postgres

2025-07-19 Thread Ron Johnson
On Sat, Jul 19, 2025 at 5:19 PM veem v wrote: > > On Sun, 20 Jul 2025 at 02:29, Adrian Klaver > wrote: > >> On 7/19/25 13:39, veem v wrote: >> > >> >> I thought you are answered that with your tests above? At least for the >> Postgres end. As to the Snowflake end you will need to do comparable >

Re: Should we document the cost of pg_database_size()? Alternatives?

2025-07-17 Thread Ron Johnson
On Thu, Jul 17, 2025 at 8:55 PM Craig Ringer wrote: [snip] > > FS-based sizing isn't really enough > > > Asking users to monitor at the filesystem level works, kind-of, but > it'll lead to confusion due to WAL and temp files in simple installs. > To get decent results they will n

Re: Bypassing Directory Ownership Check in PostgreSQL 16.6 with Secure z/OS NFS (AT-TLS)

2025-07-17 Thread Ron Johnson
On Wed, Jul 16, 2025 at 8:42 PM Greg Sabino Mullane wrote: > On Wed, Jul 16, 2025 at 9:25 AM Amol Inamdar wrote: > >> >>1. NFS mount point is for /nfs-mount/postgres (and permissions locked >>down so that Postgres cannot create directories in here) >>2. Postgres data directory is /nf

Re: Bypassing Directory Ownership Check in PostgreSQL 16.6 with Secure z/OS NFS (AT-TLS)

2025-07-16 Thread Ron Johnson
Quoting Tom's earlier email: "(But I too *would not use Postgres-over-NFS for any critical data*. Too many moving parts. It's tough enough to ensure crash safety with local storage.)" You're going through a lot of security effort to implement a Worst Practice. On Wed, Jul 16, 2025 at 9:25 AM Amo

Re: I have a suspicious query

2025-07-12 Thread Ron Johnson
On Fri, Jul 11, 2025 at 2:44 PM Greg Sabino Mullane wrote: > Looks like someone testing out the fake Postgres CVE 2019-9193 > > https://nvd.nist.gov/vuln/detail/CVE-2019-9193 > > See for example: > > https://packetstorm.news/files/id/166540 > > But certainly the first step is finding out who or w

Re: having temp_tablespaces on less reliable storage

2025-07-11 Thread Ron Johnson
On Fri, Jul 11, 2025 at 10:46 AM Dimitrios Apostolou wrote: > > On Thu, 10 Jul 2025, Dimitrios Apostolou wrote: > > > Hello list, > > > > I have a database split across many tablespaces, with temp_tablespaces > > pointing to a separate, less reliable device (single local NVMe drive). > How > > da

  1   2   3   4   5   6   7   8   9   10   >