public inbox for [email protected]help / color / mirror / Atom feed
PostgreSQL Log Info 9+ messages / 5 participants [nested] [flat]
* PostgreSQL Log Info @ 2024-11-22 05:02 Jethish Jethish <[email protected]> 0 siblings, 1 reply; 9+ messages in thread From: Jethish Jethish @ 2024-11-22 05:02 UTC (permalink / raw) To: [email protected] Hi Everyone, Is it possible to log the rows returned by a query in the PostgreSQL logs? ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: PostgreSQL Log Info @ 2024-11-22 05:19 David G. Johnston <[email protected]> parent: Jethish Jethish <[email protected]> 0 siblings, 1 reply; 9+ messages in thread From: David G. Johnston @ 2024-11-22 05:19 UTC (permalink / raw) To: Jethish Jethish <[email protected]>; +Cc: [email protected] <[email protected]> On Thursday, November 21, 2024, Jethish Jethish <[email protected]> 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 thought to be needed? David J. ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: PostgreSQL Log Info @ 2024-11-22 07:32 Jethish Jethish <[email protected]> parent: David G. Johnston <[email protected]> 0 siblings, 4 replies; 9+ messages in thread From: Jethish Jethish @ 2024-11-22 07:32 UTC (permalink / raw) To: David G. Johnston <[email protected]>; +Cc: [email protected] 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 <[email protected]> wrote: > On Thursday, November 21, 2024, Jethish Jethish <[email protected]> > 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 thought to be needed? > > David J. > ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: PostgreSQL Log Info @ 2024-11-22 09:07 Ron Johnson <[email protected]> parent: Jethish Jethish <[email protected]> 3 siblings, 0 replies; 9+ messages in thread From: Ron Johnson @ 2024-11-22 09:07 UTC (permalink / raw) To: pgsql-generallists.postgresql.org <[email protected]> Isn't "I need the query returned values" the purpose of the client application? On Fri, Nov 22, 2024 at 2:32 AM Jethish Jethish <[email protected]> wrote: > 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 < > [email protected]> wrote: > >> On Thursday, November 21, 2024, Jethish Jethish <[email protected]> >> 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 thought to be needed? >> >> David J. >> > -- Death to <Redacted>, and butter sauce. Don't boil me, I'm still alive. <Redacted> lobster! ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: PostgreSQL Log Info @ 2024-11-22 11:35 Karsten Hilbert <[email protected]> parent: Jethish Jethish <[email protected]> 3 siblings, 0 replies; 9+ messages in thread From: Karsten Hilbert @ 2024-11-22 11:35 UTC (permalink / raw) To: [email protected] Am Fri, Nov 22, 2024 at 01:02:27PM +0530 schrieb Jethish Jethish: > If an select query is fired I need the query returned values needs to be > logged in my PostgreSQL log file. What do you expect your log file to be in size after, say, a day of activity ? Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: PostgreSQL Log Info @ 2024-11-22 16:02 Adrian Klaver <[email protected]> parent: Jethish Jethish <[email protected]> 3 siblings, 0 replies; 9+ messages in thread From: Adrian Klaver @ 2024-11-22 16:02 UTC (permalink / raw) To: Jethish Jethish <[email protected]>; David G. Johnston <[email protected]>; +Cc: [email protected] On 11/21/24 23:32, Jethish Jethish wrote: > 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 What if the query returns 500,000 rows? What is the purpose of retaining this information? > > > On Fri, Nov 22, 2024, 10:49 AM David G. Johnston > <[email protected] <mailto:[email protected]>> wrote: > > On Thursday, November 21, 2024, Jethish Jethish > <[email protected] <mailto:[email protected]>> 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 thought to be needed? > > David J. > -- Adrian Klaver [email protected] ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: PostgreSQL Log Info @ 2024-11-22 16:15 David G. Johnston <[email protected]> parent: Jethish Jethish <[email protected]> 3 siblings, 1 reply; 9+ messages in thread From: David G. Johnston @ 2024-11-22 16:15 UTC (permalink / raw) To: Jethish Jethish <[email protected]>; +Cc: [email protected] On Fri, Nov 22, 2024 at 12:32 AM Jethish Jethish <[email protected]> wrote: > If an select query is fired I need the query returned values needs to be > logged in my PostgreSQL log file. > Then the answer is no, and unlikely to become a feature anyone would develop or that we'd accept. A more innovative solution is going to need to be thought up to satisfy the security people that want to know what data was acquired from their system by either their users or semi-privileged hackers (privileged exploits would likely just disable such logging anyway). The space of setting up a proxy server in between clients and the PostgreSQL server is under-explored as a means by which to incorporate such functionality externally to the core server. David J. ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: PostgreSQL Log Info @ 2024-11-22 16:26 Jethish Jethish <[email protected]> parent: David G. Johnston <[email protected]> 0 siblings, 1 reply; 9+ messages in thread From: Jethish Jethish @ 2024-11-22 16:26 UTC (permalink / raw) To: David G. Johnston <[email protected]>; +Cc: [email protected] Sorry guys, what I meant was to log the tuple returned count not the values to get printed in logs. On Fri, Nov 22, 2024, 9:46 PM David G. Johnston <[email protected]> wrote: > On Fri, Nov 22, 2024 at 12:32 AM Jethish Jethish <[email protected]> > wrote: > >> If an select query is fired I need the query returned values needs to be >> logged in my PostgreSQL log file. >> > Then the answer is no, and unlikely to become a feature anyone would > develop or that we'd accept. > > A more innovative solution is going to need to be thought up to > satisfy the security people that want to know what data was acquired from > their system by either their users or semi-privileged hackers (privileged > exploits would likely just disable such logging anyway). The space of > setting up a proxy server in between clients and the PostgreSQL server is > under-explored as a means by which to incorporate such functionality > externally to the core server. > > David J. > ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: PostgreSQL Log Info @ 2024-11-22 16:34 David G. Johnston <[email protected]> parent: Jethish Jethish <[email protected]> 0 siblings, 0 replies; 9+ messages in thread From: David G. Johnston @ 2024-11-22 16:34 UTC (permalink / raw) To: Jethish Jethish <[email protected]>; +Cc: [email protected] On Fri, Nov 22, 2024 at 9:26 AM Jethish Jethish <[email protected]> wrote: > Sorry guys, what I meant was to log the tuple returned count not the > values to get printed in logs. > That too is a no. Though more because is just doesn't seem useful enough to expend effort on designing and implementing something. There is a work-around in that you could enable auto-explain with analyze and read the actuals from that. David J. ^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2024-11-22 16:34 UTC | newest] Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-11-22 05:02 PostgreSQL Log Info Jethish Jethish <[email protected]> 2024-11-22 05:19 ` David G. Johnston <[email protected]> 2024-11-22 07:32 ` Jethish Jethish <[email protected]> 2024-11-22 09:07 ` Ron Johnson <[email protected]> 2024-11-22 11:35 ` Karsten Hilbert <[email protected]> 2024-11-22 16:02 ` Adrian Klaver <[email protected]> 2024-11-22 16:15 ` David G. Johnston <[email protected]> 2024-11-22 16:26 ` Jethish Jethish <[email protected]> 2024-11-22 16:34 ` David G. Johnston <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox