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 < david.g.johns...@gmail.com> 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 sivapostg...@yahoo.com < sivapostg...@yahoo.com> 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

Re: Question Regarding COPY Command Handling of Line Breaks in PostgreSQL

2025-07-11 Thread Ron Johnson
On Fri, Jul 11, 2025 at 8:20 AM gzh wrote: > Dear, > > I am encountering an issue with the COPY command in PostgreSQL regarding > the handling of line breaks in data fields. My PostgreSQL instance is > installed on a Linux system. > > When I use the COPY command to export data to a CSV file and t

Re: Aggregate versions of hashing functions (md5, sha1, etc...)

2025-07-11 Thread Ron Johnson
On Fri, Jul 11, 2025 at 5:01 AM Dominique Devienne wrote: > On Thu, Jul 10, 2025 at 7:11 PM Ron Johnson > wrote: > > On Thu, Jul 10, 2025 at 12:26 PM Adrian Klaver < > adrian.kla...@aklaver.com> wrote: > >> On 7/10/25 04:48, Dominique Devienne wrote: > >&g

Re: Aggregate versions of hashing functions (md5, sha1, etc...)

2025-07-10 Thread Ron Johnson
On Thu, Jul 10, 2025 at 12:26 PM Adrian Klaver wrote: > On 7/10/25 04:48, Dominique Devienne wrote: > > > Seems so logical to me, that these hashing functions were available > > are aggregates, I can't be the first one to think of that, can it? > > > > I've been on this list since late 2002 and I

Re: Password Encryption and Connection Issues

2025-07-09 Thread Ron Johnson
On Wed, Jul 9, 2025 at 11:26 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wed, Jul 9, 2025 at 8:09 AM Ron Johnson > wrote: > >> That requires setting the password to null and then recreating the >> password, no? >> > > You might want

Re: Password Encryption and Connection Issues

2025-07-09 Thread Ron Johnson
On Wed, Jul 9, 2025 at 11:11 AM Adrian Klaver wrote: > On 7/9/25 06:56, Alpaslan AKDAĞ wrote: > > Hello all > > > > > As a result, some users are able to connect, while others cannot. > > What client is being used and what version of said client? > This is a salient point:clients from the pre-PG

Re: Password Encryption and Connection Issues

2025-07-09 Thread Ron Johnson
On Wed, Jul 9, 2025 at 10:59 AM Greg Sabino Mullane wrote: > On Wed, Jul 9, 2025 at 9:57 AM Alpaslan AKDAĞ > wrote: > >> Is it expected behavior that users created with scram-sha-256 passwords >> can still connect via md5 in pg_hba.conf? > > > Yes. From the docs: > >> To ease transition from the

Re: pg_upgrade: can I use same binary for old & new?

2025-07-05 Thread Ron Johnson
On Sat, Jul 5, 2025 at 3:19 PM Pierre Fortin wrote: > On Sat, 05 Jul 2025 14:30:20 -0400 Tom Lane wrote: > > Forgive my ignorance; always trying to learn more... :) > > >p...@pfortin.com writes: > >> On Sat, 5 Jul 2025 11:11:32 -0700 Adrian Klaver wrote: > >>> How did you measure above? > > > >>

Re: pg_upgrade: can I use same binary for old & new?

2025-07-05 Thread Ron Johnson
On Sat, Jul 5, 2025 at 2:24 PM wrote: > On Sat, 5 Jul 2025 11:11:32 -0700 Adrian Klaver wrote: > > >On 7/5/25 09:52, Pierre Fortin wrote: > > >> Wanting to upgrade from: > >> PostgreSQL 15.13 on x86_64-mageia-linux-gnu, > >> compiled by gcc (Mageia 15.1.0-1.mga10) 15.1.0, 64-bit > >> to: > >> PG

Re: pg_upgrade: can I use same binary for old & new?

