Re: Better, consistent instrumentation for postgreSQL using a similar API as Oracle

2021-10-04 Thread Mladen Gogala



On 10/4/21 02:34, Laurenz Albe wrote:

On Fri, 2021-10-01 at 15:06 -0500, Jeff Holt wrote:

TLDR; If I spend the time necessary to instrument the many functions that are 
the equivalent
of the Oracle counterparts, would anyone pull those changes and use them?
Specifically, for those who know Oracle, I'm talking about implementing:
    1. The portion of the ALTER SESSION that enables extended SQL trace
    2. Most of the DBMS_MONITOR and DBMS_APPLICATION_INFO packages
    3. Instrument the thousand or so functions that are the equivalent of those 
found in Oracle's V$EVENT_NAME
    4. Dynamic performance view V$DIAG_INFO
For the last 35 years, I've made my living helping people solve Oracle 
performance problems by looking at it


[...]

Now looking closely at postgreSQL, I see an opportunity to more quickly 
implement Oracle's current feature list.

Anything that improves user experience in that respect is welcome, but consider
that each database has different approaches to solve the same problems.

Before you go to the length of implementing a lot of stuff, check in with
the -hackers list and discuss your ideas.

Please be a lot more specific than in this e-mail.  While it is certainly
fine to sketch your ambitios vision, focus on one specific thing you can
imagine implementing and come up with a design for that.

Note that "Oracle has it" is not a good enough reason for a PostgreSQL
feature.  We think we can do better than they do (at least in many respects).
Also, don't assume that everyone on the -hackers list will be familiar with
certain PostgreSQL features.

One think that you should keep in mind is that Oracle has to provide different
features in that area because they are not open source.  In PostgreSQL, I can
simply read the code or attach a debugger to a backend, and when it comes to
profiling, "perf" works pretty well.  So there is less need for these things.

I don't want to discourage you, but contributing to PostgreSQL can be a lengthy
and tedious process.  On the upside, things that make it into core are usually
fairly mature.

Yours,
Laurenz Albe


Laurenz, you are obviously not aware who are you talking to. Let me 
introduce you: Cary Millsap and Jeff Holt are authors of the "Optimizing 
Oracle for Performance", one of the most influential books in the entire 
realm of  Oracle literature.  The book describes the method of tuning 
Oracle applications by examining where are they spending time and what 
are they waiting for. The book can be found on Amazon and I would 
seriously advise you to read it:


https://www.amazon.com/Optimizing-Oracle-Performance-Practitioners-Response-ebook/dp/B00BJ9A8SU/ref=sr_1_1?dchild=1&keywords=Optimizing+Oracle+for+Performance&qid=1633395886&s=books&sr=1-1

Haughty lectures about "Oracle has it" not being good enough could 
hardly be more out of place here. To put it as politely as is possible 
in this case, shut your pie hole. What Jeff is asking for is not 
something that "Oracle has", it's something that customers want. That 
was the case few years ago when I was asking for the optimizer hints. I 
was castigated by the former pastry baker turned Postgres guru and my 
reaction was simple: I threw Postgres out of the company that I was a 
working for as the lead DBA. You see, customer is always right, whether 
the database is open source or not. Needless to say, Postgres has 
optimizer hints these days. It still has them in "we do not want" part 
of the Wiki, which is hilarious.


You see, without proper event instrumentation, and knowing where the 
application spends time, it is not possible to exactly tune that 
application. Oracle used to have a witchcraft based lore like that, 
where the performance was estimated, based on buffer cache hit ratio, 
the famous "BCHR". That was known as "Method C". The name comes from 
Cary's and Jeff's book. Jeff and Cary are the ones who made the BCHR 
based black magic - obsolete.


In other words, Jeff is asking for a method to fine tune the 
applications with precision. Instead of being an arrogant person, 
you should have given him the answer:


https://github.com/postgrespro/pg_wait_sampling

Postgres already has an extension which implements around 60% of what 
Oracle has. Of course, Oracle's mechanism is somewhat more refined but 
it is also 20 years older. Cary Millsap, Anjo Kolk and Jeff Holt were 
implementing the instrumentation for Oracle 7. There was a huge pile of 
paper, printed off Metalink, a predecessor of "My Oracle Support", 
describing Oracle 7 events and explaining what Oracle was actually 
waiting for. At that time Cary Millsap was a VP in Oracle development. 
The book came out for Oracle8. You see, Jeff Holt really knows what he's 
asking for. You are the ignorant one, the one who engaged in talking at 
Jeff, not knowing that there already is an answer. There is no shame in 
not knowing something, people ask questions all the time. Arrogantly 
talking at someone and giving unsolicited lectur

Re: Better, consistent instrumentation for postgreSQL using a similar API as Oracle

2021-10-04 Thread [email protected]
Mladen,

Shame on u lecturing a top notch guy in the PostgreSQL world, Laurenz Albe. I 
think Laurenz knows “a little bit” about Oracle having written the popular 
extension, fdw_oracle, among his many other contributions to the PG world. So 
ironic that Laurenz was just named “PostgReSQL person of the week”, and then 
has to be subjected to this “tirade” of yours!

Follow the PG protocol in submitting your change requests to core PG and stop 
your Bitchin!

Michael Vitale


Sent from my iPad

> On Oct 4, 2021, at 9:51 PM, Mladen Gogala  wrote:
> 
> 
>> On 10/4/21 02:34, Laurenz Albe wrote:
>>> On Fri, 2021-10-01 at 15:06 -0500, Jeff Holt wrote:
>>> TLDR; If I spend the time necessary to instrument the many functions that 
>>> are the equivalent
>>> of the Oracle counterparts, would anyone pull those changes and use them?
>>> Specifically, for those who know Oracle, I'm talking about implementing:
>>>1. The portion of the ALTER SESSION that enables extended SQL trace
>>>2. Most of the DBMS_MONITOR and DBMS_APPLICATION_INFO packages
>>>3. Instrument the thousand or so functions that are the equivalent of 
>>> those found in Oracle's V$EVENT_NAME
>>>4. Dynamic performance view V$DIAG_INFO
>>> For the last 35 years, I've made my living helping people solve Oracle 
>>> performance problems by looking at it
>>> 
>> [...]
>>> Now looking closely at postgreSQL, I see an opportunity to more quickly 
>>> implement Oracle's current feature list.
>> Anything that improves user experience in that respect is welcome, but 
>> consider
>> that each database has different approaches to solve the same problems.
>> 
>> Before you go to the length of implementing a lot of stuff, check in with
>> the -hackers list and discuss your ideas.
>> 
>> Please be a lot more specific than in this e-mail.  While it is certainly
>> fine to sketch your ambitios vision, focus on one specific thing you can
>> imagine implementing and come up with a design for that.
>> 
>> Note that "Oracle has it" is not a good enough reason for a PostgreSQL
>> feature.  We think we can do better than they do (at least in many respects).
>> Also, don't assume that everyone on the -hackers list will be familiar with
>> certain PostgreSQL features.
>> 
>> One think that you should keep in mind is that Oracle has to provide 
>> different
>> features in that area because they are not open source.  In PostgreSQL, I can
>> simply read the code or attach a debugger to a backend, and when it comes to
>> profiling, "perf" works pretty well.  So there is less need for these things.
>> 
>> I don't want to discourage you, but contributing to PostgreSQL can be a 
>> lengthy
>> and tedious process.  On the upside, things that make it into core are 
>> usually
>> fairly mature.
>> 
>> Yours,
>> Laurenz Albe
> 
> Laurenz, you are obviously not aware who are you talking to. Let me introduce 
> you: Cary Millsap and Jeff Holt are authors of the "Optimizing Oracle for 
> Performance", one of the most influential books in the entire realm of  
> Oracle literature.  The book describes the method of tuning Oracle 
> applications by examining where are they spending time and what are they 
> waiting for. The book can be found on Amazon and I would seriously advise you 
> to read it:
> 
> https://www.amazon.com/Optimizing-Oracle-Performance-Practitioners-Response-ebook/dp/B00BJ9A8SU/ref=sr_1_1?dchild=1&keywords=Optimizing+Oracle+for+Performance&qid=1633395886&s=books&sr=1-1
> 
> Haughty lectures about "Oracle has it" not being good enough could hardly be 
> more out of place here. To put it as politely as is possible in this case, 
> shut your pie hole. What Jeff is asking for is not something that "Oracle 
> has", it's something that customers want. That was the case few years ago 
> when I was asking for the optimizer hints. I was castigated by the former 
> pastry baker turned Postgres guru and my reaction was simple: I threw 
> Postgres out of the company that I was a working for as the lead DBA. You 
> see, customer is always right, whether the database is open source or not. 
> Needless to say, Postgres has optimizer hints these days. It still has them 
> in "we do not want" part of the Wiki, which is hilarious.
> 
> You see, without proper event instrumentation, and knowing where the 
> application spends time, it is not possible to exactly tune that application. 
> Oracle used to have a witchcraft based lore like that, where the performance 
> was estimated, based on buffer cache hit ratio, the famous "BCHR". That was 
> known as "Method C". The name comes from Cary's and Jeff's book. Jeff and 
> Cary are the ones who made the BCHR based black magic - obsolete.
> 
> In other words, Jeff is asking for a method to fine tune the applications 
> with precision. Instead of being an arrogant person, you should have 
> given him the answer:
> 
> https://github.com/postgrespro/pg_wait_sampling
> 
> Postgres already has an extension which implements around 60% 

