vitus_wagner: My photo 2005 (Default)
[personal profile] vitus_wagner

Вот думаю теперь, а как назвать RIB-швертбот. Байдарка у меня уже скоро сорок лет как называется Northwind. Соответственно тут тоже можно использовать какой-нибудь ветер. Например «Шелонник». Ирина, правда, утвержает что судно должно называться словом женского рода, потому что she. У юго-западного ветра, правда, есть синоним «Моряна». Но тут вдруг возникла мысль назвать яхту именем одной из 9 дочерей Эгира и Ран, и название на борту написать футарком. Например, ᛒᚢᛚᚷᛃᚨ (Bylgja).

vitus_wagner: My photo 2005 (Default)
[personal profile] vitus_wagner

Пришла тут ко мне очередная пачка вакансий с Linked In, cмотрю из восьми аж у двух фирм написано местоположение "Косово, Тверская область, Россия" Смотрю я на это Косово в Молоковском муниципальном округе и вижу что это какая-то совершенная глушь на полпути между Бежецком и Весьегонском, да ещё сильно в сторону от соединяющего их шоссе. Там весь Молоковский муниципальный округ три тысячи человек, значит население деревни вообще измеряется трехзначным, если не двухзначным числом.

И вдруг такой центр IT, прям Кремниевая долина.

Я, правда полагаю, что на самом деле у этих фирм в качестве местоположения было указана балканская страна Косово. Там действительно регистрируют офисы российские IT фирмы с целью обхода санкций. Но с какого перепуга ЛинкедИн решил что это российская деревня Косово? И почему выбрал именно эту, тверскую, а не вот эту в десяти километрах от станции Клин, или вот эту которая поглуше, но тоже не в пошехонских лесах?

Ashutosh Bapat: Professional karma

Mar. 14th, 2026 05:48 am
[syndicated profile] planet_postgresql_feed

In the very early days of my career, an incident made me realise that perfoming my job irresponsibily will affect me adversely, not because it will affect my position adversely, but because it can affect my life otherwise also. I was part a team that produced a software used by a financial institution where I held my account. A bug in the software caused a failure which made several accounts, including my bank account, inaccessible! Fortunately I wasn't the one who introduced that bug and neither was other software engineer working on the product. It has simply crept through the cracks that the age-old software had developed as it went through many improvements. Something that happens to all the architectures, software or otherwise in the world. That was an enlightening and eve opening experience. But professional karma is not always bad; many times it's good. When the humble work I do for earning my living also improves my living, it gives me immense satisfaction. It means that it's also improving billions of lives that way across the globe.

When I was studying post-graduation in IIT Bombay, I often travelled by train - local and intercity. The online ticketing system for long distant trains was still in its early stages. Local train tickets were still issued at stations and getting one required standing in a long queue. Fast forward to today, you can buy a local train ticket on a mobile App or at a kiosk at the station by paying online through UPI. In my recent trip to IIT Bombay I bought such a ticket using GPay in a few seconds. And know what, UPI uses PostgreSQL as an OLTP database in its system. I didn't have to go through the same experience thank to the same education and the work I am doing. Students studying in my alma-matter no more have to go through the same painful experience now, thanks to many PostgreSQL contributors who once were students and might have similar painful experiences in their own lives.



In PGConf.India, Koji Annoura, who is a Graph database expert talked about o

[...]

пятница 13

Mar. 14th, 2026 12:45 am
kattrend: (с драйвом)
[personal profile] kattrend
СЯУ, что забавность пятницы 13 происходит не от тамплиеров, а от французского театра. Ну, ок. В наших подземельях нумерологически прекрасный день не вызывает опасений, а скорее веселит - как и число 666, оно тоже кажется забавным.

В общем, сегодня я, приехав в Тени, первым делом уронила в лужу всё своё пальто целиком. Лужа у нас всё еще есть, паводок продолжается, но мы уже вообще привыкли. Подумаешь. Мебель к потопу готова, и подтекает удобненько: при входе и возле колодца. Помыть ботинки в луже, пойти дальше, не разуваясь, и слить воду в шпигат. Корабль кораблём вообще.

Потом я уронила крышку от колодца. Потом рулон туалетной бумаги. К этому моменту я уже так развеселилась, что падение предметов само собой закончилось, и дальше мы только складывали и нанизывали журавлей. Причем, чёрных, вопреки обещанию, сложили очень мало, два-три из сотни. Но я сложила глянцевого чёрного лебедя.

