Postgres Logical Replication - how to see what subscriber is doing with received data?

2024-08-30 Thread Michael Jaskiewicz
I've got two Postgres 13 databases on AWS RDS. * One is a master, the other a slave using logical replication. * Replication has fallen behind by about 350Gb. * The slave was maxed out in terms of CPU for the past four days because of some jobs that were ongoing so I'm not sure what l

Re: ANALYZE on partitioned tables vs on individual partitions

2024-08-07 Thread Michael Harris
E. Regards Mike On Wed, 7 Aug 2024 at 18:09, David Rowley wrote: > > On Wed, 7 Aug 2024 at 19:20, Michael Harris wrote: > > I found that running an ANALYZE specifying only those 4 columns only took > > 5 minutes, compared to the 30 minutes for the whole table. > > > > T

Re: ANALYZE on partitioned tables vs on individual partitions

2024-08-07 Thread Michael Harris
Many thanks David for the comprehensive response. > I think the complaint was about no autovacuum on the partitioned > table, not the partitions. Yes, exactly. One other piece of information: these tables contain a lot of columns, of which only 4 are normally used for WHERE clauses or joins. The

ANALYZE on partitioned tables vs on individual partitions

2024-08-06 Thread Michael Harris
Hello Experts, Our application has a database with a large number of partitioned tables used to store time series data. It is partitioned by time: new data is populated into the current partition, old partitions eventually get dropped, and the partitions in between are largely static. I had not

Re: Re. Select with where condition times out

2024-07-20 Thread Michael Nolan
On Thu, Jul 18, 2024 at 4:38 AM sivapostg...@yahoo.com wrote: > > Hello, > PG V11 > > Select count(*) from table1 > Returns 10456432 > > Select field1, field2 from table1 where field3> '2024-07-18 12:00:00' > Times out > > The above query was working fine for the past 2 years. > > Backup was taken

Re: Declaring a field that is also an out parameter in a function

2024-07-07 Thread Michael Nolan
On Sun, Jul 7, 2024 at 4:13 AM Pavel Stehule wrote: > > but looks so there are false alarms related to using an alias. It is > interesting so I have not any report about this issue, so probably using > aliases is not too common today. I'm not sure why there's a warning about using an alias. 43.

Declaring a field that is also an out parameter in a function

2024-07-06 Thread Michael Nolan
In the following short code, the out parameter d3 is also declared, so its value will be null in the output. create or replace function public.test_function(in varchar, in char, in date, ou t d1 text, out d2 integer, out d3 char, out d4 date ) stable as $$ DECLARE wk_intxt alias for $1; wk

Re: Alignment check

2024-07-06 Thread Michael Nolan
I don't have any direct experience with Yugabyte (the databases I work with are way too small to be on Yugabyte) but my older son does work for them as an SRE, sometimes remotely when he's visiting us, so we've talked about it a bit. (It's actually the first time in 20 years I've had much of a clu

RE: Removing the default grant of EXECUTE on functions/procedures to PUBLIC

2024-07-05 Thread Tefft, Michael J
d a default =X/rolename. Examining \ddp and its underlying quuery, I see that view column pg_default_acl gets a new row with defaclacl populated after the ALTER DEFAULT PRIVILEGES. Thanks very much for your guidance, I am on track now. Mike Tefft From: Tom Lane Sent: Friday, July 5, 2024 2:2

RE: Removing the default grant of EXECUTE on functions/procedures to PUBLIC

2024-07-05 Thread Tefft, Michael J
be checking instead? Thanks, Mike Tefft From: Tom Lane Sent: Friday, July 5, 2024 10:51 AM To: Tefft, Michael J Cc: pgsql-general@lists.postgresql.org Subject: Re: Removing the default grant of EXECUTE on functions/procedures to PUBLIC "Tefft, Michael J" writes: > I am trying t

Removing the default grant of EXECUTE on functions/procedures to PUBLIC

2024-07-05 Thread Tefft, Michael J
I am trying to remove the default grant of EXECUTE on all functions/procedures to PUBLIC. >From my reading, there is no straightforward way to do this. For example, ALTER DEFAULT PRIVILEGES REVOKE EXECUTE ON FUNCTIONS FROM PUBLIC; Does not apply this across the entire cluster (or database) but onl

Re: --frokbackend process

2024-06-26 Thread Michael Paquier
uld begin some sort of investigation, for example, to know what is happening to your system and figure out if there is even something wrong going on. Thanks, -- Michael signature.asc Description: PGP signature

Re: ERROR: could not attach to dynamic shared area

2024-06-26 Thread Michael Paquier
d for it today by me down to v15. This will show up in the next round of minor releases. -- Michael signature.asc Description: PGP signature

Can you refresh a materialized view from a materialized view on another server?

2024-04-18 Thread Michael Nolan
My production server has a materialized view that is refreshed from a mysql_fdw several times a day. What I'd like to be able to do is refresh the materialized view on the testbed server from the one on the production server so that they are the same. (Refreshing it from the MySQL server will res

Foreign Key error between two partitioned tables

2024-04-18 Thread Michael Corey
OREIGN KEY (par_file_id) REFERENCES par_log_file(par_file_id); Version Postgres 13.13 Any help would be appreciated/ -- Michael Corey

Re: recovery.signal not being removed when recovery complete

2024-04-03 Thread Michael Paquier
two .signal files when promotion is achieved would be a problem to me because we'd reenter recovery again at a follow-up startup. ArchiveRecoveryRequested should be set if there was either recovery.signal or standby.signal found at startup, meaning that we should have a TLI jump at promotion

RE: alter table xxx alter column yyy set (n_distinct=nnnn );

2024-03-11 Thread Tefft, Michael J
where schemaname='sss' and tablename='xxx' and attname = ‘col1’; So setting n_distinct on the column at the parent/partitioned-table level is not relevant for this. Thanks again. Mike Tefft From: Greg Sabino Mullane Sent: Monday, March 11, 2024 12:23 PM To: Laurenz Albe

RE: alter table xxx alter column yyy set (n_distinct=nnnn );

2024-03-11 Thread Tefft, Michael J
negative, but none carry the value I attempted to set Thanks, Mike Tefft -Original Message- From: Laurenz Albe Sent: Monday, March 11, 2024 9:21 AM To: Tefft, Michael J ; pgsql-general@lists.postgresql.org Subject: Re: alter table xxx alter column yyy set (n_distinct= ); On Mon

alter table xxx alter column yyy set (n_distinct=nnnn );

2024-03-11 Thread Tefft, Michael J
I have been struggling to set n_distinct on a few table columns, and confirm that my changes have actually been accepted. I have a 400-million row table with 81 partitions. PostgreSQL version is 14.11. Column p_id has 13 million distinct values but pg_stats says n_distinct is only 82k. Column pi

Re: Identity and Sequence

2024-02-16 Thread Michael Corey
sync? On Fri, Feb 16, 2024 at 11:35 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Fri, Feb 16, 2024 at 9:24 AM Michael Corey < > michael.corey...@nielsen.com> wrote: > >> If I run these two statements I get an error >> ERROR: relation "part_t

Identity and Sequence

2024-02-16 Thread Michael Corey
ations of this ALTER TABLE statement and none seem to work. What is the proper way to reattach the identity and the sequence bearing in mind that I will load the new table with the data from the old table? -- Michael Corey

Re: support fix query_id for temp table

2024-02-01 Thread Michael Paquier
RangeVar, so there is no "easy" way to tackle that :/ -- Michael signature.asc Description: PGP signature

Re: field error on refreshed materialized view

2024-01-27 Thread Michael Nolan
Followup: The problem turned out to be a field in the mysql server that was not size-limited to 255 characters and had several rows with as many as 299 characters in them. Apparently when using an FDW and materialized view in postgresql 10.4, field size limits aren't checked, because a query on t

Re: field error on refreshed materialized view

2024-01-25 Thread Michael Nolan
On Thu, Jan 25, 2024 at 3:38 PM Tom Lane wrote: > > Michael Nolan writes: > > On the 10.4 server this materialized view works, but on the 16.1 > > server it fails: > > > uscf=# refresh materialized view uscf_vip; > > refresh materialized view uscf_vip; &

field error on refreshed materialized view

2024-01-25 Thread Michael Nolan
I'm in the process of updating a server from postgresql 10.4 on Centos 7 to 16.1 on AlmaLInux 9, and am reminded of the old line about when you're up to your necks in alligators, it is difficult to remember that your goal was to drain the swamp. We have several materialized views that are refreshe

