Re: errcodes.h and others not generated when compiling 13.6 on M1 Mac

2022-04-28 Thread Tom Lane
Sam Kidman writes: >> Are you using any nondefault make options? Are you invoking our Makefile >> from some make script of your own? > This all came about because we use asdf as a version manager which compiles > the versions of various programs you want to use. There's potentially a > problem w

Re: errcodes.h and others not generated when compiling 13.6 on M1 Mac

2022-04-28 Thread Tom Lane
Sam Kidman writes: > So for some reason that submake-generated-headers target isn't getting > called for us. Hmph. What "make" version are you using exactly? Are you using any nondefault make options? Are you invoking our Makefile from some make script of your own? (There are some hacks invol

Re: errcodes.h and others not generated when compiling 13.6 on M1 Mac

2022-04-28 Thread Tom Lane
Sam Kidman writes: > Ok, so apparently it's something wrong with our environments? Is it > possible something is failing silently? Any tips for how to troubleshoot? Apparently so, but it's not very clear what. You didn't answer as to what your build environment is, eg do you have any MacPorts or

Re: Whole Database or Table AES encryption

2022-04-28 Thread Bruce Momjian
On Thu, Apr 28, 2022 at 11:55:09PM +0100, Aaron Gray wrote: > On Wed, 27 Apr 2022 at 18:01, Bruce Momjian wrote: > > > > On Wed, Apr 27, 2022 at 05:21:41PM +0100, Aaron Gray wrote: > > > Hi, > > > > > > Is there any way to (virtually) encrypt whole databases or tables with > > > AES or other types

Re: Whole Database or Table AES encryption

2022-04-28 Thread Mladen Gogala
On 4/28/22 18:55, Aaron Gray wrote: On Wed, 27 Apr 2022 at 18:01, Bruce Momjian wrote: On Wed, Apr 27, 2022 at 05:21:41PM +0100, Aaron Gray wrote: Hi, Is there any way to (virtually) encrypt whole databases or tables with AES or other types of encryption ? You can use storage encryption via

Re: Whole Database or Table AES encryption

2022-04-28 Thread Aaron Gray
On Wed, 27 Apr 2022 at 18:01, Bruce Momjian wrote: > > On Wed, Apr 27, 2022 at 05:21:41PM +0100, Aaron Gray wrote: > > Hi, > > > > Is there any way to (virtually) encrypt whole databases or tables with > > AES or other types of encryption ? > > You can use storage encryption via the operating syst

Re: Is this a reasonable use for advisory locks?

2022-04-28 Thread Michael Lewis
How many of these processes do you expect to have running concurrently? How long does that API call take? Might it be better to update the customer (or in a separate table as suggested) as "catch up charge process started at" and then clear that or set completed time in another column to serialize?

Could Postgres warn about incorrect volatility class?

2022-04-28 Thread Philip Semanchuk
Hi all, I recently discovered that a custom function that I thought was being inlined was not being inlined because I had declared it IMMUTABLE, but the function body cast an enum value to text which is a STABLE operator. Once I corrected my function's definition to declare it STABLE, Postgres i

Re: int8range and index usage for <@ operator

2022-04-28 Thread KOPOSOV Sergey
On Thu, 2022-04-28 at 12:57 -0400, Tom Lane wrote: > This email was sent to you by someone outside the University. > You should only click on links or attachments if you are certain that the > email is genuine and the content is safe. > > KOPOSOV Sergey writes: > > I'm trying to understand to is t

Re: int8range and index usage for <@ operator

2022-04-28 Thread Tom Lane
KOPOSOV Sergey writes: > I'm trying to understand to is there a possibility to use an index for PG > when I have a integer column in a table and I want to execute queries with > this > integer_column <@ int8range > or > integer_column <@ int8multirange > in a where clause There's no support for

Re: Privilege error with c functions during postgresql upgrade from 11 -> 13