Изготовила первый в этом году кувшин лимонада. Весна! Снова надо закупать фрукты и мяту.

Продала последний экземпляр календаря. Весна, самое время. Причем, даме, которая пришла вообще не за ним и даже не знала, что мы сделали календарь, а тут случайно вспомнила, что надо бы вообще какой-нибудь календарь завести. Тоже довольно иронично.

А, когда я уже ехала домой, я подобрала на помойке здоровенный альбом фотографий Петера Линдберга, и теперь сижу и складываю из кусков фотографий журавлей. Фотографии чёрно белые, местами вообще преимущественно чёрные, а я же обещала чёрных либо безумных журавлей.

Ладно, безумный всё-таки был, хоть и цветной. У него на крыле белым по красному слово "правительство", а со складки у основания крыла смотрит глаз Гагарина. К соцреализму, понятно, отношение у меня принципиальное: он подлежит постмодернической переработке. Перед Линдбергом немножко неудобно, но в целом он довольно-таки объективирует женщину, так что и ладно. А обещанное надо делать. Ещё 290 журавлей не хватает.

Писательское

Mar. 13th, 2026 08:36 pm
vitus_wagner: My photo 2005 (Default)
[personal profile] vitus_wagner

Сегодня случилось знаменательное событие - объем "Императрицы Кэт" превысил объем "Детей пространства". Теперь "Кэт" - самое объемное из моих (вернее наших с Ириной) произведений. Не только из выложенных на самиздате.

При этом ещё не закончена переработка второй части и появились кое-какие планы на эпизоды, которые надо добавить в третью.

Я уже подумываю о том, чтобы поделить произведение на три тома. Хотя Ирина считает, что 600 страниц для одного тома это нормально.

[syndicated profile] planet_postgresql_feed

I previously blogged about ensuring that the “ON CONFLICT” directive is used in order to avoid vacuum from having to do additional work. I also later demonstrated the characteristics of how the use of the MERGE statement will accomplish the same thing.

You can read the original blogs here Reduce Vacuum by Using “ON CONFLICT” Directive and here Follow-Up: Reduce Vacuum by Using “ON CONFLICT” Directive

Now in another recent customer case, I was chasing down why the application was invoking 10s of thousands of Foreign Key and Constraint violations per day and I began to wonder, if these kinds of errors also caused additional vacuum as described in those previous blogs. Sure enough it DEPENDS.

Let’s set up a quick test to demonstrate:

/* Create related tables: */
CREATE TABLE public.uuid_product_value (
        id int PRIMARY KEY,
        pkid text,
        value numeric,
        product_id int,
        effective_date timestamp(3)
        );

CREATE TABLE public.uuid_product (
        product_id int PRIMARY KEY
        );

ALTER TABLE uuid_product_value
    ADD CONSTRAINT uuid_product_value_product_id_fk 
    FOREIGN KEY (product_id) 
    REFERENCES uuid_product (product_id) ON DELETE CASCADE;

/* Insert some mocked up data */
INSERT INTO public.uuid_product VALUES ( 
        generate_series(0,200));

INSERT INTO public.uuid_product_value VALUES ( 
        generate_series(0,10000), 
        gen_random_uuid()::text,
        random()*1000,
        ROUND(random()*100),
        current_timestamp(3));
 
/* Vacuum Analyze Both tables */
VACUUM (VERBOSE, ANALYZE) uuid_product;
VACUUM (VERBOSE, ANALYZE) uuid_product_value;

/* Verify that there are no dead tuples: */
SELECT
    schemaname,
    relname,
    n_live_tup,
    n_dead_tup
FROM
    pg_stat_all_tables
WHERE
    relname in ('uuid_product_value', 'uuid_product');
 
 schemaname |      relname       | n_live_tup | n_dead_tup
------------+--------------------+------------+------------
 public     | uuid_product_value |      10001 |          0
 public
[...]

Квадратиш

Mar. 13th, 2026 03:59 pm
[syndicated profile] shoorick_ru_feed

Posted by Shoorick

0. КДПВ — сорок девять квадратиков.

1. Пятнадцатое марта приходится на воскресенье. В прошлом году думал поехать в этот день в соседний город, но общественный транспорт не ходил, в этом году лучше прокачусь туда, куда даже личный двухколёсный дойдёт.

