Re: --frokbackend process

2024-06-26 Thread Michael Paquier
On Thu, Jun 27, 2024 at 09:19:45AM +0500, Kashif Zeeshan wrote: > It's hard to figure out the issue by just looking on the process list, to > figure out the issue you need to share the DB Server Logs and thats the why > to figure out the exac issue. Note that it is equally hard for anybody reading

Re: ERROR: could not attach to dynamic shared area

2024-06-26 Thread Michael Paquier
On Wed, Jun 26, 2024 at 02:43:30PM +, Andrew Longwill wrote: > We’re using Postgresql 15.4 in AWS RDS. Since yesterday we have seen > two occurrences where our PHP application becomes unable to connect > to our RDS replicas. In the application logs we see the error > "FATAL: could not attach to

Re: recovery.signal not being removed when recovery complete

2024-04-03 Thread Michael Paquier
On Tue, Mar 26, 2024 at 06:22:32PM -0400, Isaac Morland wrote: > I use a script to restore a backup to create a testing copy of the > database. I set the following in postgresql.auto.conf: > > recovery_target = 'immediate' > recovery_target_action = 'promote' Why not, after a pg_basebackup -R I a

Re: support fix query_id for temp table

2024-02-01 Thread Michael Paquier
On Thu, Feb 01, 2024 at 07:37:32AM +, ma lz wrote: > session 1: > create temp table ttt ( a int ); > insert into ttt values(3); -- query_id is XXX from > pg_stat_activity > > session 2: > create temp table ttt ( a int ); > insert into ttt values(3);

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

2024-01-02 Thread Michael Paquier
On Thu, Dec 28, 2023 at 02:03:12PM +0200, Kouber Saparev wrote: >> The first problem that we 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/ > > Thank you. Is there a bug report or should we file one? It

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

2023-12-23 Thread Michael Paquier
On Fri, Dec 22, 2023 at 10:55:24AM +0200, Kouber Saparev wrote: > The table for this file node is not even included in any of the > publications we have. I've found a similar issue described [1] before, so I > was wondering whether this patch is applied? Our subscriber database is > PostgreSQL 16.1

Re: pg_checksums?

2023-10-29 Thread Michael Paquier
On Sun, Oct 29, 2023 at 11:49:11AM +0100, Peter J. Holzer wrote: > On 2023-10-29 10:11:07 +0100, Paul Förster wrote: >> On Oct 29, 2023, at 02:43, Peter J. Holzer wrote: >>> I don't think so. AFAIK Replication keeps the data files in sync on a >>> bit-for-bit level and turning on checksums changes

Re: REINDEX in tables

2023-10-25 Thread Michael Paquier
On Wed, Oct 25, 2023 at 11:33:11AM +0200, Andreas Kretschmer wrote: > Am 25.10.23 um 11:24 schrieb Matthias Apitz: >> We have a client who run REINDEX in certain tables of the database of >> our application (on Linux with PostgreSQL 13.x): >> >> REINDEX TABLE CONCURRENTLY d83last; >> REINDEX TABLE

Re: Change error code severity for syslog?

2023-10-11 Thread Michael Paquier
On Thu, Oct 12, 2023 at 09:42:47AM +0900, Abhishek Bhola wrote: > For most of the Postgres errors, translating it to WARNING level in syslog > works, however, I wanted to translate *ERROR codes XX000/1/2* in Postgres > to be ERROR in syslog as well, so that it triggers the alert system and I > can

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

2023-10-03 Thread Michael Paquier
On Tue, Oct 03, 2023 at 09:08:49AM +0200, Dominique Devienne wrote: > In my case, it's OK not to be transactional, for these experiments. Is > there a way > to lock the table and do the rewriting w/o generating any WAL? I don't have > any experience > with unlogged tables, but should I take an exc

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

2023-10-02 Thread Michael Paquier
On Tue, Oct 03, 2023 at 06:31:27AM +0200, Laurenz Albe wrote: > On Tue, 2023-10-03 at 12:33 +1100, rob stone wrote: >> Would running CLUSTER on the table use the new parameters for the re- >> write? > > No, as far as I know. Note that under the hoods VACUUM FULL and CLUSTER use the same code path

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: backup_manifest rename to backup_manifest.old after successful postgres start up

2023-07-28 Thread Michael Paquier
On Tue, Jul 18, 2023 at 01:53:23AM +0200, Gert Cuykens wrote: > Hi, suggest to automatically rename backup_manifest to backup_manifest.old > like backup_label when postgres start up successfully because it has no use > anymore for pg_verifybackup after postgres has been started. Yes, I would agree

Re: Query on Primary_conninfo

