Re: After upgrading libpq, the same function(PQftype) call returns a different OID

2025-03-20 Thread David G. Johnston
On Thu, Mar 20, 2025 at 11:54 AM Tom Lane wrote: > =?utf-8?Q?=C3=81lvaro?= Herrera writes: > > That said, we could add a comment that makes this more obvious: > > ... > > This looks a tad redundant in pg_type.h itself, but makes the generated > > pg_type_d.h file more obvious: > > I think it's a

Re: After upgrading libpq, the same function(PQftype) call returns a different OID

2025-03-20 Thread Álvaro Herrera
On 2025-Mar-20, David G. Johnston wrote: > Yes, that blank line separating LSNOID and BOOLOID blocks the comment from > applying to the items after the blank line. That is a fairly common > convention, using whitespace to break things up. Also, assigning one macro > to another is quite distinct

Re: After upgrading libpq, the same function(PQftype) call returns a different OID

2025-03-20 Thread David G. Johnston
On Thu, Mar 20, 2025 at 8:42 AM Sebastien Flaesch wrote: > > */** > * * Backwards compatibility for ancient random spellings of pg_type OID > macros.* > * * Don't use these names in new code.* > * */* > #define CASHOID MONEYOID > #define LSNOID PG_LSNOID > > #define BOOLOID 16 > #define BYTEAOID

Re: Export operation efficiency in read replica

2025-03-20 Thread Laurenz Albe
On Thu, 2025-03-20 at 18:28 +0530, Siraj G wrote: > As per my understanding coming to a proper conclusion wrt RPO with > export operation is challenging. Eg., the export started at x and > ended at z, the time stamp here for many data sets is different. > Moreover, I do not think there is an increm

Re: After upgrading libpq, the same function(PQftype) call returns a different OID

2025-03-20 Thread Dominique Devienne
On Thu, Mar 20, 2025 at 4:43 PM Sebastien Flaesch wrote: > OR ( I guess I start to understand the code... ) it this comment only for: > #define CASHOID MONEYOID > #define LSNOID PG_LSNOID That's what Tom already replied, yes. --DD

Re: After upgrading libpq, the same function(PQftype) call returns a different OID

2025-03-20 Thread Sebastien Flaesch
Tom, They are. You were already pointed to it. The fact that you don't like how that file's name is spelled is not really going to impress anyone. I don't care about the .h file name or location, what scares me is this: /* * Backwards compatibility for ancient random spellings of pg_type OID mac

Re: Need help understanding has_function_privilege

2025-03-20 Thread David G. Johnston
On Wednesday, March 19, 2025, Cosimo Simeone wrote: > > > true? > Well... Ok, "whatever"... I revoke it: > =# revoke execute on function my_schema.my_func(text) from my_user; > REVOKE > Roles can inherit privileges. my_user is inheriting its execute privilege from PUBLIC. You have to revoke a g

Re: After upgrading libpq, the same function(PQftype) call returns a different OID

2025-03-20 Thread Tom Lane
Sebastien Flaesch writes: > Native PostgreSQL built-in SQL types should be listed in a .h header of the C > client API They are. You were already pointed to it. The fact that you don't like how that file's name is spelled is not really going to impress anyone. regards,

Re: Postgres incremental database updates thru CI/CD

2025-03-20 Thread Adrian Klaver
On 3/19/25 11:07, Puspendu Panda wrote: Hi , As my organization started working on postgres database,We are facing some difficulties in creating CI/CD pipeline for deployment updated script(the updated changes after base line database) .Earlier we used sql server database and in sqlserver we h

Re: Export operation efficiency in read replica

2025-03-20 Thread Ron Johnson
On Thu, Mar 20, 2025 at 7:52 AM Siraj G wrote: > Hello Experts! > > I have a DB with 1TB in size serving needs of one of our critical > applications. I have a requirement to take export of the DB on a daily > basis, but want to carry out this operation in read replica. The postgresql > version is

Re: Need help understanding has_function_privilege

2025-03-20 Thread Joe Conway
On 3/19/25 04:24, Cosimo Simeone wrote: Hi! I'd need help understanding what i am doing wrong... Where am I: =# \c psql (15.8 (Homebrew), server 14.15 (Debian 14.15-1.pgdg120+1)) You are now connected to database "postgres" as user "postgres". Init: =# create role my_user; =# create schema my_s

How to convert wal log to sql commands starting from specified time

2025-03-20 Thread Andrus
Hi! Postgres 14 hot standby server server is running in Debian Linux under WSL. It saves wal log from master to pg_wal directory. wal_keep size is 100GB. Command  pg_recvlogical -P pgoutput -o proto_version=1 -o publication_names=koiktabelid_pub --create-slot --start --slot=naitategevust -

Re: Bloated toast table with empty associated table