В воскресенье 15.03.2026 где-то с 12 часов утра и пока не надоест буду 🔥 жечь палки и дуть на угли в зоне пикников белградского парка Ада Цыганлия. Ближайшая автобусная остановка — Чукарица: 🚍 55, 56, 80, 87, 89, 91, 92 не считая трёхзначных — от неё идти около километра, минут 15.

Карта
[syndicated profile] planet_postgresql_feed

Welcome to Part two of our series about building a High Availability Postgres cluster using Patroni! Part one focused entirely on establishing the DCS using etcd, providing the critical layer that Patroni uses to store metadata and guarantee its leadership token uniqueness across the cluster.With this solid foundation, it's now time to build the next layer in our stack: Patroni itself. Patroni does the job of managing the Postgres service and provides a command interface for node administration and monitoring. Technically the Patroni cluster is complete at the end of this article, but stick around for part three where we add the routing layer that brings everything together.Hopefully you still have the three VMs where you installed etcd. Those will be the same place where everything else happens, so if you haven’t already gone through the steps in part one, come back when you’re ready.Otherwise, let’s get started!

Installing Postgres

The Postgres community site has an incredibly thorough page dedicated to installation on various platforms. For the sake of convenience, this guide includes a simplified version of the Debian instructions. Perform these steps on all three servers.Start by setting up the PGDG repository:Then install your favorite version of Postgres. For the purposes of this guide, we’re also going to stop Postgres and drop the initial cluster the Postgres package creates. Patroni will recreate all of this anyway, and it should be in control.It’s also important to completely disable the default Postgres service since Patroni will be in charge:Finally, install the version of Patroni included in the PGDG repositories. This should be available on supported platforms like Debian and RedHat variants, but if it isn’t, you may have to resort to the official installation instructions.Once that command completes, we should have three fresh VMs ready for configuration.

Configuring Patroni the easy way

The Debian Patroni package provides a tool called  that transforms a Patroni template into a configur[...]
[syndicated profile] planet_postgresql_feed

This article reviews the November 2025 CommitFest.

For the highlights of the previous two CommitFests, check out our last posts: 2025-07, 2025-09.

  • Planner: eager aggregation
  • Converting COUNT(1) and COUNT(not_null_col) to COUNT(*)
  • Parallel TID Range Scan
  • COPY … TO with partitioned tables
  • New function error_on_null
  • Planner support functions for optimizing set-returning functions (SRF)
  • SQL-standard style functions with temporary objects
  • BRIN indexes: using the read stream interface for vacuuming
  • WAIT FOR: waiting for synchronization between replica and primary
  • Logical replication of sequences
  • pg_stat_replication_slots: a counter for memory limit exceeds during logical decoding
  • pg_buffercache: buffer distribution across OS pages
  • pg_buffercache: marking buffers as dirty
  • Statistics reset time for individual relations and functions
  • Monitoring the volume of full page images written to WAL
  • New parameter log_autoanalyze_min_duration
  • psql: search path in the prompt
  • psql: displaying boolean values
  • pg_rewind: skip copying WAL segments already present on the target server
  • pgbench: continue running after SQL command errors

...

[syndicated profile] planet_postgresql_feed

Most PostgreSQL tuning advice that folks chase is quick fixes but not on understanding what made planners choose an path or join over others optimal path. !

Tuning should not start with Analyze on tables involved in the Query but with intend what is causing the issue and why planner is not self sufficient to choose the optimal path.

Most fixes we search for SQL tuning are around,

Add an index. 
Rewrite the query.
Bump work_mem.
Done.

Except it’s not done. The same problem comes back, different query, different table, same confusion.

The Real Problem

A slow query is a symptom. Statistics, DDL, query style, and PG version are the actual culprit’s.

Before you touch anything, you need to answer five questions — in order:

  • Find it — which query actually hurts the most right now?
  • Read the plan — what is the planner doing and where is it wrong?
  • Check statistics — is the planner even working with accurate data?
  • Check the DDL — is your schema helping or hiding the answer?
  • Check GUCs & version — are the defaults silently working against you?
5-Dimension SQL Tuning Framework

Most developers skip straight to question two. Many skip to indexes without asking any question at all.

What I Covered at PGConf India 2026

I presented this framework at PGConf India yesterday, a room full of developers and DBA , sharp questions, and a lot of “I’ve hit exactly this” moments.

The slides cover core foundations for approaching Query Tuning and production gotchas including partition pruning, SARGability, CTE fences, and correlated column statistics.

Slide – PostgreSQL Query Tuning: A Foundation Every Database Developer Should Build

