Re: How to perform PITR when all of the logs won't fit on the drive

2018-03-01 Thread Alan Hodgson
On Thu, 2018-03-01 at 17:28 -0500, Tony Sullivan wrote: Hello, I have a situation where something was deleted from a database that shouldn't have been so I am having to take a base backup and perform a point-in-time-recovery. The problem I have is that the decompressed WAL files will not fit on th

Re: How to run a task continuously in the background

2019-07-11 Thread Alan Hodgson
On Thu, 2019-07-11 at 11:19 -0500, Michael Nolan wrote: > A cron job will only run once a minute, not wake up every second. > But you could write a PHP program that does a one-second sleep before > checking if there's something to do, and a batch job that runs > periodically to see if the PHP prog

Re: Is my lecturer wrong about PostgreSQL? I think he is!

2019-10-09 Thread Alan Hodgson
Assuming you're not a troll ... On Wed, 2019-10-09 at 20:06 +0100, Pól Ua Laoínecháin wrote: > 1) Is my lecturer full of it or does he really have a point? > He's more than full of it. PostgreSQL has had a few bugs over the year that could have resulted in data corruption, but they're pretty rar

Re: Text search lexer's handling of hyphens and negatives

2019-10-16 Thread Alan Hodgson
On Tue, 2019-10-15 at 20:34 -0700, raylu wrote: > On Tue, Oct 15, 2019 at 3:35 PM Alan Hodgson > wrote: > > My company has found the pg_trm extension to be more useful for > > partial text searches than the full text functions. I don't know > > specifically how it mig

Re: Postgres Point in time Recovery (PITR),

2019-10-21 Thread Alan Hodgson
On Mon, 2019-10-21 at 16:40 +0530, Avinash Kumar wrote: > We need to ensure that we have safe backup locations, for example, > push them to AWS S3 and forget about redundancy. > Why do you think only Offline Backups are reliable today ? There have been examples of hackers gaining control of an o

Re: Postgres Point in time Recovery (PITR),

2019-10-21 Thread Alan Hodgson
On Mon, 2019-10-21 at 20:40 +0530, Avinash Kumar wrote: > can't he destroy the offline backups and your database ? > This is not a right justification to encouraging Offline Backups over > Online Backups. > If you are worried about storing your online backups through internet > on cloud (i do no

Re: 11 -> 12 upgrade on Debian Ubuntu

2019-11-07 Thread Alan Hodgson
On Thu, 2019-11-07 at 10:45 -0500, stan wrote: > I am in the middle of a project, and it looks like version 12 is now what > the Debian/Ubuntu package managers want to update to. > > I of course, will do this first on a test machine, not the "production", or > "develop,met" machines, but I though

Re: migration from 9.4 to 9.6

2019-12-06 Thread Alan Hodgson
On Fri, 2019-12-06 at 21:38 +, Julie Nishimura wrote: > I'd like to copy one single database from 9.4 cluster to a new 9.6 > cluster (migration with the upgrade), to the different host > > > > > > > > > > Put 9.4 on the new server. Replicate the db to it. When you're ready to switch,

Re: UPDATE many records

2020-01-07 Thread Alan Hodgson
On Tue, 2020-01-07 at 11:47 -0900, Israel Brewster wrote: > One potential issue I just thought of with this approach: disk space. > Will I be doubling the amount of space used while both tables exist? > If so, that would prevent this from working - I don’t have that much > space available at the mo

Re: UPDATE many records

2020-01-07 Thread Alan Hodgson
On Tue, 2020-01-07 at 11:58 -0900, Israel Brewster wrote: > > > Really? Why? With the update I am only changing data - I’m not adding > any additional data, so the total size should stay the same, right? > I’m obviously missing something… :-) > PostgreSQL keeps the old row until it gets vacuumed

Re: trouble making PG use my Perl

2020-03-02 Thread Alan Hodgson
On Mon, 2020-03-02 at 18:23 -0500, Tom Lane wrote: > Kevin Brannen writes: > > On Centos 6.10, it ships with Perl 5.10.1, which is really ancient > > tome. > > Well, yeah, because RHEL 6/Centos 6 are really ancient. That's > whatI'd expect with a long-term-support distro that's nearly > EOL.Repl

