Re: PostgreSQL 15.10 update corrective action for ATTACH PARTITION/DETACH PARTITION

2024-11-30 Thread Paul Foerster
Hi Alvaro, > On 30 Nov 2024, at 08:41, Alvaro Herrera wrote: > > Only if you have self-referencing FKs in partitioned tables. It > would be an interesting data point to verify whether this reports > anything else. Also, I'd be really curious if your databases include > the case I'm suspicious

Re: PostgreSQL 15.10 update corrective action for ATTACH PARTITION/DETACH PARTITION

2024-11-29 Thread Paul Foerster
Hi Alvaro, > On 29 Nov 2024, at 18:15, Alvaro Herrera wrote: > > This all was to say that the query in the release notes is undoubtedly > wrong. After thinking some more about it, I think the fix is to add 1 > to the number of constraints: > > SELECT conrelid::pg_catalog.regclass AS "constrain

Re: PostgreSQL 15.10 update corrective action for ATTACH PARTITION/DETACH PARTITION

2024-11-28 Thread Paul Foerster
Hi Tom, hi Alvaro, > On 27 Nov 2024, at 19:52, Tom Lane wrote: > > Okay, so I was able to reproduce this from scratch on HEAD: great, thanks. > I doubt that there's anything actually wrong with the catalog state at > this point (perhaps Alvaro would confirm that). That leads to the > conclusi

Re: PostgreSQL 15.10 update corrective action for ATTACH PARTITION/DETACH PARTITION

2024-11-26 Thread Paul Foerster
Hi Tom, > On 26 Nov 2024, at 22:25, Tom Lane wrote: > > I would have expected an empty result too. Can you confirm that > p_ci_pipelines used to be a partition of something? Can you show us > the full DDL (or psql \d+ output) for the partitioned table it > used to be part of, and for that matt

Re: PostgreSQL 15.10 update corrective action for ATTACH PARTITION/DETACH PARTITION

2024-11-26 Thread Paul Foerster
Hi Adrian, > On 26 Nov 2024, at 17:56, Adrian Klaver wrote: > > Did you commit the statements? Yes. I have autocommit on, the psql default. > Are you using concurrent sessions to do this? No. I do this in one session. 1. select, 2. drop, 3. add, 4. select. > When you run the query again do y

Re: DB Switchover using repmgr--Error

2024-11-26 Thread Paul Foerster
Hi, > [postgres@post1 bin]$ ./repmgr -f /var/lib/pgsql/repmgr.conf primary register > ERROR: following errors were found in the configuration file: > syntax error in file "/var/lib/pgsql/repmgr.conf" line 3, near token > "data_directory" > syntax error in file "/var/lib/pgsql/repmgr.conf" lin

PostgreSQL 15.10 update corrective action for ATTACH PARTITION/DETACH PARTITION

2024-11-26 Thread Paul Foerster
Hi, I have a question regarding the recent security update for PostgreSQL 15. We have a gitlab database. It used to run on the PostgreSQL 15.8 software. I updated from 15.8 to 15.10 and executed the corrective actions as outlined in: https://www.postgresql.org/about/news/postgresql-171-165-159-

PostgreSQL 15.9 Update: Partitioned tables with foreign key constraints

2024-11-19 Thread Paul Foerster
Hi, the PostgreSQL 15.9 release notes instruct to look out for especially detached partitions with foreign key constraints. I'm in the process of updating our databases from 15.8 to 15.9 now and found a case where the select statement returns a constraint. The release notes say nothing about w

Re: PostgreSQL 15.9 Update: Partitioned tables with foreign key constraints

2024-11-19 Thread Paul Foerster
Hi Alvaro, > On 19 Nov 2024, at 17:34, Alvaro Herrera wrote: > > It doesn't really matter when you do it, because the constraint only > gets broken by running DETACH with the old server code. You have > already run the DETACH sometime in the past (that's how the constraint > got broken), which

Re: PostgreSQL 15.9 Update: Partitioned tables with foreign key constraints

2024-11-19 Thread Paul Foerster
Hi Adrian, > On 19 Nov 2024, at 17:17, Adrian Klaver wrote: > > Read this: > > https://www.postgresql.org/about/news/out-of-cycle-release-scheduled-for-november-21-2024-2958/ > > and hold off awhile. Thanks very much. I will. Cheers, Paul

Re: PostgreSQL 15.9 Update: Partitioned tables with foreign key constraints