2025-07-05 Thread Ron Johnson
On Sat, Jul 5, 2025 at 2:11 PM Adrian Klaver wrote: > On 7/5/25 09:52, Pierre Fortin wrote: > > Hi, > > > > [Hope this gets through after dumping DKIM-ignorant mail provider.] > > > > Wanting to upgrade from: > > PostgreSQL 15.13 on x86_64-mageia-linux-gnu, > > compiled by gcc (Mageia 15.1.0-1.mg

Re: Corrupt btree index includes rows that don't match

2025-07-04 Thread Ron Johnson
On Fri, Jul 4, 2025 at 9:49 AM Erik Johnston wrote: > Hi, a quick update: > > - We have discovered that the corruption was present from before libicu > update. > - We ran `pg_amcheck --index state_groups_state_type_idx --heapallindexed > matrix`, which returned nothing > - We believe that means t

Re: Corrupt btree index includes rows that don't match

2025-07-04 Thread Ron Johnson
On Fri, Jul 4, 2025 at 5:50 AM wrote: > > One coincidence is that we started seeing the first symptoms of this > > around the same time as libicu was updated with a security patch. > > However, postgres hasn’t been restarted and doesn’t reference the > > new version in its process maps. Plus stat

Re: PLPGSQL - store fetched records in array of record

2025-07-02 Thread Ron Johnson
On Wed, Jul 2, 2025 at 8:21 AM Durumdara wrote: > Hello! > > I have to store some fetched records into two lists (arrays) to work with > them. > There's almost certainly a way to do what you need done without using arrays. Might require a bit of rethinking, though. -- Death to , and butter sa

Re: Simulate a PITR in postgresql 16

2025-06-30 Thread Ron Johnson
Using PgBackRest might be more convenient, since it handles everything you need, is multithreaded, never removes too many wal files, compresses files if you want and also encrypts them if you want. (In 2025, I also leave pg_wal on the same mount point as data/. Disk space is plentiful and it's ju

Re: password rules

2025-06-28 Thread Ron Johnson
On Sat, Jun 28, 2025 at 9:59 AM Peter J. Holzer wrote: > On 2025-06-27 19:00:36 +0200, raphi wrote: > > > > > > Am 26.06.2025 um 14:27 schrieb Peter J. Holzer: > > > On 2025-06-25 17:55:12 +0200, raphi wrote: > > > > Am 25.06.2025 um 17:33 schrieb Peter J. Holzer: > > > > > On 2025-06-25 14:42:26

Re: analyze-in-stages post upgrade questions

2025-06-27 Thread Ron Johnson
On Fri, Jun 27, 2025 at 9:35 AM Zechman, Derek S wrote: > > > We recently performed an upgrade from pg14 (14.18) to pg16 (16.9) and > performed the analyze-in-stages post upgrade. It has been noticed that > some plans changed to use hash joins instead of nested loops. Further > investigation fo

Re: Retrieving current date

2025-06-19 Thread Ron Johnson
On Thu, Jun 19, 2025 at 2:23 AM sivapostg...@yahoo.com < sivapostg...@yahoo.com> wrote: > Hello, > May be a very basic question. We all here are new to Linux / PostgreSQL > > Ubuntu Server 22.04 > PostgreSQL 15 > PgAdmin4 6.16 > > When I run the following query in pg_admin > > Select today_now >

Re: db maintanance problem VACUUM FULL

2025-06-12 Thread Ron Johnson
On Thu, Jun 12, 2025 at 9:24 AM Laurenz Albe wrote: > On Thu, 2025-06-12 at 15:14 +0200, Pavol Sekeres wrote: > > We recently updated our production database to PostgreSQL 12.22 from the > 9.6.24 version. > > We didn't want to make a big jump. > > But you should have. v12 is out of support. > T

Re: db maintanance problem VACUUM FULL

2025-06-12 Thread Ron Johnson
On Thu, Jun 12, 2025 at 9:14 AM Pavol Sekeres wrote: > Hi, > > We recently updated our production database to PostgreSQL 12.22 from the > 9.6.24 version. > Will you soon make another jump to a supported version? > We didn't want to make a big jump. > It is around 2 TB in size with one stand-by

Re: Is it correct to raise an exception in a domain check

2025-06-10 Thread Ron Johnson
On Tue, Jun 10, 2025 at 4:53 PM Logan Grosz wrote: > Hi, > > I have a `DOMAIN` on `JSONB`. I need to verify the shape of the JSON, so I > have a check expression written in PL/pgSQL. The docs say > > > Each constraint must be an expression producing a Boolean result > > Would it be correct to rai

Re: Regarding fillfactor use case for only delete ops

2025-06-07 Thread Ron Johnson
On Sat, Jun 7, 2025 at 7:53 AM Laurenz Albe wrote: > On Fri, 2025-06-06 at 09:59 -0400, Ron Johnson wrote: > > On Fri, Jun 6, 2025 at 8:57 AM Laurenz Albe > wrote: > > > On Fri, 2025-06-06 at 14:10 +0530, Durgamahesh Manne wrote: > > > > Can we generate a fill f

Re: Regarding fillfactor use case for only delete ops

2025-06-06 Thread Ron Johnson
On Fri, Jun 6, 2025 at 4:36 AM Durgamahesh Manne wrote: > Hi Team > > Can we generate a fill factor for tables that have delete ops ? > > Does the fill factor really work and help to minimize the bloat for tables > that have delete ops? > > I have parent table with weekly partitions So for every

Re: Regarding fillfactor use case for only delete ops

2025-06-06 Thread Ron Johnson
On Fri, Jun 6, 2025 at 8:57 AM Laurenz Albe wrote: > On Fri, 2025-06-06 at 14:10 +0530, Durgamahesh Manne wrote: > > Can we generate a fill factor for tables that have delete ops ? > > > > Does the fill factor really work and help to minimize the bloat for > tables that have delete ops? > > > > I

Re: Sudden increase in n_dead_tup with no corresponding insert/update/delete

2025-06-04 Thread Ron Johnson
Note also that 15.6 is about 18 months old. Upgrading really does only take a few minutes, if you download the binaries before installation. On Wed, Jun 4, 2025 at 2:37 PM Matthew Tice wrote: > > > On Jun 3, 2025, at 6:23 PM, David Rowley wrote: > > > > On Wed, 4 Jun 2025 at 07:22, Matthew Tic

Re: Yet more ROLE changes in v18 beta1???

2025-06-04 Thread Ron Johnson
On Wed, Jun 4, 2025 at 1:53 PM Adrian Klaver wrote: > > > On 6/4/25 9:39 AM, Dominique Devienne wrote: > > On Wed, Jun 4, 2025 at 5:29 PM Adrian Klaver > wrote: > >>> $ ./myruntests.csh tests_pdgm_schemas -t "..." --pq-version > >>> Connected to ... (17.4, server 18.0) > >> > >> What is '(17.4,

Re: Changing a varchar(7) domain into text directly in pg_type

2025-05-28 Thread Ron Johnson
Foreign key "code tables" are ubiquitous in good database design; another example is zip/postal codes and cities. Statuses are another standard usage. Thus, what you're doing is absolutely bog-standard. (In your case, I would add "taxonomy_edition" to the species table. You get more information

Re: get speed help

2025-05-19 Thread Ron Johnson
Hi, > I mean any manual > I have a small code, that searches some 1 billion records in 1 > seconds thru index simple case -- I want to test that with postgres > > > On Mon, May 19, 2025 at 10:14 PM Ron Johnson > wrote: > >> Spinning rust? SSD? NVMe? SATA? SCSI

Re: get speed help

2025-05-19 Thread Ron Johnson
small table > indexed on that char - 20 field , say 16 gb ram, amd normal power processor > no parallel processing, to know it, the speed in single processor > > On Mon, May 19, 2025 at 9:55 PM Ron Johnson > wrote: > >> On Mon, May 19, 2025 at 12:12 PM Dias Thomas >> wr

Re: get speed help

2025-05-19 Thread Ron Johnson
On Mon, May 19, 2025 at 12:12 PM Dias Thomas wrote: > Hello all, > Could i get a help, postgres 1 billion records indexed table, search > speed in a normal machine, no parallel processing ... for a knowledge ?? > 1. How big are the records? 2. How big are the keys? 3. What is a normal machine?

Re: Upgrading PG11 to PG17 without dump/restore

2025-05-01 Thread Ron Johnson
On Thu, May 1, 2025 at 9:06 AM Durumdara wrote: > Hello! > > There is a heavily used server, with older debian, and PG11. > The data is more than 1,2 TB. > The PG_Upgrade is not possible because of lesser space and too old debian. > > As we see now we have only one way to move this server. > 1.)

Re: Index not used in certain nested views but not in others

2025-04-30 Thread Ron Johnson
On Wed, Apr 30, 2025 at 3:51 PM Markus Demleitner < msdem...@ari.uni-heidelberg.de> wrote: > Dear List, > > I know how tedious mails with a subject of the type "I don't understand > what the planner does" are, but on this one I'm really stumped. > Regrettably, the situation is also a bit complex.

Re: Changing default fillfactor for the whole database

2025-04-27 Thread Ron Johnson
On Sat, Apr 26, 2025 at 10:31 PM Marcelo Fernandes wrote: > Hi there, > > I have a scenario where virtually all user tables in the database will > need to > have a lower fill factor. > > It would have been handy to have a way to set this default, but as of now, > I > don't think the default can b

Re: Order of update

2025-04-20 Thread Ron Johnson
On Sun, Apr 20, 2025 at 5:35 AM Thiemo Kellner wrote: > Very interesting. But is the sort overhead worth it? Why not make the > constraint deferrable before the update and switch back afterwards? > The role which runs the UPDATE might not have the priv to ALTER TABLE ... ALTER CONSTRAINT. -- D

Re: verify checksums online

2025-04-18 Thread Ron Johnson
On Fri, Apr 18, 2025 at 5:18 PM Jeremy Schneider wrote: > i should know the answer to this... but asking anyway > > i think there had been some mailing list discussions years ago? the > pg_checksum utility in core still can't do an online check right? > https://www.postgresql.org/docs/17/app-pgc

Re: Cannot turn track_counts on

2025-04-17 Thread Ron Johnson
On Thu, Apr 17, 2025 at 5:13 AM Anton Shepelev wrote: > Daniel Gustafsson: > > > Also, is this by any chance a managed instance like Amazon > > RDS or Azure, or is it a local database under your > > control? > > It is a normal installation on a Linux machine, and my > company has full root access

Re: Best Tool for PostgreSQL Auditing and Storing Audit Logs Separately

2025-04-16 Thread Ron Johnson
On Wed, Apr 16, 2025 at 3:42 PM Nico Williams wrote: > On Wed, Apr 16, 2025 at 02:43:59PM -0400, Ron Johnson wrote: > > You'll have to bring that up with the PgAudit maintainer. Note, though, > > that the purpose of PgAudit is not "recreate the database from audi

Re: Best Tool for PostgreSQL Auditing and Storing Audit Logs Separately

2025-04-16 Thread Ron Johnson
On Wed, Apr 16, 2025 at 3:15 PM Achilleas Mantzios < a.mantz...@cloud.gatewaynet.com> wrote: > On 16/4/25 21:43, Ron Johnson wrote: > > > You'll have to bring that up with the PgAudit maintainer. Note, though, > that the purpose of PgAudit is not "recreate the da

Re: Best Tool for PostgreSQL Auditing and Storing Audit Logs Separately

2025-04-16 Thread Ron Johnson
n Wed, Apr 16, 2025 at 1:35 PM Achilleas Mantzios < a.mantz...@cloud.gatewaynet.com> wrote: > On 16/4/25 15:36, Ron Johnson wrote: > > > pgaudit is statement-level, not transaction-level; that's its nature. > This is the same as log_statement. > > ok, but log_statement p

Re: Best Tool for PostgreSQL Auditing and Storing Audit Logs Separately

2025-04-16 Thread Ron Johnson
pgaudit is statement-level, not transaction-level; that's its nature. This is the same as log_statement. On Wed, Apr 16, 2025 at 5:10 AM Achilleas Mantzios - cloud < a.mantz...@cloud.gatewaynet.com> wrote: > On 4/15/25 12:14, KENAN ÇİFTÇİ wrote: > > Hi, > > You can use pgaudit and pgauditlogtofi

Re: Fwd: Identify system databases

2025-04-15 Thread Ron Johnson
On Tue, Apr 15, 2025 at 3:11 PM Tom Lane wrote: > "David G. Johnston" writes: > > On Tue, Apr 15, 2025 at 11:20 AM Adrian Klaver < > adrian.kla...@aklaver.com> > > wrote: > >> If what you say is true why does initdb lack an option to not create > >> them on creating a cluster? > > > By creating

Re: To take backup of Postgresql Database without large objects

2025-04-11 Thread Ron Johnson
On Fri, Apr 11, 2025 at 8:56 AM sivapostg...@yahoo.com < sivapostg...@yahoo.com> wrote: > Hello, > > Using PostgreSQL 15.1, compiled by Visual C++ build 1914, 64-bit in > Windows 10. > That's 11 patch releases behind current. > Trying to take backup of a database, using pg_dump, where one table

Re: Archive logging not cleaning up pg_wal directory

2025-04-10 Thread Ron Johnson
On Thu, Apr 10, 2025 at 8:29 AM Justin Swanhart wrote: > Hi, > > I have the following in my postgresql.conf for archive logging: > archive_command='test ! -f /var/lib/postgresql/prod_archive_logs/%f && cp > %p /var/lib/postgresql/prod_archive_logs/%f' > > This command is properly copying the log

Re: PgBackRest fails due to filesystem full

2025-04-09 Thread Ron Johnson
Try creating a new stanza, and doing a full backup from it. On Wed, Apr 9, 2025 at 1:49 AM KK CHN wrote: > > > On Tue, Apr 8, 2025 at 10:28 PM Greg Sabino Mullane > wrote: > >> On Mon, Apr 7, 2025 at 5:32 AM KK CHN wrote: >> >>> *ERROR: [082]: WAL segment 000101EB00*4B was not arch

Re: Wal file query

2025-04-08 Thread Ron Johnson
You cannot connect to the Primary while connected to the Replica, except via postgres_fdw. Even then, it might not work, since the replica replicates _fdw definitions. These exist on the primary: pg_current_wal_lsn() pg_replication_slots pg_stat_replication These exist on the replica: pg_last_

Re: Any industry best practise to overcome this specific malware "pg_mem"

2025-04-05 Thread Ron Johnson
On Wed, Apr 2, 2025 at 11:31 AM Adrian Klaver wrote: > On 4/2/25 08:18, Bharani SV-forum wrote: > > Hello MVP's > > Good Morning > > Any industry best practise to overcome this specific malware "pg_mem". > > > > url = > > > https://www.aquasec.com/blog/pg_mem-a-malware-hidden-in-the-postgres-proc

Re: Bloated toast table with empty associated table

2025-04-05 Thread Ron Johnson
On Thu, Mar 20, 2025 at 7:40 AM Paul Allen wrote: > Hello. > > Preconditions. > > I have some empty table and constantly try to execute `insert ... on > conflict do update ...` on it. My data in row which I try to insert is > invalid by violation of foreing key constraint, so I am getting error >

Re: Performance issues during pg_restore -j with big partitioned table

2025-04-04 Thread Ron Johnson
On Wed, Apr 2, 2025 at 1:32 PM Dimitrios Apostolou wrote: > Hello list. > > My database includes one table with 1000 partitions, all of them rather > sizeable. I run: > >pg_restore -j12 --no-tablespaces --disable-triggers --exit-on-error > --no-owner --no-privileges -n public -d newdb custom_

Re: Issue installing postgis on RHEL9

2025-04-02 Thread Ron Johnson
On Wed, Apr 2, 2025 at 12:29 PM Danny Im wrote: > Hello, > > I am having issues trying to install the postgis30_13 package on a RHEL9 > host. Attempting to install the package gives me this error: > > $ sudo dnf install postgis30_13 > Updating Subscription Management repositories. > Zabbix 6.0 LT

Re: BTREE index: field ordering

2025-03-28 Thread Ron Johnson
On Fri, Mar 28, 2025 at 9:35 AM Laurenz Albe wrote: > On Fri, 2025-03-28 at 13:38 +0100, Moreno Andreo wrote: > > Postgres 16.4 (planning to go on 17.4) > > I'm creating some indexes based on some slow query reported by logs. > > These queries involve a WHERE with more than 5 fields, that are

Re: size of attributes table is too big

2025-03-25 Thread Ron Johnson
a table with size over 500GB. It is going to take a couple of hours I > presume. > > Also, I hope aggressive vacuuming will prevent us from this situation. > > Regards > Siraj > > > > > On Wed, Mar 19, 2025 at 11:27 PM Ron Johnson > wrote: > >> On Wed, M

Re: Experience and feedback on pg_restore --data-only

2025-03-24 Thread Ron Johnson
Why are you regularly having emergencies requiring the restoration of multi-TB tables to databases with lots of cruft? Fixing that would go a long way towards eliminating your problems with pg_restore. On Mon, Mar 24, 2025 at 11:51 AM Dimitrios Apostolou wrote: > On Mon, 24 Mar 2025, Adrian Kla

Re: Experience and feedback on pg_restore --data-only

2025-03-21 Thread Ron Johnson
On Fri, Mar 21, 2025 at 2:36 PM Dimitrios Apostolou wrote: > On Thu, 20 Mar 2025, Dimitrios Apostolou wrote: > > > Rationale: > > > > When restoring a backup in an emergency situation, it's fine to run > > pg_restore as superuser and get an exact replica of the dumped db. > How often do you have

Re: Export operation efficiency in read replica

2025-03-20 Thread Ron Johnson
On Thu, Mar 20, 2025 at 7:52 AM Siraj G wrote: > Hello Experts! > > I have a DB with 1TB in size serving needs of one of our critical > applications. I have a requirement to take export of the DB on a daily > basis, but want to carry out this operation in read replica. The postgresql > version is

Re: Bloated toast table with empty associated table

2025-03-20 Thread Ron Johnson
records. And... it did just that. But what *must* PG do when it discovers a constraint violation 99% of the way through inserting those 100 records? That's right: remove the records. Thus, you get bloat. > On Thu, Mar 20, 2025 at 4:28 PM Ron Johnson > wrote: > > > > On Th

Re: Bloated toast table with empty associated table

2025-03-20 Thread Ron Johnson
ot;vacuumdb -d the_db -t > controlzone_passage". How often you run it depends on how quickly it > bloats. > > Seems like it is the only solution for now. > The autovacuum daemon can't know/see everything. > On Thu, Mar 20, 2025 at 4:03 PM Ron Johnson > wrote: &

Re: size of attributes table is too big

2025-03-19 Thread Ron Johnson
On Wed, Mar 19, 2025 at 1:06 PM Siraj G wrote: > Hello! > > I have a PG (v16) instance which is occupying around 1TB of storage. Out > of this, around 350GB is occupied by the table pg_catalog.pg_attribute. > Why is the catalog table's size so big? > > Here are the sizes: > > pg_attribute > 338 G

Re: Cannot pg_dump_all anymore...

2025-03-18 Thread Ron Johnson
On Tue, Mar 18, 2025 at 5:14 AM E-BLOKOS wrote: > I got this error: > > pg_dump: error: query returned 0 rows instead of one: EXECUTE > dumpBaseType('794978') > > any clue to solve it? > PG version? Whole command line, including all error messages? -- Death to , and butter sauce. Don't boil m

Re: Creating a new database on a different file system

2025-03-17 Thread Ron Johnson
On Mon, Mar 17, 2025 at 4:30 PM Laurenz Albe wrote: > On Mon, 2025-03-17 at 14:33 -0400, Ron Johnson wrote: > > On Mon, Mar 17, 2025 at 11:18 AM Laurenz Albe > wrote: > > > On Mon, 2025-03-17 at 15:51 +0100, Luca Ferrari wrote: > > > > On Mon, Mar 17, 2025 at

Re: Creating a new database on a different file system

2025-03-17 Thread Ron Johnson
On Mon, Mar 17, 2025 at 11:18 AM Laurenz Albe wrote: > On Mon, 2025-03-17 at 15:51 +0100, Luca Ferrari wrote: > > On Mon, Mar 17, 2025 at 3:49 PM Ian Dauncey > wrote: > > > We have created a few databases on the file system defined in the > postgresql.conf, > > > but now I would like to create a

Re: #1 - Known bug (memory related) with respect to Aurora postgresql 13.16.3

2025-03-17 Thread Ron Johnson
Aurora is very nonstandard. Thus, "we" don't support it. Having said that... "report running out of memory" smells like work_mem is set too high. On Mon, Mar 17, 2025 at 3:12 PM Bharani SV-forum wrote: > Team > Any one faced similar issue with Ver 13.16.X > > > > - Forwarded Message -

Re: Query optimization

2025-03-13 Thread Ron Johnson
On Thu, Mar 13, 2025 at 11:48 PM Durgamahesh Manne < maheshpostgr...@gmail.com> wrote: > On Fri, 14 Mar, 2025, 09:11 Ron Johnson, wrote: > >> On Thu, Mar 13, 2025 at 11:25 PM Durgamahesh Manne < >> maheshpostgr...@gmail.com> wrote: >> >>> On Fri, M

Re: Query optimization

2025-03-13 Thread Ron Johnson
On Thu, Mar 13, 2025 at 11:25 PM Durgamahesh Manne < maheshpostgr...@gmail.com> wrote: > On Fri, Mar 14, 2025 at 8:19 AM Ron Johnson > wrote: > >> On Thu, Mar 13, 2025 at 10:16 PM Durgamahesh Manne < >> maheshpostgr...@gmail.com> wrote: >> [snip] >

Re: Query optimization

2025-03-13 Thread Ron Johnson
On Thu, Mar 13, 2025 at 10:16 PM Durgamahesh Manne < maheshpostgr...@gmail.com> wrote: [snip] > Hi Adrian Klaver > > 1) Postgres version. > select version(); > version > > -