Re: keeping images in a bytea field on AWS RDS

2020-03-31 Thread Alan Hodgson
On Tue, 2020-03-31 at 15:49 -0400, Richard Bernstein wrote: > I am using postgresql on RDS. I need to upload an image to the table. > I understand that I need to set the PGDATA directory and place the > image file in it, before setting the path in the bytea field. But how > do I set PGDATA if I don

Re: Memory footprint diff between 9.5 and 12

2020-05-07 Thread Alan Hodgson
On Thu, 2020-05-07 at 13:33 -0700, Tory M Blue wrote: > I hadn't noticed this until today, but a running 9.5 system with > buffers at 10GB starts and has been running years without issues. > (15GB available) > Postgres 12 will not start with that configuration, complaining about > memory availabili

Re: Best way to use trigger to email a report ?

2020-05-08 Thread Alan Hodgson
On Fri, 2020-05-08 at 12:26 -0400, David Gauthier wrote: > psql (9.6.0, server 11.3) on linux > > Looking for ideas. I want a trigger to... > 1) compose an html report based on DB content > 2) email the report to a dist list (dl = value of a table column) > > If this will involve hybrid coding,

Re: Advise on how to install pl/perl on existing DB.

2020-05-26 Thread Alan Hodgson
On Tue, 2020-05-26 at 12:32 -0400, David Gauthier wrote: > psql (9.6.0, server 11.3) linux > > Hi: > I'm a PG users who has asked our IT team to install pl/perlu on an > existing 9.6.0 instance on linux. They really don't know how to > approach this. Could someone point me to a good step-by-st

Re: AW: Linux Update Experience

2020-05-28 Thread Alan Hodgson
On Thu, 2020-05-28 at 09:00 +, Marco Lechner wrote: > Hi Markus, > > at the moment we are facing similar conflicts on Oracle LInux 7 (wich > is derived from RHEL) – we manage our machines using Spacewalk. The > conflicts occur (as expected) on Spacewalk as well as on manually > using yum: >

Re: PostgreSQL 11 with SSL on Linux

2020-06-04 Thread Alan Hodgson
On Thu, 2020-06-04 at 17:32 +, Susan Joseph wrote: > So when I run rpm -i it says that the package is installed, but I > can't find a postgresql directory with all the files and executables. > So what am I missing? > > > > > > The server stuff is in postgresql11-serverif you're using t

Re: Need to install Postgres Version 14 in Linux server with Client and migration steps.

2022-05-09 Thread Alan Hodgson
On Mon, 2022-05-09 at 06:46 +, Rajamoorthy-CW, Thirumurugan 8361 wrote: > Hi Team, >   > I need to install Postgres Version 14 in Linux server with Client > and migration steps. Can you please provide me the installation > steps document ? > PostgreSQL is kind of a do-it-yourself thing like a

Re: pg_receivewal/xlog to ship wal to cloud

2022-07-18 Thread Alan Hodgson
On Mon, 2022-07-18 at 15:55 -0400, neslişah demirci wrote: > Hi all,  > > Wondering if anyone has any experience of using pg_receivewal/xlog > to ship wal files to GCP/S3? > I use archive_command to send WAL to S3. It works fine. I do gzip them before uploading, as they are usually pretty compre

Re: pg_upgrade 13.6 to 15.1?

2023-01-15 Thread Alan Hodgson
On Sun, 2023-01-15 at 16:59 -0500, p...@pfortin.com wrote: > > > encodings for database "template1" do not match:  old "UTF8", new > "SQL_ASCII" Failure, exiting You almost certainly don't want your new database to use SQL_ASCII. Init the new cluster with -E UTF8.

Re: Issues Scaling Postgres Concurrency

2023-03-14 Thread Alan Hodgson
On Mon, 2023-03-13 at 12:24 -0400, Harrison Borges wrote: > Hello everyone. > > I’m running into severe performance problems with Postgres as I > increase the number of concurrent requests against my backend. I’ve > identified that the bottleneck is Postgres, and to simplify the > test case, I cre

Re: Monitoring PITR recovery progress