Re: undefined symbol when installing pgcrypto on 16.1

2024-01-24 Thread Michael Nolan
No, it wasn't there, because I hadn't included --with-openssl in the configure. Looking at my history, I had done that once earlier but dropped it for the reason noted below. Including --with-openssl does include the crypto library, but if I don't do a 'make clean' before doing a make, I get erro

Re: undefined symbol when installing pgcrypto on 16.1

2024-01-24 Thread Michael Nolan
Sorry, I meant 'make check'. :sigh:

Re: undefined symbol when installing pgcrypto on 16.1

2024-01-24 Thread Michael Nolan
Writing or debugging makefiles is something I haven't done much of, but as best I can figure out the problem is that the libcrypto.so file isn't being linked in, though this line in the Makefile in pgcrypto seems to say should be: SHLIB_LINK += $(filter -lcrypto -lz, $(LIBS)) I'm guessing it is s

Re: undefined symbol when installing pgcrypto on 16.1

2024-01-18 Thread Michael Nolan
On Thu, Jan 18, 2024 at 9:51 AM Tom Lane wrote: > > Looks like we have aarch64 and ppc64 machines running Alma 8 and 9. > No x86 though, which might matter for such a low-level failure > as this. So I guess that'll be on the list to add to the build farm at some point? (My Xanthian 'talent' of f

Re: undefined symbol when installing pgcrypto on 16.1

2024-01-18 Thread Michael Nolan
On Thu, Jan 18, 2024 at 5:03 AM Daniel Gustafsson wrote: > > > On 18 Jan 2024, at 00:59, Michael Nolan wrote: > > On Wed, Jan 17, 2024 at 5:32 PM Daniel Gustafsson wrote: > >> > > That's surprising, I expected that it would require the legacy provider be

Re: undefined symbol when installing pgcrypto on 16.1

2024-01-17 Thread Michael Nolan
On Wed, Jan 17, 2024 at 5:32 PM Daniel Gustafsson wrote: > > > On 18 Jan 2024, at 00:24, Michael Nolan wrote: > > > > Sorry for the delay in responding, network issues kept me offline for > > several days. > > > > These are the openssl packages inst

Re: undefined symbol when installing pgcrypto on 16.1

2024-01-17 Thread Michael Nolan
Sorry for the delay in responding, network issues kept me offline for several days. These are the openssl packages installed from the Almalinux 9 repositories: apr-util-openssl.x86_64 1.6.1-23.el9 @appstream openssl.x86_641:3.0.7-24.el9

undefined symbol when installing pgcrypto on 16.1

2024-01-11 Thread Michael Nolan
This is on AlmaLinux 9.3, installing postgresql from source code. In PG 16.1 when I try to install pgcrypto, the modules compile but I get this error when running checks: CREATE EXTENSION pgcrypto; +ERROR: could not load library "/home/postgres/src/postgresql-16.1/tmp_install/usr/local/pgsql/li

Re: Time zone offset in to_char()

2024-01-11 Thread michael
har(now() at time zone 'Europe/Amsterdam', '-MM-DD HH24:MI:SS.US0 TZH:TZM'); to_char ---- 2024-01-11 16:24:52.8736860 +00:00 (1 row) At least it seems to do what you need. Regards, Michael > > I'm dealing with a data virt

Re: Logical replication breaks: "unexpected duplicate for tablespace 0, relfilenode 2774069304"

2024-01-02 Thread Michael Paquier
tails, and work on fixing the issue. -- Michael signature.asc Description: PGP signature

looking for mariadb-devel to install mysql_fdw_16 in AlmaLinux 9

2023-12-26 Thread Michael Nolan
I'm trying to install mysql_fdw_16 and it requires the mariadb-devel module. There is no mariadb-devel module for Almalinux 9. There is a MariaDB-devel module, but when I install it, the install for mysql_fdw_16 still tells me that there is no mariadb-devel module available. How do I work around

Re: Logical replication breaks: "unexpected duplicate for tablespace 0, relfilenode 2774069304"

2023-12-23 Thread Michael Paquier
have here is that we've lost track of the patch proposed, so I have added a CF entry for now: https://commitfest.postgresql.org/46/4720/ -- Michael signature.asc Description: PGP signature

Re: pg_checksums?