2023-07-26 Thread Michael Paquier
On Wed, Jul 26, 2023 at 05:33:50PM +0530, Praneel Devisetty wrote: > Standy is not picking this change even after a reload. > > Restarting standby is working out, but as PG13 supports reload of > primary_connfino is there a reliable way to achieve this without restarting > standby database. prima

Re: fsync data directory after DB crash

2023-07-18 Thread Michael Paquier
On Tue, Jul 18, 2023 at 04:50:25PM +0800, Pandora wrote: > I found that starting from version 9.5, PostgreSQL will do fsync on > the entire data directory after DB crash. Here's a question: if I > have FPW = on, why is this step still necessary? Yes, see around the call of SyncDataDirectory() in x

Re: ECPG Semantic Analysis

2023-06-22 Thread Michael Paquier
On Fri, Jun 23, 2023 at 12:21:48AM -0400, Juan Rodrigo Alejandro Burgos Mella wrote: > I have a modified version of ECPG, to which I gave the ability to do > semantic analysis of SQL statements. Where can you share it or with whom > can I discuss it? I cannot say what kind of problem this solves

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

2023-06-22 Thread Michael Paquier
On Thu, Jun 22, 2023 at 07:16:21PM +0530, Abhishek Dasgupta wrote: > I am puzzled as to why this error occurs only with PostgreSQL 14 and not > with PostgreSQL 11. This error is specific to the Postgres JDBC driver, which relies on its own application layer for FIPS and SCRAM because it speaks dir

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

2023-05-08 Thread Michael Paquier
On Mon, May 08, 2023 at 06:04:23PM -0400, Tom Lane wrote: > Andres seems to think it's a problem with aborting a DROP DATABASE. > Adding more data might serve to make the window wider, perhaps. And the odds get indeed much better once I use these two toys: CREATE OR REPLACE FUNCTION create_tables(

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

2023-05-08 Thread Michael Paquier
On Mon, May 08, 2023 at 07:15:20PM +0530, Dilip Kumar wrote: > I am able to reproduce this using the steps given above, I am also > trying to analyze this further. I will send the update once I get > some clue. Have you been able to reproduce this on HEAD or at the top of REL_15_STABLE, or is tha

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

2023-05-07 Thread Michael Paquier
On Mon, May 08, 2023 at 02:46:37PM +1200, Thomas Munro wrote: > That sounds like good news, but I'm still confused: do you see all 0s > in the target database (popo)'s catalogs, as reported (and if so can > you explain how they got there?), or is it regression that is > corrupted in more subtle way

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

2023-05-07 Thread Michael Paquier
On Sun, May 07, 2023 at 10:30:52PM +1200, Thomas Munro wrote: > Bug-in-PostgreSQL explanations could include that we forgot it was > dirty, or some backend wrote it out to the wrong file; but if we were > forgetting something like permanent or dirty, would there be a more > systematic failure? Oh,

Re: pg_basebackup / recovery

2023-04-12 Thread Michael Paquier
On Wed, Apr 12, 2023 at 01:45:56PM +0300, Achilleas Mantzios - cloud wrote: > On 4/12/23 12:32, Fabrice Chapuis wrote: >> During recovery process of a self contained backup, how postgres know to >> stop reading wal when consistency is reached? > > Because it knows the full packup info. It will obs

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

2023-04-11 Thread Michael Paquier
On Tue, Apr 11, 2023 at 04:44:54PM +, Evgeny Morozov wrote: > We have data_checksums=on. (It must be on by default, since I cannot > find that in our config files anywhere.) initdb does not enable checksums by default, requiring a -k/--data-checksums, so likely this addition comes from from yo

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

2023-04-07 Thread Michael Paquier
On Fri, Apr 07, 2023 at 01:04:34PM +0200, Laurenz Albe wrote: > On Thu, 2023-04-06 at 16:41 +, Evgeny Morozov wrote: >> Could this be a PG bug? > > It could be, but data corruption caused by bad hardware is much more likely. There is no way to be completely sure here, except if we would be ab

Re: Binding Postgres to port 0 for testing

2023-03-26 Thread Michael Paquier
On Sun, Mar 26, 2023 at 10:49:33PM -0600, Markus Pilman wrote: > I somehow didn't consider looking at the postgres tests, though it makes > sense that they need to solve this problem. If I read the perl code > correctly though it seems that this could, in theory, cause a race? The > script checks f

Re: Binding Postgres to port 0 for testing

2023-03-26 Thread Michael Paquier
On Sat, Mar 25, 2023 at 11:01:33AM -0600, Markus Pilman wrote: > Now the problem is that I need to find a TCP port for each running postgres > instance. There's multiple ways to do this, but by far the easiest one I > know is to bind to port 0. So my plan was to start postgres with "-p 0" and > the

Re: Libpq linked to LibreSSL