2019-01-23 Thread Alan Hodgson
On Wed, 2019-01-23 at 18:58 +0100, Ivan Voras wrote: > And, the actual question: how to monitor the WAL replay process? > Currently, the recovery.conf file is sitting there, with the database > running, but pg processes are idle, and pg_stat_activity doesn't list > anything which appears to be rela

Re: loading plpython error

2019-02-14 Thread Alan Hodgson
> On 2/14/19 4:17 PM, Alan Nilsson wrote: > > Platform: Linux x86-64, CentOS 6, Postgres 11.1. > > > > We have installed from the YUM repo. The server runs fine but we > > are > > trying to add python support. > > > > yum install postrgesql11-contrib postgresql11-plpython > > > > I can see th

Re: running out of disk space

2019-05-09 Thread Alan Hodgson
On Thu, 2019-05-09 at 15:46 +, Julie Nishimura wrote: > hello, > > We are running out of disk space, and we introduced new volume to it. > I am about to create new tablespace X and alter user databases to set > to this new tablespace X. So, all new tables will be created in X, > but what about

Re: running out of disk space

2019-05-09 Thread Alan Hodgson
On Thu, 2019-05-09 at 16:49 +, Julie Nishimura wrote: > Alan, thanks for your reply. > > > > > > > > So, we currently have this situation: > > > > > > > > /dev/sda1 2.7T 2.4T 298G 90% /data/vol1 > > > /dev/sdb2 2.7T 2.4T 296G 89% /data/vol2 > > >

Re: Trying to understand a failed upgrade in AWS RDS

2023-05-23 Thread Alan Hodgson
On Sun, 2023-05-21 at 07:56 -0700, Mike Lissner wrote: > > As far as I know it's impossible to reliably pg_upgrade a node > > that has subscriptions and eventually resume logical > > replication.  > > > > > Should this go in the documentation somewhere? Maybe in the > pg_upgrade notes? I still d

Re: connecting to new instance

2023-09-22 Thread Alan Hodgson
On Fri, 2023-09-22 at 17:08 -0500, Brad White wrote: > I have the v15 service started and listening on 0.0.0.0:5434. > Through TCPView, I can see it listening on 5434, I can see the > previous version listening and connecting on 5432. > I can connect from localhost to port 5434. > I have ipv6 turne

Re: Can user specification of a column value be required when querying a view ?

2023-11-20 Thread Alan Hodgson
On Mon, 2023-11-20 at 13:44 -0800, Christophe Pettus wrote: > > > > On Nov 20, 2023, at 13:41, David Gauthier > > wrote: > > I want the users to be required to provide a value for ssn in the > > following query... > > "select * from huge_view where ssn = '106-91-9930' " > > I never want them to

Re: vacuumdb seems not to like option -j when run from crontab

