Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t8ilj-005dJp-LC for pgsql-general@arkaria.postgresql.org; Wed, 06 Nov 2024 16:20:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t8ilg-007Nry-D1 for pgsql-general@arkaria.postgresql.org; Wed, 06 Nov 2024 16:20:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t8ilg-007Nrp-1Y for pgsql-general@lists.postgresql.org; Wed, 06 Nov 2024 16:20:28 +0000 Received: from mail-oo1-xc29.google.com ([2607:f8b0:4864:20::c29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t8ilc-000XCj-CY for pgsql-general@postgresql.org; Wed, 06 Nov 2024 16:20:28 +0000 Received: by mail-oo1-xc29.google.com with SMTP id 006d021491bc7-5ebbed44918so4038873eaf.0 for ; Wed, 06 Nov 2024 08:20:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730910024; x=1731514824; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=QjL2Shiid/v0VTQ86A7ol7FyVF7Ip87DbCrhOllgskA=; b=T0pCCcq4Ydw+iC0C+uwvamPi9eB26MdMFHqLe/CAvfAVGRN+6l/M7YSv2C5gDEcgrj nuBjAr6CLM0rh2GNMyHBaJbIZGVXI0b0D1H1tu+mh640229lmFmZl/TbOxbthLX2dpQJ CAKhHtK5msts5b799i2B9Vzf63/ld7822f0k3BaeIxzFjvvQU6QmWZtYVnTzjfv31Ods jKDzJoDnK9H7Dfq/XH0pjdtchyfeedzwYN1FGWQSxZ+8RSkzBqYnXM5ook1eNqpkRryO PHotdDn3D7njzJCARhg4Ohs5+zdpXu85ZJUt0agjy+YFvu/rDc7cfjvhRDSurK9ZgQQG beGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730910024; x=1731514824; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QjL2Shiid/v0VTQ86A7ol7FyVF7Ip87DbCrhOllgskA=; b=RdBH+UKwZXF4zoSsu7TwoeH1AlKzlePKCsP1PFpBpHp37zIFjcHzMgM4ehU+mh5y8A Bxifhw+agZm790qF4WeTKJnXyRLoMWYO6uiE8A4ckNx8tlhEEkXSVyIcczxQQRGOaLCz uQ3rHWDQCY0/25W4v86NK2cG7M43z2km5SA+Ys4ioqxK0R/GBHD92mgS3m2fdT1uAxJi IC7VW5NOYl6IsjEHfzbDgfDanJqkD5HMPdp2OT0gESDNyMEvMJ+MBBta+AziP4pXFCSq jvOwCYOuUINH2zqOruTjvWayKElhytGSXFpJX2FrGzhQezKLz1cP29YBNOgNw0TR2WIU wHOw== X-Gm-Message-State: AOJu0YzhxdjQvISRg2GCi0wG8S1ceycIk5836hQD6i472NIL7MBg4H80 T5KPdeq+MDrQPzZZsOiQUnzbJlZufDL7EA7uDm7C2sI93v4x5n6VajrJve31uQTtd1XR4bzrGG2 oYSIOtHy3uLRy7tljTgeEZSPKvEhphQ== X-Google-Smtp-Source: AGHT+IF/eU4hlCdncndLZIVQKbHIZuoLPasnZazNt+dKkMvKoPd5tqb+YOtd+u95QvjDWfryGnoKg+3mUPudIey4JuQ= X-Received: by 2002:a05:6820:1a03:b0:5c4:144b:1ff9 with SMTP id 006d021491bc7-5ec5ec9271dmr19861736eaf.5.1730910023882; Wed, 06 Nov 2024 08:20:23 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Dominique Devienne Date: Wed, 6 Nov 2024 17:20:12 +0100 Message-ID: Subject: About the stability of COPY BINARY data To: pgsql-general@postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk From https://www.postgresql.org/docs/current/sql-copy.html: |> binary-format file is less portable across machine architectures and PostgreSQL versions In my experience, the binary encoding of binding/resultset/copy is endian neutral (network byte order), so what is the less portable across machine architectures that warning about? Also, does the code for per-type _send() and _recv() functions really change across versions of PostgreSQL? How common are instances of such changes across versions? Any examples of such backward-incompatible changes, in the past? The binary data contains OIDs, but if sticking to built-in types, which OIDs are unlikely to change across versions? I'm obviously storing COPY BINARY data (we have lots of bytea columns), and I wonder how bad it is long term, and across PostgreSQL versions. Thanks for any insights, --DD