[syndicated profile] deb_matrix_synapse_feed
Version 1.146.0-3 of matrix-synapse is marked for autoremoval from testing on Fri 03 Apr 2026. It is affected by #1129756, #1129884. You should try to prevent the removal by fixing these RC bugs.
[syndicated profile] planet_postgresql_feed

There is a moment in many database reviews when the room becomes a little too quiet.

Someone asks:

“Which columns in this database are encrypted?”

At first, the answers sound reassuring.

“We use TLS.”

“The disks are encrypted.”

“The application handles sensitive fields.”

And then the real picture starts to emerge.

Some values are encrypted in one service but not another.

Some migrations remembered to apply encryption.

Some scripts did not.

Some backups are safe in theory, but no one wants to test that theory the hard way.

That is the uncomfortable truth of database security:

encryption is often present, but not always enforced where the data actually lives.

That is exactly the problem I wanted to explore with the PostgreSQL extension:

column_encrypt: https://github.com/vibhorkum/column_encrypt

This extension provides transparent column-level encryption using custom PostgreSQL datatypes so developers can read and write encrypted columns without changing their SQL queries.

And perhaps the most human part of this project is this:

the idea for this project started back in 2016.

It stayed with me for years as one of those engineering ideas that never quite leaves your mind — the thought that PostgreSQL itself could enforce encryption at the column level.

Now I’ve finally decided to release it.

This is the first public version. It’s a starting point — useful, practical, and hopefully something the PostgreSQL community can explore and build upon.

Why This Matters

Encryption conversations often focus first on infrastructure.

  • We encrypt disks.
  • We use TLS connections.
  • We protect credentials.

All of these are important.

But once data is inside the database, a different question matters:

What happens if someone gains access to the database itself?

That access might come from:

  • a leaked backup
  • an overprivileged account
  • a dump file
  • a compromised service
  • an operational mista
[...]
[syndicated profile] planet_postgresql_feed

Introduction

When using AWS RDS Proxy, the goal is to achieve connection multiplexing – many client connections share a much smaller pool of backend PostgreSQL connections, givng more resources per connection and keeping query execution running smoothly.

However, if the proxy detects that a session has changed internal state in a way it cannot safely track, it pins the client connection to a specific backend connection. Once pinned, that connection can never be multiplexed again. This was the case with a recent database I worked on.

In this case, we observed the following:

  • extremely high CPU usage
  • relatively high LWLock wait times
  • OOM killer activity on the database, maybe once every day or two
  • thousands of active connections

What was strange about it all was that the queries involved were relatively simple, with max just one join.


Finding the Pinning Source

To get to the root cause, one option was to look in pg_stat_statements. However, that approach had two problems:

  1. Getting a clean snapshot of the statistics while thousands of queries were being actively processed would be tricky.
  2. pg_stat_statements normalizes queries and does not expose the values passed to parameter placeholders.

Instead, to see the actual parameters, we briefly enabled log_statement = 'all'. This immediately surfaced something interesting in the logs, which could be downloaded and reviewed on my own time and pace.

What we saw were statements like SELECT set_config($2,$1,$3) with parameters related to JIT configuration – that was the first real clue.


Getting to the Bottom

After tracing the behavior through the stack, the root cause turned out to be surprisingly indirect. The application created new connections through SQLAlchemy’s asyncpg dialect, and we needed to drill down into that driver’s behavior.


Step 1 – Reviewing how SQLAlchemy registers JSON codecs

During connection initialization, SQLAlchemy runs an on_connect hook:

def connect(conn):
[...]
[syndicated profile] planet_postgresql_feed
PGConf.dev is heading to Vancouver, Canada, from May 19–22, bringing together the users, developers, and community organizers driving the future of PostgreSQL. EDB is proud to be a Gold-level sponsor this year, with our own Robert Haas serving as an organizer and Jacob Champion contributing to the Program Committee. Following a highly successful Call for Papers, we’ve put together this preview of the EDB-led sessions you won't want to miss.

семь тысяч

Mar. 12th, 2026 03:09 pm
kattrend: (пиастры)
[personal profile] kattrend
Статистическая флуктуация: я приметила уже три предмета, которые хотела бы заиметь, и каждый стоит семь тысяч.

В Ножимане - мачете моей мечты: слегка изогнутый нож-ножище, похожий на ятаган или меч дао. Не то чтобы в ближайшее время мне придётся рубить ветки, но внимание привлёк.