2022-04-28 Thread Adrian Klaver
On 4/28/22 02:08, Dives, Chloe wrote: Thanks for your reply. I am using pg_upgrade to do the upgrade In the Postgres 11 instance using psql what does: \df+ bt_index_check return. In particular under the Access privileges column. Also the output of: \du Going back to your original post, so

Re: Backing up a DB excluding certain tables

2022-04-28 Thread JORGE MALDONADO
Yes, I get a warning when running psql as follows. I will search for help in Google and PostgreSQL documentation. The warning suggests *seeing psql reference page "Notes for Windows users"*. I will do that. I had not noticed the warning. Thank you. [image: image.png] Regards, Jorge Maldonado On

Re: Backing up a DB excluding certain tables

2022-04-28 Thread Tom Lane
JORGE MALDONADO writes: >> *FYI, -n riopoderoso and the riopoderoso >> in'riopoderoso."AspNetRoleClaims"' are redundant.* > Should I remove the schema name so the exclude switch is *-T "AspNet"* > instead of *-T 'riopoderoso."AspNet"'?* No. As I explained upthread, you'd better use either

Re: parallel-processing multiple similar query tasks - any example?

2022-04-28 Thread Shaozhong SHI
Well, I guess that does not work. Never mind. Regards, David On Thursday, 28 April 2022, Alvaro Herrera wrote: > On 2022-Apr-28, Shaozhong SHI wrote: > > > Expand and explain please. > > No, thanks. > > -- > Álvaro Herrera >

int8range and index usage for <@ operator

2022-04-28 Thread KOPOSOV Sergey
Hi, I'm trying to understand to is there a possibility to use an index for PG when I have a integer column in a table and I want to execute queries with this integer_column <@ int8range or integer_column <@ int8multirange in a where clause Here is an example *** wsdb=> create temp table

RE: Privilege error with c functions during postgresql upgrade from 11 -> 13

2022-04-28 Thread Dives, Chloe
Thanks for your reply. I am using pg_upgrade to do the upgrade -Original Message- From: Adrian Klaver Sent: 27 April 2022 19:00 To: Dives, Chloe ; pgsql-general@lists.postgresql.org Subject: Re: Privilege error with c functions during postgresql upgrade from 11 -> 13 [EXTERNAL EMAIL]

Re: parallel-processing multiple similar query tasks - any example?

2022-04-28 Thread Alvaro Herrera
On 2022-Apr-28, Shaozhong SHI wrote: > Expand and explain please. No, thanks. -- Álvaro Herrera

Re: parallel-processing multiple similar query tasks - any example?

2022-04-28 Thread Shaozhong SHI
Expand and explain please. Regards, David On Thursday, 28 April 2022, Alvaro Herrera wrote: > On 2022-Apr-28, Shaozhong SHI wrote: > > > Why sleep(1)? > > It is sleeping to show that they are running concurrently. If it runs > five sleeps of one second each and the whole command lasts one secon

Re: ERROR: cursor variable must be a simple variable (LINE XX: OPEN vQuery.cursorReturn FOR )

2022-04-28 Thread Tom Lane
"Burke, William JCollins" writes: > I encountered the following error when compiling a pgsql function after an > upgrade from PostgresSQL 9.3 on RHEL7 to PostgreSQL 12.9 on RHEL8, and could > use some help from the community to figure out why. > ERROR: cursor variab

Re: Backing up a DB excluding certain tables

2022-04-28 Thread Adrian Klaver
On 4/28/22 09:57, JORGE MALDONADO wrote: Good day, Here is the output to commands suggested by *Adrian Klaver*. Encoding is the same in both client and server. Also, there are 7 tables I want to exclude. image.png The version of source DB is 11, and target version is 14. Regarding the follow

Re: parallel-processing multiple similar query tasks - any example?

2022-04-28 Thread Alvaro Herrera
On 2022-Apr-28, Shaozhong SHI wrote: > Why sleep(1)? It is sleeping to show that they are running concurrently. If it runs five sleeps of one second each and the whole command lasts one second, then all sleeps ran in parallel. Had the whole command taken five seconds, you would know that the qu