2023-12-04 Thread Alan Hodgson
On Mon, 2023-12-04 at 11:07 -0500, Ron Johnson wrote: > PG 9.6.24 (Yes, it's EOL.) > > When running "vacuumdb -p5433 -j4 --analyze tap_d" from a bash > prompt, it works as expected: > $ vacuumdb -p5433 -j4 --analyze tap_d > vacuumdb: vacuuming database "tap_d" > > But not when running from cronta

Re: Seeking help extricating data from Amazon RDS Aurora/Postgres

2024-01-29 Thread Alan Hodgson
On Mon, 2024-01-29 at 14:22 -0500, Bill Mitchell wrote: > We are attempting to extract one of our database from Amazon RDS > Aurora/Postgres to another PostgreSQL cluster that is running > directly on EC2 instances. Aurora PostgreSQL supports logical replication and purports to use the native WAL

Re: Can't Remote connection by IpV6

2024-06-06 Thread Alan Hodgson
On Thu, 2024-06-06 at 11:46 -0300, Marcelo Marloch wrote: > Hi everyone, is it possible to remote connect through IpV6? IpV4 > works fine but I cant connect through V6 > > postgresql.conf is to listen all address and pg_hba.conf is set > with host all all :: md5 i've tried ::/0 and ::0/0 but had

Re: Where is my app installed?

2024-08-22 Thread Alan Hodgson
On Thu, 2024-08-22 at 20:36 -0400, Arbol One wrote: >   > After installing PostgreSQL on my Debian-12 machine, I typed > 'postgres --version' and got this msg: >  bash: postgres: command not found >   > 'psql --version', however, does work and gives me this message : >   > psql (PostgreSQL) 16.3 (D

Re: archive_commnad parameter question

2021-04-19 Thread Alan Hodgson
On Mon, 2021-04-19 at 21:09 +, Allie Crawford wrote: > Hello, > I am new in PostgreSQL and I am trying to understand what the “test” word is > representing in the archive_command configuration that the PostgreSQL > documentation is showing as the format on how to set up this parameter >   > arc

Re: Database issues when adding GUI

2021-06-07 Thread Alan Hodgson
On Mon, 2021-06-07 at 09:03 -0700, Rich Shepard wrote: > The problem source is postgres telling me it cannot connect to the database > but I can do so directly using psql: > > $ psql --host salmo --user rshepard --dbname bustrac > psql: error: could not connect to server: could not connect to serv

Re: Database issues when adding GUI

2021-06-07 Thread Alan Hodgson
On Mon, 2021-06-07 at 09:22 -0700, Rich Shepard wrote: > On Mon, 7 Jun 2021, Edson Carlos Ericksson Richter wrote: > > > Are you sure it should be 127.0.1.1, not 127.0.0.1? AFAIK, localhost > > should be 127.0.0.1 > > May be an issue in /etc/hosts for "salmo" host? > > Edson, > > salmo, 127.0.0.

Re: Psql wants to use IP6 when connecting to self using tcp...

2021-06-23 Thread Alan Hodgson
On Wed, 2021-06-23 at 17:25 -0500, Jerry LeVan wrote: > > So the question is: Why does using the short name evidently cause postresql > to use the ipv6 address > and using the full name use the ipv4 address? I'm thinking this might be coming from Avahi, which might be enabled on Fedora by default

Query planner issue with preferring primary key over a better index when using ORDER BY and LIMIT

2021-12-06 Thread Alan Hodgson
I keep running into problems like these: Devs are using an ORM. It really likes to produce queries like: SELECT "shipment_import_records".* FROM "shipment_import_records" WHERE shipment_import_records"."shipment_import_id" = 5090609 ORDER BY "shipment_import_records"."id" ASC LIMIT 1; I don't kn

Re: Query planner issue with preferring primary key over a better index when using ORDER BY and LIMIT

2021-12-06 Thread Alan Hodgson
On Mon, 2021-12-06 at 10:18 -0700, Michael Lewis wrote: > What is your default_statistics_target and how accurate is that > estimate of 5668 rows? What is random_page_cost set to by the way? > > > default_statistics_target = 1000 random_page_cost = 2.0 (it's on AWS on a 9000 iops gp2 volume) P

Re: Query planner issue with preferring primary key over a better index when using ORDER BY and LIMIT

2021-12-06 Thread Alan Hodgson
On Mon, 2021-12-06 at 18:20 +0100, Francisco Olarte wrote: > > Can you post an explain analyze? To me it seems like the planner > thinks shipment_import_id is randomly distributed and the table is > well correlated with it's PK, so scanning it for the first id > should > be fast.    #explain anal

Re: Query planner issue with preferring primary key over a better index when using ORDER BY and LIMIT

2021-12-06 Thread Alan Hodgson
On Mon, 2021-12-06 at 10:19 -0700, Rob Sargent wrote: > To be clear, is it the devs or the ORM that's adding the ORDER  and > the  > LIMIT?  I'm betting on devs.  Do they need the smallest id (first > occurrance?) or do they need data common to all 5096 entries > (Name?) and > any record will do?

Re: Find missing data in a column

2021-12-29 Thread Alan Hodgson
On Wed, 2021-12-29 at 12:43 -0500, john polo wrote: > I have a database in PostgreSQL 12 on Windows. It has > 8,000,000 > rows.  > I want to copy this database to PostgreSQL 10 on Slackware Linux. I > used > this command to get the data out of the Windows database: > > "C:\Program Files\PostgreSQ

Re: Moving the master to a new server

2022-02-14 Thread Alan Hodgson
On Tue, 2022-02-15 at 08:29 +1300, Glen Eustace wrote: > I need to move my master postgresql deployment to a new server. > > I am comfortable with stopping all connections then doing a > pg_dumpall > > psql to move the databases, they are not huge so this completes in > an > acceptable time and

Re: Moving the master to a new server

2022-02-14 Thread Alan Hodgson
On Tue, 2022-02-15 at 08:58 +1300, Glen Eustace wrote: > > But upgrading that way takes too long for the master so I build a > new > server instead. So, if I shutdown both postgresql instances old and > new, > rsync the data directory and restart on the new. I should be OK ? > Should be, yeah.

Re: To all who wish to unsubscribe

2017-11-21 Thread Alan Hodgson
On Tue, 2017-11-21 at 10:52 -0800, John R Pierce wrote: > > > > > it seems to *ME* like a simpler solution to the original problem >   would have been to simply STRIP any DKIM out of the original >   messages, and continue to munge headers and footers like mail > list >  

Re: ERROR: could not load library libperl.so, PostgreSQL trying to CREATE EXTENSION plperlu

2017-11-30 Thread Alan Hodgson
On Thu, 2017-11-30 at 22:20 +, Ben Nachtrieb wrote: >   > > ...to ld.so.conf, I get: > > ERROR:  could not load library > "/var/lib/pgsql10/lib/postgresql/plperl.so": > /var/lib/pgsql10/lib/postgresql/plperl.so: undefined symbol: > Perl_xs_handshake > > SQL state: XX000 It looks to me like

Re: ERROR: could not load library libperl.so, PostgreSQL trying to CREATE EXTENSION plperlu

2017-11-30 Thread Alan Hodgson
On Thu, 2017-11-30 at 22:59 +, Ben Nachtrieb wrote: > Alan, > >   > > Thank you!  Solution: build them from source on the server? Well, it would be more maintainable to find a source for packages built for your particular OS. Or run a supported OS; that one looks pretty old. Or I guess you ca

Re: postgres not starting

2018-02-15 Thread Alan Hodgson
On Thu, 2018-02-15 at 18:21 -0600, Azimuddin Mohammed wrote: > Hello, > I am unable to start postgres on one of the server > I am getting below error "HINT: is another postmaster already running > on port 5432, if not wait a few seconds and retry" > I checked the processes nothing is running with

Re: On error mesage (0x80090325) whilst installing Apps Stack Builder

2018-02-22 Thread Alan Hodgson
> > The problem is that I keep getting the following error mesage: > > - > > --- > > A certificate verification problem was encountered whilst accessing > > https//www.postgresql.org/applications-v2.xml

Re: Delays between "connection received" and "connection authenticated" because of localhost entries in hba

2024-10-29 Thread Alan Hodgson
On Wed, 2024-10-30 at 00:15 +0530, Vijaykumar Jain wrote: > > > On Wed, 30 Oct 2024 at 00:04, Alan Hodgson > wrote: > > On Tue, 2024-10-29 at 16:30 +, Daniel Westermann (DWE) wrote: > > > Delays between "connection received" and "connection > &g

Re: Delays between "connection received" and "connection authenticated" because of localhost entries in hba

2024-10-29 Thread Alan Hodgson
On Tue, 2024-10-29 at 16:30 +, Daniel Westermann (DWE) wrote: > Delays between "connection received" and "connection authenticated" > because of localhost entries in hba Maybe check that "files" is the first mechanism for hosts lookups in nsswitch.conf. afaik dig doesn't follow the same name

Re: License question

2024-11-25 Thread Alan Hodgson
On Mon, 2024-11-25 at 22:47 +, Clay Jackson (cjackson) wrote: > > Are you willing to sign up for "maintaining" PostgreSQL in your > environment, INCLUDING things like patching, finding and fixing > bugs, upgrades, backup and recovery, and off-hours support? > Not sure what your point is, you

Re: License question

2024-11-25 Thread Alan Hodgson
On Fri, 2024-11-22 at 05:40 +, prashant sinha wrote: > Hello There, > I am looking to install PostgreSQL on a Microsoft Azure cloud VM > for a product I am developing for business purpose. Is there a free > version of PostgreSQL available which I can use without buying any > licenses? In case I