Re: Moving from Linux to Linux?

2025-03-12 Thread Ron Johnson
On Wed, Mar 12, 2025 at 4:16 PM Paul Foerster wrote: > Hi Ron, > > > On 12 Mar 2025, at 17:59, Ron Johnson wrote: > > > > Developers making DDL changes on production databases? > > Of course not. But I can't block developer databases. That'd make a few

Re: Moving from Linux to Linux?

2025-03-12 Thread Ron Johnson
On Wed, Mar 12, 2025 at 12:48 PM Paul Foerster wrote: > Hi Christophe, > > > On 12 Mar 2025, at 12:16, Christophe Pettus wrote: > > > > You *can* apply DDL while logical replication is going on, as long as > you do so in a disciplined way. This generally means applying it to the > subscriber be

Re: hide data from admins

2025-03-11 Thread Ron Johnson
On Tue, Mar 11, 2025 at 9:48 PM Siraj G wrote: > Hello Experts! > > What are the features available in Postgresql to hide PII (personal > identifiable information) from the Admin team? Like in Oracle we have data > vault and data redaction, I am looking for similar features in > PostgreSQL.We do

Re: Moving from Linux to Linux?

2025-03-11 Thread Ron Johnson
On Tue, Mar 11, 2025 at 2:35 PM Paul Foerster wrote: > Hi Devrim, Thomas, Adrian, Ron, Joe, > > answering to myself as answering to five postings in one go is impossible. > 🤣 > > > Are there any obstacles that definitely make that a no-go? Do I risk > corruption?