Re: ERROR: cursor variable must be a simple variable (LINE XX: OPEN vQuery.cursorReturn FOR )

2022-04-28 Thread David G. Johnston
On Thu, Apr 28, 2022 at 8:03 AM Burke, William J Collins < william.bu...@collins.com> wrote: > Hello, > > > > I encountered the following error when compiling a pgsql function after an > upgrade from PostgresSQL 9.3 on RHEL7 to PostgreSQL 12.9 on RHEL8, and > could use some help from the community

Re: parallel-processing multiple similar query tasks - any example?

2022-04-28 Thread Shaozhong SHI
No, No. Why sleep(1)? It should be all active - doing work concurrently. Regards, David On Thu, 28 Apr 2022 at 16:17, Alvaro Herrera wrote: > On 2022-Apr-28, Shaozhong SHI wrote: > > > multiple similar query tasks are as follows: > > > > select * from a_table where country ='UK' > > select *

Re: parallel-processing multiple similar query tasks - any example?

2022-04-28 Thread Alvaro Herrera
On 2022-Apr-28, Shaozhong SHI wrote: > multiple similar query tasks are as follows: > > select * from a_table where country ='UK' > select * from a_table where country='France' > and so on > > How best to parallel-processing such types of multiple similar query tasks? > > Any example available?

ERROR: cursor variable must be a simple variable (LINE XX: OPEN vQuery.cursorReturn FOR )

2022-04-28 Thread Burke, William J Collins
Hello, I encountered the following error when compiling a pgsql function after an upgrade from PostgresSQL 9.3 on RHEL7 to PostgreSQL 12.9 on RHEL8, and could use some help from the community to figure out why. ERROR: cursor variable must be a simple variable LINE XX: OPEN vQuery.cursorReturn F

Re: How to set password in psql -h -d -U command line?

2022-04-28 Thread alias
Don't Do This - PostgreSQL wiki On Thu, Apr 28, 2022 at 3:13 PM Josha Inglis wrote: > https://www.postgresql.org/docs/current/libpq-envars.html > > Either set the PGPASSWORD environment variable or set up a .pgp

Re: How to set password in psql -h -d -U command line?

2022-04-28 Thread Josha Inglis
https://www.postgresql.org/docs/current/libpq-envars.html Either set the PGPASSWORD environment variable or set up a .pgpass file Josha On Thu, 28 Apr 2022 at 19:33, Shaozhong SHI wrote: > I tried various ways to set password in psql command line, but got no luck. > > Can anyone help? > > Rega

Re: How to set password in psql -h -d -U command line?

2022-04-28 Thread Joao Miguel Ferreira
Hello, I usually use this approach: PGPASSWORD=secret psql -h 127.0.0.1 -p 5432 -U joao mydatabase it has the down side that the password is shown in the command. need to be careful about that aspect On Thu, Apr 28, 2022 at 10:33 AM Shaozhong SHI wrote: > I tried various ways to set password

Aw: How to set password in psql -h -d -U command line?

2022-04-28 Thread Karsten Hilbert
> I tried various ways to set password in psql command line, but got no luck. Have you tried all the methods that you showed in your mail or did you try others as well ? Best regards, Karsten

About postgresql-db Directory

2022-04-28 Thread Junsong Yang
Hi, A directory called postgresql-db appeared after the postgres instance was deleted. I noticed that the mounting point(/var/lib/pgdata)disappeared. But another directory called postgresql-db appeared at /var/lib/postgresql-db which preserved all the data in the previous deployment like this

How to set password in psql -h -d -U command line?

2022-04-28 Thread Shaozhong SHI
I tried various ways to set password in psql command line, but got no luck. Can anyone help? Regards, David

Re: Replication with Patroni not working after killing secondary and starting again

2022-04-28 Thread Zb B
> When the secondary starts up it should continue replicating from where > it stopped. However, it can only do this if the necessary information is > still available. If WAL files have been deleted in the mean time. it > can't replay them. There should be error messages in your logs on what > went