Re: Better, consistent instrumentation for postgreSQL using a similar API as Oracle

2021-10-04 Thread Peter Geoghegan
On Mon, Oct 4, 2021 at 6:51 PM Mladen Gogala  wrote:
> Haughty lectures about "Oracle has it" not being good enough could
> hardly be more out of place here. To put it as politely as is possible
> in this case, shut your pie hole. What Jeff is asking for is not
> something that "Oracle has", it's something that customers want. That
> was the case few years ago when I was asking for the optimizer hints. I
> was castigated by the former pastry baker turned Postgres guru and my
> reaction was simple: I threw Postgres out of the company that I was a
> working for as the lead DBA. You see, customer is always right, whether
> the database is open source or not. Needless to say, Postgres has
> optimizer hints these days. It still has them in "we do not want" part
> of the Wiki, which is hilarious.

In all sincerity: Chill out. I don't think that this is worth getting
into an argument over. I think that there is a good chance that you'd
have had a much better experience if the conversation had been in
person. Text has a way of losing a lot of important nuance.

I have personally met and enjoyed talking to quite a few people that
personally worked on Oracle, in various capacities -- the world of
database internals experts is not huge. I find Tanel Poder very
interesting, too -- never met the man, but we follow each other on
Twitter. Oracle is a system that has some interesting properties in
general (not just as a counterpoint to PostgreSQL), and I definitely
respect it. Same with SQL Server.

There are lots of smart and accomplished people in the world,
including Jeff. I think that it's worth understanding these
differences in perspective. There is likely to be merit in all of the
specific points made by both Laurenze and Jeff. They may not be
irreconcilable, or anything like it.

-- 
Peter Geoghegan




Re: Better, consistent instrumentation for postgreSQL using a similar API as Oracle

2021-10-04 Thread Mladen Gogala



On 10/4/21 22:25, [email protected] wrote:

Mladen,

Shame on u lecturing a top notch guy in the PostgreSQL world, Laurenz Albe. I 
think Laurenz knows “a little bit” about Oracle having written the popular 
extension, fdw_oracle, among his many other contributions to the PG world. So 
ironic that Laurenz was just named “PostgReSQL person of the week”, and then 
has to be subjected to this “tirade” of yours!

Follow the PG protocol in submitting your change requests to core PG and stop 
your Bitchin!

Michael Vitale


First, a matter of format: please don't top-post. Replies go under the 
original posts. That's an unwritten rule, but a very time honored one. 
Second, I know very well who Laurenz Albe is. We have met on the 
oracle-l few decades ago. Third, I think that my reproach to Laurenz's 
tone is very justified.  You don't say "the argument that Python has it 
is not good enough" to Dennis Ritchie. Hopefully, you get my analogy, 
but one cannot ever be sure.


Last, I didn't request any new features from the Postgres community. 
That's a mistake that I'll never commit again. Last time I tried, this 
has happened:


https://www.toolbox.com/tech/data-management/blogs/why-postgresql-doesnt-have-query-hints-020411/

I still keep it in my bookmark folder, under "Humor". I used that 
article several times on the oracle-l as an illustration some properties 
of Postgres community. That article was a gift and I am sincerely 
grateful. Of course, PostgreSQL now has query hints.


--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com





Re: Better, consistent instrumentation for postgreSQL using a similar API as Oracle

2021-10-04 Thread Mladen Gogala



On 10/4/21 23:08, Peter Geoghegan wrote:

n all sincerity: Chill out. I don't think that this is worth getting
into an argument over. I think that there is a good chance that you'd
have had a much better experience if the conversation had been in
person. Text has a way of losing a lot of important nuance.

I have personally met and enjoyed talking to quite a few people that
personally worked on Oracle, in various capacities -- the world of
database internals experts is not huge. I find Tanel Poder very
interesting, too -- never met the man, but we follow each other on
Twitter. Oracle is a system that has some interesting properties in
general (not just as a counterpoint to PostgreSQL), and I definitely
respect it. Same with SQL Server.

There are lots of smart and accomplished people in the world,
including Jeff. I think that it's worth understanding these
differences in perspective. There is likely to be merit in all of the
specific points made by both Laurenze and Jeff. They may not be
irreconcilable, or anything like it.


What angered me was the presumptuous tone of voice directed to an Oracle 
legend. I have probably talked to many more Oracle people than you, 
including Tanel, whom I have met personally. I am not on Twitter, 
unfortunately I am older than 20. Before you ask, I am not on Instagram, 
Facebook or Tiktok. I am not on OnlyFans either. I have never understood 
the need to share one's every thought in real time. Being rather private 
person has probably stymied my career of an internet influencer. I'll 
never rival Kim Kardashian.


As for Jeff Holt, I believe that a person of his stature needs to be 
taken seriously and not lectured "how are things done in Postgres 
community". I  am rather confused by the thinly veiled hostility toward 
Oracle. In my opinion, Postgres community should be rather welcoming to 
Oracle people like Frits Hoogland, Frank Pachot or Jeff Holt. After all, 
we are using Postgres and telling us "you can't have what you used to 
get from Oracle" is not either encouraging or smart. If you want 
consulting jobs in big banks and for a decent money, you might just take 
Oracle people seriously. Have you ever wondered why Oracle has so many 
customers despite the fact that it's so freakishly expensive?


--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com





Re: Better, consistent instrumentation for postgreSQL using a similar API as Oracle

2021-10-04 Thread Peter Geoghegan
On Mon, Oct 4, 2021 at 9:04 PM Mladen Gogala  wrote:
> What angered me was the presumptuous tone of voice directed to an Oracle
> legend. I have probably talked to many more Oracle people than you,
> including Tanel, whom I have met personally. I am not on Twitter,
> unfortunately I am older than 20. Before you ask, I am not on Instagram,
> Facebook or Tiktok. I am not on OnlyFans either. I have never understood
> the need to share one's every thought in real time. Being rather private
> person has probably stymied my career of an internet influencer. I'll
> never rival Kim Kardashian.

You do seem shy.

> As for Jeff Holt, I believe that a person of his stature needs to be
> taken seriously and not lectured "how are things done in Postgres
> community".

I haven't met Jeff Holt either, but I believe that he is also older
than 20. I have to imagine that he doesn't particularly need you to
defend his honor.

> I  am rather confused by the thinly veiled hostility toward
> Oracle. In my opinion, Postgres community should be rather welcoming to
> Oracle people like Frits Hoogland, Frank Pachot or Jeff Holt. After all,
> we are using Postgres and telling us "you can't have what you used to
> get from Oracle" is not either encouraging or smart.

I agree with all that. I am also friendly with Frank, as it happens.

I think that Laurenze was just trying to establish common terms of
reference for discussion -- it's easy for two groups of people with
similar but different terminology to talk past each other. For
example, I think that there may be confusion about what is possible
with a tool like eBPF today, and what might be possible in an ideal
world.

-- 
Peter Geoghegan