2024-11-19 Thread Paul Foerster
Hi Tom, > On 19 Nov 2024, at 17:25, Tom Lane wrote: > > Generally speaking, our release notes are addressed to someone who's > already installed the update (or a later one). Thank you for the advice. Cheers, Paul

Re: glibc updarte 2.31 to 2.38

2024-09-25 Thread Paul Foerster
Hi Adrian, > On 22 Sep 2024, at 18:53, Adrian Klaver wrote: > > https://www.postgresql.org/docs/17/release-17.html#RELEASE-17-HIGHLIGHTS > > Add a builtin platform-independent collation provider (Jeff Davis) > > This supports C and C.UTF-8 collations. I must admit that I haven't read the read

Re: glibc updarte 2.31 to 2.38

2024-09-21 Thread Paul Foerster
Hi Peter, > On 21 Sep 2024, at 00:33, Peter J. Holzer wrote: > > I don't use SLES but I would expect it to have an RPM for it. > > If you have any test machine which you can upgrade before the production > servers (and given the amount of data and availability requirements you > have, I really

Re: glibc updarte 2.31 to 2.38

2024-09-19 Thread Paul Foerster
Hi Joe, > On 19 Sep 2024, at 20:09, Joe Conway wrote: > > See my thread-adjacent email, but suffice to say that if there are collation > differences that do affect your tables/data, and you allow any inserts or > updates, you may wind up with corrupted data (e.g. duplicate data in your > othe

Re: glibc updarte 2.31 to 2.38

2024-09-19 Thread Paul Foerster
Hi Peter, > On 19 Sep 2024, at 19:43, Peter J. Holzer wrote: > > I wrote a small script[1] which prints all unicode code points and a few > selected[2] longer strings in order. If you run that before and after > the upgrade and the output doesn't change, you are probably be fine. > (It checks on

Re: glibc updarte 2.31 to 2.38

2024-09-19 Thread Paul Foerster
Hi Joe, > On 19 Sep 2024, at 19:07, Joe Conway wrote: > > Every glibc major version change potentially impacts the sorting of some > strings, which would require reindexing. Whether your actual data trips into > any of these changes is another matter. > > You could check by doing something eq

Re: glibc updarte 2.31 to 2.38

2024-09-19 Thread Paul Foerster
Hi Tom, > On 19 Sep 2024, at 17:14, Tom Lane wrote: > > No, I wouldn't expect that to be necessary. I was hoping one of the pros would say that. 🤣 > Maybe. We don't really track glibc changes, so I can't say for sure, > but it might be advisable to reindex indexes on string columns. Advisabl

Re: glibc updarte 2.31 to 2.38

2024-09-19 Thread Paul Foerster
Hi Adrian, > On 19 Sep 2024, at 17:00, Adrian Klaver wrote: > > I would take a look at: > > https://wiki.postgresql.org/wiki/Locale_data_changes > > It refers to the glibc 2.8 change in particular, but includes some generic > tips that could prove useful. > > > The glibc change log below mi

glibc updarte 2.31 to 2.38

2024-09-19 Thread Paul Foerster
Hi, we have SLES 15.5 which has glibc 2.31. Our admin told us that he's about to install the SLES 15.6 update which contains glibc 2.38. I have built our PostgreSQL software from source on SLES 15.5, because we have some special requirements which the packages cannot fulfill. So I have questio

Re: Automatic failover

2020-03-17 Thread Paul Foerster
Hi Sonam, On Tue, Mar 17, 2020 at 11:30 AM Sonam Sharma wrote: > > I have setup replication using repmgr. Wanted to know how much time the slave > node will take to become new primary ?? If any document, can someone please > share of auto failover. With automatic failover, how much time the sl

Re: select * from test where name like 'co_%'

2020-03-10 Thread Paul Foerster
Hi, an underscore matches a single character, any character. You'd have to escape it and tell the query what the escape character is if you want it to be treated as a standard character: db=# create table t(t text); CREATE TABLE db=# insert into t(t) values ('fox'), ('fo_'), ('fo_x'); INSERT 0 3

Re: pg_dump and public schema

2020-03-04 Thread Paul Foerster
Hi, I think "create database" always creates the "public" schema. So, all is well. All you have to do is drop it after running the dump.sql script. Cheers, Paul On Wed, Mar 4, 2020 at 2:43 PM Олег Самойлов wrote: > > Hi all. PostgresQL 12.1. Strange behaviour with pg_dump and absent public > s