2023-10-29 Thread Michael Paquier
plicated to the standby. - Promote the standby. - Enable checksums on the previous primary. - Start the previous primary to be a standby of the node you failed over to. -- Michael signature.asc Description: PGP signature

Re: REINDEX in tables

2023-10-25 Thread Michael Paquier
or older snapshots held by concurrent sessions when the index build is finished and when the index built gets validated. -- Michael signature.asc Description: PGP signature

Re: Presentation tools used ?

2023-10-22 Thread Michael Nolan
Sorry for the top posting, I forget that Gmail does that by default. Mike Nolan

Re: Presentation tools used ?

2023-10-22 Thread Michael Nolan
To add to what Steve has said, see if you can find a room with equipment similar to what you'll be using for the actual presentation to practice in. Put up your most complex slide, then take a seat in the back of the room and imagine what it'll look like with a room full of people in front of you.

Fwd: Need efficient way to remove (almost) duplicate rows from a table

2023-10-17 Thread Michael Nolan
I'm not clear which rows are duplicates. It looks like limb_id, branch_id and twig_id make up a unique key. If there was a row (2, 2, 7,103.7) would it be a duplicate of rows (1,1,2,103.7) and (1,1,3,103.7)? -- MIke Nolan

Re: Change error code severity for syslog?

2023-10-11 Thread Michael Paquier
y to them. I have an example of this kind of idea in one of my plugin modules here: https://github.com/michaelpq/pg_plugins/tree/main/jsonlog -- Michael signature.asc Description: PGP signature

Re: How to force "re-TOAST" after changing STORAGE or COMPRESSION?

2023-10-03 Thread Michael Paquier
les, but should I take an exclusive lock on the table, > switch it to unlogged, > rewrite, and switch it back to logged? Switching a table back to be logged requires all its 8k blocks to be WAL-logged, so that would be roughly the same as a plain UPDATE. -- Michael signature.asc Description: PGP signature

Re: How to force "re-TOAST" after changing STORAGE or COMPRESSION?

2023-10-02 Thread Michael Paquier
lation if you are too aggressive with the updates. You could do that in periodic steps, as well. -- Michael signature.asc Description: PGP signature

Re: How to force "re-TOAST" after changing STORAGE or COMPRESSION?

2023-10-02 Thread Michael Paquier
t sure that this is the correct path to do so or that in some cases forcing the hand of the user was incorrect. It was also creating a penalty in some of the hot loops of area: commit: dbab0c07e5ba1f19a991da2d72972a8fe9a41bda committer: Michael Paquier date: Mon, 14 Jun 2021 09:25:50 +0900 Remove force

Re: Changed functionality from 14.3 to 15.3

2023-09-22 Thread Michael Corey
something changed in the underlying Postgres build. On Wed, Sep 20, 2023 at 7:11 PM Erik Wienhold wrote: > On 2023-09-20 17:53 -0400, Michael Corey wrote: > > To make matters even more strange. I checked the permissions of > > rds_superuser in 15 and 14 > > > >

Re: Changed functionality from 14.3 to 15.3

2023-09-20 Thread Michael Corey
, *pg_write_all_data*, rds_password, rds_replication TO rds_superuser WITH ADMIN OPTION; AWS added these permissions, but based on what they do you would think this would allow the SELECTs in 15. On Wed, Sep 20, 2023 at 4:40 PM Erik Wienhold wrote: > On 2023-09-20 15:19 -0400, Michael Corey wr

Re: Changed functionality from 14.3 to 15.3

2023-09-20 Thread Michael Corey
hema? >> Because it must inherit SELECT on ref_media_code on 14.3. It can't be >> from object_creator because that role also gets newly created. >> > > Your description also suggests that maybe the v14 instance has altered > default privileges setup that maybe the v15 doesn't have. > > David J. > > -- Michael Corey

Re: Changed functionality from 14.3 to 15.3

2023-09-20 Thread Michael Corey
original 14 server and made two copies. I kept one as 14 and upgraded the other to 15. Lastly, I created the test case. On Wed, Sep 20, 2023 at 3:07 PM Erik Wienhold wrote: > On 2023-09-20 13:17 -0400, Michael Corey wrote: > > PG 14 Server > > psql (14.2, server 14.3) > > You

Re: Changed functionality from 14.3 to 15.3

