Re: Stats for indexes on expressions

2020-12-24 Thread Tom Lane
Shantanu Shekhar writes: > I am trying to understand how the cost for a query involving indexes on > expressions is calculated. How is the statistics on the expression > maintained? For example Postgres documentation on 'Indexes on Expressions' > mentions the following example: > CREATE INDEX p

Stats for indexes on expressions

2020-12-24 Thread Shantanu Shekhar
Hello, I am trying to understand how the cost for a query involving indexes on expressions is calculated. How is the statistics on the expression maintained? For example Postgres documentation on 'Indexes on Expressions' mentions the following example: CREATE INDEX people_names ON people ((first

Re: Problem with ssl and psql in Postgresql 13

2020-12-24 Thread Kyotaro Horiguchi
At Thu, 24 Dec 2020 11:54:32 -0500, Tom Lane wrote in > I wrote: > > Kyotaro Horiguchi writes: > >> The attached the first patch does that. > > > +1, it seems like a clear oversight that the GSSENC patches didn't adjust > > these messages. The reason SSL state is mentioned is that it's relevan

Re: Missing rows after migrating from postgres 11 to 12 with logical replication

2020-12-24 Thread Adrian Klaver
On 12/24/20 12:24 PM, Lars Vonk wrote: Well thanks for taking the time anyway. Indeed next time reduce the parts is a good idea. I would still expect though that if a logical replica misses a WAL it would stop replicating (and / or report an inconsistent state). I know this is the case with b

Re: Missing rows after migrating from postgres 11 to 12 with logical replication

2020-12-24 Thread Lars Vonk
Well thanks for taking the time anyway. Indeed next time reduce the parts is a good idea. I would still expect though that if a logical replica misses a WAL it would stop replicating (and / or report an inconsistent state). I know this is the case with binary replication (it stops replication). As

Re: pg_upgrade from 12 to 13 failes with plpython2

2020-12-24 Thread Devrim Gündüz
Hi, On Tue, 2020-11-17 at 14:30 -0800, Adrian Klaver wrote: > As a packager you are in charge of how the packaging is done. Still > announcing a change that effectively nullifies the documentation > would to me be something that should be announced somewhere else > than a list that I'm guessin

Re: created type not found in create table

2020-12-24 Thread Open _
oh, duh..  works now...  Thanks for the second pair of eyes. I thought I had ruled that out by doing a search on the type name and making sure it was the same all places... (which is a long ingrained habit). Must have searched on one of the other type names. This is my first use of such a type i

Re: created type not found in create table

2020-12-24 Thread Tom Lane
Open _ writes: >    CREATE TYPE staffadmin.staff_roll >    as ENUM ('Not yet defined', 'Everything', 'Sys Admin', 'Developer', > 'DBA', 'Security', 'Art & Apperance', 'Support', 'Manager') ; >    CREATE TYPE > ... >    psql:/tmp/psql_tmp.5133.sql:16: ERROR:  type "staffadmin.staff_role" doe

created type not found in create table

2020-12-24 Thread Open _
I'm using I have psql (PostgreSQL) 13.1 on centOS 7.1I do everything through layers of bash scripts and bash script functions. So posting all the code would be huge. The scripts run as postgres Each script step tests if that object already exists before creating Each statement is a separate call

Re: Problem with ssl and psql in Postgresql 13

2020-12-24 Thread Tom Lane
I wrote: > Kyotaro Horiguchi writes: >> The attached the first patch does that. > +1, it seems like a clear oversight that the GSSENC patches didn't adjust > these messages. The reason SSL state is mentioned is that it's relevant > to which pg_hba entry gets chosen; and once we invented "hostgss

Re: Missing rows after migrating from postgres 11 to 12 with logical replication

2020-12-24 Thread Adrian Klaver
On 12/23/20 1:40 AM, Lars Vonk wrote: The full setup is: **Before: 11 primary -> 11 hotstandby binary **During migration 11 primary -> 11 hotstandby binary   | -> 12 new instance via logical   |-> 12 new replica via binary **After migration 12 primary |-> 12 replica via binary Th

Re: Changing the data directory path before the initial configuration of PostgreSQL 10.7.1

2020-12-24 Thread Keith Christian
> The easiest way is moving /var/lib/pgsql/data under /xyz directory > (when the db is not running) and create a symlink in the original > location: > > chown postgres: /xyz > su - postgres > mv /var/lib/pgsql/data /xyz/10-data > ln -s /xyz/10-data /var/lib/pgsql/data > > Then you can use setup scr

Re: Changing the data directory path before the initial configuration of PostgreSQL 10.7.1

2020-12-24 Thread Devrim Gündüz
Hi, On Thu, 2020-12-24 at 06:35 -0700, Keith Christian wrote: > Using Postgres 10.7.1 on Fedora core 28.  Admittedly not the latest > but am helping a colleague with a production system who needs a > PostgreSQL instance on this machine. > > The default /var/lib/pgsql/data directory needs to go

Changing the data directory path before the initial configuration of PostgreSQL 10.7.1

2020-12-24 Thread Keith Christian
Hi Postgres friends, Using Postgres 10.7.1 on Fedora core 28. Admittedly not the latest but am helping a colleague with a production system who needs a PostgreSQL instance on this machine. The default /var/lib/pgsql/data directory needs to go on another partition with more space, let's call it /

Re: FATAL: could not load library "/usr/pgsql-13/lib/libpqwalreceiver.so" during replication

2020-12-24 Thread Devrim Gündüz
Hi, On Sun, 2020-12-20 at 06:23 +0530, Rambabu V wrote: > [root@node2 ~]# cat /etc/redhat-release > Red Hat Enterprise Linux Server release 7.2 (Maipo) IIRC RHEL 7 RPMs support RHEL 7.6+. Please update. Regards, -- Devrim Gündüz Open Source Solution Architect, Red Hat Certified Engineer Twitte