Re: PostgreSQL Log Info

2024-11-21 Thread Jethish Jethish
Hi David, If an select query is fired I need the query returned values needs to be logged in my PostgreSQL log file. For example if a select query returns 5 rows I need the same in the log file On Fri, Nov 22, 2024, 10:49 AM David G. Johnston wrote: > On Thursday, November 21, 2024, Jethish J

Re: Fwd: A million users

2024-11-21 Thread Kaare Rasmussen
Hi That said, having a million users is a bit strange. Do you want to give each visitor to your website a unique Postgres role, or something like that? I think this is unusual, but it should work. OK, thanks for the feedback, all. It may not be necessary to have such a fine grained syst

Re: CVE-2024-10979 Vulnerability Impact on PostgreSQL 11.10

2024-11-21 Thread Adrian Klaver
On 11/21/24 20:53, David G. Johnston wrote: On Thursday, November 21, 2024, Adrian Klaver > wrote: On 11/21/24 20:31, Subhash Udata wrote: Thank you for your detailed response. I would like to clarify my situation further to ensure I take th

Re: PostgreSQL Log Info

2024-11-21 Thread David G. Johnston
On Thursday, November 21, 2024, Jethish Jethish wrote: > > Is it possible to log the rows returned by a query in the PostgreSQL logs? > As a practical matter, no. That said, given one can get row contents into the server log in various ways, what is the use case for why this capability is though

PostgreSQL Log Info

2024-11-21 Thread Jethish Jethish
Hi Everyone, Is it possible to log the rows returned by a query in the PostgreSQL logs?

Re: CVE-2024-10979 Vulnerability Impact on PostgreSQL 11.10

2024-11-21 Thread Laurenz Albe
On Fri, 2024-11-22 at 10:01 +0530, Subhash Udata wrote: > Currently, my environment is running PostgreSQL 15.0. I understand that > version > 15.9 contains the fix for CVE-2024-10979, as mentioned in the release notes. > Given that I am not using the PL/Perl extension in my environment, I wanted

CVE-2024-10979 Vulnerability Impact on PostgreSQL 11.10

2024-11-21 Thread David G. Johnston
On Thursday, November 21, 2024, Adrian Klaver wrote: > On 11/21/24 20:31, Subhash Udata wrote: > >> Thank you for your detailed response. I would like to clarify my >> situation further to ensure I take the appropriate steps. >> >> Currently, my environment is running *PostgreSQL 15.0*. I underst

Re: CVE-2024-10979 Vulnerability Impact on PostgreSQL 11.10

2024-11-21 Thread David G. Johnston
On Thursday, November 21, 2024, Subhash Udata wrote: > > Currently, my environment is running *PostgreSQL 15.0*. I understand that > version *15.9* contains the fix for CVE-2024-10979, as mentioned in the > release notes. > > Given that I am not using the *PL/Perl* extension in my environment > I

Re: CVE-2024-10979 Vulnerability Impact on PostgreSQL 11.10

2024-11-21 Thread Adrian Klaver
On 11/21/24 20:31, Subhash Udata wrote: Thank you for your detailed response. I would like to clarify my situation further to ensure I take the appropriate steps. Currently, my environment is running *PostgreSQL 15.0*. I understand that version *15.9* contains the fix for CVE-2024-10979, as me

Re: CVE-2024-10979 Vulnerability Impact on PostgreSQL 11.10

2024-11-21 Thread Ron Johnson
15.0 is missing TWO YEARS of bug fixes. https://www.postgresql.org/docs/release/ And It's your database, not ours. Plus, we aren't the Version Police that knock your head with a billy club if you don't upgrade. Patching takes 10 minutes, and any good DBA will keep his or her systems as patched a

Re: CVE-2024-10979 Vulnerability Impact on PostgreSQL 11.10

2024-11-21 Thread Adrian Klaver
On 11/21/24 19:57, Subhash Udata wrote: Hi Adrian, Thank you for your response regarding the affected versions of PostgreSQL. I have a follow-up question for clarification: The PostgreSQL documentation mentions that the versions with a fix for CVE-2024-10979 are *17.1, 16.5, 15.9, 14.14, 13.

Re: CVE-2024-10979 Vulnerability Impact on PostgreSQL 11.10

2024-11-21 Thread Tom Lane
"David G. Johnston" writes: > On Thursday, November 21, 2024, Subhash Udata > wrote: >> The PostgreSQL documentation mentions that the versions with a fix for >> CVE-2024-10979 are *17.1, 16.5, 15.9, 14.14, 13.17, and 12.21*. However, >> your reply states that any version greater than 13+ should

Re: CVE-2024-10979 Vulnerability Impact on PostgreSQL 11.10

2024-11-21 Thread Subhash Udata
Thank you for your detailed response. I would like to clarify my situation further to ensure I take the appropriate steps. Currently, my environment is running *PostgreSQL 15.0*. I understand that version *15.9* contains the fix for CVE-2024-10979, as mentioned in the release notes. Given that I

CVE-2024-10979 Vulnerability Impact on PostgreSQL 11.10

2024-11-21 Thread David G. Johnston
On Thursday, November 21, 2024, Subhash Udata wrote: > > > Thank you for your response regarding the affected versions of PostgreSQL. > I have a follow-up question for clarification: > > The PostgreSQL documentation mentions that the versions with a fix for > CVE-2024-10979 are *17.1, 16.5, 15.9,

Re: CVE-2024-10979 Vulnerability Impact on PostgreSQL 11.10