2023-09-20 Thread Michael Corey
atabases and received different results. On Wed, Sep 20, 2023 at 12:33 PM Erik Wienhold wrote: > On 2023-09-20 09:15 -0400, Michael Corey wrote: > > Thanks for responding. All of the DDL is just the setup for the test > > case. I ran those steps in both databases to setup the exac

Re: Changed functionality from 14.3 to 15.3

2023-09-20 Thread Michael Corey
sten_schema, but in 15.3 I am unable due to a permission issue. On Tue, Sep 19, 2023 at 8:17 PM Erik Wienhold wrote: > On 2023-09-19 15:09 -0400, Michael Corey wrote: > > We are experiencing different functionality once we upgraded from > Postgres > > 14.3 to Postgres 15.3. > >

Changed functionality from 14.3 to 15.3

2023-09-19 Thread Michael Corey
We are experiencing different functionality once we upgraded from Postgres 14.3 to Postgres 15.3. Below is a test case that we created which shows a schema user who has a VIEW that accesses a table in another schema. In 14.3 the schema user is able to create the VIEW against the other schema's ta

Re: backup_manifest rename to backup_manifest.old after successful postgres start up

2023-07-28 Thread Michael Paquier
, I would agree with you that it is not especially useful to keep it around once the cluster has been recovered from a base backup. It would actually lead to various errors if attempting to run pg_verifybackup on its data folder, for instance. -- Michael signature.asc Description: PGP signature

Re: Query on Primary_conninfo

2023-07-26 Thread Michael Paquier
more details about what's happening. For example, what do the logs of the standby tell you? Are you sure that the reload was done on the correct node? Did you check with a SHOW command that the new value is reflected on your standby to what you want it to be? -- Michael signature.asc Description: PGP signature

Re: fsync data directory after DB crash

2023-07-18 Thread Michael Paquier
om here on would be * persisted. To avoid that, fsync the entire data directory. -- Michael signature.asc Description: PGP signature

Re: Large scale reliable software system

2023-06-26 Thread Michael Nolan
It's not just Ruby, dumb databases are preferred in projects like WordPress, Drupal and Joomla, too. Now, if it's because they're used to using MySQL, well maybe that's not so hard to understand. :-) On Mon, Jun 26, 2023 at 8:05 PM Guyren Howe wrote: > > This is a reasonable answer, but I want

Re: ECPG Semantic Analysis

2023-06-22 Thread Michael Paquier
s all the development discussions are done by email on the mailing list pgsql-hackers, mostly. -- Michael signature.asc Description: PGP signature

Re: FIPS-related Error: Password Must Be at Least 112 Bits on Postgres 14, Unlike in Postgres 11

2023-06-22 Thread Michael Paquier
speaks directly the protocol and because it has no dependency to libpq. Are there any specific failures you are seeing in the PostgreSQL backend that you find confusing? -- Michael signature.asc Description: PGP signature

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Michael Weiller
team implement them. > > Operationally much simpler to have a listener handle that. > > -- Born in Arizona, moved to Babylonia. Hello Ron, I have to agree with you there as well. The workflow you have to go through is also often a time issue. There are many places that have to agree and then application owners still have to provide justifications. At the same time, we have to be flexible and fast and allocate the resources well at any time and provide the application with the maximum possible performance. Regards Michael

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Michael Weiller
32 ─┐ ┌──┬──> PG_Cluster1@localhost:5433 >> ─> pgs2.server.net:5432 ─┤ │ ├──> PG_Cluster2@localhost:5434 >> ─> pgs3.server.net:5432 ─┼─>─┤ 192.168.0.1:5432 ├──> >> PG_Cluster3@localhost:5435 >> ─> pgs4.server.net:5432 ─┤ │ ├──> PG_Cluster4

Re: date format

2023-06-14 Thread Michael Nolan
Can you use a CASE statement? The real issue with date conversion is not knowing if a value of 02-03-2023 is mm-dd- or dd-mm-. On Wed, Jun 14, 2023 at 11:42 AM Marc Millas wrote: > > Hi, > > I would like to load data from a file via file_fdw or COPY.. its a postgres > 14 cluster > > but

Re: Question about where to deploy the business logics for data processing

2023-06-09 Thread Michael Nolan
You're gonna lock yourself into SOMETHING, that's why there are still thousands of COBOL programs still being maintained. Mike Nolan On Fri, Jun 9, 2023 at 3:39 PM Ron wrote: > > You can be sure that banks and academic research projects have different > needs. Heck, your University's class sch