В винтажной лавке, которая на месте бывшей комиссионки на Полозовой улице - медный кофейник, который пригодился бы для антуражного степного чаепития и отличный варган, я как раз свой потеряла. И то, и то - семь тысяч.

Что-то эта семёрка так навязчиво в глаза лезет, что надо бы, наверное, выставить какую-нибудь штуку на продажу за семь тысяч и выбрать себе одну из этих штучек. Или за четырнадцать, и выбрать две.

Ну или научиться делать варганы и кофейники. Ножи я и так умею. А то много суеты - продай, купи. Взять да сделать.
[syndicated profile] dxdt_ru_feed

Posted by Александр Венедюхин

На Hackaday – попытка построить радар с ФАР (AERIS-10) на базе открытой архитектуры и из доступных комплектующих. Сантиметровый диапазон: частота 10.5GHz. Низкоуровневую “радарную” работу реализуют на FPGA и готовых формирователях луча, общее управление – на микроконтроллерах STM32. Предусмотрено механическое сканирование по азимуту и привязка к GPS-координатам.

gabrielle roth: SCaLE23x

Mar. 12th, 2026 12:38 am
[syndicated profile] planet_postgresql_feed
I’m back from Pasadena after SCaLE23x and another installment of PostgreSQL@SCaLE! It was really just wonderful this year, seeing old friends and making new ones, talking to people and soaking up knowledge. I’m looking forward to implementing what I learned. Expo Hall:We had a lot of booth volunteers this year. Thank you all so much; […]
[syndicated profile] planet_postgresql_feed

This is the second in a series of three blog posts covering the new AI functionality in pgAdmin 4. In the first post, I covered LLM configuration and the AI-powered analysis reports. In this post, I'll introduce the AI Chat agent in the query tool, and in the third, I'll explore the AI Insights feature for EXPLAIN plan analysis.If you've ever found yourself staring at a database schema you didn't design, trying to work out the right joins to answer a seemingly simple question, you'll appreciate what the AI Chat agent brings to pgAdmin's query tool. Rather than having to alt-tab to an external AI service, paste in your schema, describe what you need, and then copy the resulting SQL back into your editor, the entire conversation now happens within the query tool itself, with full awareness of your actual database structure.

Finding the AI Assistant

The AI Chat agent appears as a new tab alongside the Query and Query History tabs in the left panel of the query tool. It's labelled 'AI Assistant' and is only visible when an LLM provider has been configured (as described in the first post in this series). The panel header shows which LLM provider and model are currently active, so you always know what's generating your responses.

Natural Language to SQL

The core capability of the AI Chat agent is translating natural language questions into SQL queries. You type what you want to know in plain English (or whatever language you're comfortable with), and the assistant generates the corresponding SQL, complete with an explanation of what it does and why it was written that way.For example, you might type something like:The assistant will first inspect your database schema to understand the available tables and relationships, then generate an appropriate query. The response includes both the SQL and a brief explanation, so you can understand what the query is doing before you run it.What makes this particularly useful is that the assistant doesn't just guess at your schema; it actively inspects the database using a[...]

весна

Mar. 12th, 2026 12:53 am
kattrend: (Default)
[personal profile] kattrend
Кажется, мы уже совсем привыкли к постоянно подтекающему нам в корни паводку. Время от времени кто-то берёт швабру и сгоняет воду в колодец. В остальное время мы спокойно складываем журавликов, пьём чай, варим какао. Ну вода и вода, подумаешь.

Нам открыли тайную комнату (на её железной двери загадочные знаки, а внутри ничего особенного: комната на метр выше, сухая, пустая, выкрашенная в белый). Арендовать бы её, но у кого?

Две музыкальные группы из моих четырёх задумали писать альбом, и спасибо, что не три - третья готовится. А с четвёртой мы отлично, хотя и очень мало, поиграли на днях. Нас было четыре смычка, а репетируем мы никогда, благо новых песен нет. Слушаем друг друга, прёмся. В общем, всё круто, только времени нет вообще. Которую неделю сохнут у меня четыре чашечки, предназначенные для раку, я уже и органического материала заготовила термос, но это же нужен свободный день, а где он?

Зато в трудные времена забить всё буквально время созиданием - это очень хорошая идея. Главное не останавливаться.

Profile

nataraj: (Default)
Swami Dhyan Nataraj

July 2024

S M T W T F S
 123456
789 10111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 14th, 2026 11:27 am
Powered by Dreamwidth Studios