Hooks in PostgreSQL allow extending functionality by intercepting and modifying PostgreSQL's internal execution flow. There are several types of hooks for different phases like planning, execution, security. Hooks are function pointers that extensions can set to run custom code. This allows monitoring and modifying queries and user actions like login. Examples show how to use hooks to log queries, profile functions, or check passwords. Hooks require installing and uninstalling functions to set the pointers.
This document discusses different types of communication channels in SystemC, including primitive channels like sc_mutex, sc_semaphore, and sc_fifo. It provides examples of using each channel type to implement bus arbitration in a simple bus model with multiple masters and a slave module. sc_mutex is used with a mutex to allow only one master at a time to access the bus. sc_semaphore is used with a semaphore to allow multiple masters to concurrently access the bus. sc_fifo is used within a wrapper module between masters and the bus to buffer data.
The document discusses Bluespec, a hardware description language that allows for writing RTL designs from a higher level of abstraction. It covers Bluespec's toolchain which can generate Verilog code and perform simulation and synthesis. It also discusses Bluespec's strong type system and parallel programming model based on rules. The sample code shows how to write a bubble sort module in Bluespec using registers, rules, and scheduling constructs.
The Ring programming language version 1.10 book - Part 16 of 212Mahmoud Samir Fayed
Here are some key things to note about the new tracing functions in Ring 1.5:
- RingVM_SetTrace() allows you to specify a function name that will be called on certain tracing events. This function can then use the other tracing functions to inspect the call stack.
- RingVM_TraceData() returns an array containing information about the current trace event, like line number, file name, function name, etc.
- RingVM_TraceEvent() returns an integer code indicating the type of event, like new line, new function, return, error, etc.
- RingVM_TraceFunc() returns the name of the function currently being traced.
- RingVM_ScopesCount()
The document discusses how a website called UAZAA is continuing to use fraudulent code on its pages. The code is hidden using JavaScript encryption and hexadecimal encoding. It is embedded at the end of common JavaScript files, like jQuery, to avoid detection. The document provides the encrypted code as an example.
Модули в С++ 20: хорошие, плохие и ужасные. Владислав Чехарев. CoreHard Sprin...corehard_by
В докладе будут освещена тема модулей в С++, которые появятся в 20-ом стандарте. Рассмотрим какие вопросы они призваны решить и как. На примерах разберем, какие есть положительные и отрицательные моменты, а также какие проблемы могут возникнуть и как их можно решить.
This document discusses using TurboGears web application frameworks on both Python 2 and Python 3. It describes setting up separate Python 2 and Python 3 environments to develop TurboGears apps, installing TurboGears on both, and creating a basic app that renders templates. It also covers TurboGears features like object dispatch routing, template engines, database access using SQLAlchemy/Ming, and authentication.
This document summarizes the key changes and new features in PHP 5.6, which was released in August 2014. It provides details on the release process and timeline. Some major additions in 5.6 included constant scalar expressions, variadic functions, argument unpacking, and the power operator. Other improvements included better SSL/TLS support, the new phpdbg debugging tool, and performance enhancements. The document also outlines some backwards incompatible changes and deprecated features.
How many ways to monitor oracle golden gate-Collaborate 14Bobby Curtis
The document provides contact information for Bobby Curtis, a senior technical consultant specializing in Oracle GoldenGate and Oracle Enterprise Manager 12c. It lists his location, affiliations, areas of expertise, and contact details including his Twitter, blog, and email addresses. The document also provides links to registration and location pages for an upcoming training event from Enkitec and an overview of the topics to be covered, including monitoring approaches for Oracle GoldenGate.
This document discusses different types of communication channels in SystemC, including primitive channels like sc_mutex, sc_semaphore, and sc_fifo. It provides examples of using each channel type to implement bus arbitration in a simple bus model with multiple masters and a slave module. sc_mutex is used with a mutex to allow only one master at a time to access the bus. sc_semaphore is used with a semaphore to allow multiple masters to concurrently access the bus. sc_fifo is used within a wrapper module between masters and the bus to buffer data.
The document discusses Bluespec, a hardware description language that allows for writing RTL designs from a higher level of abstraction. It covers Bluespec's toolchain which can generate Verilog code and perform simulation and synthesis. It also discusses Bluespec's strong type system and parallel programming model based on rules. The sample code shows how to write a bubble sort module in Bluespec using registers, rules, and scheduling constructs.
The Ring programming language version 1.10 book - Part 16 of 212Mahmoud Samir Fayed
Here are some key things to note about the new tracing functions in Ring 1.5:
- RingVM_SetTrace() allows you to specify a function name that will be called on certain tracing events. This function can then use the other tracing functions to inspect the call stack.
- RingVM_TraceData() returns an array containing information about the current trace event, like line number, file name, function name, etc.
- RingVM_TraceEvent() returns an integer code indicating the type of event, like new line, new function, return, error, etc.
- RingVM_TraceFunc() returns the name of the function currently being traced.
- RingVM_ScopesCount()
The document discusses how a website called UAZAA is continuing to use fraudulent code on its pages. The code is hidden using JavaScript encryption and hexadecimal encoding. It is embedded at the end of common JavaScript files, like jQuery, to avoid detection. The document provides the encrypted code as an example.
Модули в С++ 20: хорошие, плохие и ужасные. Владислав Чехарев. CoreHard Sprin...corehard_by
В докладе будут освещена тема модулей в С++, которые появятся в 20-ом стандарте. Рассмотрим какие вопросы они призваны решить и как. На примерах разберем, какие есть положительные и отрицательные моменты, а также какие проблемы могут возникнуть и как их можно решить.
This document discusses using TurboGears web application frameworks on both Python 2 and Python 3. It describes setting up separate Python 2 and Python 3 environments to develop TurboGears apps, installing TurboGears on both, and creating a basic app that renders templates. It also covers TurboGears features like object dispatch routing, template engines, database access using SQLAlchemy/Ming, and authentication.
This document summarizes the key changes and new features in PHP 5.6, which was released in August 2014. It provides details on the release process and timeline. Some major additions in 5.6 included constant scalar expressions, variadic functions, argument unpacking, and the power operator. Other improvements included better SSL/TLS support, the new phpdbg debugging tool, and performance enhancements. The document also outlines some backwards incompatible changes and deprecated features.
How many ways to monitor oracle golden gate-Collaborate 14Bobby Curtis
The document provides contact information for Bobby Curtis, a senior technical consultant specializing in Oracle GoldenGate and Oracle Enterprise Manager 12c. It lists his location, affiliations, areas of expertise, and contact details including his Twitter, blog, and email addresses. The document also provides links to registration and location pages for an upcoming training event from Enkitec and an overview of the topics to be covered, including monitoring approaches for Oracle GoldenGate.
This document summarizes a workshop on quality of life through unit testing in Python 3. The workshop aims to:
1) Understand how unit testing can improve quality of life by ensuring quality code.
2) Practice unit testing in Python 3 by writing and running tests.
3) Integrate unit testing into the development workflow as part of continuous integration.
The document provides an introduction to unit testing concepts and best practices. It also demonstrates unit testing in Python 3 through examples and tricks for writing, importing, and automatically running tests. Finally, it discusses integrating unit testing into development and continuous integration workflows.
This document discusses potential stages and tasks for a recruitment challenge system for the OWASP organization. It proposes 3 stages:
Stage 1 involves basic tasks using telnet/SMTP to test technical skills. Stage 2 involves a social engineering challenge to test security awareness. Stage 3 involves securing a virtualized network using techniques like restricted shells, SSH tunnels, control groups, and firewalls. The goal is to optimize the recruitment process while minimizing risk of rejecting qualified candidates.
0507 057 01 98 * Adana Klima Servisleri, Adana Klima Servisi, Adana Klima Servisleri, Arçelik Klima Servisleri Adana, Beko Klima Servisleri Adana, Demirdöküm Klima Servisleri Adana, Vestel Klima Servisleri Adana, Aeg Klima Servisleri Adana, Bosch Klima Servisleri Adana, Ariston Klima Servisleri Adana, Samsung Klima Servisleri Adana, Siemens Klima Servisleri Adana, Profilo Klima Servisleri Adana, Fujitsu Klima Servisleri Adana, Baymak Klima Servisleri Adana, Sharp Klima Servisleri Adana, Mitsubishi Klima Servisleri Adana, Alaska Klima Servisleri Adana, Aura Klima Servisleri Adana, Adana Çukurova Klima Servisleri, Adana Yüreğir Klima Servisleri, Adana Seyhan Klima Servisleri
This document discusses recruitment processes and requirements for a secure system to optimize recruitment time and minimize risk of rejecting good candidates. It proposes a multi-stage challenge system beginning with basic tasks in telnet/SMTP and progressing to more advanced stages involving social engineering, virtualization, and network security scenarios. Restricted shells, control groups, and data security measures are also discussed to help ensure the system fulfills security requirements.
Because this system is web application (partially)
Because we based (100%) on FOSS (open-source)
Because security matters
Because OWASP people cares about security and can affect recruitment processes (hopefully) ;)
This document provides an overview of StormCrawler, an open source distributed crawler built on Apache Storm. It discusses key components like the FetcherBolt for fetching URLs, ParserBolt for parsing content and extracting metadata, and StatusUpdaterBolt for tracking crawl status. It also covers common configurations like URL partitioning, politeness policies, and filters. The document recommends using ConfigurableTopology or the archetype to simplify development, and describes how StormCrawler is used in production crawls involving news, images, and archiving to WARC files.
This document provides an overview of technologies and best practices for developing a web application using Spring Boot, Spring MVC, and other Spring technologies. It discusses setting up the project structure, implementing data access with Spring Data JPA and repositories, adding security, testing with Mockito and RestAssured, and documenting the API with Swagger.
Introduction to Gatling performance testing tool and how we used it for testing Zonky's REST API. Example of running distributed performance tests in AWS Fargate with real-time monitoring with Logstash/ElasticSearch/Kibana stack.
This document discusses how to write MySQL 5.1 plugins. It covers including necessary header files, declaring plugins, implementing a generic plugin descriptor, and providing init and deinit functions. It also provides an example of a minimal daemon plugin that logs initialization and deinitialization.
For the Docker users out there, Sematext's DevOps Evangelist, Stefan Thies, goes through a number of different Docker monitoring options, points out their pros and cons, and offers solutions for Docker monitoring. Webinar contains actionable content, diagrams and how-to steps.
Structured logs provide more context and are easier to analyze than traditional logs. This document discusses why one should use structured logs and how to implement structured logging in Python. Key points include:
- Structured logs add context like metadata, payloads and stack traces to log messages. This makes logs more searchable, reusable and easier to debug.
- Benefits of structured logs include easier developer onboarding, improved debugging and monitoring, and the ability to join logs from different systems.
- Python's logging module can be used to implement structured logging. This involves customizing the LogRecord and Formatter classes to output log messages as JSON strings.
- Considerations for structured logs include potential performance impacts from serialization
PG Day'14 Russia, PostgreSQL System Architecture, Heikki Linnakangaspgdayrussia
Доклад был представлен на официальной российской конференции PG Day'14 Russia, посвященной вопросам разработки и эксплуатации PostgreSQL.
Software architecture means a high-level view of the components of the system and their relationships. Understanding how various components work together is crucial if you want to start hacking on PostgreSQL, but also for understanding performance characteristics and run-time behavior of production systems.
Software architecture is not a single diagram, but consists of multiple views of the same system.
Process view: describing the processes at runtime and how they communicate.
Data flow: how a query passes through various parts of the system, and how the results flow back.
Data structures: how the Heap and Indexes are organized.
Source code: what's in the PostgreSQL source treem, and many more.
In this presentation, I will give an overview of the most important views necessary to understand how PostgreSQL works.
The document provides an overview of the nginx web server, describing its core features and modules for handling HTTP requests in an event-driven and non-blocking manner. It also outlines the process for creating custom modules, walking through the steps to create a simple "hello world" module that sets a request handler. The document encourages debugging and testing any new modules that are created.
This document provides an overview of logging concepts and configuration in Log4j 2. It describes what to log, different log levels, appenders for outputting logs, layouts for formatting log messages, and ways to filter, route, and rewrite logs. It also covers best practices for logging, programmatic configuration, plugins, and using Log4j 2 with other technologies like OSGi and Xtend annotations.
This is a bug bounty hunter presentation given at Nullcon 2016 by Bugcrowd's Faraz Khan.
Learn more about Bugcrowd here: https://bugcrowd.com/join-the-crowd
This document introduces how to build a simple trading bot using Python. It outlines communicating with exchanges via APIs, performing trades, analyzing data, and testing without real transactions. The bot queries balances, orders, and market data, applies trading algorithms, and logs statistics. Mock connections allow testing bot decisions against scenario files to validate functionality without financial risk. Overall, Python provides libraries to easily create initial trading bots for learning, even if profits are unlikely.
The document discusses several programming languages and libraries that provide concurrency constructs for parallel programming. It describes features for concurrency in Ada 95, Java, and C/C++ libraries including pthreads. Key features covered include threads, mutual exclusion locks, condition variables, and examples of implementing a bounded buffer for inter-thread communication.
Tracing and profiling my sql (percona live europe 2019) draft_1Valerii Kravchuk
The document discusses various tools that can be used for tracing and profiling MySQL, including Linux tools like strace, gdb, ftrace, bpftrace, perf, and dynamic probes. It focuses on perf as one of the best and easiest tools to use for tracing and profiling MySQL in production on Linux. Examples are provided of using perf to add probes to MySQL dynamically to capture SQL queries.
Performance Insights is a service that provides visibility into the performance of Amazon RDS databases. It monitors database load and average active sessions to identify potential bottlenecks. The dashboard allows users to filter metrics by time frame, SQL query, user, host, and other attributes to help diagnose performance issues across different database engines like Amazon Aurora and MySQL.
This document outlines the history of database monitoring from 1988 to the present. It describes early monitoring tools like Utlbstat/Utlestat from 1988-1990 that used ratios and averages. Patrol was one of the first database monitors introduced in 1993. M2 from 1994 introduced light-weight monitoring using direct memory access and sampling. Wait events became a key focus area from 1995 onward. Statspack was introduced in 1998 and provided more comprehensive monitoring than previous tools. Spotlight in 1999 made database problem diagnosis very easy without manuals. Later versions incorporated improved graphics, multi-dimensional views of top consumers, and sampling for faster problem identification.
More Related Content
Similar to Hooks in postgresql by Guillaume Lelarge
This document summarizes a workshop on quality of life through unit testing in Python 3. The workshop aims to:
1) Understand how unit testing can improve quality of life by ensuring quality code.
2) Practice unit testing in Python 3 by writing and running tests.
3) Integrate unit testing into the development workflow as part of continuous integration.
The document provides an introduction to unit testing concepts and best practices. It also demonstrates unit testing in Python 3 through examples and tricks for writing, importing, and automatically running tests. Finally, it discusses integrating unit testing into development and continuous integration workflows.
This document discusses potential stages and tasks for a recruitment challenge system for the OWASP organization. It proposes 3 stages:
Stage 1 involves basic tasks using telnet/SMTP to test technical skills. Stage 2 involves a social engineering challenge to test security awareness. Stage 3 involves securing a virtualized network using techniques like restricted shells, SSH tunnels, control groups, and firewalls. The goal is to optimize the recruitment process while minimizing risk of rejecting qualified candidates.
0507 057 01 98 * Adana Klima Servisleri, Adana Klima Servisi, Adana Klima Servisleri, Arçelik Klima Servisleri Adana, Beko Klima Servisleri Adana, Demirdöküm Klima Servisleri Adana, Vestel Klima Servisleri Adana, Aeg Klima Servisleri Adana, Bosch Klima Servisleri Adana, Ariston Klima Servisleri Adana, Samsung Klima Servisleri Adana, Siemens Klima Servisleri Adana, Profilo Klima Servisleri Adana, Fujitsu Klima Servisleri Adana, Baymak Klima Servisleri Adana, Sharp Klima Servisleri Adana, Mitsubishi Klima Servisleri Adana, Alaska Klima Servisleri Adana, Aura Klima Servisleri Adana, Adana Çukurova Klima Servisleri, Adana Yüreğir Klima Servisleri, Adana Seyhan Klima Servisleri
This document discusses recruitment processes and requirements for a secure system to optimize recruitment time and minimize risk of rejecting good candidates. It proposes a multi-stage challenge system beginning with basic tasks in telnet/SMTP and progressing to more advanced stages involving social engineering, virtualization, and network security scenarios. Restricted shells, control groups, and data security measures are also discussed to help ensure the system fulfills security requirements.
Because this system is web application (partially)
Because we based (100%) on FOSS (open-source)
Because security matters
Because OWASP people cares about security and can affect recruitment processes (hopefully) ;)
This document provides an overview of StormCrawler, an open source distributed crawler built on Apache Storm. It discusses key components like the FetcherBolt for fetching URLs, ParserBolt for parsing content and extracting metadata, and StatusUpdaterBolt for tracking crawl status. It also covers common configurations like URL partitioning, politeness policies, and filters. The document recommends using ConfigurableTopology or the archetype to simplify development, and describes how StormCrawler is used in production crawls involving news, images, and archiving to WARC files.
This document provides an overview of technologies and best practices for developing a web application using Spring Boot, Spring MVC, and other Spring technologies. It discusses setting up the project structure, implementing data access with Spring Data JPA and repositories, adding security, testing with Mockito and RestAssured, and documenting the API with Swagger.
Introduction to Gatling performance testing tool and how we used it for testing Zonky's REST API. Example of running distributed performance tests in AWS Fargate with real-time monitoring with Logstash/ElasticSearch/Kibana stack.
This document discusses how to write MySQL 5.1 plugins. It covers including necessary header files, declaring plugins, implementing a generic plugin descriptor, and providing init and deinit functions. It also provides an example of a minimal daemon plugin that logs initialization and deinitialization.
For the Docker users out there, Sematext's DevOps Evangelist, Stefan Thies, goes through a number of different Docker monitoring options, points out their pros and cons, and offers solutions for Docker monitoring. Webinar contains actionable content, diagrams and how-to steps.
Structured logs provide more context and are easier to analyze than traditional logs. This document discusses why one should use structured logs and how to implement structured logging in Python. Key points include:
- Structured logs add context like metadata, payloads and stack traces to log messages. This makes logs more searchable, reusable and easier to debug.
- Benefits of structured logs include easier developer onboarding, improved debugging and monitoring, and the ability to join logs from different systems.
- Python's logging module can be used to implement structured logging. This involves customizing the LogRecord and Formatter classes to output log messages as JSON strings.
- Considerations for structured logs include potential performance impacts from serialization
PG Day'14 Russia, PostgreSQL System Architecture, Heikki Linnakangaspgdayrussia
Доклад был представлен на официальной российской конференции PG Day'14 Russia, посвященной вопросам разработки и эксплуатации PostgreSQL.
Software architecture means a high-level view of the components of the system and their relationships. Understanding how various components work together is crucial if you want to start hacking on PostgreSQL, but also for understanding performance characteristics and run-time behavior of production systems.
Software architecture is not a single diagram, but consists of multiple views of the same system.
Process view: describing the processes at runtime and how they communicate.
Data flow: how a query passes through various parts of the system, and how the results flow back.
Data structures: how the Heap and Indexes are organized.
Source code: what's in the PostgreSQL source treem, and many more.
In this presentation, I will give an overview of the most important views necessary to understand how PostgreSQL works.
The document provides an overview of the nginx web server, describing its core features and modules for handling HTTP requests in an event-driven and non-blocking manner. It also outlines the process for creating custom modules, walking through the steps to create a simple "hello world" module that sets a request handler. The document encourages debugging and testing any new modules that are created.
This document provides an overview of logging concepts and configuration in Log4j 2. It describes what to log, different log levels, appenders for outputting logs, layouts for formatting log messages, and ways to filter, route, and rewrite logs. It also covers best practices for logging, programmatic configuration, plugins, and using Log4j 2 with other technologies like OSGi and Xtend annotations.
This is a bug bounty hunter presentation given at Nullcon 2016 by Bugcrowd's Faraz Khan.
Learn more about Bugcrowd here: https://bugcrowd.com/join-the-crowd
This document introduces how to build a simple trading bot using Python. It outlines communicating with exchanges via APIs, performing trades, analyzing data, and testing without real transactions. The bot queries balances, orders, and market data, applies trading algorithms, and logs statistics. Mock connections allow testing bot decisions against scenario files to validate functionality without financial risk. Overall, Python provides libraries to easily create initial trading bots for learning, even if profits are unlikely.
The document discusses several programming languages and libraries that provide concurrency constructs for parallel programming. It describes features for concurrency in Ada 95, Java, and C/C++ libraries including pthreads. Key features covered include threads, mutual exclusion locks, condition variables, and examples of implementing a bounded buffer for inter-thread communication.
Tracing and profiling my sql (percona live europe 2019) draft_1Valerii Kravchuk
The document discusses various tools that can be used for tracing and profiling MySQL, including Linux tools like strace, gdb, ftrace, bpftrace, perf, and dynamic probes. It focuses on perf as one of the best and easiest tools to use for tracing and profiling MySQL in production on Linux. Examples are provided of using perf to add probes to MySQL dynamically to capture SQL queries.
Similar to Hooks in postgresql by Guillaume Lelarge (20)
Performance Insights is a service that provides visibility into the performance of Amazon RDS databases. It monitors database load and average active sessions to identify potential bottlenecks. The dashboard allows users to filter metrics by time frame, SQL query, user, host, and other attributes to help diagnose performance issues across different database engines like Amazon Aurora and MySQL.
This document outlines the history of database monitoring from 1988 to the present. It describes early monitoring tools like Utlbstat/Utlestat from 1988-1990 that used ratios and averages. Patrol was one of the first database monitors introduced in 1993. M2 from 1994 introduced light-weight monitoring using direct memory access and sampling. Wait events became a key focus area from 1995 onward. Statspack was introduced in 1998 and provided more comprehensive monitoring than previous tools. Spotlight in 1999 made database problem diagnosis very easy without manuals. Later versions incorporated improved graphics, multi-dimensional views of top consumers, and sampling for faster problem identification.
Ash masters : advanced ash analytics on Oracle Kyle Hailey
The document discusses database performance tuning. It recommends using Active Session History (ASH) and sampling sessions to identify the root causes of performance issues like buffer busy waits. ASH provides key details on sessions, SQL statements, wait events, and durations to understand top resource consumers. Counting rows in ASH approximates time spent and is important for analysis. Sampling sessions in real-time can provide the SQL, objects, and blocking sessions involved in issues like buffer busy waits.
Successfully convince people with data visualizationKyle Hailey
Successfully convince people with data visualization
video of presentation available at https://www.youtube.com/watch?v=3PKjNnt14mk
from Data by the Bay conference
Virtual Data : Eliminating the data constraint in Application DevelopmentKyle Hailey
Virtual data provided by Delphix can eliminate data as a constraint in application development by enabling:
1) Fast provisioning of full-sized development databases in minutes from production data without moving large amounts of data. This allows development and testing to parallelize and find bugs earlier.
2) Self-service access to consistent, masked data for multiple use cases like development, security and cloud migration. Masking only needs to be done once before cloning databases.
3) Optimized data movement to the cloud through compression, encryption and replication of thin cloned data sets 1/3 the size of full production databases. This improves cloud migration and enables active-active disaster recovery across sites.
DBTA Data Summit : Eliminating the data constraint in Application DevelopmentKyle Hailey
1) The document discusses how data constraints are a major problem in application development. It slows down development cycles and leads to bugs. The proposed solution is using virtual data techniques to eliminate the need to move and manage physical copies of data.
2) Key use cases of virtual data techniques discussed are faster development, enhanced security through data masking, and easier cloud migration by reducing data movement. Virtual data allows instant provisioning of development environments and fast refresh of test data.
3) Customers reported benefits like cutting development cycles in half and reducing time to roll out new insurance products from 50 days to 23 days when using virtual data techniques.
Accelerate Develoment with VIrtual DataKyle Hailey
This document summarizes best practices for application development using data virtualization to remove data as a constraint. It discusses how data management currently does not scale with agile development and is a major bottleneck. The solution presented is using a data virtualization appliance to create thin clones from production data for development, QA, and test environments. This allows for self-service provisioning of environments and parallel development. It provides use cases showing how virtual data improves development throughput, shifts testing left to find bugs earlier, and enables continuous delivery of features to production.
Mark Farnam : Minimizing the Concurrency Footprint of TransactionsKyle Hailey
The document discusses minimizing the concurrency footprint of transactions by using packaged procedures. It recommends instrumenting all code, including PL/SQL, for performance monitoring. It provides examples of submitting trivial transactions using different methods like sending code from the client, sending a PL/SQL block, or calling a stored procedure. Calling a stored procedure is preferred as it avoids re-parsing and re-sending code and allows instrumentation to be added without extra network traffic.
The document discusses security considerations for installing and configuring an Oracle Exadata Database Machine. It recommends preparing for installation by collecting security requirements, subscribing to security alerts, and reviewing installation guidelines. During installation, it advises implementing available security features like the "Resecure Machine" step to tighten permissions and passwords. Post-deployment, it suggests addressing any site-specific security needs like changing default passwords and validating policies.
Martin Klier : Volkswagen for Oracle GuysKyle Hailey
Martin Klier of Performing Databases GmbH gave a Ted Talk at the Oak Table World 2015 conference about how Oracle database administrators are like Volkswagen cars. He compared different aspects of maintaining Oracle databases to maintaining Volkswagens, noting both require regular maintenance to ensure optimal performance. The talk referenced NOx emissions and concluded that as IT professionals, database administrators have power and a responsibility to use it wisely.
This document provides an overview of DevOps. It begins by describing the waterfall development process and its limitations in meeting goals and deadlines. It then introduces Agile as an improvement over waterfall by allowing for more frequent testing and deployment. The document discusses how Continuous Delivery takes Agile further by aiming to deploy new features continuously. It states that DevOps is required to fully achieve Continuous Delivery. DevOps is defined as achieving a fast flow of features from development to operations to customers. The top constraints preventing this flow are identified as development environments, testing environments, code architecture, development speed, and product management.
This document discusses using data virtualization to accelerate application projects by 50%. It outlines some common problems with physical data copies, such as bottlenecks, bugs due to old data, difficulty creating subsets, and delays. The document then introduces the concept of using a data virtualization appliance to take snapshots of production data and create thin clones for development and testing environments. This allows for fast, full-sized, self-service clones that can be refreshed quickly. Use cases discussed include improved development and testing workflows, faster production support like recovery and migration, and enabling continuous business intelligence functions.
Data Virtualization: Revolutionizing data cloningKyle Hailey
This document discusses data virtualization and its use in DevOps. It begins by explaining that data virtualization, also known as copy data management, is becoming more common. It then discusses how data virtualization enables DevOps practices like continuous integration by allowing fast provisioning of full database environments.
The document outlines some of the typical challenges with traditional database architectures, including long setup times, lack of parallel environments, and high storage costs due to many full database copies. It presents data virtualization as a solution, allowing instant provisioning of thin clones from a production database. Finally, it provides examples of how data virtualization can help with development/QA, production support, and business intelligence use cases.
The document discusses using data virtualization to address the constraint of data in DevOps workflows. It describes how traditional database cloning methods are inefficient and consume significant resources. The solution presented uses thin cloning technology to take snapshots of production databases and provide virtual copies for development, QA, and other environments. This allows for unlimited, self-service virtual databases that reduce bottlenecks and waiting times compared to physical copies.
Denver devops : enabling DevOps with data virtualizationKyle Hailey
This document discusses how data constraints can limit DevOps efforts and proposes a solution using virtual data and thin cloning. It notes that moving and copying production data is challenging due to storage, personnel and time requirements. This typically results in bottlenecks, long wait times for environments, code check-ins and production bugs. The solution presented is to use a data virtualization platform that can take thin clones of production data using file system snapshots, compress the data and share it across environments through a centralized cache. This allows self-service provisioning of database environments and accelerates DevOps processes.
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]Kyle Hailey
The document discusses analyzing I/O performance and summarizing lessons learned. It describes common tools used to measure I/O like moats.sh, strace, and ioh.sh. It also summarizes the top 10 anomalies encountered like caching effects, shared drives, connection limits, I/O request consolidation and fragmentation over NFS, and tiered storage migration. Solutions provided focus on avoiding caching, isolating workloads, proper sizing of NFS parameters, and direct I/O.
Oaktable World 2014 Toon Koppelaars: database constraints polite excuseKyle Hailey
The document discusses validation execution models for SQL assertions. It proposes moving from less efficient models that evaluate all assertions for every change (EM1) to more efficient models. Later models (EM3-EM5) evaluate only assertions involving changed tables, columns or literals based on parsing the assertion and change being made. The most efficient model (EM5) evaluates assertions only when the change transition effect potentially impacts the assertion. Overall the document argues SQL assertions could improve data quality if DBMS vendors supported more optimized evaluation models.
Profiling the logwriter and database writerKyle Hailey
The document discusses the behavior of the Oracle log writer (LGWR) process under different conditions. In idle mode, LGWR sleeps for 3 seconds at a time on a semaphore without writing to the redo log buffer. When a transaction is committed, LGWR may write the committed redo entries to disk either before or after the foreground process waits on a "log file sync" event, depending on whether LGWR has already flushed the data. The document also compares the "post-wait" and "polling" modes used for the log file sync wait.
Most important New features of Oracle 23c for DBAs and Developers. You can get more idea from my youtube channel video from https://youtu.be/XvL5WtaC20A
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
When it is all about ERP solutions, companies typically meet their needs with common ERP solutions like SAP, Oracle, and Microsoft Dynamics. These big players have demonstrated that ERP systems can be either simple or highly comprehensive. This remains true today, but there are new factors to consider, including a promising new contender in the market that’s Odoo. This blog compares Odoo ERP with traditional ERP systems and explains why many companies now see Odoo ERP as the best choice.
What are ERP Systems?
An ERP, or Enterprise Resource Planning, system provides your company with valuable information to help you make better decisions and boost your ROI. You should choose an ERP system based on your company’s specific needs. For instance, if you run a manufacturing or retail business, you will need an ERP system that efficiently manages inventory. A consulting firm, on the other hand, would benefit from an ERP system that enhances daily operations. Similarly, eCommerce stores would select an ERP system tailored to their needs.
Because different businesses have different requirements, ERP system functionalities can vary. Among the various ERP systems available, Odoo ERP is considered one of the best in the ERp market with more than 12 million global users today.
Odoo is an open-source ERP system initially designed for small to medium-sized businesses but now suitable for a wide range of companies. Odoo offers a scalable and configurable point-of-sale management solution and allows you to create customised modules for specific industries. Odoo is gaining more popularity because it is built in a way that allows easy customisation, has a user-friendly interface, and is affordable. Here, you will cover the main differences and get to know why Odoo is gaining attention despite the many other ERP systems available in the market.
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
Top 9 Trends in Cybersecurity for 2024.pptxdevvsandy
Security and risk management (SRM) leaders face disruptions on technological, organizational, and human fronts. Preparation and pragmatic execution are key for dealing with these disruptions and providing the right cybersecurity program.
How Can Hiring A Mobile App Development Company Help Your Business Grow?ToXSL Technologies
ToXSL Technologies is an award-winning Mobile App Development Company in Dubai that helps businesses reshape their digital possibilities with custom app services. As a top app development company in Dubai, we offer highly engaging iOS & Android app solutions. https://rb.gy/necdnt
SMS API Integration in Saudi Arabia| Best SMS API ServiceYara Milbes
Discover the benefits and implementation of SMS API integration in the UAE and Middle East. This comprehensive guide covers the importance of SMS messaging APIs, the advantages of bulk SMS APIs, and real-world case studies. Learn how CEQUENS, a leader in communication solutions, can help your business enhance customer engagement and streamline operations with innovative CPaaS, reliable SMS APIs, and omnichannel solutions, including WhatsApp Business. Perfect for businesses seeking to optimize their communication strategies in the digital age.
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesQuickdice ERP
Explore the seamless transition to e-invoicing with this comprehensive guide tailored for Saudi Arabian businesses. Navigate the process effortlessly with step-by-step instructions designed to streamline implementation and enhance efficiency.
2. 2
Who's Guillaume Lelarge?
● French translator of the PostgreSQL manual
● Member of pgAdmin's team
● Vice-treasurer of PostgreSQL Europe
● CTO of Dalibo
● Mail: guillaume@lelarge.info
● Twitter: g_lelarge
● Blog: http://blog.guillaume.lelarge.info
3. 3
PostgreSQL
● Well known for its extensibility
● For example, a user can add
– Types
– Functions
– Operators
– Languages
– Etc
● Extensions in 9.1
● Less known is the hook system
4. 4
Hooks
● Interrupt, and modify behaviour
● Not known because
– Not explained in the documentation
– Usually quite recent
● Four kinds of hooks
– Planner hooks
– Executor hooks
– Security/permissions hooks
– PL/pgsql hooks
9. 9
And yet another one
Hook Used in Initial release
shmem_startup_hook pg_stat_statements 8.4
10. 10
How do they work inside PG
● Hooks consist of global function pointers
● Initially set to NULL
● When PostgreSQL wants to use a hook
– It checks the global function pointer
– And executes it if it is set
11. 11
How do we set the function pointer?
● A hook function is available in a shared library
● At load time, PostgreSQL calls the _PG_init()
function of the shared library
● This function needs to set the pointer
– And usually saves the previous one!
12. 12
How do we unset the function pointer?
● At unload time, PostgreSQL calls the _PG_fini()
function of the shared library
● This function needs to unset the pointer
– And usually restores the previous one!
13. 13
Example with
ClientAuthentication_hook
● Declaration of the function type
– extract from src/include/libpq/auth.h, line 27
/* Hook for plugins to get control in ClientAuthentication() */
typedef void (*ClientAuthentication_hook_type) (Port *, int);
14. 14
Example with
ClientAuthentication_hook
● Declare, and set the global function pointer
– extract from src/backend/libpq/auth.c, line 215
/*
* This hook allows plugins to get control following client authentication,
* but before the user has been informed about the results. It could be used
* to record login events, insert a delay after failed authentication, etc.
*/
ClientAuthentication_hook_type ClientAuthentication_hook = NULL;
16. 16
Writing hooks
● Details on some hooks
– ClientAuthentication
– Executor_End
– check_password
– func_beg
● And various examples
17. 17
ClientAuthentication_hook details
● Get control
– After client authentication
– But before informing the user
● Usefull to
– Record login events
– Insert a delay after failed authentication
19. 19
ClientAuthentication_hook function
● Two parameters
– f (Port *port, int status)
● Port is a complete structure described in
include/libpq/libpq-be.h
– remote_host, remote_hostname, remote_port,
database_name, user_name, guc_options, etc.
● Status is a status code
– STATUS_ERROR, STATUS_OK
20. 20
Writing a ClientAuthentication_hook
● Example: forbid connection if a file is present
● Needs two functions
– One to install the hook
– Another one to check availability of the file, and
allow or deny connection
21. 21
Writing a ClientAuthentication_hook
● First, initialize the hook
static ClientAuthentication_hook_type prev_client_auth_hook = NULL;
/* Module entry point */
void
_PG_init(void)
{
prev_client_auth_hook = ClientAuthentication_hook;
ClientAuthentication_hook = my_client_auth;
}
22. 22
Writing a ClientAuthentication_hook
● Check availability of the file, and allow or deny
connection
static void my_client_auth(Port *port, int status)
{
struct stat buf;
if (prev_client_auth_hook)
(*prev_client_auth_hook) (port, status);
if (status != STATUS_OK)
return;
if(!stat("/tmp/connection.stopped", &buf))
ereport(FATAL, (errcode(ERRCODE_INTERNAL_ERROR),
errmsg("Connection not authorized!!")));
}
23. 23
Executor hooks details
● Start
– beginning of execution of a query plan
● Run
– Accepts direction, and count
– May be called more than once
● Finish
– After the final ExecutorRun call
● End
– End of execution of a query plan
24. 24
Executor hooks use
● Usefull to get informations on executed queries
● Already used by
– pg_stat_statements
– auto_explain
– pg_log_userqueries
http://pgxn.org/dist/pg_log_userqueries/
– query_histogram
http://pgxn.org/dist/query_histogram/
– query_recorder http://pgxn.org/dist/query_recorder/
25. 25
ExecutorEnd_hook function
● One parameter
– f(QueryDesc *queryDesc)
● QueryDesc is a structure described in
include/executor/execdesc.h
– CmdType, sourceTexte, Instrumentation, etc
26. 26
Writing an ExecutorEnd_hook
● Example: log queries executed by superuser only
● Needs three functions
– One to install the hook
– One to uninstall the hook
– And a last one to do the job :-)
27. 27
Writing an ExecutorEnd_hook
● First, install the hook
/* Saved hook values in case of unload */
static ExecutorEnd_hook_type prev_ExecutorEnd = NULL;
void _PG_init(void)
{
prev_ExecutorEnd = ExecutorEnd_hook;
ExecutorEnd_hook = my_ExecutorEnd;
}
28. 28
Writing an ExecutorEnd_hook
● The hook itself:
– check if the user has the superuser attribute
– log (or not) the query
– fire the next hook or the default one
static void
my_ExecutorEnd(QueryDesc *queryDesc)
{
Assert(query != NULL);
if (superuser())
elog(LOG, "superuser %s fired this query %s",
GetUserNameFromId(GetUserId()),
query);
if (prev_ExecutorEnd)
prev_ExecutorEnd(queryDesc);
else
standard_ExecutorEnd(queryDesc);
}
30. 30
check_password hook details
● Get control
– When CREATE/ALTER USER is executed
– But before commiting
● Usefull to
– Check the password according to some enterprise
rules
– Log change of passwords
– Disallow plain text passwords
● Major issue
– Less effective with encrypted passwords :-/
32. 32
check_password_hook function
● Five parameters
– const char *username, const char *password, int
password_type, Datum validuntil_time, bool
validuntil_null
● password_type
– PASSWORD_TYPE_PLAINTEXT
– PASSWORD_TYPE_MD5
33. 33
Writing a check_password_hook
● Example: disallow plain text passwords
● Needs two functions
– One to install the hook
– One to check the password type
35. 35
Writing a check_password_hook
● The hook itself:
– check if the password is encrypted
static void
my_check_password(const char *username,
const char *password, int password_type,
Datum validuntil_time, bool validuntil_null)
{
if (password_type == PASSWORD_TYPE_PLAINTEXT)
{
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("password is not encrypted")));
}
}
36. 36
func_beg details
● Get control
– Before BEGIN block of a PL/pgsql function
● Usefull to
– Log start of each function
– Profile functions
– Debug functions
37. 37
func_beg use
● Modules using this hook
– pldebugger
– plprofiler
– log_functions
(https://github.com/gleu/log_functions)
38. 38
func_beg function
● Two parameters
– f (PLpgSQL_execstate *estate, PLpgSQL_function
*func)
● estate is a complete structure described in
src/pl/plpgsql/plpgsql.h
● func is a complete structure described in
src/pl/plpgsql/plpgsql.h
– Name, OID, return type, ...
39. 39
Writing a func_beg
● Example: log each function executed
● Needs two functions
– One to install the hook
– Another one to log the function name
43. 43
Compiling hooks – example
● Make is your friend (and so is pg_config)
$ make USE_PGXS=1
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-
statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -
fexcess-precision=standard -fpic -I. -I. -I/opt/postgresql-
9.1/include/server -I/opt/postgresql-9.1/include/internal -D_GNU_SOURCE -
c -o your_hook.o your_hook.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-
statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -
fexcess-precision=standard -fpic -shared -o your_hook.so
only_encrypted_passwords.o -L/opt/postgresql-9.1/lib -Wl,--as-needed -Wl,-
rpath,'/opt/postgresql-9.1/lib',--enable-new-dtags
● Can't use PGXS with PL/pgsql plugins
– But will be possible in 9.2 (thanks to Heikki for
working on the patch)
44. 44
Installing hooks – from source
● Make is still your friend
$ make USE_PGXS=1 install
/bin/mkdir -p '/opt/postgresql-9.1/lib'
/bin/sh /opt/postgresql-9.1/lib/pgxs/src/makefiles/../../config/install-sh -c
-m 755 your_hook.so '/opt/postgresql-9.1/lib/your_hook.so'
45. 45
PGXS
● It's better to rely only on PGXS (if possible)
● Makefile looks like this:
MODULE_big = your_hook
OBJS = your_hook.o
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
● So much simpler...
47. 47
Using hooks – example
● Install the hook...
● In postgresql.conf
shared_preload_libraries = 'only_encrypted_passwords'
● Restart PostgreSQL
$ pg_ctl start
server starting
2012-01-28 16:01:32 CET LOG: loaded library "only_encrypted_passwords"
48. 48
Using hooks – example
● Use the hook...
postgres=# CREATE USER u1 PASSWORD 'supersecret';
ERROR: password is not encrypted
postgres=# CREATE USER u1 PASSWORD 'md5f96c038c1bf28d837c32cc62fa97910a';
CREATE ROLE
postgres=# ALTER USER u1 PASSWORD 'f96c038c1bf28d837c32cc62fa97910a';
ERROR: password is not encrypted
postgres=# ALTER USER u1 PASSWORD 'md5f96c038c1bf28d837c32cc62fa97910a';
ALTER ROLE
49. 49
Using hooks with LOAD statement
● Install the shared library
● LOAD the library
● ... and use it
50. 50
Using hooks – example
● Install the hook...
● Create the function, and use it:
postgres=# CREATE FUNCTION f1() RETURNS boolean LANGUAGE plpgsql AS $$
postgres$# BEGIN
postgres$# PERFORM pg_sleep(5);
postgres$# RETURN true;
postgres$# END
postgres$# $$;
CREATE FUNCTION
hooks=# SET client_min_messages TO log;
LOG: duration: 0.132 ms statement: SET client_min_messages TO log;
SET
hooks=# SELECT f1();
LOG: duration: 5003.180 ms statement: SELECT f1();
f1
----
t
(1 row)
51. 51
Using hooks – example
● LOAD the shared library, and use it...
hooks=# LOAD 'logplpgsql';
LOG: duration: 0.373 ms statement: LOAD 'logplpgsql';
LOAD
hooks=# SELECT f1();
LOG: Execute function f1
LOG: duration: 5001.466 ms statement: SELECT f1();
[...]
hooks=# SELECT f1() FROM generate_series(1, 5);
LOG: Execute function f1
LOG: Execute function f1
LOG: Execute function f1
LOG: Execute function f1
LOG: Execute function f1
LOG: duration: 25006.701 ms statement: SELECT f1() FROM generate_series(1,
5);
[...]
52. 52
9.2 hooks
● One old hook with enhanced capability
● PGXS support for PL/pgsql hooks
● Two new hooks
– A logging hook
– And another planer hook
53. 53
9.2 – Enhanced object_access_hook
● DROP statement support for object_access_hook
● Used by sepgsql
54. 54
9.2 hooks – the logging hook
● Logging hook, by Martin Pihlak
– emit_log_hook
– Intercept messages before they are sent to the server
log
– Custom log filtering
– Used by pg_journal
(http://www.pgxn.org/dist/pg_journal/0.1.0/)
55. 55
9.2 hooks – the planner hook
● Planner hook, by Peter Geoghegan
– post_parse_analyze_hook
– Get control at end of parse analysis
– Query normalisation within pg_stat_statements
56. 56
Conclusion
● Hooks are an interesting system to extend the
capabilities of PostgreSQL
● Be cautious to avoid adding many of them
● We need more of them :-)
● Examples and slides available on:
– https://github.com/gleu/Hooks-in-PostgreSQL