Re: Question about where to deploy the business logics for data processing

2023-06-09 Thread Michael Nolan
Clearly I'm a 73 year old dinosaur, because I believe in having the business logic in the database wherever possible. But the development projects I've been around lately aren't using triggers at all. (And it should not surprise anyone, certainly not me, that consistency of data enforcement is an

Re: Trying to understand a failed upgrade in AWS RDS

2023-05-19 Thread Elterman, Michael
Please, use the following runbook. 1. Disable the subscription to pg10. 2. Disable Application Users on Publisher. 3. Drop all replication slots on Publisher (The upgrade can not be executed if there are any replication slots) 4. Run RDS's upgrade (which runs pg_upgrade). 5. Recreate replication sl

Re: "PANIC: could not open critical system index 2662" - twice

2023-05-08 Thread Michael Paquier
we, err, revisit the choice of making WAL_LOG the default strategy even for this set of minor releases? FWIW, I've mentioned that this choice was too aggressive in the thread of 8a86618.. -- Michael signature.asc Description: PGP signature

Re: "PANIC: could not open critical system index 2662" - twice

2023-05-08 Thread Michael Paquier
LE, or is that 15.2-ish without fa5dd46? One thing I was wondering about to improve the odds of the hits is to be more aggressive with the number of relations created at once, so as we are much more aggressive with the number of pages extended in pg_class from the origin database. -- Michael sign

Re: Hung Query with No Locking Issues

2023-05-08 Thread Michael P. McDonnell
Okay - that worked. How did you know that would work? That's incredible. On Sun, May 7, 2023 at 4:25 PM Tom Lane wrote: > "Michael P. McDonnell" writes: > > I have 2 stored procedures that need to run back to back. It could > > convert to a single one - but

Re: "PANIC: could not open critical system index 2662" - twice

2023-05-07 Thread Michael Paquier
in a way similar to Evgeny. -- Michael signature.asc Description: PGP signature

Re: "PANIC: could not open critical system index 2662" - twice

2023-05-07 Thread Michael Paquier
ll these steps are stable in the backend, at least here. Or do we have some low-hanging fruit with the WAL_LOG strategy? That could always be possible, of course, but that looks like the same issue to me, just with a different symptom showing up. -- Michael signature.asc Description: PGP signature

Hung Query with No Locking Issues

2023-05-07 Thread Michael P. McDonnell
Hey team - I have 2 stored procedures that need to run back to back. It could convert to a single one - but it's easier from a maintenance perspective to keep them separated. The first procedure effectively is INSERT INTO table_b () SELECT FROM _table_a_; COMMIT; Total execution time - about

Re: libpq and multi-threading

2023-05-03 Thread Michael J. Baars
Hi Michael, Are pthread_* functions really such an improvement over clone? Does it make an 'freely passing around' of PGresult objects possible? Like it matters, process or thread. We were talking about the documentation and this 'freely passing around' PGresult object. I ju

Re: libpq and multi-threading

2023-05-03 Thread Michael Loftis
anytime PG or anything else Linux based says thread they’re talking about a POSIX Thread environment. On Wed, May 3, 2023 at 05:12 Michael J. Baars < mjbaars1977.pgsql.hack...@gmail.com> wrote: > Hi Peter, > > The shared common address space is controlled by the clone(2) CLONE_VM &

Re: libpq and multi-threading

2023-05-03 Thread Michael J. Baars
ously will result in internal interference. Because libpq makes use of malloc to store results, you will come to find that the CLONE_VM option was not the option you were looking for. On Tue, 2 May 2023, 19:58 Peter J. Holzer, wrote: > On 2023-05-02 17:43:06 +0200, Michael J. Baars wrote: >

Re: libpq and multi-threading

2023-05-02 Thread Michael J. Baars
Hi David, My mistake. Too much fiddling around, but better than no fiddling around. It appears both sides make mistakes, or does your freely passing around work better than mine? On Tue, 2 May 2023, 17:57 David G. Johnston, wrote: > On Tue, May 2, 2023 at 2:38 AM Michael J. Ba

Re: libpq and multi-threading