2024-11-21 Thread Subhash Udata
Hi Adrian, Thank you for your response regarding the affected versions of PostgreSQL. I have a follow-up question for clarification: The PostgreSQL documentation mentions that the versions with a fix for CVE-2024-10979 are *17.1, 16.5, 15.9, 14.14, 13.17, and 12.21*. However, your reply states th

Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?

2024-11-21 Thread Steeve Boulanger
> 1) Do the 77 share some trait the other 80 don't. No pattern found yet .. but still verifying a few things > 2) Do the OS system logs reveal anything? Nothing found in syslog > 3) What was happening in the databases just prior to the time the stats reset? Here's an example (log extracts) fo

Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?

2024-11-21 Thread Adrian Klaver
On 11/21/24 13:31, Steeve Boulanger wrote: > All I can think to do is look at the logs  around the stats_reset times > for the databases and see if there is anything relevant. That was already done, but nothing relevant was found unfortunately. Unless it was not recognized as relevant. Since

Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?

2024-11-21 Thread Steeve Boulanger
Hello Ron, > Also, "SELECT pg_postmaster_start_time();" to show the *real* Postgresql start time, instead of what you think it is. Yes you're right - I should have been more explicit. [local]:5432 postgres@postgres=# select current_timestamp - pg_postmaster_start_time() as uptime; uptim

Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?

2024-11-21 Thread Steeve Boulanger
> All I can think to do is look at the logs around the stats_reset times > for the databases and see if there is anything relevant. That was already done, but nothing relevant was found unfortunately. -Steeve On Thu, Nov 21, 2024 at 3:12 PM Adrian Klaver wrote: > On 11/21/24 12:57, Steeve Bo

Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?

2024-11-21 Thread Ron Johnson
On Thu, Nov 21, 2024 at 4:12 PM Adrian Klaver wrote: > On 11/21/24 12:57, Steeve Boulanger wrote: > > > > > Please reply to list also. > > > > My apologies - I thought I did a "Reply all", but apparently not. I'm a > > little bit of a noob with email distrib lists. > > > > > 1) What is log_min_

Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?

2024-11-21 Thread Adrian Klaver
On 11/21/24 12:57, Steeve Boulanger wrote: > Please reply to list also. My apologies - I thought I did a "Reply all", but apparently not. I'm a little bit of a noob with email distrib lists. > 1) What is log_min_error_statement set to?           name           | setting | pending_restart

Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?

2024-11-21 Thread Steeve Boulanger
> Please reply to list also. My apologies - I thought I did a "Reply all", but apparently not. I'm a little bit of a noob with email distrib lists. > 1) What is log_min_error_statement set to? name | setting | pending_restart -+-+--

Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?

2024-11-21 Thread Adrian Klaver
On 11/21/24 12:34, Steeve Boulanger wrote: Please reply to list also. Ccing list. Thanks Adrian for taking the time to respond. I will review the documentation once more, just in case I missed anything. My apologies - I forgot to mention in my original post, that our last cluster shutdown

Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?

2024-11-21 Thread Adrian Klaver
On 11/21/24 09:29, Steeve Boulanger wrote: Hello, I have noticed recently that our databases (ie most but not all) have their stats reset on daily basis: select count(case when stats_reset > (now() - interval '1 day') then 1 else null end) db_reset_cnt, count(*) db_total_cnt from pg_stat_dat

Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?

2024-11-21 Thread Steeve Boulanger
Hello, I have noticed recently that our databases (ie most but not all) have their stats reset on daily basis: select count(case when stats_reset > (now() - interval '1 day') then 1 else null end) db_reset_cnt, count(*) db_total_cnt from pg_stat_database; db_reset_cnt | db_total_cnt

Re: Postgres service not starting on windows after install if not installed into standard locations

2024-11-21 Thread Adrian Klaver
On 11/21/24 06:10, Thomas Schweikle wrote: Am Mi., 20.Nov..2024 um 18:15:42 schrieb Adrian Klaver: On 11/20/24 05:26, Thomas Schweikle wrote: Am Mo., 18.Nov..2024 um 19:43:36 schrieb Laurenz Albe: On Mon, 2024-11-18 at 17:22 +, Thomas Schweikle wrote: Had installed PostgreSQL 16.5 on Wind

Re: Update to postgresql 14.14

2024-11-21 Thread Levente Birta
On 20/11/2024 18:15, Adrian Klaver wrote: On 11/20/24 06:26, Levente Birta wrote: Hi I'm trying to update postgresql 14.13->14.14, but there is a libllvm 18.1 dependency. I have enabled the pgdg-centos8-sysupdates repo, but as I see there is no llvm 18, only 16/17. Is something that I mis

Re: Postgres service not starting on windows after install if not installed into standard locations

2024-11-21 Thread Thomas Schweikle
Am Mi., 20.Nov..2024 um 18:15:42 schrieb Adrian Klaver: > On 11/20/24 05:26, Thomas Schweikle wrote: >> Am Mo., 18.Nov..2024 um 19:43:36 schrieb Laurenz Albe: >>> On Mon, 2024-11-18 at 17:22 +, Thomas Schweikle wrote: Had installed PostgreSQL 16.5 on Windows 10: > >>> How exactly is the W

Re: Validating check constraints without a table scan?

2024-11-21 Thread Philip Couling
Jian He The context here is constraints for partitioning as suggested in documentation https://www.postgresql.org/docs/current/ddl-partitioning.html#DDL-PARTITIONING-DECLARATIVE-MAINTENANCE An example constraint from the documentation: ALTER TABLE measurement_y2008m02 ADD CONSTRAINT y2008m02 C