Re: Re : Credcheck extension

2024-11-19 Thread 張宸瑋
Thank you for your help.Problem solved! Adrian Klaver 於 2024年11月20日 週三,下午12:04寫道: > On 11/19/24 19:01, 張宸瑋 wrote: > > Thank you for your help!After applying the patch, the above issue has > > been resolved. > > > > I have another question: After identifying who is in the banned_role, > > the Gi

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: Help with restoring database from old version of PostgreSQL

2024-11-19 Thread Ron Johnson
Ah, so it's a plain old SQL file. That makes things much easier!! Here's the thing: PG (whether 9.6 or 16 or 17) is the database engine; no GUI, and just a basic command line interface. PgAdmin4 is a GUI interface to PG. Newer versions of PgAdmin4 are not compatible with EOL PG versions like 9.6

Re: Re : Credcheck extension

2024-11-19 Thread Adrian Klaver
On 11/19/24 19:01, 張宸瑋 wrote: Thank you for your help!After applying the patch, the above issue has been resolved.  I have another question: After identifying who is in the banned_role, the GitHub example uses the command SELECT pg_banned_role_reset(); to unlock everyone. I would like to kno

Re: Re : Credcheck extension

2024-11-19 Thread 張宸瑋
Thank you for your help!After applying the patch, the above issue has been resolved. I have another question: After identifying who is in the banned_role, the GitHub example uses the command SELECT pg_banned_role_reset(); to unlock everyone. I would like to know if there is a way to unlock a spec

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

Running docker in postgres, SHM size of the docker container in postgres 16

2024-11-19 Thread Koen De Groote
Hello all, Assume a machine with 16 CPU cores and 64GB of RAM. 300 max connections. Postgres is running here, inside a docker container. Docker containers receive a small amount of shared memory from /dev/shm Experience teaches that the default 64MB of /dev/shm for the postgres container, is not

Re: Running docker in postgres, SHM size of the docker container in postgres 16

2024-11-19 Thread Thomas Munro
On Wed, Nov 20, 2024 at 11:22 AM Koen De Groote wrote: > Why would that be? It's the exact same data. The install is about 50GB in > size. Is there something wrong with postgres 16, or did some settings > significantly change, that I need to know about? I went over all the > changelogs, nothing

Re: Help with restoring database from old version of PostgreSQL

2024-11-19 Thread Adrian Klaver
On 11/19/24 14:13, Catherine Frock wrote: Do you know what versions of PG and pgAdmin4 I need? Also, I don't know where to get a different version of PG. You need to take a step back and take stock of where you started and where you want to be. To that end answer the following: 1) What ar

Re: Help with restoring database from old version of PostgreSQL

2024-11-19 Thread Catherine Frock
Do you know what versions of PG and pgAdmin4 I need? Also, I don't know where to get a different version of PG. -- Arden On Tue, Nov 19, 2024 at 5:01 PM Ron Johnson wrote: > Ah, so it's a plain old SQL file. That makes things much easier!! > > Here's the thing: PG (whether 9.6 or 16 or 17) is

Re: Help with restoring database from old version of PostgreSQL

2024-11-19 Thread Catherine Frock
I am trying to restore a previously backed up database .sql file that was created in PostgreSQL 9.6 using pgAdmin4 (I'm not sure which version I was using). In response to Ron: Do I need to use PG16 instead of pgAdmin4? And if so, can you please provide a website where I can download PG16? In res

Re: Help with restoring database from old version of PostgreSQL

2024-11-19 Thread Ron Johnson
You say that you just installed PG17. That's perfectly fine. If pgAdmin4 version 8.12 is recent, then it's fine to use that, too. The thing is that sql files are just... a bunch of SQL statements. Whatever SQL is generated by v9.6 will be easily processed by a modern version. On Tue, Nov 19, 2

Re: Help with restoring database from old version of PostgreSQL

2024-11-19 Thread Adrian Klaver
On 11/19/24 1:47 PM, Catherine Frock wrote: I am trying to restore a previously backed up database .sql file that was created in PostgreSQL 9.6 using pgAdmin4 (I'm not sure which version I was using). In response to Ron: Do I need to use PG16 instead of pgAdmin4? And if so, can you please

Re: Functions and Indexes

2024-11-19 Thread Laurenz Albe
On Tue, 2024-11-19 at 14:30 +0100, Moreno Andreo wrote: > Inhttps://www.cybertec-postgresql.com/en/join-strategies-and-performance-in-postgresql/ >  you say >  "Note that for inner joins there is no distinction between the join > condition and the WHERE condition, but that doesn't hold for outer

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: PostgreSQL 15.9 Update: Partitioned tables with foreign key constraints

2024-11-19 Thread Alvaro Herrera
Hi Paul, On 2024-Nov-19, Paul Foerster wrote: > 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 co

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

2024-11-19 Thread Tom Lane
Paul Foerster writes: > 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 relea

Re: Functions and Indexes

2024-11-19 Thread Moreno Andreo
On 19/11/24 12:34, Laurenz Albe wrote: On Tue, 2024-11-19 at 11:53 +0100, Moreno Andreo wrote: What about if query becomes SELECT foo1, foo2 FROM bar WHERE (POSITION(foo1 IN 'blah blah') >0) You could create an index like     CREATE INDEX ON bar (position(foo1 IN 'blah blah')); Alternative

Specifying columns returned by a function, when the function is in a SELECT column list?

2024-11-19 Thread Ron Johnson
It's trivial to specify columns when a table-returning function is the FROM clause, but how does one specify columns when the table-returning function is a column in a SELECT clause? I don't have the proper vocabulary to know what to Google for. Examples below: Easy: cdsbmop=# select downstream_

Re: Re : Credcheck extension

2024-11-19 Thread 張宸瑋
Sorry for the inconvenience, but I used make and make install to build the credcheck--2.8.0.sql sources zip file. I would like to ask how I can update and apply the changes to the system, as I modified the files in credcheck/test/expected/06_reuse_interval.out and credcheck/test/sql/06_reuse_interv

Re: Functions and Indexes

2024-11-19 Thread Laurenz Albe
On Tue, 2024-11-19 at 11:53 +0100, Moreno Andreo wrote: > > > What about if query becomes > > > SELECT foo1, foo2 FROM bar WHERE (POSITION(foo1 IN 'blah blah') >0) > > > > You could create an index like > > > >     CREATE INDEX ON bar (position(foo1 IN 'blah blah')); > > > > Alternatively, you co

Re: Functions and Indexes

2024-11-19 Thread Moreno Andreo
On 18/11/24 20:05, Laurenz Albe wrote: On Mon, 2024-11-18 at 15:37 +0100, Moreno Andreo wrote: I'm creating indexes for some tables, and I came across a doubt. If a column appears in the WHERE clause (and so it should be placed in index), in case it is "processed" in a function (see below),

Re: Functions and Indexes

2024-11-19 Thread Moreno Andreo
On 18/11/24 15:43, Gianni Ceccarelli wrote: On Mon, 18 Nov 2024 15:37:57 +0100 Moreno Andreo wrote: If a column appears in the WHERE clause (and so it should be placed in index), in case it is "processed" in a function (see below), is it possible to insert this function to further narrow do