2025-03-20 Thread Paul Allen
> It's the general principle that the _scale_factor defaults are in my > experience too high. Sorry, didn't mentioned Ok, thanks, I will use the cron task. It's toast behaviour still seems odd to me. Is there a way to prevent this behaviour at all, to not store rows which were failed to insert?

Re: Export operation efficiency in read replica

2025-03-20 Thread Siraj G
Hello Laurenz As per my understanding coming to a proper conclusion wrt RPO with export operation is challenging. Eg., the export started at x and ended at z, the time stamp here for many data sets is different. Moreover, I do not think there is an incremental way available for export, correct? P

Re: Bloated toast table with empty associated table

2025-03-20 Thread Ron Johnson
On Thu, Mar 20, 2025 at 8:45 AM Paul Allen wrote: > > It's the general principle that the _scale_factor defaults are in my > experience too high. > Sorry, didn't mentioned > > Ok, thanks, I will use the cron task. > > It's toast behaviour still seems odd to me. Is there a way to prevent > this be

Re: Bloated toast table with empty associated table

2025-03-20 Thread Ron Johnson
On Thu, Mar 20, 2025 at 8:22 AM Paul Allen wrote: > > Instantaneously and repeatedly, while ignoring the error? > Yes, that's how it should work and I probably can't do anything about it. > > > Your _scale_factor values are too high. Drop them down to about 5%. > > Okay, but what about altering

Re: Bloated toast table with empty associated table

2025-03-20 Thread Paul Allen
> Instantaneously and repeatedly, while ignoring the error? Yes, that's how it should work and I probably can't do anything about it. > Your _scale_factor values are too high. Drop them down to about 5%. Okay, but what about altering controlzone_passage table, where I set all _scale_factor value

Re: Export operation efficiency in read replica

2025-03-20 Thread Laurenz Albe
On Thu, 2025-03-20 at 17:22 +0530, Siraj G wrote: > I have a DB with 1TB in size serving needs of one of our critical > applications. I have a requirement to take export of the DB on a > daily basis, but want to carry out this operation in read replica. > The postgresql version is: 16.6 > > What w

Export operation efficiency in read replica

2025-03-20 Thread Siraj G
Hello Experts! I have a DB with 1TB in size serving needs of one of our critical applications. I have a requirement to take export of the DB on a daily basis, but want to carry out this operation in read replica. The postgresql version is: 16.6 What would be the RPO of such backup? What would be

Re: After upgrading libpq, the same function(PQftype) call returns a different OID

2025-03-20 Thread Luca Ferrari
On Thu, Mar 20, 2025 at 8:18 AM Sebastien Flaesch wrote: > > Let's not deviate from my request: > > I have implemented various DB client modules using the C client APIs, for > Oracle DB, SQL Server, IBM DB2, MySQL/MariaDB, SQLite and PostgreSQL. > Good for you! I don't think anybody is trying to

Need help understanding has_function_privilege

2025-03-20 Thread Cosimo Simeone
Hi! I'd need help understanding what i am doing wrong... Where am I: =# \c psql (15.8 (Homebrew), server 14.15 (Debian 14.15-1.pgdg120+1)) You are now connected to database "postgres" as user "postgres". Init: =# create role my_user; =# create schema my_schema; =# create function my_schema.my_fun

Postgres incremental database updates thru CI/CD

2025-03-20 Thread Puspendu Panda
Hi , As my organization started working on postgres database,We are facing some difficulties in creating CI/CD pipeline for deployment updated script(the updated changes after base line database) .Earlier we used sql server database and in sqlserver we have one option called DACPAC(Data-tier Applic

Re: Cannot pg_dump_all anymore...

2025-03-20 Thread E-BLOKOS
On 3/18/2025 3:59 AM, Ron Johnson wrote: On Tue, Mar 18, 2025 at 5:14 AM E-BLOKOS wrote: I got this error: pg_dump: error: query returned 0 rows instead of one: EXECUTE dumpBaseType('794978') any clue to solve it? PG version? PG 17.4 Whole command line, including all err

Re: Cannot pg_dump_all anymore...

2025-03-20 Thread E-BLOKOS
On 3/18/2025 5:49 AM, Greg Sabino Mullane wrote: First figure out which database is having that issue, by using pg_dump --schema-only on each database in turn. Then run this SQL on the database giving the error to see if the type exists, or what is nearby: select oid, typname, typtype, typnam

Re: After upgrading libpq, the same function(PQftype) call returns a different OID

2025-03-20 Thread Sebastien Flaesch
Let's not deviate from my request: I have implemented various DB client modules using the C client APIs, for Oracle DB, SQL Server, IBM DB2, MySQL/MariaDB, SQLite and PostgreSQL. While I like PostgreSQL a lot, this is the only case where I have to define myself the column type ids, to implement