2023-05-02 Thread Michael J. Baars
I was able to reproduce from here. On Tue, 2 May 2023, 15:49 Laurenz Albe, wrote: > On Tue, 2023-05-02 at 11:38 +0200, Michael J. Baars wrote: > > I have a question about libpq and multi-threading. > > > > In the PostgreSQL documentation ( > https://www.postgresql.org

libpq and multi-threading

2023-05-02 Thread Michael J. Baars
Hi All, I have a question about libpq and multi-threading. In the PostgreSQL documentation ( https://www.postgresql.org/docs/15/libpq-threading.html) it says that results can be passed around freely between threads. However, when I try to read the result from the parent thread, the program crashe

Postgres query doesn't accept double quote around schema name in query statement

2023-04-27 Thread Michael Xu
quot;MyTableName". Is there settings in pssql server or db level to change it back to its default to allow double quotes around schema. We're using PostgreSQL 13.7 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit Thanks! Michael

Re: pg_basebackup / recovery

2023-04-12 Thread Michael Paquier
its WAL redo makes sure that WAL replays until it finds the WAL record marking the end of the backup. Grepping for XLOG_BACKUP_END (WAL record type in this case) shows all the areas that rely on that, and xlogrecovery.c covers the most relevant bits. -- Michael signature.asc Description: PGP signature

Re: "PANIC: could not open critical system index 2662" - twice

2023-04-11 Thread Michael Paquier
lies on 8k on-disk pages (default size), so it is subject to the same rules as normal relations regarding checksums for the pages flushed to disk, even if it is on a catalog. -- Michael signature.asc Description: PGP signature

Re: "PANIC: could not open critical system index 2662" - twice

2023-04-07 Thread Michael Paquier
if we would be able to put our hands on a reproducible test case that would break the cluster so much that we'd get into this state. I don't recall seeing this error pattern in recent history, though. -- Michael signature.asc Description: PGP signature

Re: Backup schema without data

2023-04-06 Thread Michael Loftis
>From the man page…. “ -s --schema-only Dump only the object definitions (schema), not data. …..” On Thu, Apr 6, 2023 at 18:40 Atul Kumar wrote: > Hi, > > Please help me in telling that how I can take the backup of one single > schema without its data using pg_dump utility ? > > > So far, I

Re: Binding Postgres to port 0 for testing

2023-03-26 Thread Michael Paquier
nning the perl tests, so it is isolated as much as it can be. Using the same port should be actually fine as far as I recall, as long as the unix socket paths are different. -- Michael signature.asc Description: PGP signature

Re: Binding Postgres to port 0 for testing

2023-03-26 Thread Michael Paquier
but there may be no need to reinvent the wheel. And seeing your first message with the requirements you list, this does what you are looking for: - Create an empty cluster. - Freely create databases, tablespaces, queries, etc. - Wipe out the whole. The test cases around src/test/recovery/t/ could be a

Using GSSAPI/Kerbros/Active Directory: want the database user name to be the full name including the realm name without specifying the user

2023-03-13 Thread Michael Downey
>From what we can ascertain, this appears to be default behavior. The thing is, >many notes on setting this up on the interweb have examples creating the >database user with the full name including domain. Is it possible to do that? We are not certain where the domain name is being stripped off. Thanks, Michael

Memory leak using when using libpq PQExecParams() CRYPTO_zalloc()

2023-02-22 Thread Michael Arnold
Hi, Am looking for guidance on how to fix a memory leak when using libpq PQExecParams(). Memory leaks through CRYPTO_zalloc() and arises when using json_agg(). None-JSON based PQExecParams() calls are not leaking. Using Postgresql 13.6 (Ubuntu 13.6-0ubuntu0.21.10.1) on x86_64-pc-linux-gnu, comp

Re: Postgres Date Type Value

2022-12-17 Thread Michael Arnold
com> wrote: > On Sat, Dec 17, 2022 at 4:55 PM Michael Arnold wrote: > >> How do I interpret the 4 bytes of postgresql 'date' value? >> > See date2j and j2date in datetime.c > > timestamp.h has the relevant constant Tom refers to (POSTGRES_EPOCH_JDATE) > > > David J. > >

Postgres Date Type Value

2022-12-17 Thread Michael Arnold
Want to retrieve a date type from a postgres table using libpq PQexecParams() in binary mode (please humor me). https://www.postgresql.org/docs/14/datatype-datetime.html says that a date is 4 bytes (4713 BC to 5874897 AD). src/include/utils/date.h defines: typedef int32 DateADT; Something like

Re: postgres large database backup

2022-12-06 Thread Michael Loftis
On Thu, Dec 1, 2022 at 7:40 AM Vijaykumar Jain wrote: > > >> I do not recall zfs snapshots took anything resource intensive, and it was >> quick.ill ask around for actual time. > > > Ok just a small note, out ingestion pattern is write anywhere, read globally. > So we did stop ingestion while s

Re: Libpq linked to LibreSSL

2022-12-04 Thread Michael Paquier
t kind of environment you are using it will be hard to reach a clear conclusion without at least more details. -- Michael signature.asc Description: PGP signature

Re: postgres large database backup

2022-12-01 Thread Michael Loftis
On Thu, Dec 1, 2022 at 9:21 AM Michael Loftis wrote: > > > > On Thu, Dec 1, 2022 at 06:40 Mladen Gogala wrote: >> >> On 11/30/22 20:41, Michael Loftis wrote: >> >> >> ZFS snapshots don’t typically have much if any performance impact versus >>

Re: postgres large database backup

2022-12-01 Thread Michael Loftis
On Thu, Dec 1, 2022 at 06:40 Mladen Gogala wrote: > On 11/30/22 20:41, Michael Loftis wrote: > > > ZFS snapshots don’t typically have much if any performance impact versus > not having a snapshot (and already being on ZFS) because it’s already doing > COW style semantics. >

Re: postgres large database backup

2022-11-30 Thread Michael Loftis
On Wed, Nov 30, 2022 at 18:03 Mladen Gogala wrote: > On 11/30/22 18:19, Hannes Erven wrote: > > You could also use a filesystem that can do atomic snapshots - like ZFS. > > Uh, oh. Not so sure about that. Here is a page from the world of the big > O: https://blog.docbert.org/oracle-on-zfs/ > > Ho

Re: postgres large database backup

2022-11-30 Thread Michael Loftis
On Wed, Nov 30, 2022 at 8:40 AM Atul Kumar wrote: > > Hi, > > I have a 10TB database running on postgres 11 version running on centos 7 "on > premises", I need to schedule the backup of this database in a faster way. > > The scheduled backup will be used for PITR purposes. > > So please let me kn

Re: Q: pg_hba.conf separate database names file format

2022-11-09 Thread Michael Paquier
hba.conf as each HBA entry could get quite long depending on the connection policy you may want. My take would be to use one entry per line in an @ file in this case. -- Michael signature.asc Description: PGP signature

Re: Q: pg_hba.conf separate database names file format

2022-11-08 Thread Michael Paquier
tructs are allowed. Unless the file name following @ is an absolute path, it is taken to be relative to the directory containing the referencing file." -- Michael signature.asc Description: PGP signature

Re: empty pg_stat_progress_vacuum

2022-10-31 Thread Michael Paquier
est release available is 11.17, meaning that you are missing more than three years worth of bug fixes. Based on the roadmap in [1], 11.18 should be out next week. [1]: https://www.postgresql.org/developer/roadmap/ -- Michael signature.asc Description: PGP signature

Re: constantly updated table in Amazon RDS

2022-10-21 Thread Michael Nolan
On Fri, Oct 21, 2022 at 1:52 PM Julie Nishimura wrote: > Hello, > A table is constantly updated by inserting new rows. Will it affect select > if where clause is based on > date? > Does "where clause" to specify > date and < now? > You haven't described the table. Is there some kind of a date o

Re: Zheap Tech Problem

2022-10-14 Thread Michael Paquier
sight about all that, mainly from EDB: https://www.youtube.com/watch?v=ZbdWOuTTWrw https://www.youtube.com/watch?v=7jVz4TTB5-4 The community wiki has a page with few references to the code of the project: https://wiki.postgresql.org/wiki/Zheap -- Michael signature.asc Description: PGP signature

Re: Incorrect resource manager data checksum in record with zfs and compression

2022-10-03 Thread Michael Paquier
out > of NVMe PCIe SSDs. > > A101 (primary) -> A201 (replica) -> B101(primary) -> B201 (replica). replica -> primary does not really make sense for physical replication. Or do you mean that B101 is itself a standby doing streaming from A201? -- Michael signature.asc Description: PGP signature

  1   2   3   4   5   6   7   8   9   >