Mark Wong

Senior Software Developer

Mark Wong is a Senior Software Developer at EDB and a PostgreSQL Major Contributor. His background is in database systems solutions and performance. He first introduced himself to the PostgreSQL community in 2003 with open source benchmarking kits and performance data. Since then, he has continued to contribute to various aspects of the PostgreSQL community such as a Google Summer of Code mentor, Conference Organizer, Portland PostgreSQL Users Group Co-Organizer, PostgreSQL Fundraising Group Member, and Director on Board of the United States PostgreSQL Association.

Read Blogs

Technical Blog
```html 작성자: Mark Wong 날짜: 2026년 2월 8일 AddressSanitizer(ASan)는 메모리 오염(Memory Corruption) 버그를 찾기 위해 설계된 프로그래밍 도구입니다. 이 글에서는 AddressSanitizer가 PostgreSQL 개발 과정에서 실제 버그를 발견한 사례를 살펴봅니다. 또한 AddressSanitizer를 처음 사용하는 개발자도 로컬 환경에서 PostgreSQL 회귀 테스트(Regression Tests)와 함께 실행할 수 있도록 설정 방법을 단계별로 소개합니다. AddressSanitizer가 PostgreSQL 버그를 발견한 사례 최근 저는 몇몇 시스템 카탈로그 함수를 최신 코딩 스타일에 맞춰 옵션 파라미터를 가질 수 있도록 리팩토링하는...
Technical Blog
작성자: Mark Wong 작성일: 2026년 2월 8일 PostgreSQL 개발 과정에서 메모리 오염(Memory Corruption) 버그는 원인을 추적하기 까다로운 문제 중 하나입니다. 특히 일반적인 로컬 테스트에서는 문제가 나타나지 않다가 특정 테스트 환경에서만 오류가 발생하기도 합니다. 이번 포스팅에서는 메모리 오류 탐지 도구인 AddressSanitizer(ASan)가 PostgreSQL 코드에서 실제 버그를 찾아낸 사례를 살펴봅니다. 또한 PostgreSQL 회귀 테스트(Regression Tests) 환경에서 AddressSanitizer를 처음 사용하는 개발자를 위해 로컬에서 ASan을 구성하고 테스트를 실행하는 방법을 단계별로 소개합니다. 목차 사건의 발단: 로컬에서는 통과한...
Technical Blog
This is a short story of where AddressSanitizer, a programming tool designed to help find memory corruption, found such a bug, followed by a brief how to use it locally because it's not always easy for people new to AddressSanitizer to get it running with the PostgreSQL regression tests. The Story I had submitted a series of small patches to refactor a handful of system catalog functions with an...
Technical Blog
This post continues from my report on Random Numbers. I have begun working on a random data generator so I want to run some tests to see whether different random number generators actually impact the overall performance of a data generator. Let’s say we want to create random data for a table with 17 columns, something that contains the details of a company’s order information: Order ID Line number...
Technical Blog
He estado trabajando gradualmente en el desarrollo desde cero de herramientas para probar el rendimiento de los sistemas de bases de datos de código abierto. Uno de los componentes de este kit de herramientas es un generador de datos capaz de crear conjuntos que serán cargados en una base de datos. Necesitaré un generador de números aleatorios que cuente con las siguientes características...
Technical Blog
I’ve been slowly working on developing open source database systems performance testing tools from scratch. One of the components of this toolset is a data generator that can build a dataset to be loaded into a database. I’ll need a random number generator for that and these are the requirements that I think are most important: reproducible data fast Being able to recreate the same data can be...
Technical Blog
This example will just be focusing on returning data from user defined functions, specifically returning a value as opposed to using OUT parameters. The full code is on Github. To quickly review, PL/Julia calls jl_eval_string() to execute Julia code and captures the returning jl_value_t data structure, which contains the result of the Julia code executed. The result needs to be extracted from the...
Technical Blog
One method to handle input parameters with PL/Julia is to rewrite the body of the user defined function or stored procedure on the fly with the values declared as global variables. In order to do that, we need to create a new buffer big enough to hold the new global variable declarations in addition to the original body of the function or procedure. Again, I’ll omit various error checks to keep...
Technical Blog
A PostgreSQL procedural language handler needs to look up the body of the user defined function or stored procedure for the code to execute. Remember that the C function executed to handle PL/Julia user defined functions and stored procedures is defined in the SQL file. Thus the pljulia_call_handler() function needs to be updated to retrieve the body of the respective function or procedure. The...
Technical Blog
Julia provides an API so that Julia functions can be called from C. PL/Julia will use this C API to execute Julia code from its user defined functions and stored procedures. Julia’s documentation provides an example C program that starts up the Julia environment, evaluates the expression sqrt(2.0), displays the resulting value to the standard output, and cleans up the Julia environment. We will...