2022-12-04 Thread Michael Paquier
On Sun, Dec 04, 2022 at 09:02:07AM +0100, Marco Bambini wrote: > After several attempts (and runtime crashes), I am asking for help > with how to compile libpq with LibreSSL support (both dynamic and > static links would be OK to me). > I know how to compile libpq with OpenSSL support, but I need t

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

2022-11-09 Thread Michael Paquier
On Wed, Nov 09, 2022 at 04:02:43AM -0600, Ron wrote: > Are these "include" files supposed to solve the problem of having a *lot* of > databases (or users) that you want to allow access to? Yes, splitting the list of users and database eases the maintenance and readability of pg_hba.conf as each HB

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

2022-11-08 Thread Michael Paquier
On Tue, Nov 08, 2022 at 02:16:03PM +0100, Albrecht Dreß wrote: > However, I could not find a specification of the format for this > file… It appears as if simply giving each database name on a > separate line does the job. Is this correct? May the file contain > comments (i.e. lines starting wit

Re: empty pg_stat_progress_vacuum

2022-10-31 Thread Michael Paquier
On Fri, Oct 21, 2022 at 10:21:23PM +, senor wrote: > I'm mainly wanting to understand why I'm not seeing processes in > pg_stat_progress_vacuum. If I rapidly refresh I occasionally see an > entry for a very small table. A manually started vacuum didn't show > up either. It may be possible that

Re: Zheap Tech Problem

2022-10-14 Thread Michael Paquier
On Fri, Oct 14, 2022 at 07:53:17PM -0700, Adrian Klaver wrote: > On 10/14/22 18:59, jacktby wrote: >> What's Zheap tech? Can you give me some details or stuff to study? and >> which version will be realized in ? There are a few videos on youtube that can provide some insight about all that, mainly

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

2022-10-03 Thread Michael Paquier
On Mon, Oct 03, 2022 at 12:41:23PM -0700, John Bolliger wrote: > Our architecture is similar but all of the servers are now on ZFS now and > Postgres 13.8 with Ubuntu 18.04+ and still doing streaming replication, all > with ECC memory and 26-64 cores with 192gb ram+ on top of a ZPOOL made out > of

Re: Streaming wal from primiry terminating

2022-09-29 Thread Michael Paquier
On Thu, Sep 29, 2022 at 01:04:08PM +, Lahnov, Igor wrote: > Primary_conninfo is set in postgresql.conf > The reason is definitely something else, we do not know what. This is fatal > in this case. Which version of PostgreSQL are you using? There has been a few commits around continuation rec

Re: PostgreSQL 14.4 ERROR: out of memory issues

2022-07-12 Thread Michael Paquier
On Mon, Jul 11, 2022 at 10:50:23AM +0200, Aleš Zelený wrote: > So far, it has happened three times (during a single week) from the 14.3 -> > 14.4 upgrade, before 14.4 we haven't suffered from such an issue. > > Questions: > 1) Can we safely downgrade from 14.4 to 14.3 by shutting down the instanc

Re: Postgresql error : PANIC: could not locate a valid checkpoint record

2022-06-26 Thread Michael Paquier
On Fri, Jun 24, 2022 at 01:03:57PM +, Mahendrakar, Prabhakar - Dell Team wrote: > Is it possible to explicitly issue a checkpoint before we move on to > the pg_upgrade command? > so that in the circumstances of the Upgrade issues (like PANIC: > could not locate a valid checkpoint record), we

Re: multiple entries for synchronous_standby_names

2022-06-13 Thread Michael Paquier
On Fri, Jun 10, 2022 at 05:04:30PM +0100, Nitesh Nathani wrote: > Trying to achieve sync streaming to barman server and i need to add an > entry to postgresql.conf for this parameter, which already has an entry and > tried a few variations but does not work. Any ideas? Also tried '&&' but in > vain

Re: What do you guys use for issue tracking, CI/CD and team management? any nice open source options?

2022-04-15 Thread Michael Paquier
On Thu, Apr 14, 2022 at 06:19:44PM +0300, Achilleas Mantzios wrote: > What issue/bug tracking is PostgreSQL itself using? > What continuous build system (CI/CD) is PostgreSQL itself using? > Any tool that you ppl or the PostgreSQL infrastructure use that > links people/committers with bugs/issues,

Re: Can you install/run postgresql on a FIPS enabled host?

2022-03-22 Thread Michael Paquier
On Mon, Mar 21, 2022 at 06:33:29PM -0400, Tom Lane wrote: > It sounds like something thinks that scram-sha-256 encryption is > disallowed by FIPS. That may or may not be accurate. If it's > supposed to be allowed, you'd need to poke a little harder to > narrow down where the problem is. > > (Dig

Re: could not open relation with OID

2022-01-26 Thread Michael Paquier
On Wed, Jan 26, 2022 at 05:30:01PM -0800, Ben Chobot wrote: > We do a lot of queries per day, over a lot of hosts, all of which are on > 12.9. We've recently started doing a better job at analyzing our db logs and > have found that, a few times a day, every day, we see some of our queries > fail wi

Re: How are md5.h: pg_md5_hash() function and below functions working?

2022-01-21 Thread Michael Paquier
On Sat, Jan 08, 2022 at 08:12:50AM -0800, Adrian Klaver wrote: > On 1/8/22 05:21, Ali Koca wrote: >> I can't understand functions in md5.h, these are seemingly little bit >> weird. Such as: >> /* Utilities common to all the MD5 implementations, >> as of md5_common.c */ >> extern bool

Re: recording of INDEX creation in tables

2022-01-21 Thread Michael Paquier
On Fri, Jan 21, 2022 at 01:38:59PM +0100, Matthias Apitz wrote: > Does the PostgreSQL (11.4 or 13.1) record somewhere in system tables > the creation of INDEXes (or other objects)? Hard to say what you are looking for with such a general question. Would pg_index or pg_indexes be enough? There ar

Re: could not accept SSL connection: Success

2022-01-19 Thread Michael Paquier
On Wed, Jan 19, 2022 at 08:06:30PM -0500, Tom Lane wrote: > Michael Paquier writes: > > Leaving things in their current state is fine by me. Would it be > > better to add a note about the business with 3.0 though? > > What do you envision saying? "We don't nee

Re: could not accept SSL connection: Success

2022-01-19 Thread Michael Paquier
On Wed, Jan 19, 2022 at 07:58:43PM -0500, Tom Lane wrote: > Personally I'm satisfied to leave it as-is, since this issue apparently > occurs only in a minority of OpenSSL versions, and not the newest. Leaving things in their current state is fine by me. Would it be better to add a note about the

Re: could not accept SSL connection: Success

2022-01-19 Thread Michael Paquier
On Thu, Jan 20, 2022 at 09:05:35AM +1300, Thomas Munro wrote: > Good news, I'm glad they nailed that down. I recall that this > behaviour was a bit of a moving target in earlier versions: > > https://www.postgresql.org/message-id/CAEepm%3D3cc5wYv%3DX4Nzy7VOUkdHBiJs9bpLzqtqJWxdDUp5DiPQ%40mail.gmai

Re: could not accept SSL connection: Success

2022-01-18 Thread Michael Paquier
On Mon, Jan 17, 2022 at 05:05:52PM +0100, Carla Iriberri wrote: > I saw previous discussions where different errors were logged with the > "Success" > message and this was corrected/treated as a bug, but I couldn't find similar > reports specific to "could not accept SSL connection". Is this a know

Re: md5 issues Postgres14 on OL7

2022-01-10 Thread Michael Paquier
On Sat, Jan 08, 2022 at 02:00:16PM -0500, Tom Lane wrote: > This is looking pretty solid to me. Just a couple of nitpicks: > > * In most places you initialize variables holding error strings to NULL: > > + const char *logdetail = NULL; > > but there are three or so spots that don't, eg Perf

Re: md5 issues Postgres14 on OL7

2022-01-07 Thread Michael Paquier
b309ce64d8f6fea7a714da08df56c Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Sat, 8 Jan 2022 14:56:39 +0900 Subject: [PATCH v3] Improve error reporting for cryptohashes --- src/include/common/cryptohash.h | 1 + src/include/common/md5.h | 9 ++- src/include

Re: md5 issues Postgres14 on OL7

2022-01-06 Thread Michael Paquier
etail in md5_crypt_verify() and plain_crypt_verify() to feed back a LOG entry to the postmaster on those failures, and saw that it is safe to assign directly the error returned by the cryptohash APIs, avoiding the extra psprintf call that could become an issue under memory pressure. What do you thin

Re: md5 issues Postgres14 on OL7

2022-01-06 Thread Michael Paquier
On Wed, Jan 05, 2022 at 04:09:12PM +0900, Michael Paquier wrote: > In order to make things portable with 14 in cryptohash.c, we don't > have any need to change the existing cryptohash APIs. We could just > store in each implementation context a location to a static string, > and

Re: md5 issues Postgres14 on OL7

2022-01-04 Thread Michael Paquier
On Wed, Jan 05, 2022 at 01:08:53AM -0500, Tom Lane wrote: > I think it's very important that the error message in this case > mention "FIPS mode" explicitly. Otherwise, people will have no > idea that that's where the problem originates, and they'll be > frustrated and we'll get bug reports. (The

Re: md5 issues Postgres14 on OL7

2022-01-04 Thread Michael Paquier
On Tue, Jan 04, 2022 at 12:54:35PM -0500, Tom Lane wrote: > I reproduced this on Fedora 35 with FIPS mode enabled. The problem > is that OpenSSL treats MD5 as a disallowed cipher type under FIPS > mode, so this call in pg_cryptohash_init fails: Is that 3.0.0 or 1.1.1? I can see the following, te

Re: md5 issues Postgres14 on OL7

2022-01-04 Thread Michael Paquier
On Mon, Dec 20, 2021 at 03:22:31PM +0100, Christoph Moench-Tegeder wrote: > Active FIPS mode (/proc/sys/crypto/fips_enabled => 1) on the server does > produce this behaviour. Most likely, this is a build linked with OpenSSL? The way MD5 hashes are computed in Postgres has largely changed in 14, a

Re: Reindex "locked" standby database

2021-12-14 Thread Michael Paquier
On Wed, Dec 15, 2021 at 12:15:27AM -0300, Martín Fernández wrote: > The reindex went fine in the primary database and in one of our > standby. The other standby that we also operate for some reason > ended up in a state where all transactions were locked by the WAL > process and the WAL process was

Re: log shipping with pg_receivewal

2021-12-13 Thread Michael Paquier
On Tue, Dec 14, 2021 at 05:25:04AM +0100, Marc Millas wrote: > My question: as the synchronous option is supposed to make pg_receivewal > write transaction immediately in the wal files, is there a way to ask the > standby to apply them on the fly ie. without waiting a wal file change ? Nope, there

Re: split postgresql logfile

2021-11-29 Thread Michael Paquier
On Mon, Nov 29, 2021 at 12:12:11PM +0100, Paul van Rixel wrote: > Now the postgresql.logs are polluted with log connections/disconnection, > Agent monitoring entries and in between some entries which need some > attention but you missed them. I know the option exists to disable > log_(dis)connectio

Re: Pause streaming replication

2021-11-10 Thread Michael Paquier
On Wed, Nov 10, 2021 at 08:36:45PM -0500, Rita wrote: > Yes, I have read the manual and seen this. It pauses the replication > (select pg_is_wal_replay_paused()). But on the primary, when I look at > pg_stat_replication, it still says 'streaming' in the state column. My > question was how do I get

Re: Force re-compression with lz4

2021-10-18 Thread Michael Paquier
On Mon, Oct 18, 2021 at 08:01:04AM -0700, Adrian Klaver wrote: > Not sure how much this applies to the Postgres usage of lz4. As I understand > it, this is only used internally for table compression. When using pg_dump > compression gzip is used. Unless you pipe plain text output through some > oth

Re: Force re-compression with lz4

2021-10-18 Thread Michael Paquier
On Mon, Oct 18, 2021 at 09:57:11AM +0300, Florents Tselai wrote: > Oh, that’s good to know then. So besides ALTER COMPRESSION for > future inserts there’s not much one can do for pre-existing values The posting style of the mailing list is to not top-post, so if you could avoid breaking the logic

Re: Force re-compression with lz4

2021-10-17 Thread Michael Paquier
On Sun, Oct 17, 2021 at 10:13:48PM +0300, Florents Tselai wrote: > I did look into VACUUM(full) for it’s PROCESS_TOAST option which > makes sense, but the thing is I already had a cron-ed VACUUM (full) > which I ended up disabling a while back; exactly because of the > double-space requirement. Pl

Re: Force re-compression with lz4

2021-10-17 Thread Michael Paquier
On Sun, Oct 17, 2021 at 10:33:52PM +0200, Daniel Verite wrote: > However lz4 appears to be much faster to compress than pglz, so its > benefit is clear in terms of CPU usage for future insertions. CPU-speaking, LZ4 is *much* faster than pglz when it comes to compression or decompression with its d

Re: How postgres is refreshing TLS certificates

2021-07-28 Thread Michael Paquier
On Wed, Jul 28, 2021 at 06:51:22AM +, M Tarkeshwar Rao wrote: > We are working on a activity in which I need to refresh the TLS > certificate without restarting the my application pod. > This feature is already there in Postgres. Can anyone please suggest > us how postgres is implemented the s

Re: pg_upgrade and wraparound

2021-05-08 Thread Michael Paquier
On Mon, May 03, 2021 at 11:10:44AM -0400, Jan Wieck wrote: > Not yet, but I will enter it so that we can get it into 15 for sure. I may be missing something but this is not listed: https://commitfest.postgresql.org/33/ Could you add it to the CF app please? There are so many patches and discussi

Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-22 Thread Michael Paquier
On Mon, Mar 22, 2021 at 09:25:26AM +0200, Andrus wrote: > Errors in pg_wal directory seems not to occur in patched version. Errors in > pg_stat_tmp still occur. Yesterdays log introduces new error message > > using stale statistics instead of current ones because stats collector is > not respondin

Re: PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-03-21 Thread Michael Paquier
On Tue, Feb 16, 2021 at 12:22:36PM +0100, Thomas Kellerer wrote: > My first suspect is always the anti-virus on Windows when things like > that happen with Postgres. Or maybe not. 13 has introduced a regression in this area AFAIK, and 909b449 should have taken care of it (available in 13.3~). --

Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-19 Thread Michael Paquier
On Fri, Mar 19, 2021 at 09:00:10AM +0200, Andrus wrote: > I replaced files in 13.1 server with ones from your patched version. There > are no errors in log file now for 8 hours. Yippee. Thanks. Have you tested the unpatched builds? And did you see some errors with them? -- Michael signature.a

Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-17 Thread Michael Paquier
On Thu, Mar 18, 2021 at 12:25:45PM +1300, Guy Burgess wrote: > FWIW, this looks the same issue I am getting (reported last month: > https://www.postgresql.org/message-id/f444a84e-2d29-55f9-51a6-a5dcea3bc253%40burgess.co.nz) Yep. > I get the same Process Monitor output, including BUFFER OVERFLOW e

Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-17 Thread Michael Paquier
On Wed, Mar 17, 2021 at 10:45:28AM +0200, Andrus wrote: > In this server hopefully no. Application code contains xml parsing it but > probably those queries are never running in this server. Okay, cool. I am going to send you privately two links to the builds I am going to produce, 13.2 unpatched

Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-17 Thread Michael Paquier
On Wed, Mar 17, 2021 at 11:44:48AM -0400, Tom Lane wrote: > Oh! That's an interesting theory; it'd explain why this broke recently, > because we didn't use to use that function. But how do you draw that > conclusion from this stack trace? > > Anyway, if you've diagnosed this correctly, I bet the

Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-17 Thread Michael Paquier
On Wed, Mar 17, 2021 at 09:25:00AM +0200, Andrus wrote: > pg_config --configure outputs > > --enable-thread-safety --enable-nls --with-ldap --with-openssl --with-uuid > --with-libxml --with-libxslt --with-icu --with-tcl --with-perl --with-python Thanks. Do you actually use OpenSSL, LDAP, uuid-os

Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-16 Thread Michael Paquier
On Wed, Mar 17, 2021 at 01:09:24AM +0200, Andrus wrote: > Should I try install Visual C++ , compile and replace postgres.exe file in > AMD server. Mostly. That's the annoying part: https://www.postgresql.org/docs/devel/install-windows-full.html It is also possible to compile the code on a first

Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-16 Thread Michael Paquier
same error as yours. In one of those servers, do you have in pg_wal/ some files named xlogtemp.N? N is an integer that would be the PID of the process that generated it. -- Michael From 961f9a03d4c27220c33e88402d5ef274424a0ab2 Mon Sep 17 00:00:00 2001 From: Michael Pa

Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-16 Thread Michael Paquier
Hi Andrus, On Wed, Mar 10, 2021 at 03:20:47PM +0200, Andrus wrote: > After re-starting postgres service problem persists. Where you getting the Postgres binaries from? If we provide a patch, could you test it? This would require that you do your own build, unfortunately, but having an environme

Re: how to best remove version 10 (and keep version 9.5)

2021-03-14 Thread Michael Paquier
On Sat, Mar 13, 2021 at 12:03:04PM -0800, Adrian Klaver wrote: > So, the 10 instance is not running and the 9.5 instance is listening on the > default port. At this point I would leave things as they are. Robert, you may want to know that 9.5 has been EOL'd by community. Just saying. -- Michael

Re: pg_upgrade and wraparound

2021-03-12 Thread Michael Paquier
Hi Jan, On Fri, Mar 12, 2021 at 06:13:33PM -0500, Jan Wieck wrote: > One of the things in my way is that when using pg_resetwal to put the > NextXID way into the future (to push the old cluster close to wraparound for > example), the postmaster won't start because it doesn't have the pg_xact > fil

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-07 Thread Michael Paquier
On Sun, Mar 07, 2021 at 11:45:26AM +0200, Andrus wrote: > Should files with .deleted extension deleted manually to save disk space ? > May of them have dates before today. RemoveOldXlogFiles() would discard any of those .deleted files because they don't match a legal WAL segment name, so checkpoin

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-07 Thread Michael Paquier
On Sat, Mar 06, 2021 at 07:53:11PM +0200, Andrus wrote: > I changed wal_recycle to off. So checkpointer should no more try to rename > wal files. Iit still tries to rename files. No idea way it does not use this > setting: On Windows, RemoveXlogFile() would still rename a given WAL segment file wi

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-05 Thread Michael Paquier
On Fri, Mar 05, 2021 at 07:36:37PM +0200, Andrus wrote: > Then turned real-time protection off: > > Problem persists. New entry is written after every 10 seconds. On which files are those complaints? It seems to me that you may have more going on in this system that interacts with your data fold

Re: ransomware

2021-02-01 Thread Michael Paquier
On Mon, Feb 01, 2021 at 03:38:35PM +0100, Marc Millas wrote: > there are various ways to do those checks but I was wandering if any > ""standard''" solution exist within postgres ecosystem, or someone do have > any feedback on the topic. It seems to me that you should first write down on a sheet o

Re: Does pg_ctl promote wait for pending WAL?

2021-01-28 Thread Michael Paquier
Hi Ishii-san, On Fri, Jan 29, 2021 at 07:59:26AM +0100, Paul Förster wrote: > On 29. Jan, 2021, at 03:51, Tatsuo Ishii wrote: >> >> Does anybody know whether a standby server waits for pending WAL >> records/files while promotion is requested? I assume that no data >> update is performed on the

Re: Error messages on duplicate schema names

2021-01-19 Thread Michael Paquier
On Tue, Jan 19, 2021 at 05:37:51PM -0300, Alvaro Herrera wrote: > I guess you could make the case that the CCI call should be in the > callers where we actually loop (SetDefaultACLsInSchemas, > RemoveRoleFromObjectACL), but it's hard to get excited about the added > clutter. Yeah, that matches my

Re: Error messages on duplicate schema names

2021-01-14 Thread Michael Paquier
On Wed, Jan 06, 2021 at 07:15:24PM +0200, Andrus wrote: > Should duplicate schema names accepted or should their usage throw better > error messages. This means that we are one call of CommandCounterIncrement() short for such queries, and similar safeguards already exist in this area for GRANT/REV

Re: Postgres C-API: How to get the Oid for a custom type defined in a schema outside of the current search path

2020-12-03 Thread Michael Paquier
On Thu, Dec 03, 2020 at 01:45:05PM +0100, Pavel Stehule wrote: > When you write C extensions for Postgres, then PostgreSQL source code is > the best source of inspiration. One common source of inspiration for such cases is regproc.c. For a type, you can for example look at what to_regtype() uses

Re: postgres-10 with FIPS

2020-12-03 Thread Michael Paquier
On Thu, Dec 03, 2020 at 05:57:04PM +0530, Aravindhan Krishnan wrote: > Since postgres is linked against openssl we wanted to make sure we build > postgres against the FIPS compliant openssl libraries. Does postgres > provide a FIPS debian package that can be used. If not it would be of great > help

Re: meaning of (to prevent wraparound) ..??

2020-11-25 Thread Michael Paquier
On Wed, Nov 25, 2020 at 11:10:50PM -0700, Jessica Sharp wrote: > On Wed, Nov 25, 2020 at 23:09 Atul Kumar wrote: >> Thanks Jessica. Could help me out by sharing documents that can help me >> understand “to prevent wraparound “ in simplest way, postgres doc is little >> bit harder for a newbee lik

Re: archive file "00000001000000000000006F" has wrong size: 67118648 instead of 16777216

2020-11-24 Thread Michael Paquier
On Wed, Nov 25, 2020 at 11:01:37AM +0900, 江川潔 wrote: > Hi, > > WAL log recovery was failed on wrong log record size. Could you please > advise me what is wrong in the setting ? Any suggestions will be highly > appreciated. > 2020-11-25 10:12:23.569 JST [7792] FATAL: archive file > "0001

Re: initdb --data-checksums

2020-11-09 Thread Michael Paquier
On Mon, Nov 09, 2020 at 06:03:43PM +0100, Paul Förster wrote: > indeed, it is. Have a look at: > > https://www.postgresql.org/docs/12/app-pgchecksums.html > > Make sure the database is cleanly shut down before doing it. This tool is really useful with upgrades after pg_upgrade. Please note that

Re: PANIC: could not write to log file {} at offset {}, length {}: Invalid argument

2020-11-05 Thread Michael Paquier
On Wed, Nov 04, 2020 at 10:23:04PM -0500, Tom Lane wrote: > The latter case would result in a LOG message "unrecognized win32 error > code", so it would be good to know if any of those are showing up in > the postmaster log. Yeah. Not sure which one it could be here: https://docs.microsoft.com/en

Re: PANIC: could not write to log file {} at offset {}, length {}: Invalid argument

2020-11-05 Thread Michael Paquier
On Thu, Nov 05, 2020 at 10:21:40AM +0100, Magnus Hagander wrote: > The problem with AVs generally doesn't come from them opening files in > non-share mode (I've, surprisingly enough, seen backup software that > causes that problem for example). It might happen on scheduled scans > for example, but

Re: PANIC: could not write to log file {} at offset {}, length {}: Invalid argument

2020-11-04 Thread Michael Paquier
On Wed, Nov 04, 2020 at 01:24:46PM +0100, Andreas Kretschmer wrote: >> Any ideas about what is the problem? or anything else I need to check? > > wild guess: Antivirus Software? Perhaps not. To bring more context in here, PostgreSQL opens any files on WIN32 with shared writes and reads allowed t

Re: PG 9.2 slave restarted - cache not impacted

2020-10-22 Thread Michael Paquier
On Fri, Oct 23, 2020 at 11:23:20AM +1300, Lucas Possamai wrote: > I'm a bit confused about PG cache. > > I have a PostgreSQL 9.2 cluster (yes, we're planning on upgrading it to 12) > with a master and a slave database. > > The application is sending all read requests to the slave, where the maste

Re: rum index supported on pg13?

2020-10-12 Thread Michael Paquier
On Mon, Oct 12, 2020 at 12:17:04PM -0500, John the Scott wrote: > I am still new to github protocol, so i was not sure > if asking about longer term support of rum was appropriate for > the github issues posting. Most of the original developers of rum are registered on this mailing list so there w

Re: rum index supported on pg13?

2020-10-11 Thread Michael Paquier
On Thu, Oct 08, 2020 at 09:29:31PM -0500, John the Scott wrote: > will rum index from postgrespro be supported in pg13? > numerous errors occur when compiling rum in pg13 and > no replies from github. the differences from pg12 > to pg13 seem to be significant > > https://github.com/postgresp

Re: Both type of replications from a single server?

2020-10-08 Thread Michael Paquier
On Thu, Oct 08, 2020 at 01:25:14PM +0530, Srinivasa T N wrote: > For streaming replication, I need to set wal_level to replica in A whereas > for logical_replication we need to set wal_level to replica in the same A > server. So, was wondering how to go about? A logical replica needs wal_level =

Re: Both type of replications from a single server?

2020-10-07 Thread Michael Paquier
On Thu, Oct 08, 2020 at 11:43:26AM +0530, Srinivasa T N wrote: >Is it possible to have both type of replications (streaming and logical) > from a single server? Yes. >If I have 3 servers A,B and C, then I want to have streaming replication > from A to B whereas logical replication from A

Re: PG 13 trusted extensions and pg_available_extensions

2020-09-23 Thread Michael Paquier
On Wed, Sep 23, 2020 at 03:28:45PM +, Daniel Westermann (DWE) wrote: > I was playing a bit with trusted extensions and wondered if there is > a reason that the "trusted" flag is not exposed in pg_available_extensions. > I believe that information would be quite useful so one can easily > iden

Re: Autovacuum of independent tables

2020-09-08 Thread Michael Paquier
On Tue, Sep 08, 2020 at 11:16:04AM +0300, Michael Holzman wrote: > Autovacuum does not clean dead tuples of closed transactions in tableB > while there is an open transaction on tableA. > But the tables have nothing in common. They are handled by separate > applications and there are no transaction

Re: When are largobject records TOASTed into pg_toast_2613?

2020-08-21 Thread Michael Paquier
On Fri, Aug 21, 2020 at 03:10:30PM +0200, Laurenz Albe wrote: > Indeed, system tables have no TOAST tables in PostgreSQL, so I wonder > how your "pg_largeobject" table could have grown one. FWIW, src/include/catalog/toasting.h is giving me a list of 28 catalog tables with a toast relation as of HE

Re: [EXTERNAL] RE: PostgreSQL-12 replication. Check replication lag

2020-08-05 Thread Michael Paquier
On Wed, Aug 05, 2020 at 06:36:15PM +, Mariya Rampurawala wrote: > What I want to understand is that, in case of replication link > failure, there will still be inserts happening at the master > node. In that case, how will the slave know if it is up-to-date? It cannot do that by itself, which

Re: How to rebuild index efficiently

2020-08-03 Thread Michael Paquier
On Mon, Aug 03, 2020 at 01:04:45PM -0500, Ron wrote: > same definition, and when that is complete, drop the old index. The > locking that is required here is modest: CREATE INDEX CONCURRENTLY > needs to lock the table briefly at a couple of points in the > operation, and dropping the old index req

Re: how reliable is pg_rewind?

2020-08-02 Thread Michael Paquier
On Sat, Aug 01, 2020 at 10:35:37AM -0700, Curt Kolovson wrote: > When trying to resync an old primary to become a new standby, I have found > that pg_rewind only works occasionally. How reliable/robust is pg_rewind, > and what are its limitations? We have observed that approx half our FPIs in > the

  1   2   3   4   >