<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/all-your-gucs-in-a-row-external-pid-file-t7mm1hv7k" -->

---
title: All Your GUCs in a Row: external_pid_file | daily.dev
description: PostgreSQL's `external_pid_file` GUC lets the postmaster write a second, minimal PID file to a custom path alongside the standard `postmaster.pid` in the data...
canonical: https://daily.dev/posts/all-your-gucs-in-a-row-external-pid-file-t7mm1hv7k
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: All Your GUCs in a Row: external_pid_file | daily.dev
og:description: PostgreSQL's `external_pid_file` GUC lets the postmaster write a second, minimal PID file to a custom path alongside the standard `postmaster.pid` in the data...
og:url: https://daily.dev/posts/all-your-gucs-in-a-row-external-pid-file-t7mm1hv7k
og:image: https://api.daily.dev/og/posts/t7MM1hV7K.png
og:image:alt: All Your GUCs in a Row: external_pid_file
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# All Your GUCs in a Row: external_pid_file

**[Planet PostgreSQL](https://daily.dev/sources/planet-postgresql)** · 2 min read · 0 upvotes · 0 comments

## Summary

PostgreSQL's `external_pid_file` GUC lets the postmaster write a second, minimal PID file to a custom path alongside the standard `postmaster.pid` in the data directory. This is useful when cluster managers or init scripts (e.g., Pacemaker, Red Hat Cluster resource agents) expect the PID at a conventional location like `/run/postgresql/postgresql.pid`. The key gotcha is permissions: the target directory must be writable by the `postgres` user or startup fails. Under modern systemd-managed setups the parameter is largely unnecessary since systemd tracks processes via cgroups, but it remains relevant for legacy clusterware.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://postgr.es/p/9pZ>

## Similar posts on daily.dev

- [All Your GUCs in a Row: port](https://daily.dev/posts/all-your-gucs-in-a-row-port-uoacyypyd) · Planet PostgreSQL · 0 upvotes · 0 comments
- [All Your GUCs in a Row: config\_file](https://daily.dev/posts/all-your-gucs-in-a-row-config-file-53spmxdlx) · Planet PostgreSQL · 0 upvotes · 0 comments
- [All Your GUCs in a Row: data\_directory](https://daily.dev/posts/all-your-gucs-in-a-row-data-directory-nyewadaef) · Planet PostgreSQL · 0 upvotes · 0 comments
- [All Your GUCs in a Row: extension\_control\_path](https://daily.dev/posts/all-your-gucs-in-a-row-extension-control-path-nnvvjerix) · Planet PostgreSQL · 0 upvotes · 1 comments
- [All Your GUCs in a Row: ident\_file](https://daily.dev/posts/all-your-gucs-in-a-row-ident-file-4qprt4re6) · Planet PostgreSQL · 0 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/all-your-gucs-in-a-row-external-pid-file-t7mm1hv7k)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"All Your GUCs in a Row: external_pid_file","url":"https://daily.dev/posts/all-your-gucs-in-a-row-external-pid-file-t7mm1hv7k","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/all-your-gucs-in-a-row-external-pid-file-t7mm1hv7k"},"datePublished":"2026-07-19T01:06:24.406Z","dateModified":"2026-07-19T01:06:43.402Z","description":"PostgreSQL's `external_pid_file` GUC lets the postmaster write a second, minimal PID file to a custom path alongside the standard `postmaster.pid` in the data...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/250ca832b62c4b7f967e069d2c042140?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/250ca832b62c4b7f967e069d2c042140?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Planet PostgreSQL","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet PostgreSQL","logo":"https://media.daily.dev/image/upload/logos/placeholder.jpg","url":"https://daily.dev/sources/planet-postgresql"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/all-your-gucs-in-a-row-external-pid-file-t7mm1hv7k","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,postgresql","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet PostgreSQL","item":"https://daily.dev/sources/planet-postgresql"},{"@type":"ListItem","position":3,"name":"All Your GUCs in a Row: external_pid_file"}]}
```