Re: Moving from Linux to Linux?

2025-03-11 Thread Ron Johnson
On Tue, Mar 11, 2025 at 12:23 PM Paul Foerster wrote: > Hi, > > we are considering changing the PostgreSQL platform from SUSE SLE to Red > Hat. To keep service interruptions as short as possible, the idea is to set > up a streaming replication from the SUSE server to be replaced to a > temporary

Re: Duplicate Key Values

2025-03-11 Thread Ron Johnson
Do you *currently* take regular backups? We'd be glad to show you how to take regular logical backups. On Tue, Mar 11, 2025 at 10:29 AM mark bradley wrote: > An "interesting" effect of reindexing is that all the records that were > dups in the nodes table were deleted, both copies. > > Also, al

Re: psql and regex not like

2025-03-09 Thread Ron Johnson
On Thu, Mar 6, 2025 at 6:11 AM hubert depesz lubaczewski wrote: > On Thu, Mar 06, 2025 at 04:37:56AM -0500, Ron Johnson wrote: > > This statement runs great from the psql prompt. Does exactly what I > want. > > select datname from pg_database WHERE datname !~ 'template|p

Re: [EXTERNAL] Re: Asking for OK for a nasty trick to resolve PG CVE-2025-1094 i

2025-03-08 Thread Ron Johnson
Since it's a 24x7 app, you have database replication, virtual IPs and a fail-over manager in case a server crashes? Anyway, read through the PG 15 release notes. If none really affect you, then stay on 15.3. You're certain to miss *something*, though, or not understand the ramifications. And be

  1   2   3   4   5   6   7   8   9   10   >